mag fusion: improve on ground forced mag fusion logic

While a yaw test ration > 1 rejects the mag data in air, the fusion is
forced with a limited innovation on ground to fix gyro bias and local
magnetic effects problems pre-takeoff. However, the same logic is
applied after landing and immediately after the land detector detects
landing. In some cases, this can disturb the other EKF states which can
lead to a state change of the land detector.
To avoid such a loop, the start of this forced yaw fusion is delayed by
5 seconds after landing.
This commit is contained in:
bresch
2021-02-16 15:01:25 +01:00
committed by Mathieu Bresciani
parent 310f415175
commit b00d4a9237
3 changed files with 11 additions and 5 deletions
+3
View File
@@ -601,6 +601,9 @@ void Ekf::controlGpsFusion()
if (!_control_status.flags.in_air) {
_time_last_on_ground_us = _time_last_imu;
} else {
_time_last_in_air = _time_last_imu;
}
const bool recent_takeoff_nav_failure = _control_status.flags.in_air &&