mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 09:23:33 +08:00
navigator: add yaw_acceptance getter to incorporate feedback from position
controller. The yaw acceptance is defined by the mission item. If the pos control sets it to NAN, then the yaw at a waypoint is ignored.
This commit is contained in:
@@ -322,7 +322,7 @@ MissionBlock::is_mission_item_reached()
|
||||
|
||||
if ((_navigator->get_vstatus()->is_rotary_wing
|
||||
|| (_mission_item.nav_cmd == NAV_CMD_LOITER_TO_ALT && _mission_item.force_heading))
|
||||
&& PX4_ISFINITE(_mission_item.yaw)) {
|
||||
&& PX4_ISFINITE(_navigator->get_yaw_acceptance(_mission_item.yaw))) {
|
||||
|
||||
/* check course if defined only for rotary wing except takeoff */
|
||||
float cog = _navigator->get_vstatus()->is_rotary_wing ? _navigator->get_global_position()->yaw : atan2f(
|
||||
|
||||
Reference in New Issue
Block a user