Transforming rotation matrix to fit a different axis

439 Views Asked by At

I have data of a rotation matrix that comes from a sensor like this with its corresponding axes:

enter image description here

Suppose $R_xR_yR_z = R = \begin{bmatrix} x_{11} & x_{12} & x_{13} \\ x_{21} & x_{22} & x_{23} \\ x_{31} & x_{32} & x_{33} \end{bmatrix}$

I want to transform those matrices (which come as $R$) so they will fit this axis:

enter image description here

So do I need to rotate $R$ 90 degrees along x axis in the direction of the arrow?

enter image description here

Which is the following?

$ RR_x(90) = \begin{bmatrix} x_{11} & x_{12} & x_{13} \\ x_{21} & x_{22} & x_{23} \\ x_{31} & x_{32} & x_{33} \end{bmatrix} $$ \begin{bmatrix} 1 & 0 & 0 \\ 0 & cos(90) & -sin(90) \\ 0 & sin(90) & cos(90) \end{bmatrix}$