euler_equiv.m
Checks whether two ZYZ active Euler angle sets specify the same rotation. Both angle sets are cast into row vectors and converted into direction cosine matrices by euler2dcm.m function. The relative rotation is formed as the product of the second matrix with the transpose of the first one; the sine of its rotation angle is obtained as half the Euclidean norm of the vector of the antisymmetric part, the cosine as (trace-1)/2, and the cosine is clamped into the [-1,1] interval to absorb round-off. The geodesic distance on SO(3) is then computed with atan2 and compared with the tolerance.
Syntax
answer=euler_equiv(eulers_a,eulers_b,tol)
Parameters
eulers_a - first Euler angle set [alpha beta gamma],
radians, ZYZ active convention
eulers_b - second Euler angle set [alpha beta gamma],
radians, ZYZ active convention
tol - non-negative angular tolerance, radians
Outputs
answer - true if the relative rotation angle between
the two rotations is not greater than tol
Notes
Note: Euler angles are not unique, and so this function compares the rotations produced by euler2dcm(), not the angles themselves.
See also
euler2dcm.m, euler_sup.m, dcm2euler.m, euler2qter.m, Rotation conventions
Version 2.13, authors: Ilya Kuprov