« GPGeodeticPoint » : différence entre les versions
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 |
||
(3 versions intermédiaires par le même utilisateur non affichées) | |||
Ligne 1 : | Ligne 1 : | ||
== How to call it == | == How to call it == | ||
For using the [{{PathCurrentJavaDoc}}/fr/cnes/genopus/bodies/GPGeodeticPoint.html GPGeodeticPoint] class, the developer has only to create such an object with these two possibilities: | |||
* With an altitude coordinate: | |||
<syntaxhighlight lang="java"> | |||
geodWithAlt = new GPGeodeticPoint ("With altitude:"); | |||
</syntaxhighlight> | |||
* … or without altitude coordinate (only name/latitude/longitude): | |||
<syntaxhighlight lang="java"> | |||
geodWithoutAlt = new GPGeodeticPoint ("Without altitude:", false, true); | |||
</syntaxhighlight> | |||
* … or without name (only latitude/longitude/altitude): | |||
<syntaxhighlight lang="java"> | <syntaxhighlight lang="java"> | ||
geodWithoutName = new GPGeodeticPoint ("Without name:", true, false); | |||
</syntaxhighlight> | |||
We also may initialize the widget with predefined values: | |||
<syntaxhighlight lang="java"> | |||
GeodeticPoint geodeticPoint = | |||
new GeodeticPoint(FastMath.toRadians(45.), | |||
FastMath.toRadians(10.), 120.e+3); | |||
geodWithoutAlt = new GPGeodeticPoint("Without altitude:", | |||
geodeticPoint, false); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
''<font color=#FF0000>Note: we may initialize a widget with no display altitude even with a (complete) geodetic point.</font>'' | |||
== Display == | == Display == | ||
For both cases, the display will be: | |||
[[File:GPGeodeticPoint.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> | To get a [[https://logiciels.cnes.fr/en/node/62?type=desc PATRIUS (CommonsMath)]] <font color=#4169E1>Vector3D </font> object, we will just have to call for the <font color=#4169E1>getPatriusObject()</font> method as below: | ||
<syntaxhighlight lang="java"> | <syntaxhighlight lang="java"> | ||
GeodeticPoint point = geodWithAlt.getPatriusObject(); | |||
</syntaxhighlight> | |||
</ | ''<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 == | ||
Here is the <font color=#FF8C00 title="Extensible Markup Language">XML</font> format | Here is the <font color=#FF8C00 title="Extensible Markup Language">XML</font> format: | ||
<syntaxhighlight lang="XML"> | <syntaxhighlight lang="XML"> | ||
<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> | |||
</syntaxhighlight> | |||
</ | ''<font color=#FF0000>Note: same remark as above when the widget is initialized without altitude.</font>'' |
Dernière version du 25 octobre 2017 à 16:02
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.