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::OrbitHistory Class Reference
[State History]

#include <OrbitHistory.h>

Inheritance diagram for O_SESSAME::OrbitHistory:

Inheritance graph
[legend]
Collaboration diagram for O_SESSAME::OrbitHistory:

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

References HISTORY_RESERVE_SIZE, m_OrbitHistory, m_OrbitInterpolations, and ResetHistory().


Member Function Documentation

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.

References O_SESSAME::History::m_TimeHistory.

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.

Reimplemented in IteratedExtendedKalmanFilterHistory, KalmanFilterHistory, and SequentialFilterHistory.

Definition at line 35 of file History.cpp.

References O_SESSAME::History::m_TimeHistory.

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.

Reimplemented in IteratedExtendedKalmanFilterHistory, KalmanFilterHistory, and SequentialFilterHistory.

Definition at line 31 of file History.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.

References m_OrbitHistory.

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.

References m_OrbitHistory.

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.

Referenced by main().

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.

References _, m_OrbitHistory, O_SESSAME::Matrix, and O_SESSAME::MatrixIndexBase.

Referenced by main(), and Plot().

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.

References GetState().

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.

References O_SESSAME::Interpolator::GetNumberDataPoints(), O_SESSAME::ssfTime::GetSeconds(), O_SESSAME::OrbitState::GetStateRepresentation(), m_OrbitHistory, m_OrbitInterpolations, O_SESSAME::Matrix, O_SESSAME::Interpolator::NewPointer(), NUM_POSVEL_ELEMENTS, O_SESSAME::OrbitState::SetOrbitFrame(), O_SESSAME::OrbitStateRepresentation::SetPositionVelocity(), O_SESSAME::OrbitState::SetStateRepresentation(), and O_SESSAME::Vector.

Referenced by GetState(), and main().

void O_SESSAME::OrbitHistory::ResetHistory  ) 
 

Erases the orbit state history.

Reimplemented from O_SESSAME::History.

Definition at line 51 of file OrbitHistory.cpp.

References m_OrbitHistory.

Referenced by OrbitHistory(), and O_SESSAME::Propagator::Propagator().

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.

References O_SESSAME::Interpolator::Clone(), and O_SESSAME::History::m_OriginalInterpolator.

Referenced by main().


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.

Referenced by AppendHistory(), GetHistory(), GetState(), OrbitHistory(), and ResetHistory().

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

internal vector of orbit interpolations

Definition at line 127 of file OrbitHistory.h.

Referenced by GetState(), and OrbitHistory().

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.

Referenced by O_SESSAME::History::SetInterpolator().

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.

Referenced by O_SESSAME::History::AppendHistory(), O_SESSAME::History::GetHistory(), O_SESSAME::History::GetState(), O_SESSAME::History::History(), and O_SESSAME::History::ResetHistory().

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

internal vector of time interpolations

Definition at line 134 of file History.h.

Referenced by O_SESSAME::History::History().


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