O_SESSAME::Rotation Class Reference
[Rotation Library]

#include <Rotation.h>

List of all members.


Detailed Description

A generalized rotation class to represent any attitude coordinate transformation.

Todo:
Write description of rotation class.

Examples:
It is very easy to setup and output rotations. Note that to output a rotation you must first choose what attitude state to represent it in (you cannot "cout << MyRotation" directly:
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.


Constructor & Destructor Documentation

O_SESSAME::Rotation::Rotation  ) 
 

Default Constructor. Create a Rotation with no offset.

Definition at line 20 of file Rotation.cpp.

O_SESSAME::Rotation::Rotation const Matrix _inMatrix  ) 
 

Create a Rotation from a direction cosine matrix.

Parameters:
_inMatrix 3x3 matrix of Direction Cosine Matrix (DCM) values.

Definition at line 29 of file Rotation.cpp.

O_SESSAME::Rotation::Rotation const DirectionCosineMatrix _DCM  ) 
 

Create a Rotation from a direction cosine matrix.

Parameters:
_DCM instance of Direction Cosine Matrix (DCM) class.

Definition at line 34 of file Rotation.cpp.

O_SESSAME::Rotation::Rotation const Vector _Angles,
const int &  _Sequence
 

Create a Rotation from an euler angle sequence.

Parameters:
_Angles 3x1 matrix of euler angles.
_Sequence Euler angle rotation sequence. (ie 123, 213, 313, 321, etc).

Definition at line 40 of file Rotation.cpp.

O_SESSAME::Rotation::Rotation const Angle _Angle1,
const Angle _Angle2,
const Angle _Angle3,
const int &  _Sequence
 

Create a Rotation from an euler angle sequence.

Parameters:
_Angle1 first angles in Euler angle set. [rad]
_Angle2 second angles in Euler angle set. [rad]
_Angle3 third angles in Euler angle set. [rad]
_Sequence Euler angle rotation sequence. (ie 123, 213, 313, 321, etc).

Definition at line 48 of file Rotation.cpp.

O_SESSAME::Rotation::Rotation const Vector _Axis,
const Angle _Angle
 

Create a Rotation from a given euler axis and angle.

Parameters:
Axis 3x1 Euler Axis
Angle Angle rotation about axis [rad].

Definition at line 54 of file Rotation.cpp.

O_SESSAME::Rotation::Rotation const ModifiedRodriguezParameters _MRP  ) 
 

Create a Rotation from a given set of Modified Rodriguez Parameters.

Parameters:
_MRP 3x1 MRP vector to be represented.

Definition at line 59 of file Rotation.cpp.

O_SESSAME::Rotation::Rotation const Quaternion _quat  ) 
 

Create a Rotation from a given quaternion.

Parameters:
_quat 4x1 quaternion to be represented.

Definition at line 64 of file Rotation.cpp.

O_SESSAME::Rotation::~Rotation  )  [virtual]
 

Default Destructor.

Definition at line 24 of file Rotation.cpp.


Member Function Documentation

void O_SESSAME::Rotation::Set const Matrix _inMatrix  ) 
 

Set the Rotation from a converted DCM.

Parameters:
_inMatrix 3x3 matrix of Direction Cosine Matrix (DCM) values.
Todo:
Add testing for other types of matrix inputs

Definition at line 69 of file Rotation.cpp.

void O_SESSAME::Rotation::Set const DirectionCosineMatrix _DCM  ) 
 

Set the Rotation from a converted DCM.

Parameters:
_DCM 3x3 matrix of Direction Cosine Matrix (DCM) values.

Definition at line 85 of file Rotation.cpp.

void O_SESSAME::Rotation::Set const Vector _Angles,
const int &  _Sequence
 

Set the Rotation from an euler angle sequence.

Parameters:
_Angles 3x1 matrix of euler angles.
_Sequence Euler angle rotation sequence. (ie 123, 213, 313, 321, etc).

Definition at line 95 of file Rotation.cpp.

void O_SESSAME::Rotation::Set const Angle _Angle1,
const Angle _Angle2,
const Angle _Angle3,
const int &  _Sequence
 

Create a Rotation from an euler angle sequence.

Parameters:
_Angle1 first angles in Euler angle set. [rad]
_Angle2 second angles in Euler angle set. [rad]
_Angle3 third angles in Euler angle set. [rad]
_Sequence Euler angle rotation sequence. (ie 123, 213, 313, 321, etc).

Definition at line 107 of file Rotation.cpp.

void O_SESSAME::Rotation::Set const Vector _Axis,
const Angle _Angle
 

Set the Rotation from a converted Euler Axis and Angle set.

Parameters:
_Axis 3x1 Euler Axis.
_Angle Angle rotation about axis [rad].

Definition at line 117 of file Rotation.cpp.

void O_SESSAME::Rotation::Set const ModifiedRodriguezParameters _MRP  ) 
 

Set the Rotation from a converted vector of MRP.

Parameters:
_MRP 3x1 vector of Modified Rodriguez Parameters to set the Rotation.

Definition at line 126 of file Rotation.cpp.

void O_SESSAME::Rotation::Set const Quaternion _quat  ) 
 

Set the Rotation from a converted quaternion.

Parameters:
_quat 4x1 quaternion to set the Rotation.

Definition at line 135 of file Rotation.cpp.

DirectionCosineMatrix O_SESSAME::Rotation::GetDCM  )  const
 

Return the Direction Cosine Matrix (DCM) form of the attitude transformation.

Returns:
3x3 Direction Cosine Matrix (DCM).

Definition at line 148 of file Rotation.cpp.

Vector O_SESSAME::Rotation::GetEulerAngles const int &  _Sequence  )  const
 

Return the Euler angles from the rotation representation.

Parameters:
_Sequence Euler angle rotation sequence. (ie 123, 213, 313, 321, etc).
Returns:
_Angles 3x1 matrix of euler angles.

Definition at line 157 of file Rotation.cpp.

Vector O_SESSAME::Rotation::GetEulerAxisAngle Vector _EulerAxis,
Angle _EulerAngle
const
 

Return the Euler Axis and Angle form of the attitude transformation.

Parameters:
_EulerAxis 3x1 Euler Axis to be returned.
_EulerAngle Euler angle of rotation [rad].

Definition at line 174 of file Rotation.cpp.

Vector O_SESSAME::Rotation::GetEulerAxisAngle  )  const
 

Return the Euler Axis and Angle form of the attitude transformation.

Returns:
4-element vector of the Euler Axis and Angle [EulerAxis; EulerAngle].

Definition at line 165 of file Rotation.cpp.

ModifiedRodriguezParameters O_SESSAME::Rotation::GetMRP  )  const
 

Return the Modified Rodriguez Parameters vector form of the attitude transformation.

Returns:
3x1 MRP vector.

Definition at line 182 of file Rotation.cpp.

Quaternion O_SESSAME::Rotation::GetQuaternion  )  const
 

Return the quaternion form of the attitude transformation.

Returns:
4x1 quaternion.

Definition at line 190 of file Rotation.cpp.

Vector O_SESSAME::Rotation::GetRotation const RotationType _type,
const int &  _Sequence = 123
const
 

Return the rotation based on the specified parameterization.

Todo:
completely document various rotation return types
Parameters:
_type rotation parameterization type to return the rotation representation in.
_Sequence for Euler Angle sets, specify the desired rotation sequence.
Returns:
the rotation represented by the specified rotation.

Definition at line 201 of file Rotation.cpp.

Rotation O_SESSAME::Rotation::Rotation::operator * const Rotation &  _rot2  )  const
 

Vector O_SESSAME::Rotation::Rotation::operator * const Vector _vec  )  const
 

Rotation O_SESSAME::Rotation::Rotation::operator~  )  const
 

Rotation O_SESSAME::Rotation::Rotation::operator+ const Rotation &  _rot2  )  const
 

Rotation O_SESSAME::Rotation::Rotation::operator- const Rotation &  _rot2  )  const
 


Member Data Documentation

Quaternion O_SESSAME::Rotation::m_quaternion [private]
 

internal representation of the attitude transformation.

Definition at line 466 of file Rotation.h.

RotationSense O_SESSAME::Rotation::m_RotationSense [private]
 

Handed-ness of the rotation, either LEFT_HANDED or RIGHT_HANDED.

Definition at line 469 of file Rotation.h.


Generated on Wed Aug 6 12:59:29 2003 for Open-Sessame Framework by doxygen1.3