mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 05:03:34 +08:00
ekf2: handle all time on delayed horizon (except for newest sample checks)
- a growing number of samples come into the backend with the time already delayed (sensor's interrupt setting timestamp sample) - if the incoming timestamp is already delayed then the new data checks (relative to latest IMU) can be slightly wrong - handle almost all timestamps and checks on delayed time horizon, except for explicit checks of new samples - isRecent() and isTimedOut() helpers use delayed time - add new isNewestSampleRecent() used for checking the incoming timestamp of the incoming (adjusted) data
This commit is contained in:
@@ -1006,7 +1006,7 @@ void Ekf::fixCovarianceErrors(bool force_symmetry)
|
||||
// record the pass/fail
|
||||
if (!bad_acc_bias) {
|
||||
_fault_status.flags.bad_acc_bias = false;
|
||||
_time_acc_bias_check = _time_last_imu;
|
||||
_time_acc_bias_check = _imu_sample_delayed.time_us;
|
||||
|
||||
} else {
|
||||
_fault_status.flags.bad_acc_bias = true;
|
||||
@@ -1018,7 +1018,7 @@ void Ekf::fixCovarianceErrors(bool force_symmetry)
|
||||
|
||||
P.uncorrelateCovariance<3>(13);
|
||||
|
||||
_time_acc_bias_check = _time_last_imu;
|
||||
_time_acc_bias_check = _imu_sample_delayed.time_us;
|
||||
_fault_status.flags.bad_acc_bias = false;
|
||||
_warning_events.flags.invalid_accel_bias_cov_reset = true;
|
||||
ECL_WARN("invalid accel bias - covariance reset");
|
||||
|
||||
Reference in New Issue
Block a user