O_SESSAME::History Class Reference
[State History]

#include <History.h>

Inheritance diagram for O_SESSAME::History:

Inheritance graph
[legend]
List of all members.

Detailed Description

Base class for histories storing state variables, also stores time states.

The History class provides a common interface for the group of classes which store previous state information. The user can append new state information, output the current state history, or reset the entire history. If the user appends a time which earlier than the end of the current history, the current history is deleted from that point on, and the new time is appended. The History class also provides the common storage of the time history.

Examples:
History myHistory;          // create a history with an empty collection
myHistory.AppendHistory(0); // add 0 seconds to the history
myHistory.ResetHistory();   // reset the history to an empty collection
myHistory.AppendHistory(10);// add 10 seconds to the history

cout << myHistory.GetHistory() << endl;  // Get a matrix of the stored times and output

Definition at line 57 of file History.h.

Public Member Functions

 History ()
 Creates an instance of History.

virtual ~History ()
 Default Deconstructor.

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.

void ResetHistory ()
 Erases the time 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 Member Functions

vector< ssfTime >::difference_type GetState (const ssfTime &_requestedTime)
 Returns the nearest stored,lower mesh point to the requested time.


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


Constructor & Destructor Documentation

O_SESSAME::History::History  ) 
 

Creates an instance of History.

Definition at line 16 of file History.cpp.

O_SESSAME::History::~History  )  [virtual]
 

Default Deconstructor.

Definition at line 24 of file History.cpp.


Member Function Documentation

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

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]
 

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]
 

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::ResetHistory  ) 
 

Erases the time history.

Reimplemented in O_SESSAME::AttitudeHistory, and O_SESSAME::OrbitHistory.

Definition at line 62 of file History.cpp.

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

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]
 

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.

vector< ssfTime >::difference_type O_SESSAME::History::GetState const ssfTime _requestedTime  )  [protected]
 

Returns the nearest stored,lower mesh point to the requested time.

interpolates using the specified interpolator if necessary.

Parameters:
_requestedTime Desired time to retrieve the state. Used to find the nearest corresponding lower mesh point.
Returns:
The index of the time history vector of the nearest, lower mesh point.

Reimplemented in O_SESSAME::AttitudeHistory, and O_SESSAME::OrbitHistory.

Definition at line 84 of file History.cpp.


Member Data Documentation

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

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]
 

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]
 

internal vector of time interpolations

Definition at line 134 of file History.h.


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