How to Find Equivalent Euler Angles? – Linear Algebra and Geometry

geometrylinear algebra

I have a rotation over time represented as a series of Euler angles (heading, pitch and bank). I'd like to represent the individual rotation curves as continuously as possible. An anyone help me with how I would calculate the equivalent Euler angle representations for a single rotation, from where I could derive the "closest" equivalent to the prior rotation in time?

Thanks!


I realize that half the problem may be my inability to properly express the problem in the first place. Perhaps a concrete example might make it a bit clearer. I have two rotations around a common $xyz$ axis expressed in degrees as Euler angles: $(-224.782, 265, 214.25)$ and $(-44.782, -85, 34.215)$. These produce an equivalent orientation. Supposing that I started with the latter, which is "normalized" to the range to $-180 \leq x \leq 180$, $-90\leq y\leq 90$, $-180 \leq z \leq 180$, how would I arrive at the former? Apologies for the layman explanation.

Best Answer

Are you constrained to using Euler angles? If you can decide freely what representation to use, quaternions would be preferable. In that representation, it's very easy to find which of two quaternions representing a rotation (which differ only by a sign) is closer to a given one.

With Euler angles, if you want the representation to be continuous, you can let the angles range over $\mathbb R$ instead of restricting them to a single (half-)period. However, choosing the nearest of the equivalent representations will then be more complicated than with quaternions. Quite generally, a lot of things that are nasty, complicated and potentially numerically unstable with Euler angles become nicer and easier when you use quaternions.

[Edit in response to the comments:]

There are three equivalences, one obvious, another less obvious and a third only applicable in certain circumstances.

The obvious one is that you can always add multiples of $2\pi$ to any of the angles; if you let them range over $\mathbb R$, which you must if you want to get continuous curves, this corresponds to using $\mathbb R^3$ as the parameter space instead of the quotient $(\mathbb R/2\pi\mathbb Z)^3$. This equivalence is easy to handle since you can change the three angles independently, that is, if you change one of them by a multiple of $2\pi$, you directly get the same rotation without changing the other two parameters.

What's less obvious is that (referring to this image) the transformation $(\alpha,\beta,\gamma)\rightarrow(\alpha+\pi,\pi -\beta,\gamma+\pi)$ leads to the same rotation. (This is why, in order to get unique angles, $\beta$ has to be limited to an interval of length $\pi$, not $2\pi$.)

A third equivalence comes into play only if $\beta\equiv0\pmod{\pi/2}$, since in this case $\alpha$ and $\gamma$ apply to the same axis and changing $\alpha+\gamma$ doesn't change the rotation. If your rotations are arbitrary and have no reason to have $\beta\equiv0$, you won't need to consider this case, though it may cause numerical problems if you get close to $\beta\equiv0$ (which is one good reason to use quaternions instead of Euler angles).

These three transformations generate all values of the Euler angles that are equivalent to each other. Remember that you also have to consider combinations of them, e.g. you can add multiples of $2\pi$ in $(\alpha+\pi,-\beta,\gamma+\pi)$ to get further equivalent angles.

Related Question