mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 09:31:38 +08:00
FlightTaskManual: replace yaw with yaw_sp for rotation
This commit is contained in:
committed by
Beat Küng
parent
ec79b2f8c8
commit
017576262c
@@ -84,7 +84,8 @@ void FlightTaskManualStabilized::_updateThrustSetpoints()
|
||||
{
|
||||
/* Rotate setpoint into local frame. */
|
||||
matrix::Vector3f sp{_sticks(0), _sticks(1), 0.0f};
|
||||
sp = (matrix::Dcmf(matrix::Eulerf(0.0f, 0.0f, _yaw)) * sp);
|
||||
|
||||
sp = (matrix::Dcmf(matrix::Eulerf(0.0f, 0.0f, _yaw_sp)) * sp);
|
||||
|
||||
/* Ensure that maximum tilt is in [0.001, Pi] */
|
||||
float tilt_max = math::constrain(math::radians(_tilt_max_man.get()), 0.001f, M_PI_F);
|
||||
|
||||
Reference in New Issue
Block a user