The Rotation class is the most general, and useful, of the Kinematics Toolbox classes. All attitudes can be stored as a Rotation, and then retrieved in any of the desired formats (MRP, DCM, Quaternion, Euler Axis & Angle, Euler Angle).
Here are some examples of using the kinematics toolbox in general. For more specific examples refer to the appropriate classes documentation.
DirectionCosineMatrix dcm1(deg2rad(30),deg2rad(-10),deg2rad(5), 123); // create a DCM with successive rotations of [30,-10,5] degs in a 123 rotation order Quaternion q1(dcm1); // create a quaternion that is the same attitude transformation as dcm1 Quaternion q2(~dcm1); // create a second quaternion that is the transpose of dcm1 (~dcm1) Rotation rot1(q1 * q2); // create a rotation that is the successive rotation of q1 and q2 cout << rot1; // output rot1 to the standard stream (usually the screen)
Vector eulerAxis; double eulerAngle; rot1.GetEulerAxisAngle(eulerAxis, eulerAngle); cout << eulerAxis << eulerAngle;
testRotation.cpp Demonstrates the use of the Rotation class and associated kinematic representations.
Classes | |
class | O_SESSAME::DirectionCosineMatrix |
3x3 direction cosine matrix attitude representation. More... | |
class | O_SESSAME::ModifiedRodriguezParameters |
3x1 Modified Rodriguez Parameters attitude representation. More... | |
class | O_SESSAME::Quaternion |
The non-singular, redundant Euler parameter (quaternion) vector. More... | |
class | O_SESSAME::Rotation |
A generalized rotation class to represent any attitude coordinate transformation. More... | |
Enumerations | |
enum | O_SESSAME::RotationType { O_SESSAME::DCM_Type, O_SESSAME::EulerAngle_Type, O_SESSAME::EulerAxisAngle_Type, O_SESSAME::MRP_Type, O_SESSAME::Quaternion_Type } |
Various representations of a rotation. More... | |
enum | O_SESSAME::RotationSense { O_SESSAME::LEFT_HAND = -1, O_SESSAME::RIGHT_HAND = 1 } |
The Sense, or "handedness" of a rotation system. More... | |
Functions | |
DirectionCosineMatrix | O_SESSAME::R1 (const Angle &_Angle) |
Calculates the principal rotation of the angle about the 1-axis. DirectionCosineMatrix. | |
DirectionCosineMatrix | O_SESSAME::R2 (const Angle &_Angle) |
Calculates the principal rotation of the angle about the 2-axis. DirectionCosineMatrix. | |
DirectionCosineMatrix | O_SESSAME::R3 (const Angle &_Angle) |
Calculates the principal rotation of the angle about the 3-axis. DirectionCosineMatrix. | |
Variables | |
const int | O_SESSAME::QUATERNION_SIZE = 4 |
Number of elements in a quaternion vector. | |
const int | O_SESSAME::MRP_SIZE = 3 |
Number of elements in a MRP vector. | |
const int | O_SESSAME::DCM_SIZE = 3 |
Number of elements in a DCM row or column. | |
const int | O_SESSAME::EULERAXIS_SIZE = 3 |
Number of elements in an euler axis. | |
const int | O_SESSAME::EULERANGLES_SIZE = 3 |
Number of elements in an euler angle sequence. |
|
The Sense, or "handedness" of a rotation system.
Definition at line 77 of file Rotation.h. |
|
Various representations of a rotation.
Definition at line 74 of file Rotation.h. |
|
Calculates the principal rotation of the angle about the 1-axis. DirectionCosineMatrix.
Definition at line 703 of file Rotation.cpp. References O_SESSAME::MatrixIndexBase. Referenced by CAMmatrixBase::asArray(), O_SESSAME::Keplerian::GetPositionVelocity(), O_SESSAME::AttitudeState::GetRotation2Orbital(), main(), CAMvectorBase::operator *(), CAMmatrixBase::operator *(), CAMmatrixBase::operator/(), OrbitFrameNTW::OrbitFrameNTW(), OrbitFramePQW::OrbitFramePQW(), and O_SESSAME::DirectionCosineMatrix::Set(). |
|
Calculates the principal rotation of the angle about the 2-axis. DirectionCosineMatrix.
Definition at line 727 of file Rotation.cpp. References O_SESSAME::MatrixIndexBase. Referenced by CAMmatrixBase::asArray(), main(), CAMvectorBase::operator *(), CAMmatrixBase::operator *(), CAMmatrixBase::operator/(), and O_SESSAME::DirectionCosineMatrix::Set(). |
|
Calculates the principal rotation of the angle about the 3-axis. DirectionCosineMatrix.
Definition at line 751 of file Rotation.cpp. References O_SESSAME::MatrixIndexBase. Referenced by O_SESSAME::Keplerian::GetPositionVelocity(), O_SESSAME::AttitudeState::GetRotation2Orbital(), main(), OrbitFrameNTW::OrbitFrameNTW(), OrbitFramePQW::OrbitFramePQW(), and O_SESSAME::DirectionCosineMatrix::Set(). |
|
Number of elements in a DCM row or column.
Definition at line 67 of file Rotation.h. Referenced by O_SESSAME::DirectionCosineMatrix::DirectionCosineMatrix(), O_SESSAME::Rotation::GetRotation(), and O_SESSAME::DirectionCosineMatrix::Set(). |
|
Number of elements in an euler angle sequence.
Definition at line 71 of file Rotation.h. Referenced by O_SESSAME::Quaternion::GetEulerAngles(). |
|
Number of elements in an euler axis.
Definition at line 69 of file Rotation.h. Referenced by O_SESSAME::Quaternion::GetEulerAxisAngle(). |
|
Number of elements in a MRP vector.
Definition at line 65 of file Rotation.h. Referenced by O_SESSAME::ModifiedRodriguezParameters::GetEulerAngles(), and O_SESSAME::ModifiedRodriguezParameters::ModifiedRodriguezParameters(). |
|
Number of elements in a quaternion vector.
Definition at line 63 of file Rotation.h. Referenced by O_SESSAME::Quaternion::Quaternion(), and QuaternionKinematics(). |