mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-14 14:43:34 +08:00
EKF: Prevent timestamp jitter failing GPS data arrival check (#462)
This fixes a error condition that occurs if _time_last_gps is greater than _time_last_imu. By checking time stamps at the fusion time horizon, we guarantee that this cannot happen because all observations must have a time stamp smaller or equal to _imu_sample_delayed.time_us before they are retrieved from the buffers.
This commit is contained in:
+1
-1
@@ -612,7 +612,7 @@ void Ekf::controlGpsFusion()
|
||||
_hvelInnovGate = fmaxf(_params.vel_innov_gate, 1.0f);
|
||||
}
|
||||
|
||||
} else if (_control_status.flags.gps && (_time_last_imu - _time_last_gps > (uint64_t)10e6)) {
|
||||
} else if (_control_status.flags.gps && (_imu_sample_delayed.time_us - _gps_sample_delayed.time_us > (uint64_t)10e6)) {
|
||||
_control_status.flags.gps = false;
|
||||
ECL_WARN("EKF GPS data stopped");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user