O_SESSAME::OrbitHistory Class Reference
[State History]

#include <OrbitHistory.h>

Inheritance diagram for O_SESSAME::OrbitHistory:

Inheritance graph
[legend]
List of all members.

Detailed Description

Class for storing a time history of orbital states.

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

Examples:
    OrbitState myOrbitState;
    myOrbitState.SetStateRepresentation(new PositionVelocity);
    myOrbitState.SetOrbitFrame(new OrbitFrameIJK);
    Vector initPV(6);
    myOrbitState.SetState(initPV);
    myOrbit->SetStateObject(myOrbitState);

    OrbitHistory myOrbitHistory;                     // create an orbit history with an empty collection
    myOrbitHistory.AppendHistory(0, myOrbitState);   // add the state myOrbitState which occured at t=0 to the history

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

Definition at line 51 of file OrbitHistory.h.

Public Member Functions

 OrbitHistory ()
 Default Constructor.

void AppendHistory (const double &_appendTime, const OrbitState &_appendOrbitState)
 Add the orbit state that occured at a time in seconds to the history.

void AppendHistory (const ssfTime &_appendTime, const OrbitState &_appendOrbitState)
 Add the orbit state that occured with an ssfTime object to the history.

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

void ResetHistory ()
 Erases the orbit state history.

Matrix GetHistory ()
 Returns a matrix of the orbit state history.

void GetState (const ssfTime &_requestedTime, OrbitState &_returnOrbitState)
 Returns the Orbit state at the requested time.

OrbitState GetState (const ssfTime &_requestedTime)
 Returns the Orbit 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 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< OrbitStatem_OrbitHistory
 internal vector container of the OrbitState objects describing the state history

vector< Interpolator * > m_OrbitInterpolations
 internal vector of orbit interpolations


Constructor & Destructor Documentation

O_SESSAME::OrbitHistory::OrbitHistory  ) 
 

Default Constructor.

Definition at line 15 of file OrbitHistory.cpp.


Member Function Documentation

void O_SESSAME::OrbitHistory::AppendHistory const double &  _appendTime,
const OrbitState _appendOrbitState
 

Add the orbit 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.
_appendOrbitState the new orbital state to be added.

Definition at line 22 of file OrbitHistory.cpp.

void O_SESSAME::OrbitHistory::AppendHistory const ssfTime _appendTime,
const OrbitState _appendOrbitState
 

Add the orbit 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.
_appendOrbitState the new orbital state to be added.

Definition at line 27 of file OrbitHistory.cpp.

void O_SESSAME::OrbitHistory::AppendHistory const vector< ssfTime > &  _appendTime,
const vector< OrbitState > &  _appendOrbitState
 

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

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

Parameters:
_appendTime vector of ssfTime objects to be appended.
_appendOrbitState vector of OrbitState objects to be appended.

Definition at line 34 of file OrbitHistory.cpp.

void O_SESSAME::OrbitHistory::ResetHistory  ) 
 

Erases the orbit state history.

Reimplemented from O_SESSAME::History.

Definition at line 51 of file OrbitHistory.cpp.

Matrix O_SESSAME::OrbitHistory::GetHistory  )  [virtual]
 

Returns a matrix of the orbit state history.

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

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 OrbitStateRepresentation.

Reimplemented from O_SESSAME::History.

Definition at line 60 of file OrbitHistory.cpp.

void O_SESSAME::OrbitHistory::GetState const ssfTime _requestedTime,
OrbitState _returnOrbitState
 

Returns the Orbit state at the requested time.

Warning:
Always interpolates using position & velocity.
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).
_returnOrbitState the orbital state at the requested time (the requested time may be different due to errors)

Definition at line 81 of file OrbitHistory.cpp.

OrbitState O_SESSAME::OrbitHistory::GetState const ssfTime _requestedTime  ) 
 

Returns the Orbit state at the requested time.

Warning:
Always interpolates using position & velocity.
Performs the same functionality as GetState(ssfTime& _requestedTime, OrbitState& _returnOrbitState), but returns the orbit 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 orbital state at the requested time (the requested time may be different due to errors)

Reimplemented from O_SESSAME::History.

Definition at line 75 of file OrbitHistory.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.

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<OrbitState> O_SESSAME::OrbitHistory::m_OrbitHistory [private]
 

internal vector container of the OrbitState objects describing the state history

Definition at line 125 of file OrbitHistory.h.

vector<Interpolator*> O_SESSAME::OrbitHistory::m_OrbitInterpolations [private]
 

internal vector of orbit interpolations

Definition at line 127 of file OrbitHistory.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:17 2003 for Open-Sessame Framework by doxygen1.3