Ranger NBV's attitude is formulated by determining the orientation of the tank reference frame in vehicle coordinates, and using that information to generate a parameterization of the estimated attitude in the form of a quaternion. Euler's theorem states that every attitude can be reached by a single rotation, _{ }, about an appropriately chosen axis, _{ }. For a rotation characterized by the direction cosine matrix _{ }, the Euler axis is defined by

_{}. 
(4.5) 
This axis is also called the Eigen axis for this rotation because it is not changed by the rotation. The Euler angle, _{ }, for a rotation is given by

_{}. 
(4.6) 
These four elements, _{ } and _{ }, can be combined to form a single representation of attitude. This four element quaternion _{ }is defined by

_{} 
(4.7) 
where
and
One of the primary advantages of using the quaternion for
parameterizing attitude over some of the currently more common
methods such as Euler angles is that the elements of the quaternion
are nonsingular in rate. For example, for Euler angles _{
},
_{ },
and _{ },
with ZYZ order of rotation , the rate of change of the elements as a
function of current attitude and angular velocity is

_{}. 
(4.8) 
Notice that as _{ } approaches zero, the rate of change of _{ }and _{ } approach infinity for rotation about the x and y axes, and at _{ }=0, the rates of all three elements are undefined. This causes difficulty when trying to produce controllers with good performance at any attitude. The quaternion attitude representation is a good choice when considering controller design because its first derivative is defined throughout the entire attitude space.