public class EventEnablingPredicateFilter<T extends EventDetector> extends AbstractDetector<EventEnablingPredicateFilter<T>>
Sometimes, users would like to enable or disable events by themselves, for example to trigger them only for certain orbits, or to check elevation maximums only when elevation itself is positive (i.e. they want to discard elevation maximums below ground). In these cases, looking precisely for all events location and triggering events that will later be ignored is a waste of computing time.
Users can wrap a regular
event detector in
an instance of this class and provide this wrapping instance to
in order to avoid wasting time looking for uninteresting events.
The wrapper will intercept the calls to the
g function and to the
eventOccurred method in order to ignore uninteresting events. The
event detector will the see only
the interesting events, i.e. either only events that occur when a
user-provided event enabling predicate function is true, ignoring all events
that occur when the event enabling predicate function is false. The number of
calls to the
g function will also be
|Constructor and Description|
|Modifier and Type||Method and Description|
Build a new instance.
Compute the value of the switching function.
Initialize event handler at the start of a propagation.
eventOccurred, getHandler, getMaxCheckInterval, getMaxIterationCount, getThreshold, isForward, resetState, withHandler, withMaxCheck, withMaxIter, withThreshold
protected EventEnablingPredicateFilter<T> create(double newMaxCheck, double newThreshold, int newMaxIter, EventHandler<? super EventEnablingPredicateFilter<T>> newHandler)
AbstractDetector<EventEnablingPredicateFilter<T extends EventDetector>>
newMaxCheck- maximum checking interval (s)
newThreshold- convergence threshold (s)
newMaxIter- maximum number of iterations in the event time search
newHandler- event handler to call at event occurrences
public void init(SpacecraftState s0, AbsoluteDate t)
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 does nothing
This implementation sets the direction of propagation and initializes the event
handler. If a subclass overrides this method it should call
public double g(SpacecraftState s)
Copyright © 2002-2019 CS Systèmes d'information. All rights reserved.