org.orekit.propagation.events
public class EventFilter<T extends EventDetector> extends AbstractReconfigurableDetector<EventFilter<T>>
This class is heavily based on the class with the same name from the
Apache Commons Math library. The changes performed consist in replacing
raw types (double and double arrays) with space dynamics types
(AbsoluteDate
, SpacecraftState
).
General events
are defined implicitely
by a g function
crossing
zero. This function needs to be continuous in the event neighborhood,
and its sign must remain consistent between events. This implies that
during an ODE integration, events triggered are alternately events
for which the function increases from negative to positive values,
and events for which the function decreases from positive to
negative values.
Sometimes, users are only interested in one type of event (say increasing events for example) and not in the other type. 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
a Propagator
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
wrapped regular event detector
will the see only
the interesting events, i.e. either only increasing
events or
decreasing
events. the number of calls to the g function
will also be reduced.
EventDetector.Action
DEFAULT_MAX_ITER, DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
Constructor and Description |
---|
EventFilter(T rawDetector,
FilterType filter)
Wrap an
event detector . |
Modifier and Type | Method and Description |
---|---|
protected EventFilter<T> |
create(double newMaxCheck,
double newThreshold,
int newMaxIter,
EventHandler<EventFilter<T>> newHandler)
Build a new instance.
|
double |
g(SpacecraftState s)
Compute the value of the switching function.
|
void |
init(SpacecraftState s0,
AbsoluteDate t)
Initialize event handler at the start of a propagation.
|
convert, convert, eventOccurred, getHandler, resetState, withHandler, withMaxCheck, withMaxIter, withThreshold
getMaxCheckInterval, getMaxIterationCount, getThreshold
public EventFilter(T rawDetector, FilterType filter)
event detector
.rawDetector
- event detector to wrapfilter
- filter to useprotected EventFilter<T> create(double newMaxCheck, double newThreshold, int newMaxIter, EventHandler<EventFilter<T>> newHandler)
create
in class AbstractReconfigurableDetector<EventFilter<T extends EventDetector>>
newMaxCheck
- maximum checking interval (s)newThreshold
- convergence threshold (s)newMaxIter
- maximum number of iterations in the event time searchnewHandler
- event handler to call at event occurrencespublic 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.
init
in interface EventDetector
init
in class AbstractDetector
s0
- initial statet
- target time for the integrationpublic double g(SpacecraftState s) throws OrekitException
g
in interface EventDetector
g
in class AbstractDetector
s
- the current state information: date, kinematics, attitudeOrekitException
- if some specific error occursCopyright © 2002–2015 CS Syst?mes d'Information. All rights reserved.