mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-06 06:21:36 +08:00
Navigator: Force yaw pointing towards waypoint for all cases
This commit is contained in:
@@ -194,9 +194,10 @@ Mission::on_active()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* see if we need to update the current yaw heading */
|
/* see if we need to update the current yaw heading */
|
||||||
if (_param_yawmode.get() != MISSION_YAWMODE_NONE
|
if ((_param_yawmode.get() != MISSION_YAWMODE_NONE
|
||||||
&& _param_yawmode.get() < MISSION_YAWMODE_MAX
|
&& _param_yawmode.get() < MISSION_YAWMODE_MAX
|
||||||
&& _mission_type != MISSION_TYPE_NONE) {
|
&& _mission_type != MISSION_TYPE_NONE)
|
||||||
|
|| _navigator->get_vstatus()->is_vtol) {
|
||||||
heading_sp_update();
|
heading_sp_update();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -566,7 +567,8 @@ Mission::heading_sp_update()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* always keep the front of the rotary wing pointing to the next waypoint */
|
/* always keep the front of the rotary wing pointing to the next waypoint */
|
||||||
if (_param_yawmode.get() == MISSION_YAWMODE_FRONT_TO_WAYPOINT) {
|
if (_param_yawmode.get() == MISSION_YAWMODE_FRONT_TO_WAYPOINT
|
||||||
|
|| _navigator->get_vstatus()->is_vtol) {
|
||||||
_mission_item.yaw = get_bearing_to_next_waypoint(
|
_mission_item.yaw = get_bearing_to_next_waypoint(
|
||||||
point_from_latlon[0],
|
point_from_latlon[0],
|
||||||
point_from_latlon[1],
|
point_from_latlon[1],
|
||||||
|
|||||||
Reference in New Issue
Block a user