![]() |
ModelSpace
|
Class defining a direction cosine matrix inherited from Matrix. More...
#include <DCM.hpp>
Public Member Functions | |
DCM () | |
Default constructor generates DCM as an identity matrix. | |
DCM (const T(&initial)[3][3]) | |
Constructor for Matrix class with initialization. Initializes matrix to values passed in via array. | |
DCM (const DCM< T > &initial) | |
Copy constructor for Matrix class. Copies data from matrix object to the current instance. | |
DCM (const std::array< std::array< T, 3 >, 3 > &initial) | |
Constructor for Matrix class with initialization. Initializes matrix to values passed in via array. | |
~DCM () | |
Destructor – doesn't do anything because we don't dynamically allocate. | |
int | inverse (DCM< T > &result) const |
Function to return the inverse of the matrix. | |
DCM< T > | inverse () const |
void | rate (const CartesianVector< T, 3 > &omega_f1_f2__f1, Matrix< T, 3, 3 > &dcmdot_f1_f2) |
Function to calculate the rate of change in the current representation based on the omega vector. | |
int | toEuler321 (Euler321< T > &euler_f1_f2) const |
Function to convert current attitude to 321 Euler sequence. | |
Euler321< T > | toEuler321 () |
int | toQuaternion (Quaternion< T > &q_f1_f2) const |
Overloaded functions to convert current attitude to quaternion. | |
Quaternion< T > | toQuaternion () |
int | toMRP (MRP< T > &mrp_f1_f2) const |
Overloaded functions to convert current attitude to MRP. | |
MRP< T > | toMRP () |
void | dump () const |
Function to dump information on matrix. | |
std::string | str () const |
Function to dump information on matrix to string. | |
int | set (const unsigned int &row, const unsigned int &col, const T &value) |
Function to set a single value in the matrix. | |
int | get (const unsigned int &row, const unsigned int &col, T &result) const |
Function to get a single value in the matrix. | |
T | get (const unsigned int &row, const unsigned int &col) const |
Function to get a single value in the matrix. | |
void | setFromArray (const T *start_ptr) |
Function to set the values of the matrix row-wise. | |
void | getAsArray (T *start_ptr) const |
Function to get the values of the matrix row-wise. | |
void | getCopy (Matrix< T, R, C > &result) const |
Function to get a copy of the matrix. | |
T * | operator[] (unsigned int idx) |
Function to return a matrix row or vector value. | |
std::pair< unsigned int, unsigned int > | size () |
Function to get the size of the matrix. | |
void | max (T &result, std::pair< unsigned int, unsigned int > &index) const |
Function to return the maximum value in the matrix. | |
void | min (T &result, std::pair< unsigned int, unsigned int > &index) const |
Function to return the minimum value in the matrix. | |
int | det (T &result) const |
Function to return the determinant of the matrix. | |
int | inverse (Matrix< T, R, C > &result) const |
Function to return the inverse of the matrix. | |
void | transpose (Matrix< T, C, R > &result) const |
Function to return the transpose of the matrix. | |
Matrix< T, C, R > | transpose () const |
int | trace (T &result) const |
Function to return the trace of the matrix. | |
void | setToZeros () |
Function to set all elements of the matrix to zero. | |
int | identity () |
Function to set matrix to identity, if it is a square matrix. | |
int | eye () |
Public Attributes | |
std::array< std::array< T, C >, R > | values |
The actual values held by the matrix – a two dimensional array of values indexed as (row, column). NOTE: Public for ease of access and speed (no need to use setter/getter), and functions in Matrix and Safemath libraries are tested safe. Behavior using matrices outside of clockwerk libraries should use setter/getter, rather than direct access, for safety. | |
Protected Member Functions | |
int | _checkLookupBoundaries (const unsigned int &start_r, const unsigned int &end_r, const unsigned int &start_c, const unsigned int &end_c) const |
Function to check, given a set of submatrix boundaries, that those boundaries are valid for the current matrix. | |
int | _LUPDecompose (T *A[R], unsigned int P[R+1]) const |
Function to take a 2-d matrix represented by A and decompose it into LU form. | |
Class defining a direction cosine matrix inherited from Matrix.
This file defines a simple DCM attitude representation for cartesian coordinate systems. It is largely the same as the base matrix class, with the following exceptions:
|
protectedinherited |
Function to take a 2-d matrix represented by A and decompose it into LU form.
A | A 2-d matrix represented as a double pointer After ops A contains a copy of both matrices L-E and U as A=(L-E)+U such that P*A=L*U. |
P | The permutation matrix to hold info on matrix changes |
|
inherited |
|
inherited |
Function to get a single value in the matrix.
row | The row index |
col | The column index |
|
inherited |
Function to get a single value in the matrix.
row | The row index |
col | The column index |
value | PBR return of the value in the matrix |
|
inherited |
Function to get the values of the matrix row-wise.
start_ptr | The data address at which write should begin. |
|
inherited |
Function to get a copy of the matrix.
result | PBR return of a copy of this matrix |
|
inherited |
Function to set matrix to identity, if it is a square matrix.
int clockwerk::DCM< T >::inverse | ( | DCM< T > & | result | ) | const |
Function to return the inverse of the matrix.
result | PBR return of matrix inverse |
|
inherited |
Function to return the inverse of the matrix.
result | PBR return of matrix inverse |
|
inherited |
Function to return the maximum value in the matrix.
result | PBR return of maximum value |
|
inherited |
Function to return the minimum value in the matrix.
result | PBR return of minimum value |
|
inherited |
Function to return a matrix row or vector value.
idx | The row index to return |
void clockwerk::DCM< T >::rate | ( | const CartesianVector< T, 3 > & | omega_f1_f2__f1, |
Matrix< T, 3, 3 > & | dcmdot_f1_f2 | ||
) |
Function to calculate the rate of change in the current representation based on the omega vector.
omega_f1_f2__f1 | Angular velocity vector for the attitude representation - omega of frame 1 wrt frame 2 expressed in frame 1 |
dcmdot_f1_f2 | Rate of change in the current DCM |
|
inherited |
|
inherited |
Function to set the values of the matrix row-wise.
start_ptr | The data address at which read should begin. |
|
inlineinherited |
int clockwerk::DCM< T >::toEuler321 | ( | Euler321< T > & | euler_f1_f2 | ) | const |
Function to convert current attitude to 321 Euler sequence.
PBR | return of 321 Euler sequence in PBR case |
int clockwerk::DCM< T >::toMRP | ( | MRP< T > & | mrp_f1_f2 | ) | const |
int clockwerk::DCM< T >::toQuaternion | ( | Quaternion< T > & | q_f1_f2 | ) | const |
Overloaded functions to convert current attitude to quaternion.
PBR | return of quaternion in PBR case |
|
inherited |
Function to return the trace of the matrix.
result | PBR return of matrix trace |
|
inherited |
Function to return the transpose of the matrix.
result | PBR return of matrix transpose |