mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 04:23:33 +08:00
mag_fusion: re-introduce delay between mag reset and fusion, this was
dropped during the mag fusion refactor PR #662
This commit is contained in:
+3
-1
@@ -170,7 +170,9 @@ void Ekf::fuseMag()
|
||||
return;
|
||||
}
|
||||
|
||||
bool update_all_states = !_flt_mag_align_converging;
|
||||
// For the first few seconds after in-flight alignment we allow the magnetic field state estimates to stabilise
|
||||
// before they are used to constrain heading drift
|
||||
const bool update_all_states = ((_imu_sample_delayed.time_us - _flt_mag_align_start_time) > (uint64_t)5e6);
|
||||
|
||||
// update the states and covariance using sequential fusion of the magnetometer components
|
||||
for (uint8_t index = 0; index <= 2; index++) {
|
||||
|
||||
Reference in New Issue
Block a user