mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
FlightTaskAuto: fix Weather Vane during landing
Weather vane should only set a yawrate setpoint, but no yaw setpoint. Setting it to NAN when WV is active makes sure that whatever _yaw_setpoint is set previously (e.g. through Waypoint) is not used. Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
parent
ae5725e71a
commit
680fe86c05
@ -483,7 +483,7 @@ bool FlightTaskAuto::_evaluateTriplets()
|
||||
|
||||
// set heading
|
||||
if (_ext_yaw_handler != nullptr && _ext_yaw_handler->is_active()) {
|
||||
_yaw_setpoint = _yaw;
|
||||
_yaw_setpoint = NAN;
|
||||
// use the yawrate setpoint from WV only if not moving lateral (velocity setpoint below half of _param_mpc_xy_cruise)
|
||||
// otherwise, keep heading constant (as output from WV is not according to wind in this case)
|
||||
bool vehicle_is_moving_lateral = _velocity_setpoint.xy().longerThan(_param_mpc_xy_cruise.get() / 2.0f);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user