Class FieldEventShifter<T extends CalculusFieldElement<T>>
- Type Parameters:
T- type of the field elements
- All Implemented Interfaces:
FieldDetectorModifier<T>,FieldEventDetector<T>
This class wraps an event detector to slightly
shift the events occurrences times. A typical use case is for handling
operational delays before or after some physical event really occurs.
For example, the satellite attitude mode may be switched from sun pointed
to spin-stabilized a few minutes before eclipse entry, and switched back
to sun pointed a few minutes after eclipse exit. This behavior is handled
by wrapping an eclipse detector into an instance
of this class with a positive times shift for increasing events (eclipse exit)
and a negative times shift for decreasing events (eclipse entry).
- Since:
- 13.0
- Author:
- Luc Maisonobe, Romain Serra
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFieldEventShifter(FieldEventDetectionSettings<T> detectionSettings, FieldEventDetector<T> detector, boolean useShiftedStates, T increasingTimeShift, T decreasingTimeShift) Constructor with full parameters.FieldEventShifter(FieldEventDetector<T> detector, boolean useShiftedStates, T increasingTimeShift, T decreasingTimeShift) Build a new instance. -
Method Summary
Modifier and TypeMethodDescriptionGet the decreasing events time shift.Getter for the settings.Get the detector for the raw unshifted event.Get the event function.Get the handler.Get the increasing events time shift.booleanGetter for shifted states in handler flag.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.FieldDetectorModifier
finish, g, init, resetMethods inherited from interface org.orekit.propagation.events.FieldEventDetector
getMaxCheckInterval, getMaxIterationCount, getThreshold
-
Constructor Details
-
FieldEventShifter
public FieldEventShifter(FieldEventDetector<T> detector, boolean useShiftedStates, T increasingTimeShift, T decreasingTimeShift) Build a new instance.The
max check interval, theconvergence thresholdof the raw unshifted events will be used for the shifted event. When an event occurs, theeventOccurredmethod of the raw unshifted events will be called (with spacecraft state at either the shifted or the unshifted event date depending on theuseShiftedStatesparameter).- Parameters:
detector- event detector for the raw unshifted eventuseShiftedStates- if true, the state provided toeventOccurredmethod of the associatedhandlerwill remain shifted, otherwise it will be unshifted to correspond to the underlying raw event.increasingTimeShift- increasing events time shift.decreasingTimeShift- decreasing events time shift.
-
FieldEventShifter
public FieldEventShifter(FieldEventDetectionSettings<T> detectionSettings, FieldEventDetector<T> detector, boolean useShiftedStates, T increasingTimeShift, T decreasingTimeShift) Constructor with full parameters.- Parameters:
detectionSettings- event detection settingsdetector- event detector for the raw unshifted eventuseShiftedStates- if true, the state provided toeventOccurredmethod of thedetectorwill remain shifted, otherwise it will be unshifted to correspond to the underlying raw event.increasingTimeShift- increasing events time shift.decreasingTimeShift- decreasing events time shift.- Since:
- 13.0
-
-
Method Details
-
getHandler
Description copied from interface:FieldDetectorModifierGet the handler.- Specified by:
getHandlerin interfaceFieldDetectorModifier<T extends CalculusFieldElement<T>>- Specified by:
getHandlerin interfaceFieldEventDetector<T extends CalculusFieldElement<T>>- Returns:
- event handler to call at event occurrences
-
getDetectionSettings
Description copied from interface:FieldDetectorModifierGetter for the settings.- Specified by:
getDetectionSettingsin interfaceFieldDetectorModifier<T extends CalculusFieldElement<T>>- Specified by:
getDetectionSettingsin interfaceFieldEventDetector<T extends CalculusFieldElement<T>>- Returns:
- detection settings
-
getDetector
Get the detector for the raw unshifted event.- Specified by:
getDetectorin interfaceFieldDetectorModifier<T extends CalculusFieldElement<T>>- Returns:
- the detector for the raw unshifted event
-
getIncreasingTimeShift
Get the increasing events time shift.- Returns:
- increasing events time shift
-
getDecreasingTimeShift
Get the decreasing events time shift.- Returns:
- decreasing events time shift
-
isUseShiftedStates
public boolean isUseShiftedStates()Getter for shifted states in handler flag.- Returns:
- flag
- Since:
- 14.0
-
getEventFunction
Description copied from interface:FieldDetectorModifierGet the event function. It defines g both for double and Field.- Specified by:
getEventFunctionin interfaceFieldDetectorModifier<T extends CalculusFieldElement<T>>- Specified by:
getEventFunctionin interfaceFieldEventDetector<T extends CalculusFieldElement<T>>- Returns:
- event function
-
withDetectionSettings
Builds a new instance from the input detection settings.- Parameters:
settings- event detection settings to be used- Returns:
- a new detector
-