GPForceModels

De GENOPUS
Aller à la navigation Aller à la recherche

How to call it

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

  • With no arguments:
models = new GPForceModels();
  • with several boolean parameters as arguments : these ones will allow making visible or not each kind of force. Anyway, potential has not such a boolean parameter as it will be mandatory to define a potential force model. So, in the following example, only potential, aerodynamic and radiative pressure forces will be displayed …
final boolean thirdBodiesForceIsVisible = false;
final boolean aeroForceIsVisible = true;
final boolean srpForceIsVisible = true;
final boolean rediffusedSrpForceIsVisible = false;
final boolean oceanTidesForceIsVisible = false;
final boolean terrestrialTidesForceIsVisible = false;

models = new GPForceModels("MyModels", thirdBodiesForceIsVisible,
                           aeroForceIsVisible,
                           srpForceIsVisible,
                           rediffusedSrpForceIsVisible,
                           oceanTidesForceIsVisible,
                           terrestrialTidesForceIsVisible);

Display

In case of calling GPForceModels with no arguments, the initial display will be:

GPForceModels1.png

Note: the potential is in error mode due to the fact that Droziner equations do not support a 0x0 field.

We can see that an ellipsoid definition is also displayed: this is due to the fact that some force models will need it (atmospheric one for example). The fact that the different forces may be displayed does not mean that they will be considered for a next computation (except for potential of course). To do it, each item will have to be selected as, in the next example for "third bodies" perturbations …

GPForceModels2.png

How to use it

To get a GENOPUS CustomForceModels object, we will just have to call for the getPatriusObject() method as below:

CustomForceModels forces = models.getPatriusObject();

How it is stored

Here is the XML format for such a configuration:

  <EarthPotentialForceModel name="Earth_Potential">
    <String name="attractionModel">droziner</String>
    <String name="potentialFileName">GRIM4_S4</String>
    <Integer name="zonal">8</Integer>
    <Integer name="tesseral">8</Integer>
  </EarthPotentialForceModel>
  <ThirdBodyForceModel name="Third_Body">
    <Boolean name="thirdBody">true</Boolean>
    <Boolean name="moon">true</Boolean>
    <Boolean name="sun">true</Boolean>
    <Boolean name="venus">false</Boolean>
    <Boolean name="mars">false</Boolean>
    <Boolean name="jupiter">false</Boolean>
  </ThirdBodyForceModel>
  <String name="ephemeridesType">JPL</String>
  <OneAxisEllipsoid name="Earth's_Ellipsoid">
    <Real name="sma" unit="km">6.3781363E3</Real>
    <Real name="flatness">3.3536E-3</Real>
    <Frame name="frame">
      <String name="name">GCRF</String>
    </Frame>
    <String name="name">Earth's Ellipsoid</String>
  </OneAxisEllipsoid>