#include <Rotation.h>
Rotation rotOB; rotOB.Set(deg2rad(40),deg2rad(-10),deg2rad(0), 321); \\ setup a 321 rotation of euler angles with [40, -10, 0] deg cout << rotOB.GetDCM();
Successive Rotations:
Rotation rotOB(quatOB); // create a rotation given the quaternion from Body to Orbital Rotation rotIO(quatIO); // create a rotation given the quaternion from Orbital to Inertial Rotation rotIB; rotIB = rotIO * rotOB; // the successive rotation can be calculate by 'multiplying' the rotations rotIB = rotIO + rotOB; // or by 'adding' them
Inverse Transformation:
Rotation rotBI; rotBI = ~rotIB; // determine the transformation from Inertial to Body from the inverse (transpose) of Body to Inertial
Relative Rotation:
Rotation rotError; rotError = rotTrue - rotActual; // determine the error rotation by taking the 'difference' between the two respective rotations
Definition at line 398 of file Rotation.h.
Public Member Functions | |
Rotation () | |
Default Constructor. Create a Rotation with no offset. | |
Rotation (const Matrix &_inMatrix) | |
Create a Rotation from a direction cosine matrix. | |
Rotation (const DirectionCosineMatrix &_DCM) | |
Create a Rotation from a direction cosine matrix. | |
Rotation (const Vector &_Angles, const int &_Sequence) | |
Create a Rotation from an euler angle sequence. | |
Rotation (const Angle &_Angle1, const Angle &_Angle2, const Angle &_Angle3, const int &_Sequence) | |
Create a Rotation from an euler angle sequence. | |
Rotation (const Vector &_Axis, const Angle &_Angle) | |
Create a Rotation from a given euler axis and angle. | |
Rotation (const ModifiedRodriguezParameters &_MRP) | |
Create a Rotation from a given set of Modified Rodriguez Parameters. | |
Rotation (const Quaternion &_quat) | |
Create a Rotation from a given quaternion. | |
virtual | ~Rotation () |
Default Destructor. | |
void | Set (const Matrix &_inMatrix) |
Set the Rotation from a converted DCM. | |
void | Set (const DirectionCosineMatrix &_DCM) |
Set the Rotation from a converted DCM. | |
void | Set (const Vector &_Angles, const int &_Sequence) |
Set the Rotation from an euler angle sequence. | |
void | Set (const Angle &_Angle1, const Angle &_Angle2, const Angle &_Angle3, const int &_Sequence) |
Create a Rotation from an euler angle sequence. | |
void | Set (const Vector &_Axis, const Angle &_Angle) |
Set the Rotation from a converted Euler Axis and Angle set. | |
void | Set (const ModifiedRodriguezParameters &_MRP) |
Set the Rotation from a converted vector of MRP. | |
void | Set (const Quaternion &_quat) |
Set the Rotation from a converted quaternion. | |
DirectionCosineMatrix | GetDCM () const |
Return the Direction Cosine Matrix (DCM) form of the attitude transformation. | |
Vector | GetEulerAngles (const int &_Sequence) const |
Return the Euler angles from the rotation representation. | |
Vector | GetEulerAxisAngle (Vector &_EulerAxis, Angle &_EulerAngle) const |
Return the Euler Axis and Angle form of the attitude transformation. | |
Vector | GetEulerAxisAngle () const |
Return the Euler Axis and Angle form of the attitude transformation. | |
ModifiedRodriguezParameters | GetMRP () const |
Return the Modified Rodriguez Parameters vector form of the attitude transformation. | |
Quaternion | GetQuaternion () const |
Return the quaternion form of the attitude transformation. | |
Vector | GetRotation (const RotationType &_type, const int &_Sequence=123) const |
Return the rotation based on the specified parameterization. | |
Rotation | Rotation::operator * (const Rotation &_rot2) const |
Vector | Rotation::operator * (const Vector &_vec) const |
Rotation | Rotation::operator~ () const |
Rotation | Rotation::operator+ (const Rotation &_rot2) const |
Rotation | Rotation::operator- (const Rotation &_rot2) const |
Private Attributes | |
Quaternion | m_quaternion |
internal representation of the attitude transformation. | |
RotationSense | m_RotationSense |
Handed-ness of the rotation, either LEFT_HANDED or RIGHT_HANDED. |
|
Default Constructor. Create a Rotation with no offset.
Definition at line 20 of file Rotation.cpp. |
|
Create a Rotation from a direction cosine matrix.
Definition at line 29 of file Rotation.cpp. |
|
Create a Rotation from a direction cosine matrix.
Definition at line 34 of file Rotation.cpp. |
|
Create a Rotation from an euler angle sequence.
Definition at line 40 of file Rotation.cpp. |
|
Create a Rotation from an euler angle sequence.
Definition at line 48 of file Rotation.cpp. |
|
Create a Rotation from a given euler axis and angle.
Definition at line 54 of file Rotation.cpp. |
|
Create a Rotation from a given set of Modified Rodriguez Parameters.
Definition at line 59 of file Rotation.cpp. |
|
Create a Rotation from a given quaternion.
Definition at line 64 of file Rotation.cpp. |
|
Default Destructor.
Definition at line 24 of file Rotation.cpp. |
|
Set the Rotation from a converted DCM.
Definition at line 69 of file Rotation.cpp. |
|
Set the Rotation from a converted DCM.
Definition at line 85 of file Rotation.cpp. |
|
Set the Rotation from an euler angle sequence.
Definition at line 95 of file Rotation.cpp. |
|
Create a Rotation from an euler angle sequence.
Definition at line 107 of file Rotation.cpp. |
|
Set the Rotation from a converted Euler Axis and Angle set.
Definition at line 117 of file Rotation.cpp. |
|
Set the Rotation from a converted vector of MRP.
Definition at line 126 of file Rotation.cpp. |
|
Set the Rotation from a converted quaternion.
Definition at line 135 of file Rotation.cpp. |
|
Return the Direction Cosine Matrix (DCM) form of the attitude transformation.
Definition at line 148 of file Rotation.cpp. |
|
Return the Euler angles from the rotation representation.
Definition at line 157 of file Rotation.cpp. |
|
Return the Euler Axis and Angle form of the attitude transformation.
Definition at line 174 of file Rotation.cpp. |
|
Return the Euler Axis and Angle form of the attitude transformation.
Definition at line 165 of file Rotation.cpp. |
|
Return the Modified Rodriguez Parameters vector form of the attitude transformation.
Definition at line 182 of file Rotation.cpp. |
|
Return the quaternion form of the attitude transformation.
Definition at line 190 of file Rotation.cpp. |
|
Return the rotation based on the specified parameterization.
Definition at line 201 of file Rotation.cpp. |
|
|
|
|
|
|
|
|
|
|
|
internal representation of the attitude transformation.
Definition at line 466 of file Rotation.h. |
|
Handed-ness of the rotation, either LEFT_HANDED or RIGHT_HANDED.
Definition at line 469 of file Rotation.h. |