Class ParameterDrivenDateIntervalDetector
- java.lang.Object
-
- org.orekit.propagation.events.AbstractDetector<ParameterDrivenDateIntervalDetector>
-
- org.orekit.propagation.events.ParameterDrivenDateIntervalDetector
-
- All Implemented Interfaces:
EventDetector
public class ParameterDrivenDateIntervalDetector extends AbstractDetector<ParameterDrivenDateIntervalDetector>
Detector for date intervals that may be offset thanks to parameter drivers.Two dual views can be used for date intervals: either start date/stop date or median date/duration.
. Warning, startDate driver, stopDate driver, duration driver and medianDate driver must all have the same number of values to estimate (same number of span in valueSpanMap), that is is to say that thestart
/stop
drivers andmedian
/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:
Propagator.addEventDetector(EventDetector)
-
-
Field Summary
Fields Modifier and Type Field Description static String
DURATION_SUFFIX
Default suffix for duration driver.static String
MEDIAN_SUFFIX
Default suffix for median driver.static String
START_SUFFIX
Default suffix for start driver.static String
STOP_SUFFIX
Default suffix for stop driver.-
Fields inherited from class org.orekit.propagation.events.AbstractDetector
DEFAULT_MAX_ITER, DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
-
-
Constructor Summary
Constructors Modifier Constructor Description ParameterDrivenDateIntervalDetector(String prefix, AbsoluteDate refMedian, double refDuration)
Build a new instance.ParameterDrivenDateIntervalDetector(String prefix, AbsoluteDate refStart, AbsoluteDate refStop)
Build a new instance.protected
ParameterDrivenDateIntervalDetector(AdaptableInterval maxCheck, double threshold, int maxIter, EventHandler handler, DateDriver start, DateDriver stop, DateDriver median, ParameterDriver duration)
Protected constructor with full parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ParameterDrivenDateIntervalDetector
create(AdaptableInterval newMaxCheck, double newThreshold, int newMaxIter, EventHandler newHandler)
Build a new instance.double
g(SpacecraftState s)
Compute the value of the switching function.ParameterDriver
getDurationDriver()
Get the driver for duration.DateDriver
getMedianDriver()
Get the driver for median date.DateDriver
getStartDriver()
Get the driver for start date.DateDriver
getStopDriver()
Get the driver for stop date.-
Methods inherited from class org.orekit.propagation.events.AbstractDetector
create, getDetectionSettings, getHandler, getMaxCheckInterval, getMaxIterationCount, getThreshold, init, isForward, withDetectionSettings, withHandler, withMaxCheck, withMaxCheck, withMaxIter, withThreshold
-
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.EventDetector
finish
-
-
-
-
Field Detail
-
START_SUFFIX
public static final String START_SUFFIX
Default suffix for start driver.- See Also:
- Constant Field Values
-
STOP_SUFFIX
public static final String STOP_SUFFIX
Default suffix for stop driver.- See Also:
- Constant Field Values
-
MEDIAN_SUFFIX
public static final String MEDIAN_SUFFIX
Default suffix for median driver.- See Also:
- Constant Field Values
-
DURATION_SUFFIX
public static final String DURATION_SUFFIX
Default suffix for duration driver.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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(AdaptableInterval maxCheck, double threshold, int maxIter, 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:
maxCheck
- maximum checking intervalthreshold
- convergence threshold (s)maxIter
- maximum number of iterations in the event time searchhandler
- event handler to call at event occurrencesstart
- reference interval start driverstop
- reference interval stop drivermedian
- median date driverduration
- duration driver
-
-
Method Detail
-
create
protected ParameterDrivenDateIntervalDetector create(AdaptableInterval newMaxCheck, double newThreshold, int newMaxIter, EventHandler newHandler)
Build a new instance.- Specified by:
create
in classAbstractDetector<ParameterDrivenDateIntervalDetector>
- Parameters:
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 occurrences- Returns:
- a new instance of the appropriate sub-type
-
getStartDriver
public DateDriver getStartDriver()
Get the driver for start date.Note that the start date is automatically adjusted if either
median date
orduration
areselected
and changed.- Returns:
- driver for start date
-
getStopDriver
public DateDriver getStopDriver()
Get the driver for stop date.Note that the stop date is automatically adjusted if either
median date
orduration
areselected
changed.- Returns:
- driver for stop date
-
getMedianDriver
public DateDriver getMedianDriver()
Get the driver for median date.Note that the median date is automatically adjusted if either
getStartDriver()
start date orstop date
areselected
changed.- Returns:
- driver for median date
-
getDurationDriver
public ParameterDriver getDurationDriver()
Get the driver for duration.Note that the duration is automatically adjusted if either
getStartDriver()
start date orstop date
areselected
changed.- Returns:
- driver for duration
-
g
public double g(SpacecraftState s)
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
-
-