FlightTaskAuto: Create artificial yaw speed sp for feedforward

This commit is contained in:
bresch
2020-05-25 15:19:04 +02:00
committed by Matthias Grob
parent c165327c9f
commit 7a401e5ca3
@@ -110,6 +110,11 @@ void FlightTaskAuto::_limitYawRate()
_yaw_setpoint = yaw_setpoint_sat;
_yaw_sp_prev = _yaw_setpoint;
if (!PX4_ISFINITE(_yawspeed_setpoint) && (_deltatime > FLT_EPSILON)) {
// Create a feedforward
_yawspeed_setpoint = dyaw / _deltatime;
}
}
if (PX4_ISFINITE(_yawspeed_setpoint)) {