From 5dff32422d7d968a3cbb6510ae6c0a6e13c3688a Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 12 Feb 2021 08:34:38 +1100 Subject: [PATCH] AP_NavEKF2: remove separate calls to get delta-times for vel and ang --- libraries/AP_NavEKF2/AP_NavEKF2_Measurements.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/AP_NavEKF2/AP_NavEKF2_Measurements.cpp b/libraries/AP_NavEKF2/AP_NavEKF2_Measurements.cpp index d137fde1d7..a42c239c40 100644 --- a/libraries/AP_NavEKF2/AP_NavEKF2_Measurements.cpp +++ b/libraries/AP_NavEKF2/AP_NavEKF2_Measurements.cpp @@ -475,8 +475,8 @@ bool NavEKF2_core::readDeltaVelocity(uint8_t ins_index, Vector3f &dVel, float &d const auto &ins = dal.ins(); if (ins_index < ins.get_accel_count()) { - ins.get_delta_velocity(ins_index,dVel); - dVel_dt = MAX(ins.get_delta_velocity_dt(ins_index),1.0e-4f); + ins.get_delta_velocity(ins_index,dVel, dVel_dt); + dVel_dt = MAX(dVel_dt,1.0e-4f); dVel_dt = MIN(dVel_dt,1.0e-1f); return true; } @@ -647,8 +647,8 @@ bool NavEKF2_core::readDeltaAngle(uint8_t ins_index, Vector3f &dAng, float &dAng const auto &ins = dal.ins(); if (ins_index < ins.get_gyro_count()) { - ins.get_delta_angle(ins_index,dAng); - dAng_dt = MAX(ins.get_delta_angle_dt(ins_index),1.0e-4f); + ins.get_delta_angle(ins_index, dAng, dAng_dt); + dAng_dt = MAX(dAng_dt,1.0e-4f); dAng_dt = MIN(dAng_dt,1.0e-1f); return true; }