O_SESSAME::AttitudeHistory Class Reference
[State History]

#include <AttitudeHistory.h>

Inheritance diagram for O_SESSAME::AttitudeHistory:

Inheritance graph
[legend]
List of all members.

Detailed Description

Class for storing a time history of attitude states.

The AttitudeHistory class provides a container of previous AttitudeState objects. The user may append new states, reset the collection of states, or return the attitude history in a matrix. If the user appends attitude states at time which earlier than the end of the current history, the current history is deleted from that point on, and the new attitude states are appended.

Examples:
    AttitudeState myAttitudeState;
    myAttitudeState.SetRotation(Rotation(Quaternion(0,0,0,1)));
    Vector initAngVelVector(3);
        initAngVelVector(1) = 0.1;
    myAttitudeState.SetAngularVelocity(initAngVelVector);

    AttitudeHistory myAttitudeHistory;                     // create an attitude history with an empty collection
    myAttitudeHistory.AppendHistory(0, myAttitudeState);   // add the state myAttitudeState which occured at t=0 to the history

    cout << myAttitudeHistory.GetHistory() << endl;  // Get a matrix of the stored state and output 
                                                     // [t0, attitude parameters @ t=0]
                                                     // [t1, attitude parameters @ t=1]
                                                     // [t2, attitude parameters @ t=2] etc...

Definition at line 49 of file AttitudeHistory.h.

Public Member Functions

 AttitudeHistory ()
 Constructs an empty attitude history.

 ~AttitudeHistory ()
 Default Deconstructor.

void AppendHistory (const double &_appendTime, const Rotation &_appendRotation, const Vector &_appendAngVel)
 Add the attitude rotation and angular velocity, which occured at a time in seconds, to the history.

void AppendHistory (const ssfTime &_appendTime, const Rotation &_appendRotation, const Vector &_appendAngVel)
 Add the attitude rotation and angular velocity, which occured with an ssfTime object, to the history.

void AppendHistory (const double &_appendTime, const AttitudeState &_appendAttitudeState)
 Add the attitude state that occured at a time in seconds to the history.

void AppendHistory (const ssfTime &_appendTime, const AttitudeState &_appendAttitudeState)
 Add the attitude state that occured with an ssfTime object to the history.

void AppendHistory (const vector< ssfTime > &_appendTime, const vector< AttitudeState > &_appendAttitudeState)
 Add a vector of ssfTime and AttitudeState objects to the stored history.

void AppendHistory (const vector< ssfTime > &_appendTime, const vector< Rotation > &_appendRotation, const vector< Vector > &_appendAngVel)
 Add a vector of ssfTime, Rotation, and Angular Velocity vector objects to the stored history.

void ResetHistory ()
 Erases the attitude state history.

Matrix GetHistory (const RotationType &_rotType=Quaternion_Type)
 Returns a matrix of the attitude state history.

void GetState (const ssfTime &_requestedTime, Rotation &_returnRotation, Vector &_returnAngVelVector)
 Returns the attitude state at the requested time.

AttitudeState GetState (const ssfTime &_requestedTime)
 Returns the Attitude state at the requested time.

virtual void AppendHistory (const double &_appendTime)
 Add a time (in seconds) to the stored history.

virtual void AppendHistory (const ssfTime &_appendTime)
 Add an ssfTime object to the stored history.

virtual vector< ssfTime
>::difference_type 
AppendHistory (const vector< ssfTime > &_appendTime)
 Add a vector of ssfTime objects to the stored history.

virtual Matrix GetHistory ()
 Returns a matrix of the time history.

virtual void SetInterpolator (Interpolator *_newInterpolator)
 Returns the nearest stored,lower mesh point to the requested time. Sets the interpolator used for calculating the states in-between stored mesh points.


Protected Attributes

vector< ssfTimem_TimeHistory
 internal vector container of the ssfTime objects describing the state history

Interpolatorm_OriginalInterpolator
 internal storage of the original, nominal interpolator to be copied and used for all interpolations

vector< Interpolator * > m_TimeInterpolations
 internal vector of time interpolations


Private Attributes

vector< AttitudeStatem_AttitudeHistory
 internal vector container of the AttitudeState objects describing the state history

vector< Interpolator * > m_AttitudeInterpolations
 internal vector of attitude interpolations


Constructor & Destructor Documentation

O_SESSAME::AttitudeHistory::AttitudeHistory  ) 
 

Constructs an empty attitude history.

Definition at line 15 of file AttitudeHistory.cpp.

O_SESSAME::AttitudeHistory::~AttitudeHistory  ) 
 

Default Deconstructor.

Definition at line 22 of file AttitudeHistory.cpp.


Member Function Documentation

void O_SESSAME::AttitudeHistory::AppendHistory const double &  _appendTime,
const Rotation _appendRotation,
const Vector _appendAngVel
 

Add the attitude rotation and angular velocity, which occured at a time in seconds, to the history.

Appends the state at t=_appendTime. if the new state occured at a time that is earlier than any of the stored values then the time history will be erased from the overlap point and the new state will be appended.

Parameters:
_appendTime time (in seconds) to be added.
_appendRotation the new Rotation describing the attitude to be added (by default the rotation is stored with respect to the inertial frame).
_appendAngVel Angular Velocity vector (3-elements) to be appended.

Definition at line 27 of file AttitudeHistory.cpp.

void O_SESSAME::AttitudeHistory::AppendHistory const ssfTime _appendTime,
const Rotation _appendRotation,
const Vector _appendAngVel
 

Add the attitude rotation and angular velocity, which occured with an ssfTime object, to the history.

Appends the state at t=_appendTime. if the new state occured at a time that is earlier than any of the stored values then the time history will be erased from the overlap point and the new state will be appended.

Parameters:
_appendTime the ssfTime object specifying when the state occured.
_appendRotation the new Rotation describing the attitude to be added (by default the rotation is stored with respect to the inertial frame).
_appendAngVel Angular Velocity vector (3-elements) to be appended.

Definition at line 32 of file AttitudeHistory.cpp.

void O_SESSAME::AttitudeHistory::AppendHistory const double &  _appendTime,
const AttitudeState _appendAttitudeState
 

Add the attitude state that occured at a time in seconds to the history.

Appends the state at t=_appendTime. if the new state occured at a time that is earlier than any of the stored values then the time history will be erased from the overlap point and the new state will be appended.

Parameters:
_appendTime time (in seconds) to be added.
_appendAttitudeState the new attitude state to be added.

Definition at line 39 of file AttitudeHistory.cpp.

void O_SESSAME::AttitudeHistory::AppendHistory const ssfTime _appendTime,
const AttitudeState _appendAttitudeState
 

Add the attitude state that occured with an ssfTime object to the history.

Appends the state at t=_appendTime. if the new state occured at a time that is earlier than any of the stored values then the time history will be erased from the overlap point and the new state will be appended.

Parameters:
_appendTime the ssfTime object specifying when the state occured.
_appendAttitudeState the new attitude state to be added.

Definition at line 44 of file AttitudeHistory.cpp.

void O_SESSAME::AttitudeHistory::AppendHistory const vector< ssfTime > &  _appendTime,
const vector< AttitudeState > &  _appendAttitudeState
 

Add a vector of ssfTime and AttitudeState objects to the stored history.

if the beginning of the new state vector occured earlier than any of the stored values then the attitude history will be erased from the overlap point and the new attitude state vector will be appended.

Parameters:
_appendTime vector of ssfTime objects to be appended.
_appendAttitudeState vector of AttitudeState objects describing the attitude to be appended.

Definition at line 52 of file AttitudeHistory.cpp.

void O_SESSAME::AttitudeHistory::AppendHistory const vector< ssfTime > &  _appendTime,
const vector< Rotation > &  _appendRotation,
const vector< Vector > &  _appendAngVel
 

Add a vector of ssfTime, Rotation, and Angular Velocity vector objects to the stored history.

if the beginning of the new state vector occured earlier than any of the stored values then the attitude history will be erased from the overlap point and the new attitude state vector will be appended.

Parameters:
_appendTime vector of ssfTime objects to be appended.
_appendRotation vector of Rotation objects describing the attitude to be appended (stores by default with repect to inertial reference frame).
_appendAngVel vector of Angular Velocity vectors (3-elements) to be appended.

Definition at line 69 of file AttitudeHistory.cpp.

void O_SESSAME::AttitudeHistory::ResetHistory  ) 
 

Erases the attitude state history.

Reimplemented from O_SESSAME::History.

Definition at line 86 of file AttitudeHistory.cpp.

Matrix O_SESSAME::AttitudeHistory::GetHistory const RotationType _rotType = Quaternion_Type  ) 
 

Returns a matrix of the attitude state history.

returns the matrix of the form: // Get a matrix of the stored state and output [t0, attitude parameters @ t=0] [t1, attitude parameters @ t=1] [t2, attitude parameters @ t=2] etc...

Parameters:
_rotType rotation type to return the state in (ie quaternion, MRP, DCM, Euler Angles, etc.). Default (ie no type specified) to quaternion elements.
Returns:
nxm matrix of the state history, where n is the number of time states stored and m is the number of elements in the RotationType.

Definition at line 95 of file AttitudeHistory.cpp.

void O_SESSAME::AttitudeHistory::GetState const ssfTime _requestedTime,
Rotation _returnRotation,
Vector _returnAngVelVector
 

Returns the attitude state at the requested time.

Warning:
Always interpolates using quaternions May require interpolation (see Interpolator).
Parameters:
_requestedTime requested state time. If it is not an integrated mesh point, interpolation will be used to determine the approximated value. The _requestedTime may be different due to errors (outside state bounds, uncalculable interpolation).
_returnRotation the rotation at the requested time.
_returnAngVelVector the angular velocity vector at the requested time.

Definition at line 119 of file AttitudeHistory.cpp.

AttitudeState O_SESSAME::AttitudeHistory::GetState const ssfTime _requestedTime  ) 
 

Returns the Attitude state at the requested time.

Warning:
Always interpolates using quaternions Performs the same functionality as GetState(ssfTime& _requestedTime, Rotation& _returnRotation, Vector& _returnAngVelVector), but returns the attitude state from the function rather than by reference.
Parameters:
_requestedTime requested state time. If it is not an integrated mesh point, interpolation will be used to determine the approximated value. The _requestedTime may be different due to errors (outside state bounds, uncalculable interpolation).
Returns:
the attitude state at the requested time

Reimplemented from O_SESSAME::History.

Definition at line 112 of file AttitudeHistory.cpp.

void O_SESSAME::History::AppendHistory const double &  _appendTime  )  [virtual, inherited]
 

Add a time (in seconds) to the stored history.

if the new time is earlier than any of the stored values then the time history will be erased from the overlap point and the new value will be appended.

Parameters:
_appendTime time (in seconds) to be added.

Definition at line 31 of file History.cpp.

void O_SESSAME::History::AppendHistory const ssfTime _appendTime  )  [virtual, inherited]
 

Add an ssfTime object to the stored history.

if the new time is earlier than any of the stored values then the time history will be erased from the overlap point and the new value will be appended.

Parameters:
_appendTime an ssfTime object to be appended.

Definition at line 35 of file History.cpp.

vector< ssfTime >::difference_type O_SESSAME::History::AppendHistory const vector< ssfTime > &  _appendTime  )  [virtual, inherited]
 

Add a vector of ssfTime objects to the stored history.

if the beginning of the new time vector is earlier than any of the stored values then the time history will be erased from the overlap point and the new time vector will be appended.

Parameters:
_appendTime vector of ssfTime objects to be appended.

Definition at line 40 of file History.cpp.

Matrix O_SESSAME::History::GetHistory  )  [virtual, inherited]
 

Returns a matrix of the time history.

Returns:
nx1 matrix of the state history, where n is the number of time states stored.

Reimplemented in O_SESSAME::OrbitHistory.

Definition at line 69 of file History.cpp.

void O_SESSAME::History::SetInterpolator Interpolator _newInterpolator  )  [virtual, inherited]
 

Returns the nearest stored,lower mesh point to the requested time. Sets the interpolator used for calculating the states in-between stored mesh points.

Parameters:
_newInterpolator pointer to the interpolator that serves as the model type for all the interpolations between meshpoints.

Definition at line 149 of file History.cpp.


Member Data Documentation

vector<AttitudeState> O_SESSAME::AttitudeHistory::m_AttitudeHistory [private]
 

internal vector container of the AttitudeState objects describing the state history

Definition at line 164 of file AttitudeHistory.h.

vector<Interpolator*> O_SESSAME::AttitudeHistory::m_AttitudeInterpolations [private]
 

internal vector of attitude interpolations

Definition at line 166 of file AttitudeHistory.h.

vector<ssfTime> O_SESSAME::History::m_TimeHistory [protected, inherited]
 

internal vector container of the ssfTime objects describing the state history

Definition at line 128 of file History.h.

Interpolator* O_SESSAME::History::m_OriginalInterpolator [protected, inherited]
 

internal storage of the original, nominal interpolator to be copied and used for all interpolations

Definition at line 131 of file History.h.

vector<Interpolator*> O_SESSAME::History::m_TimeInterpolations [protected, inherited]
 

internal vector of time interpolations

Definition at line 134 of file History.h.


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