« GPOneAxisEllipsoid » : 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
 
(2 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/GPOneAxisEllipsoid.html GPOneAxisEllipsoid] class, the developer has only to create such an object as is:
<syntaxhighlight lang="java">
ellips = new GPOneAxisEllipsoid("My Ellipsoid");
</syntaxhighlight>
It is also ,possible to limit the available frames using two possibilities:
* Using a specific constructor:
<syntaxhighlight lang="java">
ellips = new GPOneAxisEllipsoid("My Ellipsoid", GPRefFrame.ITRF, GPRefFrame.TIRF);
</syntaxhighlight>
* … or using the <font color=#4169E1>setAvailableFrames()</font> method:


<syntaxhighlight lang="java">
<syntaxhighlight lang="java">
ellips.setAvailableFrames(GPRefFrame.ITRF, GPRefFrame.TIRF);
</syntaxhighlight>


We also may initialize the widget with predefined values:
<syntaxhighlight lang="java">
final double REQ  = Constants.WGS84_EARTH_EQUATORIAL_RADIUS;
final double FLAT = Constants.WGS84_EARTH_FLATTENING;
final Frame ITRF = FramesFactory.getITRF();
final ExtendedOneAxisEllipsoid earth = new ExtendedOneAxisEllipsoid(REQ, FLAT, ITRF, "EARTH");
ellips = new GPOneAxisEllipsoid("My Ellipsoid", earth);
</syntaxhighlight>
</syntaxhighlight>


== Display ==
== Display ==
In the first case, we will get:
[[File:GPOneAxisEllipsoid1.png]]
As with the limitation of available frames:
[[File:GPOneAxisEllipsoid1.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]] <font color=#4169E1>ExtendedOneAxisEllipsoid </font> object, we will just have to call for the <font color=#4169E1>getPatriusObject()</font> method as below:


<syntaxhighlight lang="java">
<syntaxhighlight lang="java">
 
ExtendedOneAxisEllipsoid extEllips = ellips.getPatriusObject();
</syntaxhighlight>
</syntaxhighlight>


== 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">
 
  <OneAxisEllipsoid name="My_Ellipsoid">
    <Real name="sma" unit="km">6.3781363E3</Real>
    <Real name="flatness">3.3536E-3</Real>
    <Frame name="frame">
      <String name="name">ITRF</String>
    </Frame>
    <String name="name">My Ellipsoid</String>
  </OneAxisEllipsoid>
</syntaxhighlight>
</syntaxhighlight>

Dernière version du 7 septembre 2017 à 10:42

How to call it

For using the GPOneAxisEllipsoid class, the developer has only to create such an object as is:

ellips = new GPOneAxisEllipsoid("My Ellipsoid");

It is also ,possible to limit the available frames using two possibilities:

  • Using a specific constructor:
ellips = new GPOneAxisEllipsoid("My Ellipsoid", GPRefFrame.ITRF, GPRefFrame.TIRF);
  • … or using the setAvailableFrames() method:
ellips.setAvailableFrames(GPRefFrame.ITRF, GPRefFrame.TIRF);

We also may initialize the widget with predefined values:

final double REQ  = Constants.WGS84_EARTH_EQUATORIAL_RADIUS;
final double FLAT = Constants.WGS84_EARTH_FLATTENING;
final Frame ITRF = FramesFactory.getITRF();
final ExtendedOneAxisEllipsoid earth = new ExtendedOneAxisEllipsoid(REQ, FLAT, ITRF, "EARTH");

ellips = new GPOneAxisEllipsoid("My Ellipsoid", earth);

Display

In the first case, we will get:

GPOneAxisEllipsoid1.png

As with the limitation of available frames:

GPOneAxisEllipsoid1.png

How to use it

To get a [PATRIUS] ExtendedOneAxisEllipsoid object, we will just have to call for the getPatriusObject() method as below:

ExtendedOneAxisEllipsoid extEllips = ellips.getPatriusObject();

How it is stored

Here is the XML format:

  <OneAxisEllipsoid name="My_Ellipsoid">
    <Real name="sma" unit="km">6.3781363E3</Real>
    <Real name="flatness">3.3536E-3</Real>
    <Frame name="frame">
      <String name="name">ITRF</String>
    </Frame>
    <String name="name">My Ellipsoid</String>
  </OneAxisEllipsoid>