Professional Documents
Culture Documents
Rotation Matrices and Quaternions
Rotation Matrices and Quaternions
We use rotation matrix for the transformation from navigation frame to the body frame axes, or reverse.
Properties of rotation matrix
A rotation matrix is a special orthogonal matrix. By definition, a special orthogonal matrix has these
properties:
RRT = I
det R = 1.
From those properties we have few other consequences which are helpful:
Property 3 is useful for forward motion. Now that we have the formal properties of a rotation matrix, let's
talk about the properties that apply, by convention, to 3D graphics programming.
The idea behind Euler angles is to split the complete rotation of the coordinate system into three simpler
constitutive rotations, in such a way that the complete rotation matrix is the product of three simpler
matrices. Notice that the outer matrix will represent a rotation around one of the axis of the reference
frame, and the inner matrix represents a rotation around one of the moving frame axis. The middle
matrix represents a rotation around an intermediate axis called line of nodes.
cos cos cos sin sin sin cos cos sin cos sin sin
DCM sin cos sin sin sin cos cos cos sin sin sin cos
sin cos sin cos cos
We can now calculate relationship between angular velocities and Euler angles:
1 1 0 0 0 1 0 0 cos 0 sin 0
0 0 cos
sin 0 cos sin 0 1 0 0
2
3 0 0 sin cos 0 0 sin cos sin 0 cos
1 0 sin
J 1
0 cos sin cos
0 sin cos cos
1 sin tan cos tan
J J 1 0 sin
1
cos
sin cos
0
cos cos
Problem: it is not defined for cos 0 k
2
DCM in terms of Quaternions
Quaternions (Euler symmetric parameters) have proven very useful in representing rotations due to
several advantages above the other representations.
n - unit vector of axis
- angle of rotation
r ' nn r r nn r cos r n sin
By definition we have:
e0 cos
2
e1
e e2 n sin
2
e3
e0 , e e0 e1i e2 j e3 k
2 2 2 2 2
e0 e e e0 e1 e2 e3 1
cos 2e0 1 e0 e1 e2 e3
2 2 2 2 2
n sin 2e0 e
And now we can use quaternion represetation for vectort of axis and angle so we get:
2
2 2 2
r ' r e0 e1 e2 e3 2ee r 2e0 r e DCM r
Where:
1
e e, W e
T
2
1
e ' e, ' W ' e '
T
e0 T e1 e2 e3
e1 e0 e3 e2 1
e
1
e 1 e0 e3 e2 1
1
e3 e0 e1
e2 2 2 2 2 e e0 e1 2
e3 e2 e1 e0 3
3
3
e3 e2 e1 e0
Initial values of inertial coordinates are given by the following set of equations:
X I R cos cos
YI R sin cos
Z I R sin
R RE H 0
Initial Missile to Normal Earth-fixed frame is defined from launch azimuth and elevation angle, supposing
that bank angle is zero:
Initial value of the Inertial to missile transformation matrix is given by simple transformation (having in
mind that Inertial and Geocentric Earth-fixed frames are coincident):
(TIb )0 (TNED
b
)0 (TINED )0
sin 1 ( a13 )
tan 1 (a 23 / a 33 )
tan 1 (a12 / a11 )
Initial values of quaternions can be defined from the quaternion definition equations:
It is supposed that at time zero, inertial platform axes are coincident with missile axes (zero error
angles), so initial value of the Inertial to Platform transformation matrix is defined as:
TIp TIb
angle2quatConvert rotation angles to quaternion
dcm2quatConvert direction cosine matrix to quaternion
quat2angleConvert quaternion to rotation angles
quat2dcmConvert quaternion to direction cosine matrix