pyCGM_Single.pycgmStatic.getankleangle¶
-
pyCGM_Single.pycgmStatic.
getankleangle
(axisP, axisD)¶ Static angle calculation function.
This function takes in two axes and returns three angles. It uses an inverse Euler rotation matrix in YXZ order. The output shows the angle in degrees.
Since we use arc sin we must check if the angle is in area between -pi/2 and pi/2 but because the static offset angle under pi/2, it doesn’t matter.
- 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 .pycgmStatic import getankleangle >>> axisP = [[ 0.59, 0.11, 0.16], ... [-0.13, -0.10, -0.90], ... [0.94, -0.05, 0.75]] >>> axisD = [[0.17, 0.69, -0.37], ... [0.14, -0.39, 0.94], ... [-0.16, -0.53, -0.60]] >>> np.around(getankleangle(axisP,axisD), 2) array([0.48, 1. , 1.56])