Tutorials 4.5.1 Events : Différence entre versions
(Page créée avec « == What is an Event ? == An [{{JavaDoc4.5.1}}/fr/cnes/sirius/patrius/propagation/events/EventDetector.html EventDetector] corresponds to an object that will allow to a pr... ») |
(Aucune différence)
|
Version actuelle en date du 17 août 2020 à 08:48
What is an Event ?
An EventDetector corresponds to an object that will allow to a propagator to determine when this event will occurred.
PATRIUS will already propose a great amount of predefined events (anomaly, AOL, altitude, eclipse, ...). These events may be called with "by default" values or may be customized by defining:
- its maximum check interval (in seconds)
- the threshold value below which the convergence is acquired (in seconds)
- the fact that the event will be checked several time or not.
The following code example shows how to define an anomaly detector with all these possibilities.
Code example: Anomaly event detector
Using AbstractDetector class
If you have not found a predefined event detector into the PATRIUS list, you can build yourself you own detector using the AbstractDetector class.
In such a case, you will have to redefined:
- eventOccurred() method ; when the event has occured, this method will be called by the propagator and will return the appropriate action
- g() method ; this method will return a double value which trigger the event when it will reach zero (+/- the threshold)
- shouldBeRemoved() method
Code example: Event using AbstractDetector class
Using EventDetector interface
if you want to customize deeper your event detector, rather than to use AbstractDetector class, you may use EventDetector interface.
In such a case, you will have to redefined:
- eventOccurred() method ; when the event has occured, this method will be called by the propagator and will return the appropriate action
- getMaxCheckInterval() method ; this method will return a double value which trigger the event when it will reach zero (+/- the threshold)
- getMaxIterationCount() method
- getSlopeSelection() method
- getThreshold() method
- init() method
- resetState() method
- shouldBeRemoved() method
Code example: Event using EventDetector interface