From eb52f7c4106581689fa812f53274de14a823d3aa Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Mon, 3 Sep 2018 09:25:19 +1000 Subject: [PATCH] EKF: Remove implicit conversion and use single precision trig operator Double precision accuracy is not required for this operation. --- EKF/gps_yaw_fusion.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EKF/gps_yaw_fusion.cpp b/EKF/gps_yaw_fusion.cpp index da60b57538..8a2a3cc601 100644 --- a/EKF/gps_yaw_fusion.cpp +++ b/EKF/gps_yaw_fusion.cpp @@ -76,8 +76,8 @@ void Ekf::fuseGpsAntYaw() predicted_hdg = atan2f(ant_vec_ef(1),ant_vec_ef(0)); // calculate observation jacobian - float t2 = sin(_gps_yaw_offset); - float t3 = cos(_gps_yaw_offset); + float t2 = sinf(_gps_yaw_offset); + float t3 = cosf(_gps_yaw_offset); float t4 = q0*q3*2.0f; float t5 = q0*q0; float t6 = q1*q1;