« GPRotation » : 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/attitudes/GPRotation.html GPRotation] class, the developer has only to create such an object as is:


<syntaxhighlight lang="java">
<syntaxhighlight lang="java">
rotation = new GPRotation ("Label");
</syntaxhighlight>


We also may initialize the widget with predefined values:
<syntaxhighlight lang="java">
CustomRotation rot = new CustomRotation(RotationOrder.ZYX, FastMath.PI, 0., 0.);
rotation = new GPRotation ("Label", rot);
</syntaxhighlight>
</syntaxhighlight>


== Display ==
== Display ==
We will get:
[[File:GPRotation.png]]
As for the [[GPOrbit|GPOrbit]] widget, it is possible to do conversions (or deactivate them by clicking on the corresponding checkbox) using the same “pivot” notion.


== 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 <font color=#556B2F>'''GENOPUS'''</font> <font color=#4169E1>CustomRotation </font> object, we will just have to call for the <font color=#4169E1>getPatriusObject()</font> method as below:


<syntaxhighlight lang="java">
<syntaxhighlight lang="java">
 
CustomRotation rot = rotation.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">
 
  <Rotation name="Label">
    <String name="rotationOrder">XZX Euler angles</String>
    <Real name="psi" unit="deg">0.0E0</Real>
    <Real name="theta" unit="deg">1.8E2</Real>
    <Real name="phi" unit="deg">0.0E0</Real>
  </Rotation>
</syntaxhighlight>
</syntaxhighlight>

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

How to call it

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

rotation = new GPRotation ("Label");

We also may initialize the widget with predefined values:

CustomRotation rot = new CustomRotation(RotationOrder.ZYX, FastMath.PI, 0., 0.);
rotation = new GPRotation ("Label", rot);

Display

We will get:

GPRotation.png

As for the GPOrbit widget, it is possible to do conversions (or deactivate them by clicking on the corresponding checkbox) using the same “pivot” notion.

How to use it

To get a GENOPUS CustomRotation object, we will just have to call for the getPatriusObject() method as below:

CustomRotation rot = rotation.getPatriusObject();

How it is stored

Here is the XML format:

  <Rotation name="Label">
    <String name="rotationOrder">XZX Euler angles</String>
    <Real name="psi" unit="deg">0.0E0</Real>
    <Real name="theta" unit="deg">1.8E2</Real>
    <Real name="phi" unit="deg">0.0E0</Real>
  </Rotation>