The MRP (Modified Rodrigues Parameter) class defined in C++ provides an attitude representation for Cartesian coordinate systems. It is derived from the CartesianVector class and includes additional functionalities specific to attitude representation.
The MRP Class
Description and Naming
The MRP class is a templated class with one template argument - T.
MRP<T>
produces an MRP with three elements of type T.
The argument is:
-
T - The type of the MRP elements. This should be a floating point type.
The MRP class inherits from the CartesianVector class but has additional characteristics:
-
It always has three elements.
-
The default constructor initializes it to zeros.
-
It includes functions to convert to other attitude representations, calculate the rate of change based on angular velocity, and convert to the shadow set of MRPs.
For a complete guide on interacting with the MRP class, refer to the Doxygen documentation: MRP Doxygen
Creating an MRP
Description | C++ Example | Python Example |
---|---|---|
Default Constructor - Creates an MRP initialized to zeros. |
|
|
Constructor with Initial Value - Creates an MRP initialized with values from an initializer list. |
|
|
Constructor with std::array - Creates an MRP initialized with values from a std::array. |
|
|
Copy Constructor - Creates a new MRP as a copy of another MRP. |
|
|
Calculating the Rate of Change
Description | C++ Example | Python Example |
---|---|---|
Rate of Change - Calculates the rate of change of the MRP based on the angular velocity vector. |
|
|
Converting to Shadow Set
Description | C++ Example | Python Example |
---|---|---|
Convert to Shadow Set - Converts the MRP to its shadow set. |
|
|
Conversions to Other Attitude Representations
Description | C++ Example | Python Example |
---|---|---|
Convert to DCM - Converts the MRP to a Direction Cosine Matrix (DCM). |
|
|
Convert to DCM (Return by Value) - Converts and returns the MRP as a DCM. |
|
|
Convert to Quaternion - Converts the MRP to a quaternion. |
|
|
Convert to Quaternion (Return by Value) - Converts and returns the MRP as a quaternion. |
|
|