This article is intended to give detailed information on the definition of the various orientation output modes of the MTi. The output sequence of the elements in the vectors and matrices defined here holds for all interface options (Low-level communication protocol, API, GUI).

The definition of reference coordinate systems S (sensor), O (object) and L (local) can be found in the MTi User Manual

## Quaternion orientation output mode

A unit quaternion vector can be interpreted to represents a rotation about a unit vector **n** through an angle α.

A unit quaternion itself has unit magnitude, and can be written in the following vector format:

Quaternions are an efficient, non-singular description of 3D orientation and a quaternion is unique up to sign (q=-q).

An alternative representation of a quaternion is as a vector with a complex part, the real component is the first one, q_{0}.

The inverse (** q_{SL}**) is defined by the complex conjugate (†) of

**. The complex conjugate is easily calculated:**

*q*_{LS}As defined here ** q_{LS}** rotates a vector in the sensor co-ordinate system (

**) to the global reference co-ordinate system (**

*S***).**

*L*Hence, ** q_{SL}** rotates a vector in the global reference co-ordinate system (L) to the sensor co-ordinate system (

**), where**

*S***is the complex conjugate of**

*q*_{SL }**.**

*q*_{SL}## Euler angles orientation output mode

Euler angles describe the rotation of a rigid body by means of three successive rotations in a particular sequence. The Euler angles used are ‘roll, pitch, yaw’, referred to in the literature as Cardan/Tait-Bryan angles. The sequence of rotations for Euler angles follows the aerospace convention (Z-Y’-X’’ sequence) for rotation from the global reference co-ordinate system (**L**) to the sensor co-ordinate system (** S**).

- ψ = yaw (heading, pan, azimuth) = rotation around Z
_{L}, defined from [-180°…180°] - θ = pitch (elevation, tilt) = rotation around Y
_{L}’ which is the current Y axis after the first rotation, defined from [-90°…90°] - φ = roll (bank) = rotation around X
_{L}’’, which is the current X axis after the second rotation, defined from [-180°…180º]

** NOTE:** Due to the definition of Euler angles there is a mathematical singularity when the sensor-fixed x-axis is pointing up or down in the

**L**co-ordinate system (i.e. pitch approaches ±90°). This singularity is not present in the quaternion or direction cosine matrix (rotation matrix) representation. Quaternion and rotation matrix output modes can be used to access these orientation representations respectively.

The Euler-angles can be interpreted in terms of the components of the rotation matrix, ** R_{LS}**, or in terms of the unit quaternion,

**;**

*q*_{LS}Here, the arctangent (tan^{-1}) is the four quadrant inverse tangent function.

## Rotation Matrix orientation output mode

The rotation matrix (also known as Direction Cosine Matrix, DCM) is a well-known, redundant and complete representation of orientation. The rotation matrix can be interpreted as the unit-vector components of the sensor coordinate system ** S **expressed in

**. For**

*L-coordinate system***the unit vectors of**

*R*_{LS}**are found in the columns of the matrix, so col 1 is**

*S***expressed in**

*X*_{S}**etc. A rotation matrix norm is always equal to one (1) and a rotation**

*L***followed by the inverse rotation**

*R*_{LS}**naturally yields the identity matrix**

*R*_{SL}**.**

*I*^{3}The rotation matrix, ** R_{LS}**, can be interpreted in terms of quaternions;

or in terms of Euler angles:

As defined here ** R_{LS}**, rotates a vector in the sensor co-ordinate system (

**) to the global reference system (**

*S***):**

*L*It follows naturally that, ** R_{SL}** rotates a vector in the global reference co-ordinate system (

**) to the sensor co-ordinate system (**

*L***).**

*S*For the rotation matrix (DCM) output mode it is defined that: