public class DateBasedManeuverTriggers extends IntervalEventTrigger<ParameterDrivenDateIntervalDetector>
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_NAME
Default name for trigger.
|
Constructor and Description |
---|
DateBasedManeuverTriggers(AbsoluteDate date,
double duration)
Simple constructor.
|
DateBasedManeuverTriggers(String name,
AbsoluteDate date,
double duration)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
protected <D extends FieldEventDetector<S>,S extends CalculusFieldElement<S>> |
convertIntervalDetector(Field<S> field,
ParameterDrivenDateIntervalDetector detector)
Convert a primitive firing intervals detector into a field firing intervals detector.
|
double |
getDuration()
Get the duration of the maneuver (s).
|
AbsoluteDate |
getEndDate()
Get the end date.
|
String |
getName()
Get the maneuver name.
|
List<ParameterDriver> |
getParametersDrivers()
Get the maneuver triggers parameter drivers.
|
AbsoluteDate |
getStartDate()
Get the start date.
|
getEventsDetectors, getFieldEventsDetectors, getFiringIntervalDetector, isFiringOnInitialState
addResetter, addResetter, applyResetters, applyResetters, getFirings, init, init, initializeResetters, initializeResetters, isFiring, isFiring, notifyResetters, notifyResetters
public static final String DEFAULT_NAME
public DateBasedManeuverTriggers(AbsoluteDate date, double duration)
date
- start (or end) data of the maneuverduration
- maneuver duration (if positive, maneuver is from date to date + duration,
if negative, maneuver will be from date - duration to date)public DateBasedManeuverTriggers(String name, AbsoluteDate date, double duration)
name
- name of the trigger (used as prefix for start and stop parameters drivers)date
- start (or end) data of the maneuverduration
- maneuver duration (if positive, maneuver is from date to date + duration,
if negative, maneuver will be from date - duration to date)public String getName()
public AbsoluteDate getStartDate()
public AbsoluteDate getEndDate()
public double getDuration()
protected <D extends FieldEventDetector<S>,S extends CalculusFieldElement<S>> FieldAbstractDetector<D,S> convertIntervalDetector(Field<S> field, ParameterDrivenDateIntervalDetector detector)
There is not need to set up withMaxCheck
,
withThreshold
, or
withHandler
in the converted detector, this will be done by caller.
A skeleton implementation of this method to convert some XyzDetector
into FieldXyzDetector
,
considering these detectors are created from a date and a number parameter is:
protected <D extends FieldEventDetector<S>, S extends CalculusFieldElement<S>>
FieldAbstractDetector<D, S> convertIntervalDetector(final Field<S> field, final XyzDetector detector) {
final FieldAbsoluteDate<S> date = new FieldAbsoluteDate<>(field, detector.getDate());
final S param = field.getZero().newInstance(detector.getParam());
final FieldAbstractDetector<D, S> converted = (FieldAbstractDetector<D, S>) new FieldXyzDetector<>(date, param);
return converted;
}
convertIntervalDetector
in class IntervalEventTrigger<ParameterDrivenDateIntervalDetector>
D
- type of the event detectorS
- type of the field elementsfield
- field to which the state belongsdetector
- primitive firing intervals detector to convertpublic List<ParameterDriver> getParametersDrivers()
Copyright © 2002-2022 CS GROUP. All rights reserved.