from_DCM#

Quaternion.from_DCM(dcm: ndarray, method: str = 'shepperd', **kw) ndarray#

Quaternion from Direction Cosine Matrix.

There are five methods available to obtain a quaternion from a Direction Cosine Matrix:

  • 'chiaverini' as described in [CS99].

  • 'hughes' as described in [Hug86].

  • 'itzhack' as described in [BI00] using version 3 by default. Possible options are integers 1, 2 or 3.

  • 'sarabandi' as described in [ST19] with a threshold equal to 0.0 by default. Possible threshold values are floats between -3.0 and 3.0.

  • 'shepperd' as described in [She78].

Parameters:
  • dcm (numpy.ndarray) – 3-by-3 Direction Cosine Matrix.

  • method (str, default: ‘shepperd’) – Method to use. Options are: ‘chiaverini’, ‘hughes’, ‘itzhack’, ‘sarabandi’, and ‘shepperd’.

Notes

The selection can be simplified with Structural Pattern Matching if using Python 3.10 or later.