-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
Conversation
Update the model for the standard configuration based on the model from Sensirion and add also an option to do the tube pressure loss correction from Sensirion for other configurations.
src/modules/systemlib/airspeed.c
Outdated
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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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. |
Let's get it in! |
What units should 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. |
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:
Wind estimate for the drotek pitot tube:
Wind estimate for our custom pitot tube:
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.