From 0509f612ddad05f3ad5653cb3aabf0d9cc2a8113 Mon Sep 17 00:00:00 2001 From: bresch Date: Tue, 3 Jan 2023 10:03:46 +0100 Subject: [PATCH] ekf2: fix drag data downsampling setDragData needs the imu data at full speed to downsample it without skipping samples. --- src/modules/ekf2/EKF/estimator_interface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/ekf2/EKF/estimator_interface.cpp b/src/modules/ekf2/EKF/estimator_interface.cpp index ff737c64e1..26e21148c3 100644 --- a/src/modules/ekf2/EKF/estimator_interface.cpp +++ b/src/modules/ekf2/EKF/estimator_interface.cpp @@ -86,9 +86,9 @@ void EstimatorInterface::setIMUData(const imuSample &imu_sample) // calculate the minimum interval between observations required to guarantee no loss of data // this will occur if data is overwritten before its time stamp falls behind the fusion time horizon _min_obs_interval_us = (imu_sample.time_us - _imu_sample_delayed.time_us) / (_obs_buffer_length - 1); - - setDragData(imu_sample); } + + setDragData(imu_sample); } void EstimatorInterface::setMagData(const magSample &mag_sample)