|
|
|
@ -798,7 +798,7 @@ void Plane::update_navigation()
@@ -798,7 +798,7 @@ void Plane::update_navigation()
|
|
|
|
|
set_mode(QRTL, MODE_REASON_UNKNOWN); |
|
|
|
|
break; |
|
|
|
|
} else if (g.rtl_autoland == 1 && |
|
|
|
|
!landing.checked_for_autoland && |
|
|
|
|
!auto_state.checked_for_autoland && |
|
|
|
|
reached_loiter_target() &&
|
|
|
|
|
labs(altitude_error_cm) < 1000) { |
|
|
|
|
// we've reached the RTL point, see if we have a landing sequence
|
|
|
|
@ -809,10 +809,10 @@ void Plane::update_navigation()
@@ -809,10 +809,10 @@ void Plane::update_navigation()
|
|
|
|
|
|
|
|
|
|
// prevent running the expensive jump_to_landing_sequence
|
|
|
|
|
// on every loop
|
|
|
|
|
landing.checked_for_autoland = true; |
|
|
|
|
auto_state.checked_for_autoland = true; |
|
|
|
|
} |
|
|
|
|
else if (g.rtl_autoland == 2 && |
|
|
|
|
!landing.checked_for_autoland) { |
|
|
|
|
!auto_state.checked_for_autoland) { |
|
|
|
|
// Go directly to the landing sequence
|
|
|
|
|
if (landing.jump_to_landing_sequence()) { |
|
|
|
|
// switch from RTL -> AUTO
|
|
|
|
@ -821,7 +821,7 @@ void Plane::update_navigation()
@@ -821,7 +821,7 @@ void Plane::update_navigation()
|
|
|
|
|
|
|
|
|
|
// prevent running the expensive jump_to_landing_sequence
|
|
|
|
|
// on every loop
|
|
|
|
|
landing.checked_for_autoland = true; |
|
|
|
|
auto_state.checked_for_autoland = true; |
|
|
|
|
} |
|
|
|
|
radius = abs(g.rtl_radius); |
|
|
|
|
if (radius > 0) { |
|
|
|
|