estimator_interface: bugfix, set range sample correctly

Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
RomanBapst 2020-01-24 14:53:30 +03:00 committed by Mathieu Bresciani
parent df37c9bf1d
commit cafb1400fb
1 changed files with 1 additions and 1 deletions

View File

@ -328,7 +328,7 @@ void EstimatorInterface::setRangeData(const rangeSample& range_sample)
if ((range_sample.time_us - _time_last_range) > _min_obs_interval_us) { if ((range_sample.time_us - _time_last_range) > _min_obs_interval_us) {
_time_last_range = range_sample.time_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 -= _params.range_delay_ms * 1000;
range_sample_new.time_us -= FILTER_UPDATE_PERIOD_MS * 1000 / 2; range_sample_new.time_us -= FILTER_UPDATE_PERIOD_MS * 1000 / 2;