GPGeodeticPoint
Aller à la navigation
Aller à la recherche
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 name/latitude/longitude):
geodWithoutAlt = new GPGeodeticPoint ("Without altitude:", false, true);
- … or without name (only latitude/longitude/altitude):
geodWithoutName = new GPGeodeticPoint ("Without name:", true, 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.