The output angles for all joints are calculated from the YXZ Cardan angles derived by comparing the relative orientations of the two segments.
The knee angles are calculated from the femur and the Untortioned tibia segments, whilst the ankle joint angles are calculated from the Tortioned tibia and the foot segment.
In the case of the feet, since they are defined in a different orientation to the tibia segments, an offset of 90 degrees is added to the flexion angle. This does not affect the Cardan angle calculation of the other angles since the flexion angle is the first in the rotation sequence.
The progression angles of the feet, pelvis, thorax and head are the YXZ Cardan calculated from the rotation transformation of the subject's Progression Frame for the trial onto each segment orientation.