From ed39eb4672ca01d3336c3697354a0ad0b6174eae Mon Sep 17 00:00:00 2001 From: Thomas Stastny Date: Fri, 28 Oct 2022 23:09:37 +0200 Subject: [PATCH] mission landing abort: take min loiter alt above land point or current vehicle alt (remove arbitrary +20m) --- src/modules/navigator/mission.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/modules/navigator/mission.cpp b/src/modules/navigator/mission.cpp index 5e79bc205e..ddbee0c64b 100644 --- a/src/modules/navigator/mission.cpp +++ b/src/modules/navigator/mission.cpp @@ -1443,11 +1443,9 @@ Mission::do_abort_landing() return; } - // loiter at the larger of MIS_LTRMIN_ALT above the landing point - // or 2 * FW_CLMBOUT_DIFF above the current altitude const float alt_landing = get_absolute_altitude_for_item(_mission_item); const float alt_sp = math::max(alt_landing + _navigator->get_loiter_min_alt(), - _navigator->get_global_position()->alt + 20.0f); + _navigator->get_global_position()->alt); // turn current landing waypoint into an indefinite loiter _mission_item.nav_cmd = NAV_CMD_LOITER_UNLIMITED;