pyCGM_Single.pyCGM.getHeadangle

pyCGM_Single.pyCGM.getHeadangle(axisP, axisD)

Head angle calculation function.

This function takes in two axes and returns three angles and uses the inverse Euler rotation matrix in YXZ order.

Returns the angles in degrees.

Parameters
axisPlist

Shows the unit vector of axisP, the position of the proximal axis.

axisDlist

Shows the unit vector of axisD, the position of the distal axis.

Returns
anglelist

Returns the gamma, beta, alpha angles in degrees in a 1x3 corresponding list.

Examples

>>> import numpy as np
>>> from .pyCGM import getHeadangle
>>> axisP = [[ 0.04, 0.99, 0.06],
...        [ 0.99, -0.04, -0.05],
...       [-0.05,  0.07, -0.99]]
>>> axisD = [[-0.18, -0.98, -0.02],
...        [ 0.71, -0.11, -0.69],
...        [ 0.67, -0.14, 0.72 ]]
>>> np.around(getHeadangle(axisP,axisD), 2)
array([ 185.18,  -39.99, -190.54])