Class astrea::astro::DirectionCosineMatrix¶
template <typename In_Frame_T, typename Out_Frame_T>
ClassList > astrea > astro > DirectionCosineMatrix
Class representing a direction cosine matrix (DCM) for transforming vectors between state/frames. More...
#include <DirectionCosineMatrix.hpp>
Public Functions¶
| Type | Name |
|---|---|
| DirectionCosineMatrix (const std::array< std::array< Unitless, 3 >, 3 > & matrix) Constructor for DirectionCosineMatrix from an array of CartesianVectors. |
|
| CartesianVector< Value_T, Out_Frame_T > | operator* (const CartesianVector< Value_T, In_Frame_T > & vec) const Apply the direction cosine matrix to a CartesianVector . |
| CartesianVector< Unitless, In_Frame_T > | row (const std::size_t & idx) const Get a specific row of the direction cosine matrix. |
| DirectionCosineMatrix< Out_Frame_T, In_Frame_T > | transpose () const |
Public Static Functions¶
| Type | Name |
|---|---|
| DirectionCosineMatrix< In_Frame_T, Out_Frame_T > | X (const Angle & theta) Creates a direction cosine matrix for a rotation around the X-axis. |
| DirectionCosineMatrix< In_Frame_T, Out_Frame_T > | XZX (const Angle & alpha, const Angle & beta, const Angle & gamma) Creates a direction cosine matrix for a rotation around the X-axis followed by a rotation around the Z-axis. |
| DirectionCosineMatrix< In_Frame_T, Out_Frame_T > | Y (const Angle & theta) Creates a direction cosine matrix for a rotation around the Y-axis. |
| DirectionCosineMatrix< In_Frame_T, Out_Frame_T > | Z (const Angle & theta) Creates a direction cosine matrix for a rotation around the Z-axis. |
| DirectionCosineMatrix< In_Frame_T, Out_Frame_T > | from_vectors (const CartesianVector< Unitless, In_Frame_T > & x, const CartesianVector< Unitless, In_Frame_T > & y, const CartesianVector< Unitless, In_Frame_T > & z) Creates a direction cosine matrix from three orthonormal vectors. |
| DirectionCosineMatrix< In_Frame_T, Out_Frame_T > | identity () |
Detailed Description¶
This class provides methods to create DCMs for various rotations and to apply them to vectors.
Template parameters:
Out_Frame_TThe frame type to which the DCM applies.
Public Functions Documentation¶
function DirectionCosineMatrix¶
Constructor for DirectionCosineMatrix from an array of CartesianVectors.
inline astrea::astro::DirectionCosineMatrix::DirectionCosineMatrix (
const std::array< std::array< Unitless, 3 >, 3 > & matrix
)
Parameters:
matrixAn array containing the three rows of the DCM, each represented as a CartesianVector.
function operator*¶
Apply the direction cosine matrix to a CartesianVector .
template<typename Value_T>
inline CartesianVector < Value_T, Out_Frame_T > astrea::astro::DirectionCosineMatrix::operator* (
const CartesianVector < Value_T, In_Frame_T > & vec
) const
Template parameters:
Value_TThe type of the vector components.Frame_TThe frame of the CartesianVector.
Parameters:
vecThe CartesianVector to which the DCM will be applied.
Returns:
CartesianVector<Value_T, Out_Frame_T> The transformed CartesianVector in the output frame.
function row¶
Get a specific row of the direction cosine matrix.
inline CartesianVector < Unitless, In_Frame_T > astrea::astro::DirectionCosineMatrix::row (
const std::size_t & idx
) const
Parameters:
idxThe index of the row to retrieve (0, 1, or 2).
Returns:
const CartesianVector<Value_T, In_Frame_T>& The requested row as a CartesianVector.
function transpose¶
inline DirectionCosineMatrix < Out_Frame_T, In_Frame_T > astrea::astro::DirectionCosineMatrix::transpose () const
Public Static Functions Documentation¶
function X¶
Creates a direction cosine matrix for a rotation around the X-axis.
static inline DirectionCosineMatrix < In_Frame_T, Out_Frame_T > astrea::astro::DirectionCosineMatrix::X (
const Angle & theta
)
Parameters:
thetaThe angle of rotation around the X-axis.
Returns:
DirectionCosineMatrix<Out_Frame_T> The resulting direction cosine matrix.
function XZX¶
Creates a direction cosine matrix for a rotation around the X-axis followed by a rotation around the Z-axis.
static inline DirectionCosineMatrix < In_Frame_T, Out_Frame_T > astrea::astro::DirectionCosineMatrix::XZX (
const Angle & alpha,
const Angle & beta,
const Angle & gamma
)
Parameters:
alphaThe angle of rotation around the X-axis.betaThe angle of rotation around the Y-axis.gammaThe angle of rotation around the Z-axis.
Returns:
DirectionCosineMatrix<Out_Frame_T> The resulting direction cosine matrix.
function Y¶
Creates a direction cosine matrix for a rotation around the Y-axis.
static inline DirectionCosineMatrix < In_Frame_T, Out_Frame_T > astrea::astro::DirectionCosineMatrix::Y (
const Angle & theta
)
Parameters:
thetaThe angle of rotation around the Y-axis.
Returns:
DirectionCosineMatrix<Out_Frame_T> The resulting direction cosine matrix.
function Z¶
Creates a direction cosine matrix for a rotation around the Z-axis.
static inline DirectionCosineMatrix < In_Frame_T, Out_Frame_T > astrea::astro::DirectionCosineMatrix::Z (
const Angle & theta
)
Parameters:
thetaThe angle of rotation around the Z-axis.
Returns:
DirectionCosineMatrix<Out_Frame_T> The resulting direction cosine matrix.
function from_vectors¶
Creates a direction cosine matrix from three orthonormal vectors.
static inline DirectionCosineMatrix < In_Frame_T, Out_Frame_T > astrea::astro::DirectionCosineMatrix::from_vectors (
const CartesianVector < Unitless, In_Frame_T > & x,
const CartesianVector < Unitless, In_Frame_T > & y,
const CartesianVector < Unitless, In_Frame_T > & z
)
Parameters:
xThe unit vector in the X direction.yThe unit vector in the Y direction.zThe unit vector in the Z direction.
Returns:
DirectionCosineMatrix<Out_Frame_T> The resulting direction cosine matrix.
function identity¶
static inline DirectionCosineMatrix < In_Frame_T, Out_Frame_T > astrea::astro::DirectionCosineMatrix::identity ()
The documentation for this class was generated from the following file astrea/astro/astro/frames/types/DirectionCosineMatrix.hpp