GPIntegrator

De GENOPUS
Aller à la navigation Aller à la recherche

Only available since V2.1 version

How to call it

For using the GPIntegrator class, the developer has only to create such an object with these two possibilities:

  • With no initialization:
GPIntegrator gpInteg = new GPIntegrator();

In that case, all the possible integrators will be displayed (i.e. Runge Kutta 4, Runge Kutta 6 and Dormand Price 853)

  • Or, if we want to limit the display to some of these integrators (in the example below, only Runge Kutta 4 and Dormand Price 853) and choose the one initially displayes (here the Dormand Price 853 one):
final IntegratorTypeEnum[] types = { IntegratorTypeEnum.RK4, IntegratorTypeEnum.DOP };
GPIntegrator gpInteg = new GPIntegrator(types, IntegratorTypeEnum.DOP);
  • There are also several setter methods to override default values. For example, if we want to display by default 5 seconds for the Runge Kutta time steps, we will have to call to the specific method as:
gpInteg.setRKParameters(5.);

Display

For the first cases, the display will be:

GPIntegrator1.png

as, for the second one …

GPIntegrator2.png

Note an interesting functionnality for the Dormand Price 853 data with a user help for initializing steps and tolerances depending of some kind of orbits.

GPIntegrator3.png

How to use it

To get a [PATRIUS] FirstOrderIntegrator object, we will just have to call for the getPatriusObject() method as below:

final FirstOrderIntegrator integ = gpInteg.getPatriusObject();

Be careful, that this call will not work if the user selected the "Simplified" display for Dormand Price 853 tolerances.

To be sure that it will work every time, we will have to give an orbit as input

final FirstOrderIntegrator integ = gpInteg.getPatriusObject(orbit);

How it is stored

Here is the XML format for the Dormand Price 853 integrator data:

  <String name="Type:">Dormand-Prince (8th order)</String>
  <Real name="Minimum_timestep:_" unit="s">1.0E0</Real>
  <Real name="Maximum_timestep:_" unit="s">3.0E2</Real>
  <String name="Tolerances_definition:_">Complete</String>
  <Boolean name="Bypass_error_on_min_timestep">true</Boolean>
  <String name="Templates_for_tolerances_definition">---</String>
  <Tolerances name="Tolerance1">
    <Real name="X" unit="m">7.0E-6</Real>
    <Real name="Xr" unit="%">0.0E0</Real>
  </Tolerances>
  <Tolerances name="Tolerance2">
    <Real name="Y" unit="m">7.0E-6</Real>
    <Real name="Yr" unit="%">0.0E0</Real>
  </Tolerances>
  <Tolerances name="Tolerance3">
    <Real name="Z" unit="m">7.0E-6</Real>
    <Real name="Zr" unit="%">0.0E0</Real>
  </Tolerances>
  <Tolerances name="Tolerance4">
    <Real name="Vx" unit="m/s">3.0E-10</Real>
    <Real name="Vxr" unit="%">0.0E0</Real>
  </Tolerances>
  <Tolerances name="Tolerance5">
    <Real name="Vy" unit="m/s">3.0E-10</Real>
    <Real name="Vyr" unit="%">0.0E0</Real>
  </Tolerances>
  <Tolerances name="Tolerance6">
    <Real name="Vz" unit="m/s">3.0E-10</Real>
    <Real name="Vzr" unit="%">0.0E0</Real>
  </Tolerances>
  <Real name="Mass" unit="kg">1.0E-3</Real>
  <Real name="Massr" unit="%">1.0E-2</Real>