Class ParameterDrivenDateIntervalDetector
- All Implemented Interfaces:
EventDetector
Two dual views can be used for date intervals: either start date/stop date or
median date/duration. start/stop
drivers and median/duration
drivers work in pair. Both drivers in one pair can be selected and their changes will
be propagated to the other pair, but attempting to select drivers in both
pairs at the same time will trigger an exception. Changing the value of a driver
that is not selected should be avoided as it leads to inconsistencies between the pairs.
ParameterDriver.addSpans(AbsoluteDate, AbsoluteDate, double)
should be called with same arguments.- Since:
- 11.1
- Author:
- Luc Maisonobe
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault suffix for duration driver.static final StringDefault suffix for median driver.static final StringDefault suffix for start driver.static final StringDefault suffix for stop driver.Fields inherited from class org.orekit.propagation.events.AbstractDetector
DEFAULT_MAX_CHECK, DEFAULT_MAX_ITER, DEFAULT_THRESHOLD -
Constructor Summary
ConstructorsModifierConstructorDescriptionParameterDrivenDateIntervalDetector(String prefix, AbsoluteDate refMedian, double refDuration) Build a new instance.ParameterDrivenDateIntervalDetector(String prefix, AbsoluteDate refStart, AbsoluteDate refStop) Build a new instance.protectedParameterDrivenDateIntervalDetector(EventDetectionSettings detectionSettings, EventHandler handler, DateDriver start, DateDriver stop, DateDriver median, ParameterDriver duration) Protected constructor with full parameters. -
Method Summary
Modifier and TypeMethodDescriptionprotected ParameterDrivenDateIntervalDetectorcreate(EventDetectionSettings detectionSettings, EventHandler newHandler) Build a new instance.doubleg(SpacecraftState s) Compute the value of the switching function.static EventDetectionSettingsgetDefaultDetectionSettings(AbsoluteDate refStart, AbsoluteDate refStop) Get default detection settings.Get the driver for duration.Get the event function.Get the driver for median date.Get the driver for start date.Get the driver for stop date.Methods inherited from class org.orekit.propagation.events.AbstractDetector
checkIfForward, getDetectionSettings, getHandler, init, isForward, withDetectionSettings, withHandler, withMaxCheck, withMaxCheck, withMaxIter, withThresholdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.orekit.propagation.events.EventDetector
finish, getMaxCheckInterval, getMaxIterationCount, getThreshold, reset
-
Field Details
-
START_SUFFIX
Default suffix for start driver.- See Also:
-
STOP_SUFFIX
Default suffix for stop driver.- See Also:
-
MEDIAN_SUFFIX
Default suffix for median driver.- See Also:
-
DURATION_SUFFIX
Default suffix for duration driver.- See Also:
-
-
Constructor Details
-
ParameterDrivenDateIntervalDetector
public ParameterDrivenDateIntervalDetector(String prefix, AbsoluteDate refMedian, double refDuration) Build a new instance.- Parameters:
prefix- prefix to use for parameter drivers namesrefMedian- reference interval median daterefDuration- reference duration
-
ParameterDrivenDateIntervalDetector
public ParameterDrivenDateIntervalDetector(String prefix, AbsoluteDate refStart, AbsoluteDate refStop) Build a new instance.- Parameters:
prefix- prefix to use for parameter drivers namesrefStart- reference interval start daterefStop- reference interval stop date
-
ParameterDrivenDateIntervalDetector
protected ParameterDrivenDateIntervalDetector(EventDetectionSettings detectionSettings, EventHandler handler, DateDriver start, DateDriver stop, DateDriver median, ParameterDriver duration) Protected constructor with full parameters.This constructor is not public as users are expected to use the builder API with the various
withXxx()methods to set up the instance in a readable manner without using a huge amount of parameters.- Parameters:
detectionSettings- event detection settingshandler- event handler to call at event occurrencesstart- reference interval start driverstop- reference interval stop drivermedian- median date driverduration- duration driver- Since:
- 13.0
-
-
Method Details
-
getDefaultDetectionSettings
public static EventDetectionSettings getDefaultDetectionSettings(AbsoluteDate refStart, AbsoluteDate refStop) Get default detection settings.- Parameters:
refStart- reference interval start daterefStop- reference interval stop date- Returns:
- default detection settings
- Since:
- 13.0
-
create
protected ParameterDrivenDateIntervalDetector create(EventDetectionSettings detectionSettings, EventHandler newHandler) Build a new instance.- Specified by:
createin classAbstractDetector<ParameterDrivenDateIntervalDetector>- Parameters:
detectionSettings- detection settingsnewHandler- event handler to call at event occurrences- Returns:
- a new instance of the appropriate sub-type
-
getStartDriver
Get the driver for start date.Note that the start date is automatically adjusted if either
median dateordurationareselectedand changed.- Returns:
- driver for start date
-
getStopDriver
Get the driver for stop date.Note that the stop date is automatically adjusted if either
median dateordurationareselectedchanged.- Returns:
- driver for stop date
-
getMedianDriver
Get the driver for median date.Note that the median date is automatically adjusted if either
getStartDriver()start date orstop dateareselectedchanged.- Returns:
- driver for median date
-
getDurationDriver
Get the driver for duration.Note that the duration is automatically adjusted if either
getStartDriver()start date orstop dateareselectedchanged.- Returns:
- driver for duration
-
getEventFunction
Description copied from interface:EventDetectorGet the event function. It defines g both for double and Field.- Specified by:
getEventFunctionin interfaceEventDetector- Overrides:
getEventFunctionin classAbstractDetector<ParameterDrivenDateIntervalDetector>- Returns:
- event function
-
g
Compute the value of the switching function.The function is positive for dates within the interval defined by applying the parameter drivers shifts to reference dates, and negative for dates outside of this interval. Note that if Δt_start - Δt_stop is less than ref_stop.durationFrom(ref_start), then the interval degenerates to empty and the function never reaches positive values.
- Parameters:
s- the current state information: date, kinematics, attitude- Returns:
- value of the switching function
-