Skip to content
Snippets Groups Projects
Commit 53caf9ee authored by Michael Day's avatar Michael Day
Browse files

Plane: decrease heading tolerance when leaving loiter waypoint. Improves

autoland

This changes the heading tolerance when leaving a loiter waypoint and
tyring to maintain a heading towards the next waypoint from 20 degrees
(+/- 10) to 6 degrees (+/-).  This results in a much more reliable
landing approach as the plane is more likely to line up with a runway.
parent 5464f0dc
No related branches found
No related tags found
No related merge requests found
......@@ -1026,13 +1026,13 @@ bool Plane::verify_loiter_heading(bool init)
/*
Check to see if the the plane is heading toward the land
waypoint. We use 20 degrees (+/-10 deg) of margin so that
we can handle 200 degrees/second of yaw. Allow turn count
waypoint. We use 6 degrees (+/-3 deg) of margin so that
we can handle xxx degrees/second of yaw. Allow turn count
to stop it too to ensure we don't loop around forever in
case high winds are forcing us beyond 200 deg/sec at this
particular moment.
*/
if (labs(heading_err_cd) <= 1000 ||
if (labs(heading_err_cd) <= 300 ||
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment