Angle of rotation based on direction cosines

2.9k Views Asked by At

I have a question which is bothering me for days! Suppose that we have a fixed frame $XYZ$ and a moving frame $xyz$ in 3D. The moving frame is orthonormal and is defined based on the fixed one using 9 direction cosines. For instance, the unit vector $x$ is $(l_1,m_1,n_1)$ where $l_1$, $m_1$ and $n_1$ are the cosines of the angles between $x$ and $X$, $Y$ and $Z$ respectively. Similarly, we have $y=(l_2,m_2,n_2)$ and $z=(l_3,m_3,n_3)$ which are also unit vectors.

My question is: At first the moving frame $xyz$ coincides $XYZ$. Then it rotates arbitrary to form a frame with known direction cosines. How can I calculate the angle of rotation of the moving frame around its $z$ axis based on the 9 direction cosines. In other words, how much the $x$-axis rotates around the $z$-axis?

Thanks a lot for saving me!

2

There are 2 best solutions below

0
On

I didn't read your question closely enough. Below is the answer to how to find which axis the rotation is about and the angle of rotation about that axis. I'm leaving it, though, in case it is useful.


Set this form of the rotation matrix equal to your version. Solve for the axis vector $(u_x, u_y, u_z)$ and the angle of rotation $\theta$

0
On

The short answer is that there is not a single way to undo the rotation.

The basic concept is that mapping the attitude of one system (XYZ) to another, can be done in infinite number of ways using the rotation operators; such as angles-axis which is a single operation, or Euler angles which is what you seem to be asking for.

Euler angles are comprised of three different rotations; (there are six different sequences for Euler angles). The point is: if you change the order/sequence of these three rotations, but with same value for angles, you would end up with a different outcome.

So when you're asking how much x rotates around z, you should decide on how you want to continue the rest of rotation; is it going to rotation around the new x and then the new z? or is it going to rotate first around y and then z.

But if you decide on the whole process, let's say ZXY-Euler, and if you are looking for how to convert your rotation to a ZXY-Euler then you have to solve an equation system with 9 equations and 3 variables (good news), and there are singularities at certain angles (bad news!). Take a look at rotation matrices based on Euler angles to solve for Euler-anlges when you have your rotation matrix (3x3).