VR-Link JAVA API Documentation
 All Classes Namespaces Files Functions Variables Enumerator Pages
13.2 - Orientation, Euler Angles, and DtTaitBryan

Table of Contents

Although direction cosine matrices are often used in VR-Link to represent orientation, an alternative representation is a set of three Euler angles.

Euler angles represent the orientation of a body in space with respect to a certain coordinate system as three ordered rotations needed to go from the reference coordinate system to the body coordinate system.

DIS and the HLA RPR FOM use Euler angles to represent the orientation of an entity with respect to the geocentric coordinate axes. (The body coordinate system is defined by X out the front, Y out the right side, Z out the bottom of the entity.)

There are many possible ways to order the three rotations, but the one used by DIS and the RPR FOM, and hence VR-Link, is known as the Tait-Bryan sequence. The first rotation is about the Z axis, the second about the new Y axis, and the third about the newest X axis. The three angles are usually denoted by psi, theta, and phi respectively.

Note
These three angles do not necessarily correspond to the familiar heading, pitch, and roll of an entity. Euler angles correspond to heading, pitch, and roll only when the reference coordinate system is a topographic system. The Euler angles sent in DIS entity state PDUs or RPR FOM entity updates use the geocentric coordinate system as a reference, and thus do not correspond to heading, pitch, and roll. (For information about converting between geocentric-reference Euler angles and topographic-reference Euler angles, please see 13.3 - Coordinate Conversions.)

VR-Link's DtTaitBryan class (defined in vlTaitBryan.h) is used to represent a set of Euler angles. A DtTaitBryan can be constructed from its three component angles, specified in radians, for example:

DtTaitBryan angles(3.14, 0.0, 1.57);

The class has the following inspector and mutator functions that provide access to the individual angles:

The assignment operator, equality operators, and copy constructor are implemented for DtTaitBryan as well. The string() member function provides a string representation of the contents of the object, in a similar fashion to DtVector::string().

13.2.1 Converting Between Euler Angles and Matrix Representation

Euler.h contains functions that convert between the two representations of orientation.

Note
These functions are not converting orientations from one coordinate system to another; they are converting between two ways of expressing an orientation within a given coordinate system.

Given a set of Euler angles that represent the orientation of a body with respect to some reference frame (for example, the geocentric frame, or a topographic frame), DtEuler_to_BodyToRef() produces a rotation matrix (or DtDcm) that can rotate from body coordinates to reference coordinates, while DtEuler_to_RefToBody() produces its inverse – a matrix that can rotate from reference to body coordinates.

For example:

DtTaitBryan geocEulerAngles(...);
DtDcm bodyToGeoc;
DtEuler_to_BodyToRef(geocEulerAngles, bodyToGeoc);

The functions DtBodyToRef_to_Euler(), and DtRefToBody_to_Euler() go the other way – producing Euler angles from the matrix representation.

[<< Vector and Matrix Classes] [Home] [Top of Page] [Coordinate Conversions >>]


Document ID: Generated on Thu Oct 16 00:12:25 EDT 2025 from SVN revision 280738
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)