Sicks: use new 2D rotation

This commit is contained in:
Matthias Grob
2023-04-15 21:57:40 +02:00
parent 43850c24a1
commit 7b850a91b4
@@ -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;
}