Browse Source

FlightTaskOrbit: improve yaw tracking with feed-forward

To make the vehicle front always point exactly to the center and not
lag behind.
sbg
Matthias Grob 7 years ago committed by ChristophTobler
parent
commit
33ba041120
  1. 3
      src/lib/FlightTasks/tasks/FlightTaskOrbit.cpp

3
src/lib/FlightTasks/tasks/FlightTaskOrbit.cpp

@ -133,5 +133,8 @@ bool FlightTaskOrbit::update() @@ -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;
}

Loading…
Cancel
Save