From 19b6cebce3d6ddfd5c7553c19047e35cb3ecc059 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sun, 4 May 2025 09:29:40 +1000 Subject: [PATCH] Rover: rename get_relative_position_NED_origin methods to include 'float' can't have both postype and these methods, something has to shift names --- Rover/mode_circle.cpp | 8 ++++---- Rover/mode_dock.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Rover/mode_circle.cpp b/Rover/mode_circle.cpp index da4ce7f64a6..71f65193575 100644 --- a/Rover/mode_circle.cpp +++ b/Rover/mode_circle.cpp @@ -82,7 +82,7 @@ bool ModeCircle::set_center(const Location& center_loc, float radius_m, bool dir bool ModeCircle::_enter() { // capture starting point and yaw - if (!AP::ahrs().get_relative_position_NE_origin(config.center_pos)) { + if (!AP::ahrs().get_relative_position_NE_origin_float(config.center_pos)) { return false; } config.radius = MAX(fabsf(radius), AR_CIRCLE_RADIUS_MIN); @@ -129,7 +129,7 @@ void ModeCircle::init_target_yaw_rad() { // if no position estimate use vehicle yaw Vector2f curr_pos_NE; - if (!AP::ahrs().get_relative_position_NE_origin(curr_pos_NE)) { + if (!AP::ahrs().get_relative_position_NE_origin_float(curr_pos_NE)) { target.yaw_rad = AP::ahrs().get_yaw(); return; } @@ -150,7 +150,7 @@ void ModeCircle::update() { // get current position Vector2f curr_pos; - const bool position_ok = AP::ahrs().get_relative_position_NE_origin(curr_pos); + const bool position_ok = AP::ahrs().get_relative_position_NE_origin_float(curr_pos); // if no position estimate stop vehicle if (!position_ok) { @@ -242,7 +242,7 @@ void ModeCircle::update_circling() float ModeCircle::wp_bearing() const { Vector2f curr_pos_NE; - if (!AP::ahrs().get_relative_position_NE_origin(curr_pos_NE)) { + if (!AP::ahrs().get_relative_position_NE_origin_float(curr_pos_NE)) { return 0; } // calc vector from circle center to vehicle diff --git a/Rover/mode_dock.cpp b/Rover/mode_dock.cpp index 52de65a55f4..e89071414e1 100644 --- a/Rover/mode_dock.cpp +++ b/Rover/mode_dock.cpp @@ -248,7 +248,7 @@ float ModeDock::apply_slowdown(float desired_speed) // we can calculate it based on most recent value from precland because the dock is assumed stationary wrt ekf origin bool ModeDock::calc_dock_pos_rel_vehicle_NE(Vector2f &dock_pos_rel_vehicle) const { Vector2f current_pos_m; - if (!AP::ahrs().get_relative_position_NE_origin(current_pos_m)) { + if (!AP::ahrs().get_relative_position_NE_origin_float(current_pos_m)) { return false; }