GPConstants
De Wiki
Révision de 29 juillet 2017 à 13:19 par Admin (discussion | contributions)
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:
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 …
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>