Skip to content

Commit

Permalink
Sub: auto integrates get-closest-point-on-edge dist
Browse files Browse the repository at this point in the history
  • Loading branch information
rmackay9 committed Sep 11, 2024
1 parent fd97f33 commit c48de9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ArduSub/mode_auto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ void ModeAuto::auto_circle_movetoedge_start(const Location &circle_center, float

// check our distance from edge of circle
Vector3f circle_edge_neu;
sub.circle_nav.get_closest_point_on_circle(circle_edge_neu);
float dist_to_edge = (inertial_nav.get_position_neu_cm() - circle_edge_neu).length();
float dist_to_edge;
sub.circle_nav.get_closest_point_on_circle(circle_edge_neu, dist_to_edge);

// if more than 3m then fly to edge
if (dist_to_edge > 300.0f) {
Expand Down

0 comments on commit c48de9d

Please sign in to comment.