This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Quaternion Multiplication

Calculate product of two quaternions

  • Library:
  • Aerospace Blockset / Utilities / Math Operations

Description

The Quaternion Multiplication block calculates the product for two given quaternions. For more information on the quaternion forms, see Algorithms.

Ports

Input

expand all

First quaternion, specified as a vector or vector of quaternions. A vector of quaternions has this form, where q and p are quaternions:

[ q 0 , p 0 , ..., q 1 , p 1 , ... , q 2 , p 2 , ... , q 3 , p 3 , ...]

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | Boolean | fixed point

Second quaternion, specified as a vector or vector of quaternions. A vector of quaternions has this form, where s and r are quaternions:

[ s 0 , r 0 , ..., s 1 , r 1 , ... , s 2 , r 2 , ... , s 3 , r 3 , ...]

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | Boolean | fixed point | enumerated | bus

Output

expand all

Product of two quaternions, output as a vector or vector of quaternion products.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | Boolean | fixed point | enumerated | bus

Algorithms

This block uses quaternions of the form of

q=q0+iq1+jq2+kq3

and

r=r0+ir1+jr2+kr3.

The quaternion product has the form of

t=q×r=t0+it1+jt2+kt3,

where

t0=(r0q0r1q1r2q2r3q3)t1=(r0q1+r1q0r2q3+r3q2)t2=(r0q2+r1q3+r2q0r3q1)t3=(r0q3r1q2+r2q1+r3q0)

References

[1] Stevens, Brian L., Frank L. Lewis, Aircraft Control and Simulation, 2nd edition Hoboken, NJ: John Wiley & Sons, 2003.

Introduced before R2006a