mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 02:33:34 +08:00
EKF : Fix divergence when optical flow is not fused for a long time (#503)
* terrain_estimator : guard against case where latest range sample is newer than IMU sample * EKF : control : correct detection of no optical flow fusion over a time period
This commit is contained in:
committed by
Paul Riseborough
parent
b861594d0b
commit
a7245229cb
@@ -206,7 +206,7 @@ void Ekf::checkRangeDataContinuity()
|
||||
/* Apply a 2.0 sec low pass filter to the time delta from the last range finder updates */
|
||||
float alpha = 0.5f * _dt_update;
|
||||
_dt_last_range_update_filt_us = _dt_last_range_update_filt_us * (1.0f - alpha) + alpha *
|
||||
(_time_last_imu - _time_last_range);
|
||||
(_imu_sample_delayed.time_us - _range_sample_delayed.time_us);
|
||||
|
||||
_dt_last_range_update_filt_us = fminf(_dt_last_range_update_filt_us, 4e6f);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user