Events : Différence entre versions

De Wiki
Aller à : navigation, rechercher
(How to call it)
 
(18 révisions intermédiaires par le même utilisateur non affichées)
Ligne 4 : Ligne 4 :
  
 
Some basic event widgets are:
 
Some basic event widgets are:
* GPAltitudeDetector,
+
* [{{PathCurrentJavaDoc}}/fr/cnes/genopus/events/GPAltitudeDetector.html GPAltitudeDetector],
* GPDateDetector,
+
* [{{PathCurrentJavaDoc}}/fr/cnes/genopus/events/GPDateDetector.html GPDateDetector],
* GPRelativeDateDetector,
+
* [{{PathCurrentJavaDoc}}/fr/cnes/genopus/events/GPRecurrentDateDetector.html GPRecurrentDateDetector] (since V2.1),
 +
* [{{PathCurrentJavaDoc}}/fr/cnes/genopus/events/GPRelativeDateDetector.html GPRelativeDateDetector],
 +
* [{{PathCurrentJavaDoc}}/fr/cnes/genopus/events/GPRecurrentRelativeDateDetector.html GPRelativeRecurrentDateDetector] (since V2.1),
 
And the following events are specific as they have the possibility to define an occurrence for triggering them.
 
And the following events are specific as they have the possibility to define an occurrence for triggering them.
* GPAOLDetector,
+
* [{{PathCurrentJavaDoc}}/fr/cnes/genopus/events/GPAOLDetector.html GPAOLDetector],
* GPApsideDetector,
+
* [{{PathCurrentJavaDoc}}/fr/cnes/genopus/events/GPApsideDetector.html GPApsideDetector],
* GPEclipseDetector,
+
* [{{PathCurrentJavaDoc}}/fr/cnes/genopus/events/GPEclipseDetector.html GPEclipseDetector],
* GPLocalTimeDetector,
+
* [{{PathCurrentJavaDoc}}/fr/cnes/genopus/events/GPLocalTimeDetector.html GPLocalTimeDetector],
* GPNodeDetector,
+
* [{{PathCurrentJavaDoc}}/fr/cnes/genopus/events/GPNodeDetector.html GPNodeDetector],
* GPVisibilityFromStationDetector
+
* [{{PathCurrentJavaDoc}}/fr/cnes/genopus/events/GPVisibilityFromStationDetector.html GPVisibilityFromStationDetector],
  
 
It is very simple to call them:
 
It is very simple to call them:
Ligne 23 : Ligne 25 :
 
</syntaxhighlight>
 
</syntaxhighlight>
  
* … or with an initial event for initialization:
+
* … or with an initial event for initialization (and it that case, wa have also specified the kind of actions raised by this event with RESET actions):
  
 
<syntaxhighlight lang="java">
 
<syntaxhighlight lang="java">
 
final AbsoluteDate date0 = new AbsoluteDate(2010, 1, 1, TimeScalesFactory.getUTC());
 
final AbsoluteDate date0 = new AbsoluteDate(2010, 1, 1, TimeScalesFactory.getUTC());
 
final CustomDateDetector dateDetector = new CustomDateDetector(date0);
 
final CustomDateDetector dateDetector = new CustomDateDetector(date0);
date = new GPDateDetector("Absolute date eve nt", dateDetector);
+
date = new GPDateDetector("Absolute date eve nt", dateDetector, Action.RESET_STATE, Action.RESET_DERIVATIVES);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
Note: we do not use directly [[https://logiciels.cnes.fr/en/node/62?type=desc PATRIUS]] detectors but <font color=#556B2F>'''GENOPUS'''</font> ones as some getter methods, necessary for the widgets, do not exist.
 
Note: we do not use directly [[https://logiciels.cnes.fr/en/node/62?type=desc PATRIUS]] detectors but <font color=#556B2F>'''GENOPUS'''</font> ones as some getter methods, necessary for the widgets, do not exist.
There is also the possibility to freeze the action associated for such events (for example, if the event is associated to a maneuver, it must be set to '''STOP''' and there must have no possibility to change the action:
+
 
 +
There is also the possibility to freeze the action associated for such events (for example, if the event is associated to a maneuver, it must be set to '''STOP''' and there must have no possibility to change the action. In that case, we have just to give a single action in the constructor then, this action will not be displayed. With the previous date event, it will be:
  
 
<syntaxhighlight lang="java">
 
<syntaxhighlight lang="java">
date.blockAction(Action.STOP);
+
date = new GPDateDetector("Absolute date eve nt", dateDetector, Action.STOP);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Moreover, it exists a global <font color=#4169E1>GPEvent</font> widget proposing a menu to select an event through a redefined list. In the example below, we will propose only an apside and a node event …
+
At last, it exists a global [{{PathCurrentJavaDoc}}/fr/cnes/genopus/events/GPEventSelector.html GPEventSelector] widget proposing a menu to select an event through a predefined list. In the example below, we will propose only an apside and a node event …
  
 
<syntaxhighlight lang="java">
 
<syntaxhighlight lang="java">
Ligne 47 : Ligne 50 :
 
== Display ==
 
== Display ==
  
The display just below corresponds to GPAltitudeDetector:
+
The display just below corresponds to [{{PathCurrentJavaDoc}}/fr/cnes/genopus/events/GPDateDetector.html GPDateDetector]:
  
[[File:GPAltitudeDetector.png]]
+
[[File:GPDateDetector.png]]
 
   
 
   
We see that the display is composed of an [[GPAbsoluteDate|GPAbsoluteDate]] widget followed by fields corresponding to the event definition with the type of action (see [[https://logiciels.cnes.fr/en/node/62?type=desc PATRIUS]] documentation for more information):
+
We see that the display is composed of a [[GPAbsoluteDate|GPAbsoluteDate]] widget followed by fields corresponding to the event definition with the type of action (see [[https://logiciels.cnes.fr/en/node/62?type=desc PATRIUS]] documentation for more information):
  
 
[[File:EventAction.png]]
 
[[File:EventAction.png]]
Ligne 59 : Ligne 62 :
 
[[File:EventExpertSettings.png]]
 
[[File:EventExpertSettings.png]]
 
   
 
   
On the following example (<font color=#4169E1>GPAOLDetector</font>), we see another event detector but with a trigger information (i.e. the occurrence of the event):
+
On the following example ([{{PathCurrentJavaDoc}}/fr/cnes/genopus/events/GPAOLDetector.html GPAOLDetector]), we see another event detector but with a trigger information (i.e. the occurrence of the event):
  
 
[[File:GPAOLDetector.png]]
 
[[File:GPAOLDetector.png]]
  
At last, here is the display when using GPEventSelector widget:
+
At last, here is the display when using [{{PathCurrentJavaDoc}}/fr/cnes/genopus/events/GPEventSelector.html GPEventSelector] widget, customised with only '''Apsides''' and '''Node''' events and showing the trigger information in a different way as above:
  
 
[[File:GPEventSelector.png]]
 
[[File:GPEventSelector.png]]
Ligne 69 : Ligne 72 :
 
== 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 the corresponding <font color=#556B2F>'''GENOPUS'''</font> objects, we will just have to call for the <font color=#4169E1>getPatriusObject()</font> method as below:
  
 
<syntaxhighlight lang="java">
 
<syntaxhighlight lang="java">
 +
CustomDateDetector dateDetector = date.getPatriusObject();
 +
</syntaxhighlight>
  
 +
… or, when using [{{PathCurrentJavaDoc}}/fr/cnes/genopus/events/GPEventSelector.html GPEventSelector]:
 +
 +
<syntaxhighlight lang="java">
 +
CustomDateDetector dateDetector = eventSelector.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 an example of <font color=#FF8C00 title="Extensible Markup Language">XML</font> format for <font [{{PathCurrentJavaDoc}}/fr/cnes/genopus/events/GPDateDetector.html GPDateDetector]:
  
 
<syntaxhighlight lang="XML">
 
<syntaxhighlight lang="XML">
 
+
  <DateDetector name="Absolute_date_event">
 +
    <AbsoluteDate name="eventDate">
 +
      <String name="date">01/01/2010 00h00m00s</String>
 +
      <String name="scale">UTC</String>
 +
    </AbsoluteDate>
 +
    <String name="actionData">RESET_STATE</String>
 +
    <Real name="maxCheck" unit="s">1.0E10</Real>
 +
    <Real name="threshold" unit="s">1.0E-9</Real>
 +
  </DateDetector>
 
</syntaxhighlight>
 
</syntaxhighlight>

Version actuelle en date du 8 novembre 2019 à 10:10

Some widgets are corresponding to the most used orbital events as defined with [PATRIUS]. The following list Is not exhaustive but will present the use of a part of them. Moreover such events are also internally used in attitude or maneuver sequences.

How to call it

Some basic event widgets are:

And the following events are specific as they have the possibility to define an occurrence for triggering them.

It is very simple to call them:

  • Using a constructor with a single label:
date = new GPDateDetector("Absolute date event");
  • … or with an initial event for initialization (and it that case, wa have also specified the kind of actions raised by this event with RESET actions):
final AbsoluteDate date0 = new AbsoluteDate(2010, 1, 1, TimeScalesFactory.getUTC());
final CustomDateDetector dateDetector = new CustomDateDetector(date0);
date = new GPDateDetector("Absolute date eve nt", dateDetector, Action.RESET_STATE, Action.RESET_DERIVATIVES);

Note: we do not use directly [PATRIUS] detectors but GENOPUS ones as some getter methods, necessary for the widgets, do not exist.

There is also the possibility to freeze the action associated for such events (for example, if the event is associated to a maneuver, it must be set to STOP and there must have no possibility to change the action. In that case, we have just to give a single action in the constructor then, this action will not be displayed. With the previous date event, it will be:

date = new GPDateDetector("Absolute date eve nt", dateDetector, Action.STOP);

At last, it exists a global GPEventSelector widget proposing a menu to select an event through a predefined list. In the example below, we will propose only an apside and a node event …

eventSelector =
  new GPEventSelector("Events:", GPEventsEnum.APSIDE, GPEventsEnum.NODE);

Display

The display just below corresponds to GPDateDetector:

GPDateDetector.png

We see that the display is composed of a GPAbsoluteDate widget followed by fields corresponding to the event definition with the type of action (see [PATRIUS] documentation for more information):

EventAction.png

… and eventually expert settings including the checking interval and the convergence threshold (see [PATRIUS] documentation for more information):

EventExpertSettings.png

On the following example (GPAOLDetector), we see another event detector but with a trigger information (i.e. the occurrence of the event):

GPAOLDetector.png

At last, here is the display when using GPEventSelector widget, customised with only Apsides and Node events and showing the trigger information in a different way as above:

GPEventSelector.png

How to use it

To get the corresponding GENOPUS objects, we will just have to call for the getPatriusObject() method as below:

CustomDateDetector dateDetector = date.getPatriusObject();

… or, when using GPEventSelector:

CustomDateDetector dateDetector = eventSelector.getPatriusObject()

How it is stored

Here is an example of XML format for <font GPDateDetector:

  <DateDetector name="Absolute_date_event">
    <AbsoluteDate name="eventDate">
      <String name="date">01/01/2010 00h00m00s</String>
      <String name="scale">UTC</String>
    </AbsoluteDate>
    <String name="actionData">RESET_STATE</String>
    <Real name="maxCheck" unit="s">1.0E10</Real>
    <Real name="threshold" unit="s">1.0E-9</Real>
  </DateDetector>