GPForceModels
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("MyModels");
- with several enum and 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. But it is possible to customize which attraction model may be selected and event to force to a given one without no more possibility to change it. So, in the following examples, only potential (with DROZINER and BALMINO attraction models, the last one being the one by default), aerodynamic and radiative pressure forces will be displayed …
AttractionModelsEnum[] attractionModelsAvailable = { AttractionModelsEnum.DROZINER, AttractionModelsEnum.BALMINO };
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", AttractionModelsEnum.BALMINO, attractionModelsAvailable,
thirdBodiesForceIsVisible,
aeroForceIsVisible,
srpForceIsVisible,
rediffusedSrpForceIsVisible,
oceanTidesForceIsVisible,
terrestrialTidesForceIsVisible);
If we had set:
AttractionModelsEnum[] attractionModelsAvailable = { AttractionModelsEnum.BALMINO };
BALMINO attraction model will be set by default and should not be displayed.
Display
In case of calling GPForceModels with no arguments, the initial display will be:
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 …
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>