Sub: Support - AP_Math: Remove units on get_horizontal_distance

This commit is contained in:
Leonard Hall
2025-07-17 09:12:37 +09:00
committed by Randy Mackay
parent 6d3bc4a5b5
commit 4819ea342a
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -208,7 +208,7 @@ void ModeAuto::auto_circle_movetoedge_start(const Location &circle_center, float
}
// if we are outside the circle, point at the edge, otherwise hold yaw
float dist_to_center = get_horizontal_distance_cm(inertial_nav.get_position_xy_cm().topostype(), sub.circle_nav.get_center_NEU_cm().xy());
float dist_to_center = get_horizontal_distance(inertial_nav.get_position_xy_cm().topostype(), sub.circle_nav.get_center_NEU_cm().xy());
if (dist_to_center > sub.circle_nav.get_radius_cm() && dist_to_center > 500) {
set_auto_yaw_mode(get_default_auto_yaw_mode(false));
} else {
+1 -1
View File
@@ -874,7 +874,7 @@ bool ModeGuided::guided_limit_check()
// check if we have gone beyond horizontal limit
if (guided_limit.horiz_max_cm > 0.0f) {
const float horiz_move = get_horizontal_distance_cm(guided_limit.start_pos.xy(), curr_pos.xy());
const float horiz_move = get_horizontal_distance(guided_limit.start_pos.xy(), curr_pos.xy());
if (horiz_move > guided_limit.horiz_max_cm) {
return true;
}