O_SESSAME::OrbitState Class Reference
[Orbit Toolkit]

#include <OrbitState.h>

List of all members.


Detailed Description

Encapsulation of an Orbit State, including its coordinate type and reference frame.

The OrbitState class is an abstract representation of a current orbital state, including its position and velocity (in some OrbitStateRepresentation) and respective frame (OrbitFrame). Each instance of OrbitState is a snapshot of the spacecraft at an instant in time.

Example:
        OrbitState myOrbitState;
    myOrbitState.SetStateRepresentation(new PositionVelocity);
    myOrbitState.SetOrbitFrame(new OrbitFrameIJK);
    Vector initPV(6);
        // Space station
        initPV(VectorIndexBase+0) = -5776.6; // km
        initPV(VectorIndexBase+1) = -157; // km       
        initPV(VectorIndexBase+2) = 3496.9; // km    
        initPV(VectorIndexBase+3) = -2.595;  // km/s
        initPV(VectorIndexBase+4) = -5.651;  // km/s        
        initPV(VectorIndexBase+5) = -4.513; // km/s
    myOrbitState.SetState(initPV);

Todo:
should OrbitState contain an ssfTime object?

change to be a template class of the Representation Types

Definition at line 47 of file OrbitState.h.

Public Member Functions

 OrbitState ()
 Create an initially empty orbit state object.

virtual ~OrbitState ()
 Default deconstructor. Deletes any unused variables.

 OrbitState (const OrbitState &_OrbStateCopy)
 Create an orbit state from a copy of another orbit state.

 OrbitState (OrbitStateRepresentation *_pOrbRep, OrbitFrame *_pOrbFrame=NULL)
 Create an orbit state object from a pointer to an orbit representation (positionVelocity, keplerian, etc), and orbit frame (IJK, PQW, etc.).

void SetOrbitFrame (OrbitFrame *_pnewOrbitFrame)
 Set (or Change) the stored orbit frame that is the reference for the represenation.

OrbitFrameGetOrbitFrame () const
 Returns the pointer to the current reference frame of the orbit state.

void SetStateRepresentation (OrbitStateRepresentation *_pStateRep)
 Set (or change) the orbit state's representation.

void SetStateRepresentation (OrbitStateRepresentation *_pStateRep, OrbitFrame *_pOrbFrame)
 Set (or change) the orbit state's representation and reference frame.

OrbitStateRepresentationGetStateRepresentation () const
 Return a pointer to the orbit state's current state representation.

double GetOrbitAngularMomentum () const
 Calculates the orbit angular momentum at the current orbit state.

void SetState (const Vector &_state)
 internally set the orbit representation's state.

void SetState (const Vector &_state, OrbitFrame *_pOrbFrame)
 internally set the orbit representation's state and reference frame.

Vector GetState () const
 internally return the orbit representation's state Vector.

OrbitState operator= (const OrbitState &_OrbStateCopy)
 Copy an instance of OrbitState.


Private Attributes

OrbitStateRepresentationm_pOrbitStateRepresentation
 internal pointer to the current orbit state representation

OrbitFramem_pOrbitFrame
 internal pointer to the current orbit state reference frame


Constructor & Destructor Documentation

O_SESSAME::OrbitState::OrbitState  ) 
 

Create an initially empty orbit state object.

Definition at line 16 of file OrbitState.cpp.

O_SESSAME::OrbitState::~OrbitState  )  [virtual]
 

Default deconstructor. Deletes any unused variables.

Todo:
determine how to delete OrbitState pointers

Definition at line 37 of file OrbitState.cpp.

O_SESSAME::OrbitState::OrbitState const OrbitState &  _OrbStateCopy  ) 
 

Create an orbit state from a copy of another orbit state.

Todo:
Determine if the OrbitState copy function is req'd or hacked.

Bug:
if OrbitFrame is not set, but a vector::push_back function is called, _OrbStateCopy.m_pOrbitFrame = 0xffffffff, which indicates a failure. Need to fix this.

Definition at line 21 of file OrbitState.cpp.

O_SESSAME::OrbitState::OrbitState OrbitStateRepresentation _pOrbRep,
OrbitFrame _pOrbFrame = NULL
 

Create an orbit state object from a pointer to an orbit representation (positionVelocity, keplerian, etc), and orbit frame (IJK, PQW, etc.).

Parameters:
_pOrbRep the orbit representation (positionVelocity vector, keplerian elements, etc.) to store in the state.
_pOrbFrame the orbit frame (IJK, SEZ, PQW, etc) that is the reference frame of the representation.

Definition at line 47 of file OrbitState.cpp.


Member Function Documentation

void O_SESSAME::OrbitState::SetOrbitFrame OrbitFrame _pnewOrbitFrame  ) 
 

Set (or Change) the stored orbit frame that is the reference for the represenation.

In the future, this will convert the orbit representation from the previous frame (if defined) to the new frame.

Todo:
Implement the orbit representation conversion due to an orbit frame change.
Parameters:
_pnewOrbitFrame pointer to the orbit frame to set or convert the orbit representation to.

Definition at line 52 of file OrbitState.cpp.

OrbitFrame * O_SESSAME::OrbitState::GetOrbitFrame  )  const
 

Returns the pointer to the current reference frame of the orbit state.

Returns:
pointer to the current reference frame

Definition at line 63 of file OrbitState.cpp.

void O_SESSAME::OrbitState::SetStateRepresentation OrbitStateRepresentation _pStateRep  ) 
 

Set (or change) the orbit state's representation.

Parameters:
_pStateRep pointer to the new orbit state representation.

Definition at line 67 of file OrbitState.cpp.

void O_SESSAME::OrbitState::SetStateRepresentation OrbitStateRepresentation _pStateRep,
OrbitFrame _pOrbFrame
 

Set (or change) the orbit state's representation and reference frame.

Parameters:
_pStateRep pointer to the new orbit state representation.
_pOrbFrame pointer to the orbit frame to set or convert the orbit representation to.

Definition at line 77 of file OrbitState.cpp.

OrbitStateRepresentation * O_SESSAME::OrbitState::GetStateRepresentation  )  const
 

Return a pointer to the orbit state's current state representation.

Returns:
pointer to the current representation (positionVelocity vector, keplerian elements, etc.)

Definition at line 83 of file OrbitState.cpp.

double O_SESSAME::OrbitState::GetOrbitAngularMomentum  )  const
 

Calculates the orbit angular momentum at the current orbit state.

Returns:
the orbit angular momentum.

Definition at line 88 of file OrbitState.cpp.

void O_SESSAME::OrbitState::SetState const Vector _state  ) 
 

internally set the orbit representation's state.

Warning:
Depracated - do not use - will be moving to private.
Parameters:
_state Vector of the state components that are the same type of the orbit state representation.

Definition at line 97 of file OrbitState.cpp.

void O_SESSAME::OrbitState::SetState const Vector _state,
OrbitFrame _pOrbFrame
 

internally set the orbit representation's state and reference frame.

Warning:
Depracated - do not use - will be moving to private.
Parameters:
_state Vector of the state components that are the same type of the orbit state representation.
_pOrbFrame pointer to the orbit frame to set or convert the orbit representation to.

Vector O_SESSAME::OrbitState::GetState  )  const
 

internally return the orbit representation's state Vector.

Warning:
Depracated - do not use - will be moving to private.
Returns:
Vector of the state components that are the same type of the orbit state representation.

Definition at line 103 of file OrbitState.cpp.

OrbitState O_SESSAME::OrbitState::operator= const OrbitState &  _OrbStateCopy  ) 
 

Copy an instance of OrbitState.

Parameters:
_OrbStateCopy right operand that is the original orbit state to be copied.
Returns:
a copy of the orbit state.

Definition at line 111 of file OrbitState.cpp.


Member Data Documentation

OrbitStateRepresentation* O_SESSAME::OrbitState::m_pOrbitStateRepresentation [private]
 

internal pointer to the current orbit state representation

Definition at line 125 of file OrbitState.h.

OrbitFrame* O_SESSAME::OrbitState::m_pOrbitFrame [private]
 

internal pointer to the current orbit state reference frame

Definition at line 127 of file OrbitState.h.


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