mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 08:21:37 +08:00
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:
committed by
Mathieu Bresciani
parent
310f415175
commit
b00d4a9237
@@ -959,7 +959,8 @@ private:
|
||||
EKFGSF_yaw _yawEstimator;
|
||||
|
||||
int64_t _ekfgsf_yaw_reset_time{0}; ///< timestamp of last emergency yaw reset (uSec)
|
||||
uint64_t _time_last_on_ground_us{0}; ///< last tine we were on the ground (uSec)
|
||||
uint64_t _time_last_on_ground_us{0}; ///< last time we were on the ground (uSec)
|
||||
uint64_t _time_last_in_air{0}; ///< last time we were in air (uSec)
|
||||
bool _do_ekfgsf_yaw_reset{false}; // true when an emergency yaw reset has been requested
|
||||
uint8_t _ekfgsf_yaw_reset_count{0}; // number of times the yaw has been reset to the EKF-GSF estimate
|
||||
|
||||
|
||||
Reference in New Issue
Block a user