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.
Compounds | |
class | DirectionCosineMatrix |
3x3 direction cosine matrix attitude representation. More... | |
class | ModifiedRodriguezParameters |
3x1 Modified Rodriguez Parameters attitude representation. More... | |
class | Quaternion |
The non-singular, redundant Euler parameter (quaternion) vector. More... | |
class | Rotation |
A generalized rotation class to represent any attitude coordinate transformation. More... | |
Enumerations | |
enum | RotationType { DCM_Type, EulerAngle_Type, EulerAxisAngle_Type, MRP_Type, Quaternion_Type } |
Various representations of a rotation. More... | |
enum | RotationSense { LEFT_HAND = -1, RIGHT_HAND = 1 } |
The Sense, or "handedness" of a rotation system. More... | |
Functions | |
DirectionCosineMatrix | R1 (const Angle &_Angle) |
Calculates the principal rotation of the angle about the 1-axis. DirectionCosineMatrix. | |
DirectionCosineMatrix | R2 (const Angle &_Angle) |
Calculates the principal rotation of the angle about the 2-axis. DirectionCosineMatrix. | |
DirectionCosineMatrix | R3 (const Angle &_Angle) |
Calculates the principal rotation of the angle about the 3-axis. DirectionCosineMatrix. | |
Variables | |
const int | QUATERNION_SIZE = 4 |
Number of elements in a quaternion vector. | |
const int | MRP_SIZE = 3 |
Number of elements in a MRP vector. | |
const int | DCM_SIZE = 3 |
Number of elements in a DCM row or column. | |
const int | EULERAXIS_SIZE = 3 |
Number of elements in an euler axis. | |
const int | EULERANGLES_SIZE = 3 |
Number of elements in an euler angle sequence. |
|
Various representations of a rotation.
Definition at line 74 of file Rotation.h. |
|
The Sense, or "handedness" of a rotation system.
Definition at line 77 of file Rotation.h. |
|
Calculates the principal rotation of the angle about the 1-axis. DirectionCosineMatrix.
Definition at line 689 of file Rotation.cpp. |
|
Calculates the principal rotation of the angle about the 2-axis. DirectionCosineMatrix.
Definition at line 713 of file Rotation.cpp. |
|
Calculates the principal rotation of the angle about the 3-axis. DirectionCosineMatrix.
Definition at line 737 of file Rotation.cpp. |
|
Number of elements in a quaternion vector.
Definition at line 63 of file Rotation.h. |
|
Number of elements in a MRP vector.
Definition at line 65 of file Rotation.h. |
|
Number of elements in a DCM row or column.
Definition at line 67 of file Rotation.h. |
|
Number of elements in an euler axis.
Definition at line 69 of file Rotation.h. |
|
Number of elements in an euler angle sequence.
Definition at line 71 of file Rotation.h. |