Direction Cosines To Euler Angles VI
- Updated2025-07-30
- 3 minute(s) read
Converts a 3-by-3 matrix of direction cosines into Euler angles.

Inputs/Outputs
Direction Cosines
—
Direction Cosines specifies the 3-by-3 direction cosine matrix, which maps points in the old coordinate frame to points in the new coordinate frame. Each element in Direction Cosines must be in the range of [-1, 1].
rotation order
—
rotation order specifies the order of the axes to rotate the coordinates around. For example, X-Y-Z specifies the first, second, and third rotations are about the x-, y-, and z-axes respectively. Z-X-Z is the default order.
Euler Angles
—
Euler Angles returns the Euler angles in radians.
error
—
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster. |
You can express a rotation using direction cosines or Euler angles. The following equation describes the relationship between Direction Cosines and Euler Angles (assume the rotation is the default Z-X-Z order):
R =
where R is the input 3-by-3 Direction Cosines matrix. ϕ (–π < ϕ ≤ π), θ (0 ≤ θ ≤ π), and ψ (–π < ψ ≤ π) are the output Euler Angles in radians.
Direction Cosines
—
rotation order
—
Euler Angles
—
phi
—
error
—