mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 06:03:34 +08:00
Navigator: Set altitude acceptance radius to infinity when moving to land point after transition (#24115)
* Navigator: set alt acceptance radius to infinity for land waypoint after backtransition -> avoid vehicle with depleted battery from not reaching the alt setpoint and getting stuck Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
@@ -155,6 +155,13 @@ void RtlMissionFastReverse::setActiveMissionItems()
|
||||
}
|
||||
|
||||
mission_item_to_position_setpoint(_mission_item, &pos_sp_triplet->current);
|
||||
const bool mc_landing_after_transition = _vehicle_status_sub.get().vehicle_type ==
|
||||
vehicle_status_s::VEHICLE_TYPE_ROTARY_WING && _vehicle_status_sub.get().is_vtol &&
|
||||
new_work_item_type == WorkItemType::WORK_ITEM_TYPE_MOVE_TO_LAND;
|
||||
|
||||
if (mc_landing_after_transition) {
|
||||
pos_sp_triplet->current.alt_acceptance_radius = FLT_MAX;
|
||||
}
|
||||
}
|
||||
|
||||
issue_command(_mission_item);
|
||||
|
||||
Reference in New Issue
Block a user