Noel Hughes
Aerospace Engineer
Home Page

Euler Angles to Quaternion

  To convert a set of three Euler angles, f1, f2, f3 (1, 2, 3 are the first, second, third Euler rotations, not the axes of rotation) to the equivalent quaternion:

 

Note:  You must know the Euler rotation axis sequence, i.e

123, 321, 213, 121, etc.

 

1)    form three quaternions from the three Euler angles:

a.     for a “1” rotation axis, the quaternion is 

sin(f/2) 0.0 0.0 cos(f/2)

b.     for a “2” rotation axis, the quaternion is

0.0 sin(f/2) 0.0 cos(f/2)

c.     for a “3” rotation axis, the quaternion is

0.0 0.0 sin(f/2) cos(f/2)

 

2)    multiply the three quaternions in the correct order.

for example,

 

given:

 

rotation order 312

f1 = 30 deg

f2 = 60 deg

f3 = 45 deg

 

Q1 = 0.0 0.0 sin(30/2) cos(30/2) = 0.0  0.0   0.258819045            0.965925826

Q2 = sin(60/2)  0.0  0.0 cos(60/2) = .5  0.0   0.0  0.866025404

Q3 = 0.0  sin(45/2)  0.0 cos(45/2) =  0.382683432  0.0  0.0            0.923879533

 

Qf = Q1 Q2 Q3

     = 0.360423406            0.43967974            0.391903837            0.723317411

 

 

 

Web Hosting Companies