OpenFAST
Wind turbine multiphysics simulator
|
If M is a rotation matrix from a 1-2-3 rotation sequence about Y-X-Z, this function returns the 3 sequential angles, \(\theta_y\), \(\theta_x\), and \(\theta_z\) (in radians), that formed the matrix. More...
Public Member Functions | |
real(siki) function, dimension(3) | taitbryanyxzextractr4 (M) |
If M is a rotation matrix from a 1-2-3 rotation sequence about Y-X-Z, this function returns the 3 sequential angles, \(\theta_y\), \(\theta_x\), and \(\theta_z\) (in radians), that formed the matrix. More... | |
real(r8ki) function, dimension(3) | taitbryanyxzextractr8 (M) |
See nwtc_num::taitbryanyxzextractr4 for detailed explanation of algorithm. More... | |
real(quki) function, dimension(3) | taitbryanyxzextractr16 (M) |
See nwtc_num::taitbryanyxzextractr4 for detailed explanation of algorithm. More... | |
If M is a rotation matrix from a 1-2-3 rotation sequence about Y-X-Z, this function returns the 3 sequential angles, \(\theta_y\), \(\theta_x\), and \(\theta_z\) (in radians), that formed the matrix.
M represents a change of basis (from global to local coordinates; not a physical rotation of the body; passive rotation).
See Tait-Bryan angle \( Y_1 X_2 Z_3 \) at https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix Note that what we are using here is the passive rotation, which is the transpose of what appears in the wikipedia article.
\begin{eqnarray*} M & = & R(\theta_z) R(\theta_x) R(\theta_y) & = & R(\theta_3) R(\theta_2) R(\theta_1) \\ & = & \begin{bmatrix} \cos(\theta_z) & \sin(\theta_z) & 0 \\ -\sin(\theta_z) & \cos(\theta_z) & 0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} 1 & 0 & 0 \\ 0 & \cos(\theta_x) & \sin(\theta_x) \\ 0 & -\sin(\theta_x) & \cos(\theta_x) \end{bmatrix} \begin{bmatrix} \cos(\theta_y) & 0 & -\sin(\theta_y) \\ 0 & 1 & 0 \\ \sin(\theta_y) & 0 & \cos(\theta_y) \end{bmatrix} & = & \begin{bmatrix} C_3 & S_3 & 0 \\ -S_3 & C_3 & 0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} 1 & 0 & 0 \\ 0 & C_2 & S_2 \\ 0 & -S_2 & C_2 \end{bmatrix} \begin{bmatrix} C_1 & 0 & -S_1 \\ 0 & 1 & 0 \\ S_1 & 0 & C_1 \end{bmatrix} \\ & = & \begin{bmatrix} \cos(\theta_y) \cos(\theta_z) + \sin(\theta_y) \sin(\theta_x) \sin(\theta_z) & \cos(\theta_x) \sin(\theta_z) & \cos(\theta_y) \sin(\theta_x) \sin(\theta_z) - \sin(\theta_y) \cos(\theta_z) \\ \sin(\theta_y) \sin(\theta_x) \cos(\theta_z) - \cos(\theta_y) \sin(\theta_z) & \cos(\theta_x) \cos(\theta_z) & \cos(\theta_y) \sin(\theta_x) \cos(\theta_z) + \sin(\theta_y) \sin(\theta_z) \\ \sin(\theta_y) \cos(\theta_x) & -\sin(\theta_x) & \cos(\theta_y) \cos(\theta_x) \\ \end{bmatrix} & = & \begin{bmatrix} C_1 C_3 + S_1 S_2 S_3 & C_2 S_3 & C_1 S_2 S_3 - S_1 C_3 \\ S_1 S_2 C_3 - C_1 S_3 & C_2 C_3 & C_1 S_2 C_3 + S_1 S_3 \\ S_1 C_2 & -S_2 & C_1 C_2 \\ \end{bmatrix} \end{eqnarray*}
returned angles are in the range \(\theta_y,\theta_x, \theta_z \in \left[ \pi, -\pi \right]\)
Use TaitBryanYXZExtract (nwtc_num::taitbryanyxzextract) instead of directly calling a specific routine in the generic interface.
[in] | m | rotation matrix, M |
real(quki) function, dimension(3) nwtc_num::taitbryanyxzextract::taitbryanyxzextractr16 | ( | real(quki), dimension(3,3), intent(in) | M | ) |
See nwtc_num::taitbryanyxzextractr4 for detailed explanation of algorithm.
[in] | m | rotation matrix, M |
real(siki) function, dimension(3) nwtc_num::taitbryanyxzextract::taitbryanyxzextractr4 | ( | real(siki), dimension(3,3), intent(in) | M | ) |
If M is a rotation matrix from a 1-2-3 rotation sequence about Y-X-Z, this function returns the 3 sequential angles, \(\theta_y\), \(\theta_x\), and \(\theta_z\) (in radians), that formed the matrix.
M represents a change of basis (from global to local coordinates; not a physical rotation of the body; passive rotation).
See Tait-Bryan angle \( Y_1 X_2 Z_3 \) at https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix Note that what we are using here is the passive rotation, which is the transpose of what appears in the wikipedia article.
\begin{eqnarray*} M & = & R(\theta_z) R(\theta_x) R(\theta_y) & = & R(\theta_3) R(\theta_2) R(\theta_1) \\ & = & \begin{bmatrix} \cos(\theta_z) & \sin(\theta_z) & 0 \\ -\sin(\theta_z) & \cos(\theta_z) & 0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} 1 & 0 & 0 \\ 0 & \cos(\theta_x) & \sin(\theta_x) \\ 0 & -\sin(\theta_x) & \cos(\theta_x) \end{bmatrix} \begin{bmatrix} \cos(\theta_y) & 0 & -\sin(\theta_y) \\ 0 & 1 & 0 \\ \sin(\theta_y) & 0 & \cos(\theta_y) \end{bmatrix} & = & \begin{bmatrix} C_3 & S_3 & 0 \\ -S_3 & C_3 & 0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} 1 & 0 & 0 \\ 0 & C_2 & S_2 \\ 0 & -S_2 & C_2 \end{bmatrix} \begin{bmatrix} C_1 & 0 & -S_1 \\ 0 & 1 & 0 \\ S_1 & 0 & C_1 \end{bmatrix} \\ & = & \begin{bmatrix} \cos(\theta_y) \cos(\theta_z) + \sin(\theta_y) \sin(\theta_x) \sin(\theta_z) & \cos(\theta_x) \sin(\theta_z) & \cos(\theta_y) \sin(\theta_x) \sin(\theta_z) - \sin(\theta_y) \cos(\theta_z) \\ \sin(\theta_y) \sin(\theta_x) \cos(\theta_z) - \cos(\theta_y) \sin(\theta_z) & \cos(\theta_x) \cos(\theta_z) & \cos(\theta_y) \sin(\theta_x) \cos(\theta_z) + \sin(\theta_y) \sin(\theta_z) \\ \sin(\theta_y) \cos(\theta_x) & -\sin(\theta_x) & \cos(\theta_y) \cos(\theta_x) \\ \end{bmatrix} & = & \begin{bmatrix} C_1 C_3 + S_1 S_2 S_3 & C_2 S_3 & C_1 S_2 S_3 - S_1 C_3 \\ S_1 S_2 C_3 - C_1 S_3 & C_2 C_3 & C_1 S_2 C_3 + S_1 S_3 \\ S_1 C_2 & -S_2 & C_1 C_2 \\ \end{bmatrix} \end{eqnarray*}
returned angles are in the range \(\theta_y,\theta_x, \theta_z \in \left[ \pi, -\pi \right]\)
Use TaitBryanYXZExtract (nwtc_num::taitbryanyxzextract) instead of directly calling a specific routine in the generic interface.
[in] | m | rotation matrix, M |
real(r8ki) function, dimension(3) nwtc_num::taitbryanyxzextract::taitbryanyxzextractr8 | ( | real(r8ki), dimension(3,3), intent(in) | M | ) |
See nwtc_num::taitbryanyxzextractr4 for detailed explanation of algorithm.
[in] | m | rotation matrix, M |