public class ParameterDrivenDateIntervalDetector extends AbstractDetector<ParameterDrivenDateIntervalDetector>
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.Propagator.addEventDetector(EventDetector)
Modifier and Type | Field and 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.
|
DEFAULT_MAX_ITER, DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
Modifier | Constructor and Description |
---|---|
protected |
ParameterDrivenDateIntervalDetector(AdaptableInterval maxCheck,
double threshold,
int maxIter,
EventHandler handler,
DateDriver start,
DateDriver stop,
DateDriver median,
ParameterDriver duration)
Protected constructor with full parameters.
|
|
ParameterDrivenDateIntervalDetector(String prefix,
AbsoluteDate refStart,
AbsoluteDate refStop)
Build a new instance.
|
|
ParameterDrivenDateIntervalDetector(String prefix,
AbsoluteDate refMedian,
double refDuration)
Build a new instance.
|
Modifier and Type | Method and 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.
|
getHandler, getMaxCheckInterval, getMaxIterationCount, getThreshold, init, isForward, withHandler, withMaxCheck, withMaxCheck, withMaxIter, withThreshold
public static final String START_SUFFIX
public static final String STOP_SUFFIX
public static final String MEDIAN_SUFFIX
public static final String DURATION_SUFFIX
public ParameterDrivenDateIntervalDetector(String prefix, AbsoluteDate refMedian, double refDuration)
prefix
- prefix to use for parameter drivers namesrefMedian
- reference interval median daterefDuration
- reference durationpublic ParameterDrivenDateIntervalDetector(String prefix, AbsoluteDate refStart, AbsoluteDate refStop)
prefix
- prefix to use for parameter drivers namesrefStart
- reference interval start daterefStop
- reference interval stop dateprotected ParameterDrivenDateIntervalDetector(AdaptableInterval maxCheck, double threshold, int maxIter, EventHandler handler, DateDriver start, DateDriver stop, DateDriver median, ParameterDriver duration)
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.
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 driverprotected ParameterDrivenDateIntervalDetector create(AdaptableInterval newMaxCheck, double newThreshold, int newMaxIter, EventHandler newHandler)
create
in class AbstractDetector<ParameterDrivenDateIntervalDetector>
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 occurrencespublic DateDriver getStartDriver()
Note that the start date is automatically adjusted if either
median date
or duration
are selected
and changed.
public DateDriver getStopDriver()
Note that the stop date is automatically adjusted if either
median date
or duration
are selected
changed.
public DateDriver getMedianDriver()
Note that the median date is automatically adjusted if either
getStartDriver()
start date or stop date
are selected
changed.
public ParameterDriver getDurationDriver()
Note that the duration is automatically adjusted if either
getStartDriver()
start date or stop date
are selected
changed.
public double g(SpacecraftState s)
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.
g
in interface EventDetector
g
in class AbstractDetector<ParameterDrivenDateIntervalDetector>
s
- the current state information: date, kinematics, attitudeCopyright © 2002-2023 CS GROUP. All rights reserved.