From ddc95227129185bf2fc3eed5c17f3b060dd840fd Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Wed, 6 Feb 2019 09:16:44 -0500 Subject: [PATCH] EKF2 always use IMU timestamp as now --- src/modules/ekf2/ekf2_main.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/modules/ekf2/ekf2_main.cpp b/src/modules/ekf2/ekf2_main.cpp index 09dc0cf6f1..e356949dd5 100644 --- a/src/modules/ekf2/ekf2_main.cpp +++ b/src/modules/ekf2/ekf2_main.cpp @@ -805,15 +805,7 @@ void Ekf2::run() imu_bias_reset_request = !_ekf.reset_imu_bias(); } - // in replay mode we are getting the actual timestamp from the sensor topic - hrt_abstime now = 0; - - if (_replay_mode) { - now = sensors.timestamp; - - } else { - now = hrt_absolute_time(); - } + const hrt_abstime now = sensors.timestamp; // push imu data into estimator float gyro_integral[3];