APN-037 Rev 2 February 25
th
, 2015
Application Note on Vehicle to Body Rotations
This application note gives general guidance on how to extract the vehicle's attitude with respect
to the local level frame.
You can find the logs and commands mentioned in this application note in the SPAN Technology
for OEM6 User Manual. User manuals are available from our website at:
http://www.novatel.com/support/docupdates.htm
Frame Definitions
The vehicle frame is defined as x (perpendicular to the direction of travel in the horizontal plane),
y (direction of travel), and z (up).
The body frame is nominally the frame as marked on the IMU enclosure. If you do not mount the
IMU with the z-axis approximately up, you must check the new IMU axis orientation that SPAN
automatically uses. SPAN forces z to be up in the internal computation frame. Output attitude (in
INSPVA, INSATT, and so on) is with respect to that computation frame. Refer to the
SETIMUORIENTATION command description to see what mapping definition applies, depending on
which IMU axis most closely aligns to gravity. Essentially, this means that if you do not mount the
IMU with the z-axis approximately up (as marked on the enclosure); you have a new IMU frame
that defines what mapping applies. This new IMU frame will not match what is marked on the IMU
enclosure and will need to be determined by checking the Full Mapping Definition table
documented with the SETIMUORIENTATION command. Also, in this case, begin with the new IMU
frame aligned with the vehicle frame and record your vehicle to body rotations with respect to the
frame SPAN will be using as the computation frame.
The output roll is the angle of rotation about the y-axis, the output pitch is about the x-axis, and
the output azimuth is about the z-axis and is measured to the y-axis. Note that azimuth is positive
in the clockwise direction when looking towards the origin. However, the input vehicle to body
rotation about the z-axis follows the right hand rule convention.
X (east), Y (north), and Z (up) define the local level frame.
Relating the Vehicle Frame to the Body Frame:
Form the rotation matrix from the vehicle frame to the body frame using the vehicle to body frame
angles measured according to the procedure described in the VEHICLETOBODYROTATION log as:
is the rotation about the z-axis
is the rotation about the x-axis
is the rotation about the y-axis
This direction cosine matrix (DCM) expresses mathematically the sequence of rotations as:
)()()(
312
RRRR
b
v
APN-037 Rev 2 February 25
th
, 2015
Where
3
R
is a rotation around the z-axis (that is, the third axis of the x, y, and z set), as in:
100
0cossin
0sincos
)(
3
R
1
R
is a rotation around the x-axis, as in:
cossin0
sincos0
001
)(
1
R
2
R
is a rotation around the y-axis, as in:
cos0sin
010
sin0cos
)(
2
R
These three rotations define the transformation from the vehicle frame to the body frame.
To go the other way between the frames (from the body frame to the vehicle frame), we take the
transpose of this, which is:
)()()(
213
RRRR
v
b
Explicitly, the elements of this matrix are:
coscossinsincos
cossincossinsincoscossinsincoscossin
cossinsinsincoscossinsinsinsincoscos
v
b
R
Relating the Body Frame to the Local Level Frame:
The body to local level matrix can be formed from the roll, pitch, azimuth (convert to yaw to form
the matrix) angles found in the INSPVA (or INSATT) log, where roll is about the y-axis, pitch is about
the x-axis, and azimuth/yaw is about the z-axis. The body frame (IMU axes) are nominally
assumed to have Y pointing in the direction of travel, X to the right (perpendicular to the direction
of travel), and Z up. That means that azimuth references from north to the IMU y-axis, and roll is
about y, and pitch is about x. If you do not mount your IMU with Z approximately up, please
review the Frame Definitions section, on Page 1 of this document.
Using the angles in the INSPVA log, you can form the body frame to local-level frame-rotation
matrix.
is roll
is pitch
is yaw
APN-037 Rev 2 February 25
th
, 2015
coscossinsincos
cossincossinsincoscossinsincoscossin
cossinsinsincoscossinsinsinsincoscos
l
b
R
Relating the Vehicle Frame to the Local Level Frame:
Knowing the attitude of the body frame with respect to the local level frame, from the INSPVA (or
INSATT) log, and the rotational relationship between the body frame and the vehicle frame, you
can solve for the vehicle attitude with respect to local level. Given the two previous matrices, a
new DCM can form relating the vehicle frame to the local level frame.
b
l
v
b
v
l
RRR
where
Tv
l
l
v
RR )(
We can solve the individual angles, from the local level to vehicle frame, using the numerical
values of
l
v
R
since we know how to form the DCM. The angles from the vehicle frame to the local
level frame are denoted as
x
,
y
, and
z
. We give the matrix indices first as rows 1-3 and then
columns 1-3.
2,3sin
1 l
vx
R
3,3
1,3
tan
1
l
v
l
v
y
R
R
(In code use atan2 for proper quadrant resolution.)
2,2
2,1
tan
1
l
v
l
v
z
R
R
Final Points
If you require further information, regarding the topics covered by this document, please contact:
NovAtel Customer Service
1120 68 Ave. N.E.
Calgary, Alberta, Canada, T2E 8S5
Phone: +1-800-NOVATEL (in Canada or the U.S.) or +1-403-295-4500
Fax: +1-403-295-4901
E-mail: support@novatel.com
Website: www.novatel.com