« GPOneAxisEllipsoid » : différence entre les versions

De GENOPUS
Aller à la navigation Aller à la recherche
Aucun résumé des modifications
Aucun résumé des modifications
Ligne 1 : Ligne 1 :
== How to call it ==
== How to call it ==


For using the <font color=#4169E1>GPOneAxisellipsoid</font> class, the developer has only to create such an object as is:
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">
<syntaxhighlight lang="java">

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>