Quaternions to Euler

Oct 05, 2005 3 Replies

Hi all,



I've posted quaternion questions on here before and I thank you all for your help. However, I am still a bit cofused so please bear with me. If I have an aircraft with an Euler Angle orientaiton of (yes, my aircraft can fly in this orientation)



Roll (phi, x-axis) = 0 degrees Pitch (theta, y-axis) = 90 degrees Yaw (psi, z-axis) = 20 degrees



and I measure this with a sensor, it will suffer from singularities which will yield erroneous results. However, that same sensor will yield the correct quaternion for that orientation:



Q = 0.696 + 0.123i + 0.696j + 0.123k



My question is how do I mathematically convert the quaternion (Q) back to Euler Angle format *while* still avoiding the singularities present at theta=90 degrees?



Thanks, weg



You'll have better success in comp.games.development.programming.algorithms

See Graphics Gems, at

formatting link
for the appropriate conversion functions. There are 24 ways to convert Euler angles to and from quaternions, and they're all in there.

John Nagle

What is the advantage in using quaternions? I know the Space Shuttle uses quaternions in its guidance software, but that was because the quaternion math requires a bit fewer computer operations to process, and the early Shuttle computers were primitive. I know the Euler sequences can lead to singularities, but heuristics exist to get past those. I just highly prefer the mental structure of pitching, yawing and rolling about body axes, when it comes to 3-D rotation.

Mike Ross

Mike:

Here's a URL that should provide some insight as to why quaternions are better for dealing with 3D rotations than Euler angles:

Enjoy,

-Wayne

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required