OpenFAST
Wind turbine multiphysics simulator
Public Member Functions | List of all members
nwtc_num::eulerextract Interface Reference

if M is a rotation matrix from a 1-2-3 rotation sequence, this function returns the 3 Euler angles, \(\theta_x\), \(\theta_y\), and \(\theta_z\) (in radians), that formed the matrix. More...

Public Member Functions

real(siki) function, dimension(3) eulerextractr4 (M)
 if M is a rotation matrix from a 1-2-3 rotation sequence, this function returns the 3 Euler angles, \(\theta_x\), \(\theta_y\), and \(\theta_z\) (in radians), that formed the matrix. More...
 
real(r8ki) function, dimension(3) eulerextractr8 (M)
 if M is a rotation matrix from a 1-2-3 rotation sequence, this function returns the 3 Euler angles, \(\theta_x\), \(\theta_y\), and \(\theta_z\) (in radians), that formed the matrix. More...
 
real(quki) function, dimension(3) eulerextractr16 (M)
 if M is a rotation matrix from a 1-2-3 rotation sequence, this function returns the 3 Euler angles, \(\theta_x\), \(\theta_y\), and \(\theta_z\) (in radians), that formed the matrix. More...
 

Detailed Description

if M is a rotation matrix from a 1-2-3 rotation sequence, this function returns the 3 Euler angles, \(\theta_x\), \(\theta_y\), 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). M is the inverse of EulerConstruct (nwtc_num::eulerconstruct).

\begin{eqnarray*} M & = & R(\theta_z) R(\theta_y) R(\theta_x) \\ & = & \begin{bmatrix} \cos(\theta_z) & \sin(\theta_z) & 0 \\ -\sin(\theta_z) & \cos(\theta_z) & 0 \\ 0 & 0 & 1 \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} 1 & 0 & 0 \\ 0 & \cos(\theta_x) & \sin(\theta_x) \\ 0 & -\sin(\theta_x) & \cos(\theta_x) \end{bmatrix} \\ & = & \begin{bmatrix} \cos(\theta_y)\cos(\theta_z) & \cos(\theta_x)\sin(\theta_z)+\sin(\theta_x)\sin(\theta_y)\cos(\theta_z) & \sin(\theta_x)\sin(\theta_z)-\cos(\theta_x)\sin(\theta_y)\cos(\theta_z) \\ -\cos(\theta_y)\sin(\theta_z) & \cos(\theta_x)\cos(\theta_z)-\sin(\theta_x)\sin(\theta_y)\sin(\theta_z) & \sin(\theta_x)\cos(\theta_z)+\cos(\theta_x)\sin(\theta_y)\sin(\theta_z) \\ \sin(\theta_y) & -\sin(\theta_x)\cos(\theta_y) & \cos(\theta_x)\cos(\theta_y) \\ \end{bmatrix} \end{eqnarray*}

returned angles are in the range \(\theta_x,\theta_y, \theta_z \in \left[ \pi, -\pi \right]\)
Use EulerExtract (nwtc_num::eulerextract) instead of directly calling a specific routine in the generic interface.

Parameters
[in]mrotation matrix, M
Returns
the 3 rotation angles: \(\theta_x, \theta_y, \theta_z\)

Member Function/Subroutine Documentation

◆ eulerextractr16()

real(quki) function, dimension(3) nwtc_num::eulerextract::eulerextractr16 ( real(quki), dimension(3,3), intent(in)  M)

if M is a rotation matrix from a 1-2-3 rotation sequence, this function returns the 3 Euler angles, \(\theta_x\), \(\theta_y\), 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). M is the inverse of EulerConstruct (nwtc_num::eulerconstruct).

\begin{eqnarray*} M & = & R(\theta_z) R(\theta_y) R(\theta_x) \\ & = & \begin{bmatrix} \cos(\theta_z) & \sin(\theta_z) & 0 \\ -\sin(\theta_z) & \cos(\theta_z) & 0 \\ 0 & 0 & 1 \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} 1 & 0 & 0 \\ 0 & \cos(\theta_x) & \sin(\theta_x) \\ 0 & -\sin(\theta_x) & \cos(\theta_x) \end{bmatrix} \\ & = & \begin{bmatrix} \cos(\theta_y)\cos(\theta_z) & \cos(\theta_x)\sin(\theta_z)+\sin(\theta_x)\sin(\theta_y)\cos(\theta_z) & \sin(\theta_x)\sin(\theta_z)-\cos(\theta_x)\sin(\theta_y)\cos(\theta_z) \\ -\cos(\theta_y)\sin(\theta_z) & \cos(\theta_x)\cos(\theta_z)-\sin(\theta_x)\sin(\theta_y)\sin(\theta_z) & \sin(\theta_x)\cos(\theta_z)+\cos(\theta_x)\sin(\theta_y)\sin(\theta_z) \\ \sin(\theta_y) & -\sin(\theta_x)\cos(\theta_y) & \cos(\theta_x)\cos(\theta_y) \\ \end{bmatrix} \end{eqnarray*}

returned angles are in the range \(\theta_x,\theta_y, \theta_z \in \left[ \pi, -\pi \right]\)
Use EulerExtract (nwtc_num::eulerextract) instead of directly calling a specific routine in the generic interface.

Parameters
[in]mrotation matrix, M
Returns
the 3 rotation angles: \(\theta_x, \theta_y, \theta_z\)

◆ eulerextractr4()

real(siki) function, dimension(3) nwtc_num::eulerextract::eulerextractr4 ( real(siki), dimension(3,3), intent(in)  M)

if M is a rotation matrix from a 1-2-3 rotation sequence, this function returns the 3 Euler angles, \(\theta_x\), \(\theta_y\), 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). M is the inverse of EulerConstruct (nwtc_num::eulerconstruct).

\begin{eqnarray*} M & = & R(\theta_z) R(\theta_y) R(\theta_x) \\ & = & \begin{bmatrix} \cos(\theta_z) & \sin(\theta_z) & 0 \\ -\sin(\theta_z) & \cos(\theta_z) & 0 \\ 0 & 0 & 1 \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} 1 & 0 & 0 \\ 0 & \cos(\theta_x) & \sin(\theta_x) \\ 0 & -\sin(\theta_x) & \cos(\theta_x) \end{bmatrix} \\ & = & \begin{bmatrix} \cos(\theta_y)\cos(\theta_z) & \cos(\theta_x)\sin(\theta_z)+\sin(\theta_x)\sin(\theta_y)\cos(\theta_z) & \sin(\theta_x)\sin(\theta_z)-\cos(\theta_x)\sin(\theta_y)\cos(\theta_z) \\ -\cos(\theta_y)\sin(\theta_z) & \cos(\theta_x)\cos(\theta_z)-\sin(\theta_x)\sin(\theta_y)\sin(\theta_z) & \sin(\theta_x)\cos(\theta_z)+\cos(\theta_x)\sin(\theta_y)\sin(\theta_z) \\ \sin(\theta_y) & -\sin(\theta_x)\cos(\theta_y) & \cos(\theta_x)\cos(\theta_y) \\ \end{bmatrix} \end{eqnarray*}

returned angles are in the range \(\theta_x,\theta_y, \theta_z \in \left[ \pi, -\pi \right]\)
Use EulerExtract (nwtc_num::eulerextract) instead of directly calling a specific routine in the generic interface.

Parameters
[in]mrotation matrix, M
Returns
the 3 rotation angles: \(\theta_x, \theta_y, \theta_z\)

◆ eulerextractr8()

real(r8ki) function, dimension(3) nwtc_num::eulerextract::eulerextractr8 ( real(r8ki), dimension(3,3), intent(in)  M)

if M is a rotation matrix from a 1-2-3 rotation sequence, this function returns the 3 Euler angles, \(\theta_x\), \(\theta_y\), 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). M is the inverse of EulerConstruct (nwtc_num::eulerconstruct).

\begin{eqnarray*} M & = & R(\theta_z) R(\theta_y) R(\theta_x) \\ & = & \begin{bmatrix} \cos(\theta_z) & \sin(\theta_z) & 0 \\ -\sin(\theta_z) & \cos(\theta_z) & 0 \\ 0 & 0 & 1 \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} 1 & 0 & 0 \\ 0 & \cos(\theta_x) & \sin(\theta_x) \\ 0 & -\sin(\theta_x) & \cos(\theta_x) \end{bmatrix} \\ & = & \begin{bmatrix} \cos(\theta_y)\cos(\theta_z) & \cos(\theta_x)\sin(\theta_z)+\sin(\theta_x)\sin(\theta_y)\cos(\theta_z) & \sin(\theta_x)\sin(\theta_z)-\cos(\theta_x)\sin(\theta_y)\cos(\theta_z) \\ -\cos(\theta_y)\sin(\theta_z) & \cos(\theta_x)\cos(\theta_z)-\sin(\theta_x)\sin(\theta_y)\sin(\theta_z) & \sin(\theta_x)\cos(\theta_z)+\cos(\theta_x)\sin(\theta_y)\sin(\theta_z) \\ \sin(\theta_y) & -\sin(\theta_x)\cos(\theta_y) & \cos(\theta_x)\cos(\theta_y) \\ \end{bmatrix} \end{eqnarray*}

returned angles are in the range \(\theta_x,\theta_y, \theta_z \in \left[ \pi, -\pi \right]\)
Use EulerExtract (nwtc_num::eulerextract) instead of directly calling a specific routine in the generic interface.

Parameters
[in]mrotation matrix, M
Returns
the 3 rotation angles: \(\theta_x, \theta_y, \theta_z\)

The documentation for this interface was generated from the following file: