GPConstants

De GENOPUS
Aller à la navigation Aller à la recherche
La version imprimable n’est plus prise en charge et peut comporter des erreurs de génération. Veuillez mettre à jour les signets de votre navigateur et utiliser à la place la fonction d’impression par défaut de celui-ci.

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>