Skip to content
Snippets Groups Projects
Commit 8567e3b9 authored by Daniel Agar's avatar Daniel Agar
Browse files

RTL fix RTL_LAND_DELAY check and simplify logic

parent 9439eaa5
No related branches found
No related tags found
No related merge requests found
......@@ -48,6 +48,8 @@
using math::max;
using math::min;
static constexpr float DELAY_SIGMA = 0.01f;
RTL::RTL(Navigator *navigator, const char *name) :
MissionBlock(navigator, name),
_param_return_alt(this, "RTL_RETURN_ALT", false),
......@@ -305,7 +307,7 @@ RTL::advance_rtl()
case RTL_STATE_DESCEND:
/* only go to land if autoland is enabled */
if (_param_land_delay.get() > FLT_EPSILON) {
if (_param_land_delay.get() < -DELAY_SIGMA || _param_land_delay.get() > DELAY_SIGMA) {
_rtl_state = RTL_STATE_LOITER;
} else {
......
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