« Events » : différence entre les versions
Aucun résumé des modifications |
Aucun résumé des modifications |
||
Ligne 23 : | Ligne 23 : | ||
</syntaxhighlight> | </syntaxhighlight> | ||
* … or with an initial event for initialization: | * … or with an initial event for initialization (and it that case, wa have also added the kind of action raised by this event with a STOP action): | ||
<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, Action.STOP); | ||
date = new GPDateDetector("Absolute date eve nt", dateDetector); | date = new GPDateDetector("Absolute date eve nt", dateDetector, Action.STOP); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Version du 25 octobre 2017 à 14:59
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.
- 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 (and it that case, wa have also added the kind of action raised by this event with a STOP action):
final AbsoluteDate date0 = new AbsoluteDate(2010, 1, 1, TimeScalesFactory.getUTC());
final CustomDateDetector dateDetector = new CustomDateDetector(date0, Action.STOP);
date = new GPDateDetector("Absolute date eve nt", dateDetector, Action.STOP);
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 GPEventSelector 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 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">STOP</String>
<Real name="maxCheck" unit="s">1.0E10</Real>
<Real name="threshold" unit="s">1.0E-9</Real>
</DateDetector>