Browse Source

Plane: 3of3 add loiter_xtrack option flag for post-loiter navigation

0 to crosstrack from center of waypoint, 1 to crosstrack from tangent exit location
master
Tom Pittenger 9 years ago
parent
commit
7af888633d
  1. 6
      ArduPlane/commands_logic.cpp

6
ArduPlane/commands_logic.cpp

@ -1027,7 +1027,11 @@ bool Plane::verify_loiter_heading(bool init) @@ -1027,7 +1027,11 @@ bool Plane::verify_loiter_heading(bool init)
if (labs(heading_err_cd) <= 1000 ||
loiter.sum_cd > loiter.total_cd) {
// Want to head in a straight line from _here_ to the next waypoint instead of center of loiter wp
next_WP_loc = current_loc;
// 0 to xtrack from center of waypoint, 1 to xtrack from tangent exit location
if (next_WP_loc.flags.loiter_xtrack) {
next_WP_loc = current_loc;
}
return true;
}
return false;

Loading…
Cancel
Save