Quaternion from Rotation Matrix Quaternion to Homogeneous Transformation navigation bar

Table of Contents

Quaternion to Rotation Matrix

Converts a quaternion to a rotation matrix.

Library

QUARC Targets/Math Operations/Quaternions

Description

Quaternion to Rotation Matrix

The Quaternion to Rotation Matrix block converts a uit quaternion to a 3x3 rotation matrix.

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 input is the unit quaternion to convert to a rotation matrix.

Output Ports

R

The output is a 3x3 rotation matrix. Multiplying this rotation matrix by a vector (i.e. y = Ru) will rotate the vector in the same way as the quaternion when the Quaternion Rotate Vector block is used.

Data Type Support

This block accepts inputs of type double. The block output is of type double.

Parameters and Dialog Box

Quaternion to Rotation Matrix

The Quaternion to Rotation Matrix block has no parameters.

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.

 

navigation bar