# Quaternions to Euler

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 degrees?
Thanks, weg
â
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
snipped-for-privacy@drexel.edu wrote:

You'll have better success in comp.games.development.programming.algorithms
See Graphics Gems, at
http://www.acm.org/pubs/tog/GraphicsGems/gemsiv/euler_angle /
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
â
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
John Nagle wrote:

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 Ross

Instructions said Win98 or better, so I used Linux.
â
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Mike Ross wrote:

Mike:
Here's a URL that should provide some insight as to why quaternions are better for dealing with 3D rotations than Euler angles:
<http://www.cosc.canterbury.ac.nz/people/mukundan/atcm02_1.pdf
Enjoy,
-Wayne