O_SESSAME::Integrator Class Reference
[Integration Library]

#include <Integrator.h>

Inheritance diagram for O_SESSAME::Integrator:

Inheritance graph
[legend]
List of all members.

Detailed Description

Interface class to the Integrator algorithm strategies.

This class defines the functions that are required for all Integrator types (ie

See also:
RungeKuttaIntegrator,

AdamsBashfourthIntegrator, etc).

Integration in the Open-Sessame Framework is modeled after integration in MatLab. To integrate, a user must specify a Right-Hand Side (RHS) function that has the form , where is the time (in seconds), is the vector of states being integrated, is a matrix of constants, and is a reference to an external function which can be used to evaluate other parameters necessary for the RHS equation. The integration strategy will then evaluate the function at various timesteps, depending on the integration algorithm, and combine the results together to approximate the integrated solution.
Integration is specifically useful in the Open-Sessame Framework for numerically evaluating the equations of motion (EOM) of a spacecraft. The attitude & orbit EOM are usually defined as the time rate of change of the states (rotations, angular velocities, position, angular momentum, energy, etc) which can be integrated to determine the state of the spacecraft at some future time. For example, to evaluate the quaternion at some time :

testAttitudeIntegration.cpp testOrbitIntegration.cpp

Definition at line 107 of file Integrator.h.

Public Member Functions

virtual Matrix Integrate (const vector< ssfTime > &_propTime, odeFunctor _FunctorPtr, const Vector &_initialConditions, Orbit *_pOrbit, Attitude *_pAttitude, const Matrix &_constants, const Functor &_functorPtr)=0


Member Function Documentation

virtual Matrix O_SESSAME::Integrator::Integrate const vector< ssfTime > &  _propTime,
odeFunctor  _FunctorPtr,
const Vector _initialConditions,
Orbit _pOrbit,
Attitude _pAttitude,
const Matrix _constants,
const Functor _functorPtr
[pure virtual]
 

Interface to the Orbit & Attitude integration function.

This function defines just the interface to any of the derived integration strategies. Because it is pure virtual (virtual ... = 0;), it is not actually implemented, but defines a member function that is required to be implemented by all derived classes. Therefore, the user can be assured this integration function will exist for all derived classes.

Parameters:
_propTime This input variable specifies the list of integration times, from the starting value (first time) to the ending integration (last time) with the specified intervals. This vector is built by creating ssfTime object, and "push_back" them onto the vector list:
 vector<ssfTime> integrationTimes;
 ssfTime begin(0);
 ssfTime end(begin + 20);
 integrationTimes.push_back(begin);
 integrationTimes.push_back(end);
_FunctorPtr This is the reference (see odeFunctor) to the Right-Hand side (RHS) of the integration equation. It should be a single function that computes the time derivative of the state given the time, current state, and other parameters.
_initialConditions The vector of initial conditions of the state being integrated. It can be any sized. And should be in the order specified by the user. (ex. )
_Orbit This is a pointer to an Orbit object. It will be passed directly to the RHS and may be used for evaluating the dynamics or disturbance torque/forces. However, if no orbit is required, or used, the user should only pass a NULL pointer and the orbit object shouldn't be used in the user's RHS function.
_Attitude This is a pointer to an Attitude object. It behaves much the same way as _Orbit above. It will be passed directly to the RHS function for use in evaluation, but if not used, the user should only pass a NULL pointer, and the attitude object not used in the RHS function.
_constants This is a matrix of constants that is required by the RHS function. The constants are passed to each evaluation of the RHS, and may be any size, and store any values the user requires. Examples include Moments of Inertia, ballistic coefficients, mass, etc. Example:

_functorPtr The Functor is a call-back function that the RHS can use to evaluate an external function call. The prototype of the _functorPtr must correspond to the Functor definition, but other than that, may perform any calculations required by the user in the RHS function.
Returns:
The output of the integration function is a matrix of calculated integration times (meshpoints), and integrated state values at each of the meshpoints.

where is the time at step T, and is the state value of element i, at time step T.

Implemented in O_SESSAME::RungeKuttaFehlbergIntegrator, and O_SESSAME::RungeKuttaIntegrator.


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