-
Notifications
You must be signed in to change notification settings - Fork 17.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: cope better with GPS jamming #24899
Conversation
8a22207
to
508a097
Compare
508a097
to
2eda514
Compare
2eda514
to
5807490
Compare
rebaed |
I think we should try and get this in the near-ish future. Certainly in enough time that it gets some testing before 4.5.0 beta testing. |
5807490
to
66e9000
Compare
@priseborough this is failing the dead-reckoning CI test. The EK3 position is resetting on loss of GPS for some reason. |
The underlying issue is that the EKF in the no airspeed sensor case is not fusing in a synthetic airspeed to constrain along track drift and is falling out of dead reckoning within a few seconds of GPS being lost. Setting FLIGHT_OPTIONS bit 7 will cause the EKF to use a default airspeed halfway between ARSPD_FBW_MAX and ARSPD_FBW_MIN which for SITL is between 30 and 10. I will see if I can adjust the SITL parameters so that the vehicle cruises at 20 m/s with no airspeed sensor and set that bit in FLIGHT_OPTIONS and get the dead reckoning working for the no airspeed sensor case. Edit: There is a bug in the logic that decides when to use a default or synthesised airspeed value that prevents either being used if there is an airspeed sensor fitted but its use is disabled. |
There are multiple contributing issues:
There were other issues found:
I am currently testing fixes for these and will submit a PR against the branch. |
rebased |
e4528bb
to
df8e53d
Compare
df8e53d
to
073d8c7
Compare
073d8c7
to
4691c8c
Compare
rebased and cleaned up AP_AHRS options handling code |
@priseborough the Deadreckoning test is failing in an interesting way: |
a8d14b1
to
27c9a6b
Compare
rebased on #25676 |
bf3aec6
to
686a340
Compare
No pressure but I wonder if we should try and include this in 4.5.0. |
7ce4165
to
ff5d31a
Compare
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.
Could we pull in this change to the new EK3_OPTIONS parameter descriptions? I'm sorry to be so persistent. https://github.com/rmackay9/rmackay9-ardupilot/commits/tridge-pr-ekf-gps-check-fix/
applied, sorry for being slow on this! |
…city error is bounded
These changes enable the EKF to use the last observable wind velocity vector estimate to synthesise an airspeed measurement if operating without an airspeed sensor and when all other measurement types that can constrain velocoty drift are lost. This enables the EKF to use dead reckoning to continue after loss of GPS when there is no air speed sensor fitted and without the need to set a default airspeed value. The logic used to fuse a default airspeed value has also been cleaned up and the call to FuseAirSpeed() from inside SelectBetaDragFusion() has been removed. AP_NavEKF3: Fix error in default airspeed observation variance AP_NavEKF3: Enable shadow fusion of airspeed when sensor is disabled
These changes prevent the EKF from consuming GPS data too soon when it is recovering from jamming if the EKF is able to navigate using dead reckoning.
Explicitly test time taken to reset to GPS loss and regain of lock for copter without and plane with dead reckoning assistance.
Make it user selectable. Remove potential for a race condition between decisions based on latest data and the EKF fusion processing which operates on a delayed time horizon. This is achieved by preventing data entering the buffer if awaiting checks to pass ensuring that no EKF fusion time horizon processes can use data that hasn't passed checks. Log the waitingForGpsChecks class variable
The previous method resulted in data incest and fusion of predicted airspeed on every EKF internal time step. This was not apparent during flight where the vehicle was turning, but during long straight legs did not constrain along track drift.
ff5d31a
to
bffbda2
Compare
yeah!! great to see this go in! |
This is a revival of #23010
re-opened so I can push to it to get it to pass CI