Class FieldEventSlopeFilter<D extends FieldEventDetector<T>,T extends CalculusFieldElement<T>>
- Type Parameters:
D- type of the detectorT- type of the field elements
- All Implemented Interfaces:
FieldEventDetector<T>
This class is heavily based on the class EventFilter from the
Hipparchus library. The changes performed consist in replacing
raw types (double and double arrays) with space dynamics types
(FieldAbsoluteDate, FieldSpacecraftState).
General events are defined implicitly
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 orbit propagation, 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 FieldPropagator
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 then see only
the interesting events, i.e. either only increasing events or
only decreasing events. The number of calls to the g function will also be reduced.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFieldEventSlopeFilter(D rawDetector, FilterType filterType) Wrap anevent detector.FieldEventSlopeFilter(FieldEventDetectionSettings<T> detectionSettings, D rawDetector, FilterType filterType) Constructor with full parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoidfinish(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.Get the wrapped raw detector.Get the event function.Get filter type.Get the handler.voidinit(FieldSpacecraftState<T> s0, FieldAbsoluteDate<T> t) Initialize event detector at the start of a propagation.booleanCheck if the current propagation is forward or backward.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.withDetectionSettings(FieldEventDetectionSettings<T> settings) Builds a new instance from the input detection settings.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.orekit.propagation.events.FieldEventDetector
getMaxCheckInterval, getMaxIterationCount, getThreshold
-
Constructor Details
-
FieldEventSlopeFilter
Wrap anevent detector.- Parameters:
rawDetector- event detector to wrapfilterType- filter to use
-
FieldEventSlopeFilter
public FieldEventSlopeFilter(FieldEventDetectionSettings<T> detectionSettings, D rawDetector, FilterType filterType) Constructor with full parameters.- Parameters:
detectionSettings- event detection settingsrawDetector- event detector to wrapfilterType- filter to use since 13.0
-
-
Method Details
-
withDetectionSettings
Builds a new instance from the input detection settings.- Parameters:
settings- event detection settings to be used- Returns:
- a new detector
-
getFilterType
Get filter type.- Returns:
- filter type
- Since:
- 13.0
-
getEventFunction
Description copied from interface:FieldEventDetectorGet the event function. It defines g both for double and Field.- Specified by:
getEventFunctionin interfaceFieldEventDetector<D extends FieldEventDetector<T>>- Returns:
- event function
-
getHandler
Description copied from interface:FieldEventDetectorGet the handler.- Specified by:
getHandlerin interfaceFieldEventDetector<D extends FieldEventDetector<T>>- Returns:
- event handler to call at event occurrences
-
getDetectionSettings
Description copied from interface:FieldEventDetectorGetter for the settings.- Specified by:
getDetectionSettingsin interfaceFieldEventDetector<D extends FieldEventDetector<T>>- Returns:
- detection settings
-
getDetector
Get the wrapped raw detector.- Returns:
- the wrapped raw detector
-
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.
- Specified by:
initin interfaceFieldEventDetector<D extends FieldEventDetector<T>>- 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.
- Specified by:
resetin interfaceFieldEventDetector<D extends FieldEventDetector<T>>- Parameters:
state- current statetarget- target time for the integration
-
finish
This method finalizes the event detector's job.- Specified by:
finishin interfaceFieldEventDetector<D extends FieldEventDetector<T>>- Parameters:
state- state at propagation end
-
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.- Specified by:
gin interfaceFieldEventDetector<D extends FieldEventDetector<T>>- Parameters:
s- the current state information: date, kinematics, attitude- Returns:
- value of the switching function
-
isForward
public boolean isForward()Check if the current propagation is forward or backward.- Returns:
- true if the current propagation is forward
-