Function quat2angle does not account for singularities

10 views (last 30 days)
It seems that the function quat2angle does not account for the singularity that occurs when the second Euler angle is +/- 90 deg (for a ZYX rotation sequence). Example code:
u = deg2rad([90 -90 15]);
q = angle2quat(u(1),u(2),u(3));
[u1 u2 u3] = quat2angle(q);
u_new = rad2deg([u1 u2 u3])
u_new =
104.0362 -90.0000 18.4349
Is there a fix for this?

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!