« Tutorials 4.1 Events » : différence entre les versions

De Patrius
Aller à la navigation Aller à la recherche
Page créée avec « == What is an Event ? == An [{{PathCurrentJavaDoc}}/fr/cnes/sirius/patrius/propagation/events/EventDetector.html EventDetector] corresponds to an object that will allow t... »
 
Aucun résumé des modifications
 
Ligne 1 : Ligne 1 :
== What is an Event ? ==
== What is an Event ? ==


An [{{PathCurrentJavaDoc}}/fr/cnes/sirius/patrius/propagation/events/EventDetector.html EventDetector] corresponds to an object that will allow to a propagator to determine when this event will occurred.
An [{{JavaDoc4.1}}/fr/cnes/sirius/patrius/propagation/events/EventDetector.html EventDetector] corresponds to an object that will allow to a propagator to determine when this event will occurred.


<font color=#556B2F>'''PATRIUS'''</font> will already propose a great amount of predefined events (anomaly, <font color=#FF8C00 title="Argument Of Latitude">AOL</font>, altitude, eclipse, ...). These events may be called with "by default" values or may be customized by defining:
<font color=#556B2F>'''PATRIUS'''</font> will already propose a great amount of predefined events (anomaly, <font color=#FF8C00 title="Argument Of Latitude">AOL</font>, altitude, eclipse, ...). These events may be called with "by default" values or may be customized by defining:
Ligne 10 : Ligne 10 :
The following code example shows how to define an <font color=#FF8C00 title="Argument Of Latitude">AOL</font> detector with all these possibilities.
The following code example shows how to define an <font color=#FF8C00 title="Argument Of Latitude">AOL</font> detector with all these possibilities.


'''Code example:''' [[AOLEvent|AOL event detector]]
'''Code example:''' [[AOLEvent_4.1|AOL event detector]]


== Using AbstractDetector class ==
== Using AbstractDetector class ==


If you have not found a predefined event detector into the <font color=#556B2F>'''PATRIUS'''</font> list, you can build yourself you own detector using the [{{PathCurrentJavaDoc}}/fr/cnes/sirius/patrius/propagation/events/AbstractDetector.html AbstractDetector] class.
If you have not found a predefined event detector into the <font color=#556B2F>'''PATRIUS'''</font> list, you can build yourself you own detector using the [{{JavaDoc4.1}}/fr/cnes/sirius/patrius/propagation/events/AbstractDetector.html AbstractDetector] class.


In such a case, you will have to redefined:
In such a case, you will have to redefined:
Ligne 21 : Ligne 21 :
* <font color=#4169E1>shouldBeRemoved()</font> method
* <font color=#4169E1>shouldBeRemoved()</font> method


'''Code example:''' [[EventUsingAbstractDetector|Event using AbstractDetector class]]
'''Code example:''' [[EventUsingAbstractDetector_4.1|Event using AbstractDetector class]]


== Using EventDetector interface ==
== Using EventDetector interface ==
Ligne 37 : Ligne 37 :
* <font color=#4169E1>shouldBeRemoved()</font> method
* <font color=#4169E1>shouldBeRemoved()</font> method


'''Code example:''' [[EventUsingEventDetector|Event using EventDetector interface]]
'''Code example:''' [[EventUsingEventDetector_4.1|Event using EventDetector interface]]


[[Category:Tutorials 4.1]]
[[Category:Tutorials 4.1]]

Dernière version du 20 décembre 2018 à 15:39

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 AOL detector with all these possibilities.

Code example: AOL 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