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:
bresch
2020-01-15 14:40:06 +11:00
committed by Paul Riseborough
parent 250d5b8acc
commit d0fe1f032a
2 changed files with 3 additions and 2 deletions
+3 -1
View File
@@ -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++) {