forked from Archive/PX4-Autopilot
FlightTaskOrbit: correct acceleration feed-forward
The acceleration setpoint gets implicitly inherited from the altitude flight task since #14212. This feed-forward adds an unwanted acceleration when the right stick is deflected. Instead I'm using it to command the expected centripetal acceleration when flying in a circle for better orbit tracking.
This commit is contained in:
parent
589aff7e0d
commit
624d8a58e9
|
@ -223,9 +223,9 @@ void FlightTaskOrbit::generate_circle_setpoints(Vector2f center_to_position)
|
|||
// xy velocity adjustment to stay on the radius distance
|
||||
velocity_xy += (_r - center_to_position.norm()) * center_to_position.unit_or_zero();
|
||||
|
||||
_velocity_setpoint(0) = velocity_xy(0);
|
||||
_velocity_setpoint(1) = velocity_xy(1);
|
||||
_position_setpoint(0) = _position_setpoint(1) = NAN;
|
||||
_velocity_setpoint.xy() = velocity_xy;
|
||||
_acceleration_setpoint.xy() = -center_to_position.unit_or_zero() * _v * _v / _r;
|
||||
}
|
||||
|
||||
void FlightTaskOrbit::generate_circle_yaw_setpoints(Vector2f center_to_position)
|
||||
|
|
Loading…
Reference in New Issue