Matrix Blocks Vector Blocks navigation bar

Table of Contents > QUARC > Blocks > Blocks - By Category > Block Categories > Math Operations

Quaternion Blocks

The quaternion blocks include standard operations on quaternions, such as the product and inverse, as well as rotations and transformations to other representations. Translation is simply the sum of two quaternions (using the Sum block), and scaling is the element-wise product of two quaternions (using the Product block) so no additional blocks are provided for translation and scaling. Some of the Vector blocks can also be used with quaternions.

QUARC uses the Coutsias 1999 and Schmidt 2001 representation of a quaternion, in which the scalar is the first element in the 4-vector. This representation is more consistent with quaternions as an extension of the complex numbers. In other words, quaternions are represented as q = [q0, q1, q2, q3] where:

q = q0 + q1 i + q2 j + q3 k

The quaternion blocks provided in QUARC are:

Quaternion Conjugate

Computes the conjugate of a quaternion.

Quaternion from Angle and Axis

Creates a quaternion from an axis/angle representation.

Quaternion from Euler Angles

Creates a quaternion from an Euler angle representation.

Quaternion from Rotation Matrix

Creates a quaternion from a rotation matrix representation.

Quaternion Inverse

Computes the inverse of a quaternion.

Quaternion Product

Computes the product of two quaternions.

Quaternion Product Jacobian

Computes the Jacobian of the product of two quaternions with respect to either quaternion.

Quaternion Rotate Jacobian

Computes the Jacobian of the rotation of one quaternion by another, with respect to the quaternion containing the rotation.

Quaternion Rotate Vector

Uses a quaternion to rotate a vector.

Quaternion to Angle and Axis

Converts a quaternion to an axis/angle representation.

Quaternion to Euler Angles

Converts a quaternion to an Euler angle representation.

Quaternion to Rotation Matrix

Converts a quaternion to a rotation matrix.

Quaternion to Transformation

Converts a quaternion to a homogeneous transformation.

 

navigation bar