-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
EKF: Enable compensation for static pressure positional error #7264
EKF: Enable compensation for static pressure positional error #7264
Conversation
@simonegu FYI |
I have created a documentation change request here: https://www.gitbook.com/book/px4/firmware-devguide/edit#/edit/changes/5/en/tutorials/tuning_the_ecl_ekf.md?_k=m2vp74 The relevant links to the code will be added when the PR is merged. |
a8a4f47
to
505eb32
Compare
a6393f3
to
cf566af
Compare
cf566af
to
be6ecb4
Compare
Rebase tested using replay of : http://logs.px4.io/plot_app?log=14dcf020-ac3c-4ee1-aa46-f171ea97f30f over a range of speed height and directions Stable wind estimates Specific force innovations Vertical position (baro) innovations |
The CI mavros test (which uses LPE) is failing for some unknown reason. Because it uses LPE it should not be affected by these changes. |
Jenkins test this please |
src/modules/ekf2/ekf2_main.cpp
Outdated
|
||
} else { | ||
ctrl_state.airspeed = sqrtf(v_n(0) * v_n(0) + v_n(1) * v_n(1) + v_n(2) * v_n(2)); | ||
ctrl_state.airspeed_valid = false; |
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.
Should it not be set to true? Same below.
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.
In these two cases we no longer know what the wind speed is, so the ground speed is used as a surrogate and the validity is set to false.
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.
Ok, it's just confusing if the value is set, but the valid flag is set to false. I'd add a comment, otherwise it's good to merge.
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.
Will do
Partially replaces #7252
Adds parameters required to activate and tune the EKF's wind estimator that is designed for use by multi-rotors. See Add wind estimation for multi-rotors PX4-ECL#261 for details
Adds functionality in ekf2_main enabling ekf wind speed estimates to be used to calculate an airspeed estimate.
Adds functionality and tuning parameters enabling the estimated wind relative speed to be rotated into body frame and combined with an elliptical model of baro positional error to compensate for baro height errors caused by change in pressure distribution around the body during flight.
Here are the baro innovations for a fast forward flight and stop maneouvre before the change. Note the gradual rise in innovations back to zero after the stop at 240 sec.

Here they are after. Note the immediate recovery of innovations.

A wiki entry will be added to provide tuning advice for the multi-rotor wind estimator and baro error correction.