Interface EventDetector
- All Known Subinterfaces:
DetectorModifier
- All Known Implementing Classes:
AbstractDetector,AbstractGeographicalDetector,AbstractTopocentricDetector,AlignmentDetector,AltitudeDetector,AngularSeparationDetector,AngularSeparationFromSatelliteDetector,ApsideDetector,AttitudesSequence.Switch,AttitudesSwitcher.InstantaneousSwitch,BetaAngleDetector,BooleanDetector,CylindricalShadowEclipseDetector,DateDetector,EclipseDetector,ElevationDetector,ElevationExtremumDetector,EventEnablingPredicateFilter,EventShifter,EventSlopeFilter,ExtremumAngularSeparationDetector,ExtremumApproachDetector,FieldOfViewDetector,FootprintOverlapDetector,FunctionalDetector,GeographicZoneDetector,GroundAtNightDetector,GroundFieldOfViewDetector,ImpulseManeuver,InterSatDirectViewDetector,LatitudeCrossingDetector,LatitudeExtremumDetector,LatitudeRangeCrossingDetector,LongitudeCrossingDetector,LongitudeExtremumDetector,LongitudeRangeCrossingDetector,MagneticFieldDetector,ManeuverTriggerDetector,NegateDetector,NodeDetector,ParameterDrivenDateIntervalDetector,PlaneCrossingDetector,PositionAngleDetector,RelativeDistanceDetector,SingleDateDetector,TimeIntervalDetector
It mirrors the ODEEventHandler interface from
Hipparchus but provides a space-dynamics interface to the
methods.
Events detectors are a useful solution to meet the requirements
of propagators concerning discrete conditions. The state of each
event detector is queried by the propagator from time to time, at least
once every max check interval but it may
be more frequent. When the sign of the underlying g switching function
changes, a root-finding algorithm is run to precisely locate the event,
down to a configured convergence threshold. The
max check interval is therefore devoted to
separate roots and is often much larger than the convergence threshold.
The physical meaning of the g switching function is not really used by the event detection algorithms. Its varies from event detector to event detector. One example would be a visibility detector that could use the angular elevation of the satellite above horizon as a g switching function. In this case, the function would switch from negative to positive when the satellite raises above horizon and it would switch from positive to negative when it sets backs below horizon. Another example would be an apside detector that could use the dot product of position and velocity. In this case, the function would switch from negative to positive when the satellite crosses periapsis and it would switch from positive to negative when the satellite crosses apoapsis.
When the precise state at which the g switching function changes has been
located, the corresponding event is triggered, by calling the eventOccurred
method from the associated handler.
The method can do whatever it needs with the event (logging it, performing
some processing, ignore it ...). The return value of the method will be used by
the propagator to stop or resume propagation, possibly changing the state vector.
- Author:
- Luc Maisonobe, Véronique Pommier-Maurussane
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidfinish(SpacecraftState state) This method finalizes the event detector's job.doubleg(SpacecraftState s) Compute the value of the switching function.default EventDetectionSettingsGetter for the settings.default EventFunctionGet the event function.Get the handler.default AdaptableIntervalGet maximal time interval between switching function checks.default intGet maximal number of iterations in the event time search.default doubleGet the convergence threshold in the event time search.default voidinit(SpacecraftState s0, AbsoluteDate t) Initialize event detector at the start of a propagation.static EventDetectorof(EventFunction eventFunction) Builds instance from event function only.static EventDetectorof(EventFunction eventFunction, EventHandler eventHandler) Builds instance from event function and handler.static EventDetectorof(EventFunction eventFunction, EventHandler eventHandler, EventDetectionSettings eventDetectionSettings) Builds instance from event function, handler and detection settings.default voidreset(SpacecraftState state, AbsoluteDate target) Reset the event detector during propagation when the state is modified by an event or an additional data provider.
-
Method Details
-
of
Builds instance from event function only. Uses default handler and detection settings.- Parameters:
eventFunction- event function- Returns:
- event detector
- Since:
- 14.0
-
of
Builds instance from event function and handler. Uses default detection settings.- Parameters:
eventFunction- event functioneventHandler- handler- Returns:
- event detector
- Since:
- 14.0
-
of
static EventDetector of(EventFunction eventFunction, EventHandler eventHandler, EventDetectionSettings eventDetectionSettings) Builds instance from event function, handler and detection settings.- Parameters:
eventFunction- event functioneventHandler- handlereventDetectionSettings- detection settings- Returns:
- event detector
- Since:
- 14.0
-
init
Initialize event detector at the start of a propagation.This method is called once at the start of the propagation. It may be used by the event handler to initialize some internal data if needed.
The default implementation initializes the handler.
- Parameters:
s0- initial statet- target time for the integration
-
reset
Reset the event detector during propagation when the state is modified by an event or an additional data provider.The default implementation does nothing.
- Parameters:
state- current statetarget- target time for the integration- Since:
- 13.0
-
g
Compute the value of the switching function. This function must be continuous (at least in its roots neighborhood), as the integrator will need to find its roots to locate the events.- Parameters:
s- the current state information: date, kinematics, attitude- Returns:
- value of the switching function
-
getEventFunction
Get the event function. It defines g both for double and Field.- Returns:
- event function
- Since:
- 14.0
-
getThreshold
default double getThreshold()Get the convergence threshold in the event time search.- Returns:
- convergence threshold (s)
-
getMaxCheckInterval
Get maximal time interval between switching function checks.- Returns:
- maximal time interval (s) between switching function checks
-
getMaxIterationCount
default int getMaxIterationCount()Get maximal number of iterations in the event time search.- Returns:
- maximal number of iterations in the event time search
-
getHandler
EventHandler getHandler()Get the handler.- Returns:
- event handler to call at event occurrences
- Since:
- 12.0
-
finish
This method finalizes the event detector's job.- Parameters:
state- state at propagation end- Since:
- 12.2
-
getDetectionSettings
Getter for the settings.- Returns:
- detection settings
- Since:
- 12.2
-