mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 03:49:12 +08:00
mission landing abort: take min loiter alt above land point or current vehicle alt (remove arbitrary +20m)
This commit is contained in:
committed by
Daniel Agar
parent
0fc35ef082
commit
ed39eb4672
@@ -1443,11 +1443,9 @@ Mission::do_abort_landing()
|
|||||||
return;
|
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_landing = get_absolute_altitude_for_item(_mission_item);
|
||||||
const float alt_sp = math::max(alt_landing + _navigator->get_loiter_min_alt(),
|
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
|
// turn current landing waypoint into an indefinite loiter
|
||||||
_mission_item.nav_cmd = NAV_CMD_LOITER_UNLIMITED;
|
_mission_item.nav_cmd = NAV_CMD_LOITER_UNLIMITED;
|
||||||
|
|||||||
Reference in New Issue
Block a user