Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

O_SESSAME::Attitude Class Reference
[Attitude Toolkit]

#include <Attitude.h>

Collaboration diagram for O_SESSAME::Attitude:

Collaboration graph
[legend]
List of all members.

Detailed Description

Class encapsulating the rotational attitude of a rigid body frame with respect to another frame.

The Attitude class allows for the attitude to be stored, retrieved, history logged,

Todo:
Verify attitude is inheritable. testAttitudeIntegration.cpp testPropagation.cpp

Definition at line 51 of file Attitude.h.

Public Member Functions

 Attitude ()
virtual ~Attitude ()
void SetStateObject (const AttitudeState &_newAttitudeState)
AttitudeState GetStateObject () const
void SetControlTorques (const Vector &_ControlTorques)
Vector GetControlTorques () const
Vector GetTorques () const
void SetDynamicsEq (odeFunctor _AttDynEqFuncPtr)
odeFunctor GetDynamicsEq () const
void SetStateConversion (IntegratedAttitudeStateConversionFunction _ConversionFunction)
 Set the Attitude state conversion function.
IntegratedAttitudeStateConversionFunction GetStateConversion () const
 Get the Attitude state conversion function.
Matrix Propagate (const vector< ssfTime > &_time)
void SetPropagator (Propagator *_pPropagator)
 Sets the propagator used for integrating the attitude.
bool IsIntegrateable ()
 Returns whether the attitude is integrateable or not. Determined if there is a dynamics equation present.
void SetParameters (const Matrix &_Parameters)
Matrix GetParameters () const
void SetEnvironment (Environment *_pNewEnvironment)
 Assign the environment to be used when evaluating attitude disturbance torques. The environment contains the list of torque disturbance functions, environment parameters, and central body definition of the spacecraft. This functions sets the pointer (reference) to the environment object. This environment should be the same as the orbit's environment if there is an orbit being modeled.
EnvironmentGetEnvironment () const
 Return the reference to the environment object of the attitude. This function is useful for returning the current environment that is being used by the attitude. It can be used to inspect and set the environment variables (such as adding torque disturbance functions, setting the central body, or changing environment parameters), or to use the reference for setting another environment (the coupled orbit, or another spacecraft's orbit and attitude that are in the same environment as this spacecraft.
ObjectFunctor< EnvironmentGetEnvironmentForcesFunctor ()
 Returns the function reference (functor) to the function that evaluates the environment disturbance torques. This function is used to get the reference, or function pointer, to the environmental disturbance torque function. The reference may then be evalauated (.
AttitudeHistoryGetHistoryObject ()
 Retrieve a reference to the attitude's state history. By returning a reference, no copy is made, which is more efficient than copying a large matrix of states. The user can then inspect the history (.

Private Attributes

AttitudeState m_AttitudeState
Vector m_ControlTorques
odeFunctor m_AttDynEqFuncPtr
IntegratedAttitudeStateConversionFunction m_AttitudeStateConversionFunction
Propagatorm_pPropagator
bool m_Integrateable
 Is the attitude integrateable? (true if it is, false if is not).
Matrix m_Parameters
Environmentm_pEnvironment
 Pointer to the Environment object.
ObjectFunctor< Environmentm_EnvironmentForcesFunctor
 Pointer to the Environment forces function.
AttitudeHistory m_AttitudeHistory
 This private data member is the stored attitude state, including [time, rotation, angular velocity].


Constructor & Destructor Documentation

O_SESSAME::Attitude::Attitude  ) 
 

Default Constructor

Definition at line 19 of file Attitude.cpp.

O_SESSAME::Attitude::~Attitude  )  [virtual]
 

Default Deconstructor

Definition at line 24 of file Attitude.cpp.


Member Function Documentation

Vector O_SESSAME::Attitude::GetControlTorques  )  const
 

Returns the current set of control torques

Returns:
3-element vector of current control torques applied about body primary axes [N-m]

Definition at line 79 of file Attitude.cpp.

References O_SESSAME::Vector.

odeFunctor O_SESSAME::Attitude::GetDynamicsEq  )  const
 

Return the pointer to the Dynamics Equation right-hand side

Returns:
_AttDynEqFuncPtr pointer to the right-hand side dynamics equation

Definition at line 51 of file Attitude.cpp.

References O_SESSAME::odeFunctor.

Referenced by O_SESSAME::CombinedNumericPropagator::PropagateAttitude().

Environment * O_SESSAME::Attitude::GetEnvironment  )  const
 

Return the reference to the environment object of the attitude. This function is useful for returning the current environment that is being used by the attitude. It can be used to inspect and set the environment variables (such as adding torque disturbance functions, setting the central body, or changing environment parameters), or to use the reference for setting another environment (the coupled orbit, or another spacecraft's orbit and attitude that are in the same environment as this spacecraft.

Returns:
this function returns a pointer to the environment object that is currently stored in the attitude.

Definition at line 116 of file Attitude.cpp.

ObjectFunctor< Environment > O_SESSAME::Attitude::GetEnvironmentForcesFunctor  ) 
 

Returns the function reference (functor) to the function that evaluates the environment disturbance torques. This function is used to get the reference, or function pointer, to the environmental disturbance torque function. The reference may then be evalauated (.

See also:
ObjectFunctor) to calculate the disturbance torques at a specified time, attitude, and possibly orbit, if applicable for the defined disturbance function (such as magnetic or gravity-gradient with a higher-order gravity model).
Returns:
this function returns a functor, or function reference of an object's member function, that refers to the disturbance function.

Definition at line 121 of file Attitude.cpp.

AttitudeHistory & O_SESSAME::Attitude::GetHistoryObject  ) 
 

Retrieve a reference to the attitude's state history. By returning a reference, no copy is made, which is more efficient than copying a large matrix of states. The user can then inspect the history (.

See also:
History,

AttitudeHistory).

Returns:
this function returns a reference, which acts as an object, but is also like a pointer.

Definition at line 129 of file Attitude.cpp.

Referenced by main(), and Plot().

Matrix O_SESSAME::Attitude::GetParameters  )  const
 

Definition at line 89 of file Attitude.cpp.

References O_SESSAME::Matrix.

Referenced by SetupEnvironment().

IntegratedAttitudeStateConversionFunction O_SESSAME::Attitude::GetStateConversion  )  const
 

Get the Attitude state conversion function.

Returns:
pointer to the conversion function (takes a meshpoint and returns a Rotation object and Angular Velocity vector).

Definition at line 68 of file Attitude.cpp.

References O_SESSAME::IntegratedAttitudeStateConversionFunction.

AttitudeState O_SESSAME::Attitude::GetStateObject  )  const
 

Definition at line 39 of file Attitude.cpp.

Referenced by AttituteDynamics(), DisplayAttitude(), main(), Propagate(), O_SESSAME::CombinedNumericPropagator::PropagateAttitude(), and TwoBodyDynamics().

Vector O_SESSAME::Attitude::GetTorques  )  const
 

Return total sum of torques applied to the rigid body

Returns:
3-element vector of current torques applied about body primary axes [N-m]

bool O_SESSAME::Attitude::IsIntegrateable  ) 
 

Returns whether the attitude is integrateable or not. Determined if there is a dynamics equation present.

Returns:
true if the attitude can be integrated, false if it can't.

Definition at line 102 of file Attitude.cpp.

Referenced by DisplayAttitude(), main(), Plot(), Propagate(), and O_SESSAME::CombinedNumericPropagator::Propagate().

Matrix O_SESSAME::Attitude::Propagate const vector< ssfTime > &  _time  ) 
 

Propagates the rigid body attitude forward in time.

Parameters:
_time 3-element vector specifying the initial, final and stepsize of times to be integrated [timeInitial, timeStep, timeFinal] (s)
Returns:
matrix of integrated states.

Definition at line 94 of file Attitude.cpp.

References m_pPropagator, O_SESSAME::Matrix, and O_SESSAME::Propagator::Propagate().

Referenced by main().

void O_SESSAME::Attitude::SetControlTorques const Vector _ControlTorques  ) 
 

Set the control torques

Parameters:
_ControlTorques 3-element vector of control torques applied about body primary axes [N-m]

Definition at line 73 of file Attitude.cpp.

References CAMdoubleVector::initialize(), m_ControlTorques, and O_SESSAME::Vector.

Referenced by main().

void O_SESSAME::Attitude::SetDynamicsEq odeFunctor  _AttDynEqFuncPtr  ) 
 

Set the Dynamics Equation right-hand side file. Also makes the attitude integrateable.

Parameters:
_AttDynEqFuncPtr pointer to the right-hand side dynamics equation

Definition at line 56 of file Attitude.cpp.

References m_AttDynEqFuncPtr, and m_Integrateable.

Referenced by ChangeAttitude(), main(), and SetupAttitude().

void O_SESSAME::Attitude::SetEnvironment Environment _pNewEnvironment  ) 
 

Assign the environment to be used when evaluating attitude disturbance torques. The environment contains the list of torque disturbance functions, environment parameters, and central body definition of the spacecraft. This functions sets the pointer (reference) to the environment object. This environment should be the same as the orbit's environment if there is an orbit being modeled.

Parameters:
_pNewEnvironment this variable is a pointer to the environment object to be stored.

Definition at line 110 of file Attitude.cpp.

References m_EnvironmentForcesFunctor, m_pEnvironment, and O_SESSAME::ObjectFunctor< TClass >::Set().

Referenced by main().

void O_SESSAME::Attitude::SetParameters const Matrix _Parameters  ) 
 

Definition at line 84 of file Attitude.cpp.

References CAMdoubleMatrix::initialize(), m_Parameters, and O_SESSAME::Matrix.

Referenced by ChangeAttitude(), and SetupAttitude().

void O_SESSAME::Attitude::SetPropagator Propagator _pPropagator  ) 
 

Sets the propagator used for integrating the attitude.

Parameters:
_pPropagator Pointer to the propagator to be used.

Definition at line 44 of file Attitude.cpp.

References m_pPropagator, and O_SESSAME::Propagator::SetAttitudeObject().

Referenced by main().

void O_SESSAME::Attitude::SetStateConversion IntegratedAttitudeStateConversionFunction  _ConversionFunction  ) 
 

Set the Attitude state conversion function.

Parameters:
_ConversionFunction pointer to the conversion function (takes a meshpoint and returns a Rotation object and Angular Velocity vector).

Definition at line 63 of file Attitude.cpp.

References m_AttitudeStateConversionFunction.

Referenced by ChangeAttitude(), and SetupAttitude().

void O_SESSAME::Attitude::SetStateObject const AttitudeState _newAttitudeState  ) 
 

Definition at line 34 of file Attitude.cpp.

References m_AttitudeState.

Referenced by ChangeAttitude(), and SetupAttitude().


Member Data Documentation

odeFunctor O_SESSAME::Attitude::m_AttDynEqFuncPtr [private]
 

pointer to the right-hand side dynamics equation

Definition at line 134 of file Attitude.h.

Referenced by SetDynamicsEq().

AttitudeHistory O_SESSAME::Attitude::m_AttitudeHistory [private]
 

This private data member is the stored attitude state, including [time, rotation, angular velocity].

Definition at line 203 of file Attitude.h.

AttitudeState O_SESSAME::Attitude::m_AttitudeState [private]
 

Definition at line 64 of file Attitude.h.

Referenced by SetStateObject().

IntegratedAttitudeStateConversionFunction O_SESSAME::Attitude::m_AttitudeStateConversionFunction [private]
 

Conversion function for converting from the integrated states to a Rotation and Angular Velocity.

Definition at line 137 of file Attitude.h.

Referenced by SetStateConversion().

Vector O_SESSAME::Attitude::m_ControlTorques [private]
 

3-element vector of current control torques applied about body primary axes [N-m]

Definition at line 87 of file Attitude.h.

Referenced by SetControlTorques().

ObjectFunctor<Environment> O_SESSAME::Attitude::m_EnvironmentForcesFunctor [private]
 

Pointer to the Environment forces function.

Definition at line 189 of file Attitude.h.

Referenced by SetEnvironment().

bool O_SESSAME::Attitude::m_Integrateable [private]
 

Is the attitude integrateable? (true if it is, false if is not).

Definition at line 143 of file Attitude.h.

Referenced by SetDynamicsEq().

Matrix O_SESSAME::Attitude::m_Parameters [private]
 

Definition at line 153 of file Attitude.h.

Referenced by SetParameters().

Environment* O_SESSAME::Attitude::m_pEnvironment [private]
 

Pointer to the Environment object.

Definition at line 187 of file Attitude.h.

Referenced by SetEnvironment().

Propagator* O_SESSAME::Attitude::m_pPropagator [private]
 

Pointer to the propagator

Definition at line 140 of file Attitude.h.

Referenced by Propagate(), and SetPropagator().


The documentation for this class was generated from the following files:
Generated on Wed Sep 5 12:54:47 2007 for DSACSS Operational Code by  doxygen 1.3.9.1