mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 17:23:33 +08:00
Sicks: use new 2D rotation
This commit is contained in:
@@ -95,7 +95,6 @@ void Sticks::limitStickUnitLengthXY(Vector2f &v)
|
||||
|
||||
void Sticks::rotateIntoHeadingFrameXY(Vector2f &v, const float yaw, const float yaw_setpoint)
|
||||
{
|
||||
Vector3f v3(v(0), v(1), 0.f);
|
||||
const float yaw_rotate = PX4_ISFINITE(yaw_setpoint) ? yaw_setpoint : yaw;
|
||||
v = Vector2f(Dcmf(Eulerf(0.0f, 0.0f, yaw_rotate)) * v3);
|
||||
v = Dcm2f(yaw_rotate) * v;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user