mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 09:33:33 +08:00
mission_base: make sure all mission_items during landing phase have yaw set to NaN
This commit is contained in:
@@ -566,6 +566,13 @@ void MissionBase::handleLanding(WorkItemType &new_work_item_type, mission_item_s
|
||||
(_mission_item.nav_cmd == NAV_CMD_VTOL_LAND) &&
|
||||
!_land_detected_sub.get().landed;
|
||||
|
||||
/* ignore yaw for landing items */
|
||||
/* XXX: if specified heading for landing is desired we could add another step before the descent
|
||||
* that aligns the vehicle first */
|
||||
if (_mission_item.nav_cmd == NAV_CMD_LAND || _mission_item.nav_cmd == NAV_CMD_VTOL_LAND) {
|
||||
_mission_item.yaw = NAN;
|
||||
}
|
||||
|
||||
/* move to land wp as fixed wing */
|
||||
if (needs_vtol_landing) {
|
||||
if (_work_item_type == WorkItemType::WORK_ITEM_TYPE_DEFAULT) {
|
||||
@@ -654,13 +661,6 @@ void MissionBase::handleLanding(WorkItemType &new_work_item_type, mission_item_s
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ignore yaw for landing items */
|
||||
/* XXX: if specified heading for landing is desired we could add another step before the descent
|
||||
* that aligns the vehicle first */
|
||||
if (_mission_item.nav_cmd == NAV_CMD_LAND || _mission_item.nav_cmd == NAV_CMD_VTOL_LAND) {
|
||||
_mission_item.yaw = NAN;
|
||||
}
|
||||
}
|
||||
|
||||
bool MissionBase::position_setpoint_equal(const position_setpoint_s *p1, const position_setpoint_s *p2) const
|
||||
|
||||
Reference in New Issue
Block a user