Convert homogeneous transform or rotation matrix to alpha-beta-gamma Euler angles (XYZ rotations)
EUL = tr2eul(TR, OPTIONS) EUL = tr2eul(R, OPTIONS)
compute angles in degrees (radians default)
Execute the compiled version of the algorithm (rts_c_tr2eul)
EUL = TR2EUL(TR, OPTIONS) are the Euler angles expressed as a row vector corresponding to the rotational part of a homogeneous transform TR. The 3 angles EUL=[ALPHA, BETA, GAMMA] correspond to sequential rotations about the X, Y and Z mobile axes (Euler angles) respectively.
EUL = TR2EUL(R, OPTIONS) are the Euler angles expressed as a row vector corresponding to the orthonormal rotation matrix R.
If R has (3*n) columns or T has (4*n) columns, they are interpreted as a trajectory of n elements. Each row of RPY corresponds to a step of the trajectory.
There is a singularity when BETA=pi/2, in which case ALPHA is arbitrarily set to zero and YAW is the sum (ALPHA+GAMMA).