msgpi.utils.math.calcCab#

msgpi.utils.math.calcCab(a, b)#

Calculate the direction cosine matrix between frame a and b

\(C_{ij} = a_i\ \cdot\ b_j\)

Parameters
  • a (list of floats) – List of three a basis (a_1, a_2, a_3).

  • b (list of floats) – List of three b basis (b_1, b_2, b_3).

Returns

3x3 matrix of the direction cosine.

Return type

list of lists of floats

Examples

>>> a = [
...     [1., 0., 0.],
...     [0., 1., 0.],
...     [0., 0., 1.]
... ]
>>> b = [
...     [],
...     [],
...     []
... ]
>>> utilities.calcCab(a, b)