From a9ad30dbf9e6b4bd4f6fa14bd9cfeb644c96d92d Mon Sep 17 00:00:00 2001 From: Hunter McClelland Date: Wed, 22 Apr 2026 20:14:53 -0400 Subject: [PATCH] AC_WPNav: Fix sign mistake in a sub-part of BendyRulerHorizontal --- libraries/AC_WPNav/AC_WPNav_OA.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AC_WPNav/AC_WPNav_OA.cpp b/libraries/AC_WPNav/AC_WPNav_OA.cpp index 463462145ff..2de6b687345 100644 --- a/libraries/AC_WPNav/AC_WPNav_OA.cpp +++ b/libraries/AC_WPNav/AC_WPNav_OA.cpp @@ -242,7 +242,7 @@ bool AC_WPNav_OA::update_wpnav() return false; } - // Convert global destination to NEU vector and pass directly to position controller + // Convert global destination to NED vector and pass directly to position controller Vector2f destination_ne_m; if (!_oa_destination.get_vector_xy_from_origin_NE_m(destination_ne_m)) { // this should never happen because we can only get here if we have an EKF origin @@ -251,7 +251,7 @@ bool AC_WPNav_OA::update_wpnav() } float target_alt_loc_alt_m = 0; UNUSED_RESULT(target_alt_loc.get_alt_m(target_alt_loc.get_alt_frame(), target_alt_loc_alt_m)); - Vector3p destination_ned_m{destination_ne_m.x, destination_ne_m.y, target_alt_loc_alt_m}; + Vector3p destination_ned_m{destination_ne_m.x, destination_ne_m.y, -target_alt_loc_alt_m}; // pass the desired position directly to the position controller _pos_control.input_pos_NED_m(destination_ned_m, terrain_d_m, 10.0);