mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 19:32:36 +08:00
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:
committed by
ChristophTobler
parent
c2223030d9
commit
33ba041120
@@ -133,5 +133,8 @@ bool FlightTaskOrbit::update()
|
|||||||
|
|
||||||
// make vehicle front always point towards the center
|
// make vehicle front always point towards the center
|
||||||
_yaw_setpoint = atan2f(center_to_position(1), center_to_position(0)) + M_PI_F;
|
_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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user