Quaternion from Euler Angles Quaternion from Rotation Matrix navigation bar

Table of Contents

Quaternion to Euler Angles

This block converts a unit quaternion to Euler angles.

Library

QUARC Targets/Math Operations/Quaternions

MATLAB Command Line

Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:

qc_open_library('quarc_library/Math Operations/Quaternions')

Description

Quaternion to Euler Angles

This block convert a unit quaternion to Euler angles according to the Euler angle convention selected in the block parameters. All 24 possible combinations of rotations about fixed or relative axes are supported.

The block assumes the input is a unit quaternion in order to reduce its computation time, particularly since most of the Quaternion blocks deal with unit quaternions. To normalize a quaternion in order to get a unit quaternion, use the Normalize block, which can normalize vectors or quaternions.

Input Ports

q

The unit quaternion to convert to Euler angles.

Output Ports

phi

This output is the angle in radians for the first rotation. The axis is determined by the first axis in the rotation order selected in the Rotation order parameter.

theta

This output is the angle in radians for the second rotation. The axis is determined by the second axis in the rotation order selected in the Rotation order parameter.

psi

This output is the angle in radians for the third rotation. The axis is determined by the third axis in the rotation order selected in the Rotation order parameter.

Parameters and Dialog Box

Quaternion to Euler Angles

Rotation order

Selects the Euler angle convention to use. There are 24 different definitions for Euler angles. The classic Euler angles consist of rotations where the first and third axes are the same e.g. a Z-X-Z convention. The roll-pitch-yaw or Tait-Byran angles consist of rotations where all the axes are different e.g. an X-Y-Z convention.

Targets

Target Name

Compatible*

Model Referencing

Comments

QUARC Win32 Target

Yes

Yes

QUARC Win64 Target

Yes

Yes

QUARC Linux Nvidia Target

Yes

Yes

QUARC Linux QBot Platform Target

Yes

Yes

QUARC Linux QCar 2 Target

Yes

Yes

QUARC Linux QDrone 2 Target

Yes

Yes

QUARC Linux Raspberry Pi 3 Target

Yes

Yes

QUARC Linux Raspberry Pi 4 Target

Yes

Yes

QUARC Linux RT ARMv7 Target

Yes

Yes

QUARC Linux x64 Target

Yes

Yes

QUARC Linux DuoVero Target

Yes

Yes

QUARC Linux DuoVero 2016 Target

Yes

Yes

QUARC Linux Verdex Target

Yes

Yes

QUARC QNX x86 Target

Yes

Yes

Last fully supported in QUARC 2018.

Rapid Simulation (RSIM) Target

Yes

Yes

S-Function Target

No

N/A

Old technology. Use model referencing instead.

Normal simulation

Yes

Yes

* Compatible means that the block can be compiled for the target.

See Also

 

navigation bar