FlightTaskOrbit: improve yaw tracking with feed-forward

To make the vehicle front always point exactly to the center and not
lag behind.
This commit is contained in:
Matthias Grob
2018-05-22 07:55:19 +01:00
committed by ChristophTobler
parent c2223030d9
commit 33ba041120

View File

@@ -133,5 +133,8 @@ bool FlightTaskOrbit::update()
// make vehicle front always point towards the center
_yaw_setpoint = atan2f(center_to_position(1), center_to_position(0)) + M_PI_F;
// yawspeed feed-forward because we know the necessary angular rate
_yawspeed_setpoint = -_v / _r;
return true;
}