Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDP3x Airspeed Correction #8242

Merged
merged 7 commits into from
Nov 23, 2017
Merged

SDP3x Airspeed Correction #8242

merged 7 commits into from
Nov 23, 2017

Conversation

acfloria
Copy link
Member

@acfloria acfloria commented Nov 6, 2017

  • Update the model for the airspeed correction provided by sensirion.

  • Add a pressure drop compensation which can be used for other pitot configurations than the standard drotek one.

  • Remove the ets_airspeed driver from px4fmu-v2_default

I did test flights with a membrane based sensor, our custom pitot tube and the drotek pitot tube. During the flights I mainly did loitering with different airspeeds. If the airspeed has an offset then the wind will have an oscillation with the loitering frequency.

Wind estimate for the membrane based sensor:
membrane

Wind estimate for the drotek pitot tube:
drotek

Wind estimate for our custom pitot tube:
custom

Based on the wind plots I would say the airspeed is still by about 0.2 to 0.4 m/s off but this can be compensated by fine tuning the parameters.

case AIRSPEED_COMPENSATION_MODEL_NO_PITOT: {
const double dp_corr = (double)dp * 96600.0 / (double)pressure_ambient;
// flow through sensor
double flow_SDP33 = (300.805 - 300.878 / (0.00344205 * pow(dp_corr, 0.68698) + 1)) * 1.29 / rho_air;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we actually need double precision?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure, but I will check it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it and did a test flight with it. I saw no issue so it should be fine.

@dagar dagar added this to the Release v1.7.0 milestone Nov 22, 2017
@dagar
Copy link
Member

dagar commented Nov 22, 2017

The timing isn't ideal, but we should consider getting this in for v1.7.0 (the first stable release that supports the sdp3x). Otherwise bringing this in later will break existing setups, not to mention I already see people independently discovering problems when swapping out the pitot tube.

@LorenzMeier
Copy link
Member

Let's get it in!

@supergra
Copy link
Contributor

What units should CAL_AIR_TUBELEN be given in?

The parameter reference states "meters", and none of the code indicates anything otherwise. I don't see a conversion.

However, the python code above is clearly saying that it's in mm, and the equations look identical to what's in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants