diff --git a/ArduSub/mode_auto.cpp b/ArduSub/mode_auto.cpp index 1f0a4331acf..70d3881fe7f 100644 --- a/ArduSub/mode_auto.cpp +++ b/ArduSub/mode_auto.cpp @@ -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 { diff --git a/ArduSub/mode_guided.cpp b/ArduSub/mode_guided.cpp index 908898557f9..72561906878 100644 --- a/ArduSub/mode_guided.cpp +++ b/ArduSub/mode_guided.cpp @@ -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; }