« GPGeodeticPoint » : différence entre les versions
Aller à la navigation
Aller à la recherche
Aucun résumé des modifications |
Aucun résumé des modifications |
||
Ligne 41 : | Ligne 41 : | ||
</syntaxhighlight> | </syntaxhighlight> | ||
''<font color=#FF0000>Note: even if the widget is initialized without altitude, this one will be | ''<font color=#FF0000>Note: even if the widget is initialized without altitude, this one will be stored in the GeodeticPoint (with a zero value).</font>'' | ||
== How it is stored == | == How it is stored == |
Version du 29 juillet 2017 à 12:53
How to call it
For using the GPGeodeticPoint class, the developer has only to create such an object with these two possibilities:
- With an altitude coordinate:
geodWithAlt = new GPGeodeticPoint ("With altitude:");
- … or without altitude coordinate (only latitude/longitude):
geodWithoutAlt = new GPGeodeticPoint ("Without altitude:", false);
We also may initialize the widget with predefined values:
GeodeticPoint geodeticPoint =
new GeodeticPoint(FastMath.toRadians(45.),
FastMath.toRadians(10.), 120.e+3);
geodWithoutAlt = new GPGeodeticPoint("Without altitude:",
geodeticPoint, false);
Note: we may initialize a widget with no display altitude even with a (complete) geodetic point.
Display
For both cases, the display will be:
How to use it
To get a [PATRIUS (CommonsMath)] Vector3D object, we will just have to call for the getPatriusObject() method as below:
GeodeticPoint point = geodWithAlt.getPatriusObject();
Note: even if the widget is initialized without altitude, this one will be stored in the GeodeticPoint (with a zero value).
How it is stored
Here is the XML format:
<GeodeticPoint name="With_altitude:">
<Real name="latitude" unit="deg">4.5E1</Real>
<Real name="longitude" unit="deg">1.0E1</Real>
<Real name="altitude" unit="km">1.2E2</Real>
</GeodeticPoint>
<GeodeticPoint name="Without_altitude:">
<Real name="latitude" unit="deg">1.1E1</Real>
<Real name="longitude" unit="deg">2.2E1</Real>
<Real name="altitude" unit="km">0.0E0</Real>
</GeodeticPoint>
Note: same remark as above when the widget is initialized without altitude.