« GPForceModels » : différence entre les versions
Aucun résumé des modifications |
|||
(Une version intermédiaire par le même utilisateur non affichée) | |||
Ligne 9 : | Ligne 9 : | ||
</syntaxhighlight> | </syntaxhighlight> | ||
* with several '''enum | * 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 <font color=#FF8C00>DROZINER</font> and <font color=#FF8C00>BALMINO</font> attraction models, the last one being the one by default), aerodynamic and radiative pressure forces will be displayed … | ||
<syntaxhighlight lang="java"> | <syntaxhighlight lang="java"> | ||
Ligne 53 : | Ligne 53 : | ||
== How to use it == | == How to use it == | ||
To get a | To get a [[http://patrius.cnes.fr PATRIUS]] <font color=#4169E1>ForceModelsData </font> object, we will just have to call for the <font color=#4169E1>getPatriusObject()</font> method as below: | ||
<syntaxhighlight lang="java"> | <syntaxhighlight lang="java"> | ||
ForceModelsData forces = models.getPatriusObject(); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
''<font color=#FF0000>Note: for the previous '''<font color=#FF0000>V1.3(.1)</font>''' versions, it was mandatory to use the specific <font color=#556B2F>'''GENOPUS'''</font> [{{CurrentServer}}/uploads/JavaDocs/V1.3.1/fr/cnes/genopus/nonWidget/forces/CustomForceModels.html CustomForceModels] class.</font>'' | |||
== How it is stored == | == How it is stored == |
Dernière version du 9 octobre 2018 à 15:16
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 [PATRIUS] ForceModelsData object, we will just have to call for the getPatriusObject() method as below:
ForceModelsData forces = models.getPatriusObject();
Note: for the previous V1.3(.1) versions, it was mandatory to use the specific GENOPUS CustomForceModels class.
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>