GPOneAxisEllipsoid : Différence entre versions
De Wiki
(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... ») |
|||
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: | ||
<syntaxhighlight lang="java"> | <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"> | ||
+ | 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> | + | 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 | + | 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> |
Version du 29 juillet 2017 à 12:58
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:
As with the limitation of available frames:
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>