mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 18:08:30 -04:00
Copter: get_RTL_alt returns alt above home
This commit is contained in:
parent
fb7e75594f
commit
fb96335b46
@ -394,7 +394,7 @@ static float get_RTL_alt()
|
|||||||
#if AC_FENCE == ENABLED
|
#if AC_FENCE == ENABLED
|
||||||
// ensure not above fence altitude if alt fence is enabled
|
// ensure not above fence altitude if alt fence is enabled
|
||||||
if ((fence.get_enabled_fences() & AC_FENCE_TYPE_ALT_MAX) != 0) {
|
if ((fence.get_enabled_fences() & AC_FENCE_TYPE_ALT_MAX) != 0) {
|
||||||
rtl_alt = min(rtl_alt, pv_alt_above_origin(fence.get_safe_alt()*100.0f));
|
rtl_alt = min(rtl_alt, fence.get_safe_alt()*100.0f);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user