« Events » : différence entre les versions
(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 |
||
Ligne 1 : | Ligne 1 : | ||
Some widgets are corresponding to the most used orbital events as defined with [[https://logiciels.cnes.fr/en/node/62?type=desc 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 == | == How to call it == | ||
Some basic event widgets are: | |||
* GPAltitudeDetector, | |||
* GPDateDetector, | |||
* GPRelativeDateDetector, | |||
And the following events are specific as they have the possibility to define an occurrence for triggering them. | |||
* GPAOLDetector, | |||
* GPApsideDetector, | |||
* GPEclipseDetector, | |||
* GPLocalTimeDetector, | |||
* GPNodeDetector, | |||
* GPVisibilityFromStationDetector | |||
It is very simple to call them: | |||
* Using a constructor with a single label: | |||
<syntaxhighlight lang="java"> | |||
date = new GPDateDetector("Absolute date event"); | |||
</syntaxhighlight> | |||
* … or with an initial event for initialization: | |||
<syntaxhighlight lang="java"> | <syntaxhighlight lang="java"> | ||
final AbsoluteDate date0 = new AbsoluteDate(2010, 1, 1, TimeScalesFactory.getUTC()); | |||
final CustomDateDetector dateDetector = new CustomDateDetector(date0); | |||
date = new GPDateDetector("Absolute date eve nt", dateDetector); | |||
</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. | |||
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: | |||
<syntaxhighlight lang="java"> | |||
date.blockAction(Action.STOP); | |||
</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 … | |||
<syntaxhighlight lang="java"> | |||
eventSelector = | |||
new GPEventSelector("Events:", GPEventsEnum.APSIDE, GPEventsEnum.NODE); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
== Display == | == Display == | ||
The display just below corresponds to GPAltitudeDetector: | |||
[[File:GPAltitudeDetector.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): | |||
[[File:EventAction.png]] | |||
… and eventually expert settings including the checking interval and the convergence threshold (see [[https://logiciels.cnes.fr/en/node/62?type=desc PATRIUS]] documentation for more information): | |||
[[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): | |||
[[File:GPAOLDetector.png]] | |||
At last, here is the display when using GPEventSelector widget: | |||
[[File:GPEventSelector.png]] | |||
== How to use it == | == How to use it == |
Version du 29 juillet 2017 à 13:28
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:
- GPAltitudeDetector,
- GPDateDetector,
- GPRelativeDateDetector,
And the following events are specific as they have the possibility to define an occurrence for triggering them.
- GPAOLDetector,
- GPApsideDetector,
- GPEclipseDetector,
- GPLocalTimeDetector,
- GPNodeDetector,
- GPVisibilityFromStationDetector
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:
final AbsoluteDate date0 = new AbsoluteDate(2010, 1, 1, TimeScalesFactory.getUTC());
final CustomDateDetector dateDetector = new CustomDateDetector(date0);
date = new GPDateDetector("Absolute date eve nt", dateDetector);
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:
date.blockAction(Action.STOP);
Moreover, it exists a global GPEvent 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 …
eventSelector =
new GPEventSelector("Events:", GPEventsEnum.APSIDE, GPEventsEnum.NODE);
Display
The display just below corresponds to GPAltitudeDetector:
Fichier:GPAltitudeDetector.png
We see that the display is composed of an GPAbsoluteDate widget followed by fields corresponding to the event definition with the type of action (see [PATRIUS] documentation for more information):
… and eventually expert settings including the checking interval and the convergence threshold (see [PATRIUS] documentation for more information):
On the following example (GPAOLDetector), we see another event detector but with a trigger information (i.e. the occurrence of the event):
At last, here is the display when using GPEventSelector widget:
How to use it
To get a [PATRIUS] xxx object, we will just have to call for the getPatriusObject() method as below:
How it is stored
Here is the XML format for such a configuration: