# Quaternion Normalize

Normalize quaternion

• Library:
• Aerospace Blockset / Utilities / Math Operations

## Description

The Quaternion Normalize block calculates a normalized quaternion for a given quaternion. Aerospace Blockset™ uses quaternions that are defined using the scalar-first convention. For the equations used for the quaternion and normalized quaternion, see Algorithms.

## Ports

### Input

expand all

Quaternions in the form of [ q 0 , r 0 , ..., q 1 , r 1 , ... , q 2 , r 2 , ... , q 3 , r 3 , ...], specified as a quaternion or vector of quaternions.

Data Types: `double`

### Output

expand all

Normalized quaternion or vector of normalized quaternions.

Data Types: `double`

## Algorithms

The quaternion has the form of

`$q={q}_{0}+i{q}_{1}+j{q}_{2}+k{q}_{3}.$`

The normalized quaternion has the form of

`$normal\left(q\right)=\frac{{q}_{0}+i{q}_{1}+j{q}_{2}+k{q}_{3}}{\sqrt{{q}_{0}^{2}+{q}_{1}^{2}+{q}_{2}^{2}+{q}_{3}^{2}}}.$`

## References

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