Makes a quaternion continuous
[qc] = CL_rot_contQuat(q)
This function tries to make each component of a quaternion continuous by multiplying the quaternion by -1 when necessary.
Notes:
- The quaternion components must be smooth enough (as a function of the indices) otherwise discontinuities may not be removed.
- The quaternion is not changed by the function in the sense that it can only be multiplied by 1 or -1 (and q and -q represent the same rotation).
- Quaternions with at least one component equal to %nan are not modified.
Quaternion (dim N)
Quaternion with continuous components (dim N)
CNES - DCT/SB