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
Reduce vulnerability of EKF-GSF yaw estimator to GPS glitches #15819
Reduce vulnerability of EKF-GSF yaw estimator to GPS glitches #15819
Conversation
Only apply to non fly forward vehicle, eg copters, because magnitude of velocity innovation produced by plane launches is TBD.
Only apply to non fly forward vehicle, eg copters, because magnitude of velocity innovation produced by plane launches is TBD.
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.
Looks good! thanks for fixing this Paul. Grant and I will fly the changes soon
Testing after rebase on #15820 and running with the --force-ekf2 option to enable ekf2 use showed that the emergency yaw reset did not occur for the EKF2 instance: TOGCS: EKF3 IMU0 buffs IMU=19 OBS=7 OF=17 EN:17 dt=0.0120 |
Sorry to be a nag but I really would like it if we could avoid any EKF3 changes that conflict with my ekf pos source PR. I understand this is an important fix but the issue has been there for a while and so I'm a little confused as to why this went in first. |
because it is a "fly into a tree if you have a M6 GPS". I thought it was important to get the fix in soon. |
Improves behaviour reported here #15813
Replay of log provided with issue shows the EKF-GSF stops updating its yaw estimate during a higher period of reported GPS velocity error and resets the yaw estimation when the glitch finishes:
Before:
After:
GPS reported velocity accuracy:
The second layer of protection added is use of a velocity innovation magnitude from the bank of EKF's in the yaw estimator that is obtained using the same weightings that are used to derive the yaw estimate. For operation with non fly forward vehicle types, this needs to be below 2 m/s which has been set to be just over the value achieved by this log with noisy GPS when not glitching, eg:
Checking another copter log with a good GPS and where yaw was aligned by flying away from the pilot shows that a value of below 1.0 is achieved during the initial convergence, so the value of 2 will be OK for now and can be adjusted later.
TODO: testing of EKF2 changes.