« GPForceModels » : différence entre les versions

De GENOPUS
Aller à la navigation Aller à la recherche
(Page créée avec « == How to call it == For using the <font color=#4169E1>GPForceModels</font> class the developer has only to create such an object with these two possibilities: * With no... »)
 
Aucun résumé des modifications
Ligne 9 : Ligne 9 :
</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 '''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 …


<syntaxhighlight lang="java">
<syntaxhighlight lang="java">
Ligne 29 : Ligne 29 :
== Display ==
== Display ==


In case of calling GPForceModels with no arguments, the initial display will be:
In case of calling <font color=#4169E1>GPForceModels</font> with no arguments, the initial display will be:
 
[[File:GPForceModels1.png]]
 
''<font color=#FF0000>Note: the potential is in error mode due to the fact that Droziner equations do not support a 0x0 field.<:font>''
 
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 …
 
[[File:GPForceModels2.png]]
 
== How to use it ==
 
To get a <font color=#556B2F>'''GENOPUS'''</font> <font color=#4169E1>CustomForceModels<:font> object, we will just have to call for the <font color=#4169E1>getPatriusObject()</font> method as below:
 
<syntaxhighlight lang="java">
CustomForceModels forces = models.getPatriusObject();
</syntaxhighlight>
 
== How it is stored ==
 
Here is the <font color=#FF8C00 title="Extensible Markup Language">XML</font> format for such a configuration:
 
<syntaxhighlight lang="XML">
  <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>
</syntaxhighlight>

Version du 28 juillet 2017 à 17:40

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(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.<:font>

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<:font> 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>