5.1. Integrator Settings

As the name suggests, the integrator settings tell the dynamics simulator how to integrate numerically the equations of motion that govern the orbital mechanics to simulate. The integrator settings are defined using two derived classes, depending on whether the integrator to be used is a fixed step-size integrator or a variable step-size integrator.

5.1.1. Propagation with a fixed step-size integrator

In order to use a fixed step-size integrator, the following constructor needs to be created in your main function. The constructor is created as a shared_ptr where the arguments to the constructor are passed by using make_shared:

boost::shared_ptr< IntegratorSettings< > > integratorSettings =
            boost::make_shared< IntegratorSettings< > >
            ( integratorType, simulationStartEpoch, fixedStepSize );

where the following arguments need to be passed:

  • integratorType
    Defines the fixed step-size integrator type to be used. Currently the only options available are euler and rungeKutta4.
  • simulationStartEpoch
    Defines the simulation’s start epoch. It must be a double variable-type.
  • fixedStepSize
    Defines the fixed step-size to be used either by the euler or the rungeKutta4 numerical integrator. It must be a double variable-type.

5.1.2. Propagation with a variable step-size integrator

In order to use a variable step-size integrator, the following constructor needs to be created in your main function. Similarly to the fixed-step size integrator settings, this is done by means of a boost pointer libraries:

boost::shared_ptr< IntegratorSettings< > > integratorSettings =
            boost::make_shared< RungeKuttaVariableStepSizeSettings< > >
                        integratorType,
                        initialTime,
                        initialTimeStep,
                        coefficientSet,
                        minimumStepSize
                        maximumStepSize );

where the following arguments need to be passed:

  • integratorType
    Defines the fixed step-size integrator type to be used. The only option available is rungeKuttaVariableStepSize.
  • initialTime
    Defines the simulation’s initial time. It must be a double variable-type.
  • initialTimeStep
    Defines the initial step-size to be used either by the rungeKuttaVariableStepSize numerical integrator. It must be a double variable-type.
  • coefficientSet
    Defines the coefficient set to be used by the rungeKuttaVariableStepSize numerical integrator. The list of available coefficient sets is given in Integrators.
  • minimumStepSize
    Defines the minimum step-size that the rungeKuttaVariableStepSize numerical integrator can take. It must be a double variable-type.
  • maximumStepSize
    Defines the maximum step-size that the rungeKuttaVariableStepSize numerical integrator can take. It must be a double variable-type.

Note

Aside from the arguments listed in this page, the IntegratorSettings derived classes offer a number of optional arguments. The reader is advised to examine the Doxygen documentation included in the code for further details.

Warning

Make sure that a compatible integratorType is selected, otherwise a runtime exception will be thrown.