CMSIS-DSP: Quaternion to Rotation

| CMSIS-DSP Version 1.10.0 CMSIS DSP Software Library

- Main Page
- Usage and Description
- Reference

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
Quaternion to Rotation
Quaternion conversions

## Functions

void | arm_quaternion2rotation_f32 (const float32_t *pInputQuaternions, float32_t *pOutputRotations, uint32_t nbQuaternions)
| Conversion of quaternion to equivalent rotation matrix. More...

## Description

Conversions from quaternion to rotation.

## Function Documentation

void arm_quaternion2rotation_f32 | ( | const float32_t * | pInputQuaternions,
|  | float32_t * | pOutputRotations,
|  | uint32_t | nbQuaternions
| ) |  |

Parameters

  [in] | pInputQuaternions | points to an array of normalized quaternions
  [out] | pOutputRotations | points to an array of 3x3 rotations (in row order)
  [in] | nbQuaternions | number of quaternions in the array

Returns
  none.

  Format of rotation matrix

The quaternion a + ib + jc + kd is converted into rotation matrix:

      a^2 + b^2 - c^2 - d^2                 2bc - 2ad                 2bd + 2ac
                  2bc + 2ad     a^2 - b^2 + c^2 - d^2                 2cd - 2ab
                  2bd - 2ac                 2cd + 2ab     a^2 - b^2 - c^2 + d^2

Rotation matrix is saved in row order : R00 R01 R02 R10 R11 R12 R20 R21 R22