mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-06 19:00:27 +08:00
Sub: Support - AP_Math: Remove units on get_horizontal_distance
This commit is contained in:
committed by
Randy Mackay
parent
6d3bc4a5b5
commit
4819ea342a
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user