From 600240d95f6dc08f82e5310b13e9406c4df0f00f Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Wed, 20 May 2020 12:28:32 -0400 Subject: [PATCH] EKF: resetGpsAntYaw() fix double promotion --- EKF/gps_yaw_fusion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EKF/gps_yaw_fusion.cpp b/EKF/gps_yaw_fusion.cpp index fc99a51fe9..176569312d 100644 --- a/EKF/gps_yaw_fusion.cpp +++ b/EKF/gps_yaw_fusion.cpp @@ -313,7 +313,7 @@ bool Ekf::resetGpsAntYaw() // update the quaternion state estimates and corresponding covariances only if // the change in angle has been large or the yaw is not yet aligned - if(fabs(yaw_delta) > math::radians(15.0f) || !_control_status.flags.yaw_align) { + if(fabsf(yaw_delta) > math::radians(15.0f) || !_control_status.flags.yaw_align) { const float yaw_variance = sq(fmaxf(_params.mag_heading_noise, 1.0e-2f)); resetQuatStateYaw(measured_yaw, yaw_variance, true); }