Class FieldEventShifter<T extends CalculusFieldElement<T>>
- java.lang.Object
-
- org.orekit.propagation.events.FieldEventShifter<T>
-
- All Implemented Interfaces:
FieldDetectorModifier<T>
,FieldEventDetector<T>
public class FieldEventShifter<T extends CalculusFieldElement<T>> extends Object implements FieldDetectorModifier<T>
Wrapper shifting events occurrences times.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:
FieldPropagator.addEventDetector(FieldEventDetector)
,FieldEventDetector
,EventShifter
-
-
Constructor Summary
Constructors Constructor Description FieldEventShifter(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
g(FieldSpacecraftState<T> s)
Compute the value of the switching function.T
getDecreasingTimeShift()
Get the decreasing events time shift.FieldEventDetectionSettings<T>
getDetectionSettings()
Getter for the settings.FieldEventDetector<T>
getDetector()
Get the detector for the raw unshifted event.FieldEventHandler<T>
getHandler()
Get the handler.T
getIncreasingTimeShift()
Get the increasing events time shift.FieldEventShifter<T>
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, wait
-
Methods inherited from interface org.orekit.propagation.events.FieldDetectorModifier
finish, init, reset
-
Methods inherited from interface org.orekit.propagation.events.FieldEventDetector
getMaxCheckInterval, getMaxIterationCount, getThreshold
-
-
-
-
Constructor Detail
-
FieldEventShifter
public FieldEventShifter(FieldEventDetector<T> detector, boolean useShiftedStates, T increasingTimeShift, T decreasingTimeShift)
Build a new instance.The
max check interval
, theconvergence threshold
of the raw unshifted events will be used for the shifted event. When an event occurs, theeventOccurred
method of the raw unshifted events will be called (with spacecraft state at either the shifted or the unshifted event date depending on theuseShiftedStates
parameter).- Parameters:
detector
- event detector for the raw unshifted eventuseShiftedStates
- if true, the state provided toeventOccurred
method of the associatedhandler
will 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 toeventOccurred
method of thedetector
will 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 Detail
-
getHandler
public FieldEventHandler<T> getHandler()
Description copied from interface:FieldDetectorModifier
Get the handler.- Specified by:
getHandler
in interfaceFieldDetectorModifier<T extends CalculusFieldElement<T>>
- Specified by:
getHandler
in interfaceFieldEventDetector<T extends CalculusFieldElement<T>>
- Returns:
- event handler to call at event occurrences
-
getDetectionSettings
public FieldEventDetectionSettings<T> getDetectionSettings()
Description copied from interface:FieldDetectorModifier
Getter for the settings.- Specified by:
getDetectionSettings
in interfaceFieldDetectorModifier<T extends CalculusFieldElement<T>>
- Specified by:
getDetectionSettings
in interfaceFieldEventDetector<T extends CalculusFieldElement<T>>
- Returns:
- detection settings
-
getDetector
public FieldEventDetector<T> getDetector()
Get the detector for the raw unshifted event.- Specified by:
getDetector
in interfaceFieldDetectorModifier<T extends CalculusFieldElement<T>>
- Returns:
- the detector for the raw unshifted event
-
getIncreasingTimeShift
public T getIncreasingTimeShift()
Get the increasing events time shift.- Returns:
- increasing events time shift
-
getDecreasingTimeShift
public T getDecreasingTimeShift()
Get the decreasing events time shift.- Returns:
- decreasing events time shift
-
withDetectionSettings
public FieldEventShifter<T> withDetectionSettings(FieldEventDetectionSettings<T> settings)
Builds a new instance from the input detection settings.- Parameters:
settings
- event detection settings to be used- Returns:
- a new detector
-
g
public T g(FieldSpacecraftState<T> s)
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:
g
in interfaceFieldDetectorModifier<T extends CalculusFieldElement<T>>
- Specified by:
g
in interfaceFieldEventDetector<T extends CalculusFieldElement<T>>
- Parameters:
s
- the current state information: date, kinematics, attitude- Returns:
- value of the switching function
-
-