#include <Environment.h>
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 |
|
Create a disturbance function. Example: EnvFunction DragForce(&myDisturbanceFunction);
Definition at line 142 of file Environment.cpp. |
|
Create a disturbance function with a set number of parameters. Example: EnvFunction DragForce(&myDisturbanceFunction, 2);
Definition at line 152 of file Environment.cpp. |
|
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.
Definition at line 163 of file Environment.cpp. |
|
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.
Definition at line 177 of file Environment.cpp. |
|
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]
Definition at line 218 of file Environment.cpp. |
|
Changes what a parameter in the list points to.
Definition at line 204 of file Environment.cpp. |
|
internal pointer to the environmental disturbance function
Definition at line 122 of file Environment.h. |
|
internal storage of the number of parameters in the list
Definition at line 124 of file Environment.h. |
|
list of pointers to the parameters
Definition at line 126 of file Environment.h. |