From 84e78f5a160ffb6558fac155fab51128003b80cd Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 6 Jun 2024 20:56:27 +1000 Subject: [PATCH 1/2] AP_AHRS: clarify frame of get_location_from_origin_offset ... by renaming it get_location_from_origin_offset_NED --- libraries/AP_AHRS/AP_AHRS.cpp | 4 ++-- libraries/AP_AHRS/AP_AHRS.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/AP_AHRS/AP_AHRS.cpp b/libraries/AP_AHRS/AP_AHRS.cpp index 454bf0203e1fa..8b7c1faa0cadd 100644 --- a/libraries/AP_AHRS/AP_AHRS.cpp +++ b/libraries/AP_AHRS/AP_AHRS.cpp @@ -3536,7 +3536,7 @@ bool AP_AHRS::get_velocity_NED(Vector3f &vec) const // return location corresponding to vector relative to the // vehicle's origin -bool AP_AHRS::get_location_from_origin_offset(Location &loc, const Vector3p &offset_ned) const +bool AP_AHRS::get_location_from_origin_offset_NED(Location &loc, const Vector3p &offset_ned) const { if (!get_origin(loc)) { return false; @@ -3548,7 +3548,7 @@ bool AP_AHRS::get_location_from_origin_offset(Location &loc, const Vector3p &off // return location corresponding to vector relative to the // vehicle's home location -bool AP_AHRS::get_location_from_home_offset(Location &loc, const Vector3p &offset_ned) const +bool AP_AHRS::get_location_from_home_offset_NED(Location &loc, const Vector3p &offset_ned) const { if (!home_is_set()) { return false; diff --git a/libraries/AP_AHRS/AP_AHRS.h b/libraries/AP_AHRS/AP_AHRS.h index d71912c9f58e1..16ec1009e03bf 100644 --- a/libraries/AP_AHRS/AP_AHRS.h +++ b/libraries/AP_AHRS/AP_AHRS.h @@ -277,8 +277,8 @@ class AP_AHRS { // return location corresponding to vector relative to the // vehicle's origin - bool get_location_from_origin_offset(Location &loc, const Vector3p &offset_ned) const WARN_IF_UNUSED; - bool get_location_from_home_offset(Location &loc, const Vector3p &offset_ned) const WARN_IF_UNUSED; + bool get_location_from_origin_offset_NED(Location &loc, const Vector3p &offset_ned) const WARN_IF_UNUSED; + bool get_location_from_home_offset_NED(Location &loc, const Vector3p &offset_ned) const WARN_IF_UNUSED; // Get a derivative of the vertical position in m/s which is kinematically consistent with the vertical position is required by some control loops. // This is different to the vertical velocity from the EKF which is not always consistent with the vertical position due to the various errors that are being corrected for. From 77fa5d78cad84104ea0c84f07ba82434abd0b3e5 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 6 Jun 2024 20:56:27 +1000 Subject: [PATCH 2/2] ArduCopter: clarify frame of get_location_from_origin_offset ... by renaming it get_location_from_origin_offset_NED --- ArduCopter/mode_circle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArduCopter/mode_circle.cpp b/ArduCopter/mode_circle.cpp index bb9a6612f948c..8e206845f2f97 100644 --- a/ArduCopter/mode_circle.cpp +++ b/ArduCopter/mode_circle.cpp @@ -28,7 +28,7 @@ bool ModeCircle::init(bool ignore_checks) if (copter.circle_nav->roi_at_center()) { const Vector3p &pos { copter.circle_nav->get_center() }; Location circle_center; - if (!AP::ahrs().get_location_from_origin_offset(circle_center, pos * 0.01)) { + if (!AP::ahrs().get_location_from_origin_offset_NED(circle_center, pos * 0.01)) { return false; } // point at the ground: