-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
AP_NavEKF3 Prevent rejection of airspeed when dead reckoning #23999
base: master
Are you sure you want to change the base?
Conversation
@priseborough looks good to me. It is marked as WIP, do you want me to do some testing? I double deliberately adjust ARSPD_RATIO on my quadplane or SITL to test |
d03de27
to
145d703
Compare
I'm investigating a potential issue arising from SITL testing where setting ARSPD_RATIO to 1.5 during dead reckoning to simulate partially blocked airspeed sensor resulted in a larger than expected loss of navigation performance after a few minutes. I may have to increase the observation noise variance in addition to clipping the innovation. |
I completed the following SITL test cases:
The following map shows the period of time from disabling of GPS until wind speed change is reverted. The estimated position drifts upwind at a rate consistent with the change in wind speed. 2023-06-25 09:39:40.379 SIM_GPS_DISABLE 0.000000 -> 1.000000 Airspeed innovations spike and then decay to zero
The first test with a zero wind speed behaved as expected. 2023-06-25 09:45:46.639 ARSPD_RATIO 2.000000 -> 1.500000 The GPS was then re-enabled, wind speed increased and GPS disabled after allowing sufficient time for the wind speed to be learned 2023-06-25 09:50:27.879 SIM_GPS_DISABLE 1.000000 -> 0.000000 A partial blockage of the airspeed sensor was then simulated 2023-06-25 09:57:11.879 ARSPD_RATIO 2.000000 -> 1.500000 The effect of a scale factor error on teh wind relative speed is to skew the trajectory. When the partial blockage was removed, the navigation performance was poor with velocity errors that prevented the vehicle from following a circular orbit. Here is the EKF's estimated velocity vs the GPS velocity in the north and east directions from when the airspeed scale factor was reduced, then restored then through to when GPS was re-enabled. The speed error is within expected bounds given the airspeed estimation error of 4 m/s There is a build up in yaw and course angle error. This testing shows there is a EKF3 vulnerability to the combination of GPS loss, wind and large airspeed sensor errors which result in a yaw angle offset. The following patches were evaluated to see if yaw and ground course angle errors could be reduced.
These changes were evaluated by replaying the SITL test log. Patch 1. did not noticeably reduce ground course angle error when dead reckoning in wind with the -25% airspeed scale factor error. Patches 1 and 2 slightly reduced ground course angle error: Patches 1,2 and 3 slightly reduced ground course angle error: Looking at yaw angle estimation error across all tests: Patch 1 only makes no difference because the airspeed innovation test limit is not being exceeded. Patches 1 & 2 significantly reduced yaw angle estimation error There was some transient wind speed estimation error Patches 1, 2 & 3 further reduced yaw angle estimation error. I'll continue the testing and provide updated patches if required. We will need to accept the inherent limitations associated with use of airspeed sensor relative navigation and importance of sensor calibration. |
b400939
to
0444436
Compare
0eac1d7
to
b931792
Compare
b931792
to
c5782cd
Compare
c5782cd
to
031de06
Compare
When flying a plane without GPS, gusts or transiting through wind shear layers can cause the airspeed measurement to fail consistency checks and be rejected which can result in a fall-back to a non-navigating state. This patch correct this behaviour by clipping the innovations instead of rejecting the airspeed measurement when the EKF is dead reckoning.