The RTL docs say the vehicle will first rise by at least RTL_CLIMB_MIN or to RTL_ALT_M, whichever is higher, before returning home.
The docs already describe the RTL_CONE_SLOPE exception, but I could not find a note about altitude fence limits also affecting RTL return altitude.
In ModeRTL::compute_return_target(), the code appears to:
- compute the RTL target altitude from current altitude, RTL_CLIMB_MIN, and RTL_ALT
- apply RTL_CONE_SLOPE if enabled
- then, if
AC_FENCE_TYPE_ALT_MAX is enabled, clip the return target altitude again using the fence safe max altitude
Relevant docs:
Relevant code:
It seems the RTL docs may need a short note that an enabled altitude fence can further cap the RTL climb/return altitude. The corresponding PR is attached below.
The RTL docs say the vehicle will first rise by at least RTL_CLIMB_MIN or to RTL_ALT_M, whichever is higher, before returning home.
The docs already describe the RTL_CONE_SLOPE exception, but I could not find a note about altitude fence limits also affecting RTL return altitude.
In
ModeRTL::compute_return_target(), the code appears to:AC_FENCE_TYPE_ALT_MAXis enabled, clip the return target altitude again using the fence safe max altitudeRelevant docs:
Relevant code:
It seems the RTL docs may need a short note that an enabled altitude fence can further cap the RTL climb/return altitude. The corresponding PR is attached below.