From cafb1400fb9e18fba6237e7a7c1d50551ebc4189 Mon Sep 17 00:00:00 2001 From: RomanBapst Date: Fri, 24 Jan 2020 14:53:30 +0300 Subject: [PATCH] estimator_interface: bugfix, set range sample correctly Signed-off-by: RomanBapst --- EKF/estimator_interface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EKF/estimator_interface.cpp b/EKF/estimator_interface.cpp index 502762c9a0..398e608dcf 100644 --- a/EKF/estimator_interface.cpp +++ b/EKF/estimator_interface.cpp @@ -328,7 +328,7 @@ void EstimatorInterface::setRangeData(const rangeSample& range_sample) if ((range_sample.time_us - _time_last_range) > _min_obs_interval_us) { _time_last_range = range_sample.time_us; - rangeSample range_sample_new; + rangeSample range_sample_new = range_sample; range_sample_new.time_us -= _params.range_delay_ms * 1000; range_sample_new.time_us -= FILTER_UPDATE_PERIOD_MS * 1000 / 2;