Interface FieldEventDetector<T extends CalculusFieldElement<T>>
- Type Parameters:
T- type of the field element
- All Known Subinterfaces:
FieldDetectorModifier<T>
- All Known Implementing Classes:
FieldAbstractDetector,FieldAbstractGeographicalDetector,FieldAbstractTopocentricDetector,FieldAltitudeDetector,FieldAngularSeparationDetector,FieldApsideDetector,FieldBetaAngleDetector,FieldBooleanDetector,FieldCylindricalShadowEclipseDetector,FieldDateDetector,FieldEclipseDetector,FieldElevationDetector,FieldElevationExtremumDetector,FieldEventEnablingPredicateFilter,FieldEventShifter,FieldEventSlopeFilter,FieldExtremumAngularSeparationDetector,FieldExtremumApproachDetector,FieldFunctionalDetector,FieldGroundAtNightDetector,FieldImpulseManeuver,FieldLatitudeCrossingDetector,FieldLatitudeExtremumDetector,FieldLatitudeRangeCrossingDetector,FieldLongitudeCrossingDetector,FieldLongitudeExtremumDetector,FieldLongitudeRangeCrossingDetector,FieldManeuverTriggerDetector,FieldNegateDetector,FieldNodeDetector,FieldParameterDrivenDateIntervalDetector,FieldPlaneCrossingDetector,FieldRelativeDistanceDetector,FieldSingleDateDetector,FieldTimeIntervalDetector
It mirrors the FieldODEEventHandler 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
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidfinish(FieldSpacecraftState<T> state) This method finalizes the event detector's job.g(FieldSpacecraftState<T> s) Compute the value of the switching function.Getter for the settings.default EventFunctionGet the event function.Get the handler.default FieldAdaptableInterval<T> Get maximal time interval between switching function checks.default intGet maximal number of iterations in the event time search.default TGet the convergence threshold in the event time search.default voidinit(FieldSpacecraftState<T> s0, FieldAbsoluteDate<T> t) Initialize event detector at the start of a propagation.static <S extends CalculusFieldElement<S>>
FieldEventDetector<S> of(Field<S> field, FieldEventHandler<S> eventHandler, EventDetector detector) Builds instance from non-Field event detector.static <S extends CalculusFieldElement<S>>
FieldEventDetector<S> of(EventFunction eventFunction, FieldEventHandler<S> eventHandler, FieldEventDetectionSettings<S> eventDetectionSettings) Builds instance from event function, handler and detection settings.default voidreset(FieldSpacecraftState<T> state, FieldAbsoluteDate<T> target) Reset the event detector during propagation when the state is modified by an event or an additional data provider.
-
Method Details
-
of
static <S extends CalculusFieldElement<S>> FieldEventDetector<S> of(EventFunction eventFunction, FieldEventHandler<S> eventHandler, FieldEventDetectionSettings<S> eventDetectionSettings) Builds instance from event function, handler and detection settings.- Type Parameters:
S- field type- Parameters:
eventFunction- event functioneventHandler- handlereventDetectionSettings- detection settings- Returns:
- event detector
- Since:
- 14.0
-
of
static <S extends CalculusFieldElement<S>> FieldEventDetector<S> of(Field<S> field, FieldEventHandler<S> eventHandler, EventDetector detector) Builds instance from non-Field event detector. It might not perform as expected if the latter has a specialized handler.- Type Parameters:
S- field type- Parameters:
field- fieldeventHandler- handlerdetector- non-Field detector- Returns:
- 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 detector 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
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
FieldEventHandler<T> 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
FieldEventDetectionSettings<T> getDetectionSettings()Getter for the settings.- Returns:
- detection settings
- Since:
- 12.2
-