« GPConstants » : différence entre les versions

De GENOPUS
Aller à la navigation Aller à la recherche
(Page créée avec « == How to call it == <syntaxhighlight lang="java"> </syntaxhighlight> == Display == == How to use it == To get a https://logiciels.cnes.fr/en/node/62?type=desc PATR... »)
 
Aucun résumé des modifications
 
Ligne 1 : Ligne 1 :
== How to call it ==
== How to call it ==
<font color=#556B2F>'''GENOPUS'''</font> proposes some widgets with a list of [[https://logiciels.cnes.fr/en/node/62?type=desc PATRIUS]] constants. They can be called such as:


<syntaxhighlight lang="java">
<syntaxhighlight lang="java">
muSelector = new GPEntryEarthMu("Earth Mu selector:");


earthEqRadSelector = new GPEntryEarthEqRad("Earth Equatorial radius selector:");
earthFlatSelector = new GPEntryEarthFlat("Earth flatness selector");
earthRotRateSelector = new GPEntryEarthRotRate("Earth rotation rate selector");
earthJ2Selector = new GPEntryEarthJ2("Earth J2 selector");
</syntaxhighlight>
</syntaxhighlight>


== Display ==
== Display ==
We will get:
[[File:GPConstants1.png]]
These constants are of course modifiable via the <font color=#FF8C00 title="Grapical User Interface">GUI</font> but a list of predefined values (present in [[https://logiciels.cnes.fr/en/node/62?type=desc PATRIUS]] library) is accessible via a select button that will display a pop-up window as below …
[[File:GPConstants2.png]]


== How to use it ==
== How to use it ==


To get a [[https://logiciels.cnes.fr/en/node/62?type=desc PATRIUS]] <font color=#4169E1>xxx</font> object, we will just have to call for the <font color=#4169E1>getPatriusObject()</font> method as below:
To get the values of such constant, we will just have to call for the <font color=#4169E1>getValue()</font> method as on the example below:


<syntaxhighlight lang="java">
<syntaxhighlight lang="java">
 
double mu = muSelector.getValue();
</syntaxhighlight>
</syntaxhighlight>


== How it is stored ==
== How it is stored ==


Here is the <font color=#FF8C00 title="Extensible Markup Language">XML</font> format for such a configuration:
Here is the <font color=#FF8C00 title="Extensible Markup Language">XML</font> format:


<syntaxhighlight lang="XML">
<syntaxhighlight lang="XML">
 
  <Real name="Earth_Mu_selector:" unit="km^3/s^2">3.986004415E5</Real>
  <Real name="Earth_Equatorial_radius_selector:" unit="km">6.3781363E3</Real>
  <Real name="Earth_flatness_selector">3.3536E-3</Real>
  <Real name="Earth_rotation_rate_selector" unit="rad/s">7.29211537319376E-5</Real>
  <Real name="Earth_J2_selector">1.08263E-3</Real>
</syntaxhighlight>
</syntaxhighlight>

Dernière version du 29 juillet 2017 à 13:19

How to call it

GENOPUS proposes some widgets with a list of [PATRIUS] constants. They can be called such as:

muSelector = new GPEntryEarthMu("Earth Mu selector:");

earthEqRadSelector = new GPEntryEarthEqRad("Earth Equatorial radius selector:");

earthFlatSelector = new GPEntryEarthFlat("Earth flatness selector");

earthRotRateSelector = new GPEntryEarthRotRate("Earth rotation rate selector");

earthJ2Selector = new GPEntryEarthJ2("Earth J2 selector");

Display

We will get:

GPConstants1.png

These constants are of course modifiable via the GUI but a list of predefined values (present in [PATRIUS] library) is accessible via a select button that will display a pop-up window as below …

GPConstants2.png

How to use it

To get the values of such constant, we will just have to call for the getValue() method as on the example below:

double mu = muSelector.getValue();

How it is stored

Here is the XML format:

  <Real name="Earth_Mu_selector:" unit="km^3/s^2">3.986004415E5</Real>
  <Real name="Earth_Equatorial_radius_selector:" unit="km">6.3781363E3</Real>
  <Real name="Earth_flatness_selector">3.3536E-3</Real>
  <Real name="Earth_rotation_rate_selector" unit="rad/s">7.29211537319376E-5</Real>
  <Real name="Earth_J2_selector">1.08263E-3</Real>