« GPGeodeticPoint » : différence entre les versions

De GENOPUS
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
Ligne 1 : Ligne 1 :
== How to call it ==
== How to call it ==
For using the <font color=#4169E1>GPGeodeticPoint</font> 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 latitude/longitude):


<syntaxhighlight lang="java">
<syntaxhighlight lang="java">
geodWithoutAlt = new GPGeodeticPoint ("Without altitude:", 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>xxx</font> object, we will just have to call for the <font color=#4169E1>getPatriusObject()</font> method as below:
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>


</syntaxhighlight>
''<font color=#FF0000>Note: even if the widget is initialized without altitude, this one will be stores 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 for such a configuration:
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>


</syntaxhighlight>
''<font color=#FF0000>Note: same remark as above when the widget is initialized without altitude.</font>''

Version du 29 juillet 2017 à 12:52

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:

GPGeodeticPoint.png

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 stores 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.