mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 15:03:34 +08:00
ekf2: stop mag fusion when there is no data anymore
This commit is contained in:
@@ -107,6 +107,10 @@ void Ekf::controlMagFusion()
|
||||
_aid_src_mag.timestamp_sample = mag_sample.time_us;
|
||||
mag_observation.copyTo(_aid_src_mag.observation);
|
||||
mag_innov.copyTo(_aid_src_mag.innovation);
|
||||
|
||||
} else if (!isNewestSampleRecent(_time_last_mag_buffer_push, 2 * MAG_MAX_INTERVAL)) {
|
||||
// No data anymore. Stop until it comes back.
|
||||
stopMagFusion();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user