Main Content

Quaternion Division

Divide quaternion by another quaternion

  • Quaternion Division block

Libraries:
Aerospace Blockset / Utilities / Math Operations

Description

The Quaternion Division block divides a given quaternion by another. Aerospace Blockset™ uses quaternions that are defined using the scalar-first convention. The output is the resulting quaternion from the division or vector of resulting quaternions from division. For the quaternion forms used, see Algorithms.

Ports

Input

expand all

Dividend quaternions in the form of [q0, p0, ..., q1, p1, ... , q2, p2, ... , q3, p3, ...], specified as a quaternion or vector of quaternions.

Data Types: double

Divisor quaternions in the form of [s0, r0, ..., s1, r1, ... , s2, r2, ... , s3, r3, ...], specified as a quaternion or vector of quaternions.

Data Types: double

Output

expand all

Output quaternion or vector of resulting quaternions from division.

Data Types: double

Algorithms

The quaternions have the form of

q=q0+iq1+jq2+kq3

and

r=r0+ir1+jr2+kr3.

The resulting quaternion from the division has the form of

t=qr=t0+it1+jt2+kt3,

where

t0=(r0q0+r1q1+r2q2+r3q3)r02+r12+r22+r32t1=(r0q1r1q0r2q3+r3q2)r02+r12+r22+r32t2=(r0q2+r1q3r2q0r3q1)r02+r12+r22+r32t3=(r0q3r1q2+r2q1r3q0)r02+r12+r22+r32

References

[1] Stevens, Brian L., Frank L. Lewis. Aircraft Control and Simulation, Second Edition. Hoboken, NJ: Wiley–Interscience.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced before R2006a