From 034ecf671e9c0c25eb0260aef3d643f618a5be88 Mon Sep 17 00:00:00 2001 From: dirksavage88 Date: Fri, 8 Nov 2024 08:36:19 -0500 Subject: [PATCH] fix to yaw offset naming Signed-off-by: dirksavage88 --- src/modules/ekf2/EKF2.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/ekf2/EKF2.cpp b/src/modules/ekf2/EKF2.cpp index f3590e3d4ced..a40289f7b340 100644 --- a/src/modules/ekf2/EKF2.cpp +++ b/src/modules/ekf2/EKF2.cpp @@ -2408,9 +2408,9 @@ void EKF2::UpdateGpsSample(ekf2_timestamps_s &ekf2_timestamps) if (fabsf(_param_ekf2_gps_yaw_off.get()) > 0.f) { if (!PX4_ISFINITE(vehicle_gps_position.heading_offset) && PX4_ISFINITE(vehicle_gps_position.heading)) { // Apply offset - float raw_yaw_offset = matrix::wrap_pi(math::radians(_param_ekf2_gps_yaw_off.get())); - vehicle_gps_position.heading_offset = raw_yaw_offset; - vehicle_gps_position.heading = matrix::wrap_pi(vehicle_gps_position.heading - raw_yaw_offset); + float yaw_offset = matrix::wrap_pi(math::radians(_param_ekf2_gps_yaw_off.get())); + vehicle_gps_position.heading_offset = yaw_offset; + vehicle_gps_position.heading = matrix::wrap_pi(vehicle_gps_position.heading - yaw_offset); } }