O_SESSAME::EnvFunction Class Reference

#include <Environment.h>

List of all members.

Public Member Functions

 EnvFunction (pt2EnvFunc _EnvFuncPtr)
 Create a disturbance function.

 EnvFunction (pt2EnvFunc _EnvFuncPtr, const int &_numParameters)
 Create a disturbance function with a set number of parameters.

Vector Evaluate (const ssfTime &_currentTime, const OrbitState &_currentOrbitState, const AttitudeState &_currentAttitudeState)
 Evaluate the disturbance function at a specific state. Used to calculate the actual force or torque disturbance given the time, orbit state and attitude state.

void AddParameter (void *_parameter, int _paramNumber=-1)
 Add a parameter to the parameter list.

void RemoveParameter (int _paramNumber=-1)
 Removes a parameter from the parameter list.

void ChangeParameter (void *_parameter, int _paramNumber=-1)
 Changes what a parameter in the list points to.


Private Attributes

pt2EnvFunc m_EnvFuncPtr
 internal pointer to the environmental disturbance function

int m_NumParameters
 internal storage of the number of parameters in the list

EnvFuncParamaterType m_EnvFuncParameters
 list of pointers to the parameters


Constructor & Destructor Documentation

O_SESSAME::EnvFunction::EnvFunction pt2EnvFunc  _EnvFuncPtr  ) 
 

Create a disturbance function.

Example: EnvFunction DragForce(&myDisturbanceFunction);

Parameters:
_EnvFuncPtr pointer to an environmental disturbance function.

Definition at line 142 of file Environment.cpp.

O_SESSAME::EnvFunction::EnvFunction pt2EnvFunc  _EnvFuncPtr,
const int &  _numParameters
 

Create a disturbance function with a set number of parameters.

Example: EnvFunction DragForce(&myDisturbanceFunction, 2);

Parameters:
_EnvFuncPtr pointer to an environmental disturbance function.
_numParameters number of parameters that are passed to the disturbance function.

Definition at line 152 of file Environment.cpp.


Member Function Documentation

Vector O_SESSAME::EnvFunction::Evaluate const ssfTime _currentTime,
const OrbitState _currentOrbitState,
const AttitudeState _currentAttitudeState
 

Evaluate the disturbance function at a specific state. Used to calculate the actual force or torque disturbance given the time, orbit state and attitude state.

Parameters:
_currentTime current time to evaluate at.
_currentOrbitState current orbital state.
_currentAttitudeState current attitude state.
Returns:
3-element vector of forces (N) or torques (Nm) from the disturbance at the specified state.

Definition at line 163 of file Environment.cpp.

void O_SESSAME::EnvFunction::AddParameter void *  _parameter,
int  _paramNumber = -1
 

Add a parameter to the parameter list.

The parameter is inserted in the specified position in the list of parameters, pushing any other parameters back. The list of parameters is passed into the disturbance function (ie mass, ballistic coefficient, magnetic dipole)

Example:

MagneticForce.AddParameter(reinterpret_cast<void*>(Spacecraft.GetDipole(), 2); where the GetDipole() function returns by reference.

If a parameter position is given that is beyond the last position, the parameter will be put in the last position, the intermediate parameters will be filled with empty parameters.

Warning:
Make sure the variable that you are passing in as a parameter will stay in scope during the disturbance function calls.
Parameters:
_parameter pointer to the data where the pertinent variable is stored.
_paramNumber Position in the list of parameters. If none is specified, the parameter is put at the end.

Definition at line 177 of file Environment.cpp.

void O_SESSAME::EnvFunction::RemoveParameter int  _paramNumber = -1  ) 
 

Removes a parameter from the parameter list.

the parameters following the removed parameters will all move down one step to "fill the spot".

If no position is specified, the last parameter in the list is removed.

If a position is given that is greater than the number of parameters, nothing happens to the list.

Example:

ParameterList = [Area, Dipole, Mass], RemoveParameter(2); ParameterList = [Area, Mass]
Parameters:
_paramNumber Position of the parameter to be removed. If none is specified, remove the last parameter in the list.

Definition at line 218 of file Environment.cpp.

void O_SESSAME::EnvFunction::ChangeParameter void *  _parameter,
int  _paramNumber = -1
 

Changes what a parameter in the list points to.

Parameters:
_parameter pointer to the data where the pertinent variable is stored.
_paramNumber Position in the list of parameters. If none is specified, the parameter is put at the end.

Definition at line 204 of file Environment.cpp.


Member Data Documentation

pt2EnvFunc O_SESSAME::EnvFunction::m_EnvFuncPtr [private]
 

internal pointer to the environmental disturbance function

Definition at line 122 of file Environment.h.

int O_SESSAME::EnvFunction::m_NumParameters [private]
 

internal storage of the number of parameters in the list

Definition at line 124 of file Environment.h.

EnvFuncParamaterType O_SESSAME::EnvFunction::m_EnvFuncParameters [private]
 

list of pointers to the parameters

Definition at line 126 of file Environment.h.


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