mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 19:33:34 +08:00
Navigator: Use maximum flight altitude to limit missions
This change limits all mission items to the maximum flight altitude. The mission will still be executed and flown, but the vehicle will never exceed the mission altitude. This ensures the vehicle can always reach the mission items. Wether or not the entire mission should be rejected if it falls outside of the fenced area is enforced in the mission feasibility checker function.
This commit is contained in:
@@ -361,6 +361,7 @@ void FollowTarget::update_position_sp(bool use_velocity, bool use_position, floa
|
||||
|
||||
pos_sp_triplet->previous.valid = use_position;
|
||||
pos_sp_triplet->previous = pos_sp_triplet->current;
|
||||
mission_apply_limitation(&_mission_item);
|
||||
mission_item_to_position_setpoint(_mission_item, &pos_sp_triplet->current);
|
||||
pos_sp_triplet->current.type = position_setpoint_s::SETPOINT_TYPE_FOLLOW_TARGET;
|
||||
pos_sp_triplet->current.position_valid = use_position;
|
||||
|
||||
Reference in New Issue
Block a user