From fc9f532c34d3e90cd17e221d977befb6300cac61 Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Fri, 18 May 2018 12:50:31 +1000 Subject: [PATCH] EKF: relax range finder data continuity check --- EKF/terrain_estimator.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/EKF/terrain_estimator.cpp b/EKF/terrain_estimator.cpp index 2089316564..89c57ae999 100644 --- a/EKF/terrain_estimator.cpp +++ b/EKF/terrain_estimator.cpp @@ -201,7 +201,7 @@ void Ekf::get_hagl_innov_var(float *hagl_innov_var) // check that the range finder data is continuous void Ekf::checkRangeDataContinuity() { - // update range data continuous flag (1Hz ie 1000 ms) + // update range data continuous flag (1Hz ie 2000 ms) /* Timing in micro seconds */ /* Apply a 2.0 sec low pass filter to the time delta from the last range finder updates */ @@ -209,9 +209,9 @@ void Ekf::checkRangeDataContinuity() _dt_last_range_update_filt_us = _dt_last_range_update_filt_us * (1.0f - alpha) + alpha * (_time_last_imu - _time_last_range); - _dt_last_range_update_filt_us = fminf(_dt_last_range_update_filt_us, 2e6f); + _dt_last_range_update_filt_us = fminf(_dt_last_range_update_filt_us, 4e6f); - if (_dt_last_range_update_filt_us < 1e6f) { + if (_dt_last_range_update_filt_us < 2e6f) { _range_data_continuous = true; } else {