« GPForceModels » : différence entre les versions

De GENOPUS
Aller à la navigation Aller à la recherche
Aucun résumé des modifications
Aucun résumé des modifications
Ligne 6 : Ligne 6 :


<syntaxhighlight lang="java">
<syntaxhighlight lang="java">
models = new GPForceModels();
models = new GPForceModels("MyModels");
</syntaxhighlight>
</syntaxhighlight>


* 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 …
* 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">
AttractionModelsEnum[] attractionModelsAvailable = { AttractionModelsEnum.DROZINER, AttractionModelsEnum.BALMINO };
final boolean thirdBodiesForceIsVisible = false;
final boolean thirdBodiesForceIsVisible = false;
final boolean aeroForceIsVisible = true;
final boolean aeroForceIsVisible = true;
Ligne 19 : Ligne 21 :
final boolean terrestrialTidesForceIsVisible = false;
final boolean terrestrialTidesForceIsVisible = false;


models = new GPForceModels("MyModels", thirdBodiesForceIsVisible,
models = new GPForceModels("MyModels", AttractionModelsEnum.BALMINO, attractionModelsAvailable,
                          thirdBodiesForceIsVisible,
                           aeroForceIsVisible,
                           aeroForceIsVisible,
                           srpForceIsVisible,
                           srpForceIsVisible,
Ligne 26 : Ligne 29 :
                           terrestrialTidesForceIsVisible);
                           terrestrialTidesForceIsVisible);
</syntaxhighlight>
</syntaxhighlight>
If we had set:
<syntaxhighlight lang="java">
AttractionModelsEnum[] attractionModelsAvailable = { AttractionModelsEnum.BALMINO };
</syntaxhighlight>
<font color=#FF8C00>BALMINO</font> attraction model will be set by default and should not be displayed.


== Display ==
== Display ==

Version du 25 octobre 2017 à 15:47

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:

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>