Class DateBasedManeuverTriggers
- java.lang.Object
-
- org.orekit.forces.maneuvers.trigger.AbstractManeuverTriggers
-
- org.orekit.forces.maneuvers.trigger.IntervalEventTrigger<ParameterDrivenDateIntervalDetector>
-
- org.orekit.forces.maneuvers.trigger.DateBasedManeuverTriggers
-
- All Implemented Interfaces:
ManeuverTriggers
,ResettableManeuverTriggers
,EventDetectorsProvider
,ParameterDriversProvider
public class DateBasedManeuverTriggers extends IntervalEventTrigger<ParameterDrivenDateIntervalDetector>
Maneuver triggers based on a start and end date.- Since:
- 10.2
- Author:
- Maxime Journot
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_NAME
Default name for trigger.-
Fields inherited from interface org.orekit.propagation.events.EventDetectorsProvider
DATATION_ACCURACY
-
-
Constructor Summary
Constructors Constructor Description DateBasedManeuverTriggers(String name, AbsoluteDate date, double duration)
Simple constructor.DateBasedManeuverTriggers(String name, AbsoluteDate date, double duration, EventDetectionSettings detectionSettings)
Simple constructor.DateBasedManeuverTriggers(AbsoluteDate date, double duration)
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <D extends FieldAbstractDetector<D,S>,S extends CalculusFieldElement<S>>
FieldAbstractDetector<D,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 drivers for parameters.AbsoluteDate
getStartDate()
Get the start date.-
Methods inherited from class org.orekit.forces.maneuvers.trigger.IntervalEventTrigger
getEventDetectors, getFieldEventDetectors, getFiringIntervalDetector, init, init, isFiringOnInitialState
-
Methods inherited from class org.orekit.forces.maneuvers.trigger.AbstractManeuverTriggers
addResetter, addResetter, applyResetters, applyResetters, getFirings, initializeResetters, initializeResetters, isFiring, isFiring, notifyResetters, notifyResetters
-
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.EventDetectorsProvider
getDateDetector, getEventDetectors, getFieldDateDetector, getFieldEventDetectors
-
Methods inherited from interface org.orekit.utils.ParameterDriversProvider
getNbParametersDriversValue, getParameterDriver, getParameters, getParameters, getParameters, getParameters, getParametersAllValues, getParametersAllValues, isSupported
-
-
-
-
Field Detail
-
DEFAULT_NAME
public static final String DEFAULT_NAME
Default name for trigger.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DateBasedManeuverTriggers
public DateBasedManeuverTriggers(AbsoluteDate date, double duration)
Simple constructor.- Parameters:
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)
-
DateBasedManeuverTriggers
public DateBasedManeuverTriggers(String name, AbsoluteDate date, double duration)
Simple constructor.- Parameters:
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)- Since:
- 11.1
-
DateBasedManeuverTriggers
public DateBasedManeuverTriggers(String name, AbsoluteDate date, double duration, EventDetectionSettings detectionSettings)
Simple constructor.- Parameters:
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)detectionSettings
- date detection settings (warning: choose with care, as poor settings might miss the maneuver)- Since:
- 13.0
-
-
Method Detail
-
getName
public String getName()
Get the maneuver name.- Returns:
- the maneuver name
-
getStartDate
public AbsoluteDate getStartDate()
Get the start date.- Returns:
- the start date
-
getEndDate
public AbsoluteDate getEndDate()
Get the end date.- Returns:
- the end date
-
getDuration
public double getDuration()
Get the duration of the maneuver (s). duration = endDate - startDate- Returns:
- the duration of the maneuver (s)
-
convertIntervalDetector
protected <D extends FieldAbstractDetector<D,S>,S extends CalculusFieldElement<S>> FieldAbstractDetector<D,S> convertIntervalDetector(Field<S> field, ParameterDrivenDateIntervalDetector detector)
Convert a primitive firing intervals detector into a field firing intervals detector.There is not need to set up
withMaxCheck
,withThreshold
, orwithHandler
in the converted detector, this will be done by caller.A skeleton implementation of this method to convert some
XyzDetector
intoFieldXyzDetector
, 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; }
- Specified by:
convertIntervalDetector
in classIntervalEventTrigger<ParameterDrivenDateIntervalDetector>
- Type Parameters:
D
- type of the event detectorS
- type of the field elements- Parameters:
field
- field to which the state belongsdetector
- primitive firing intervals detector to convert- Returns:
- converted firing intervals detector
-
getParametersDrivers
public List<ParameterDriver> getParametersDrivers()
Get the drivers for parameters.- Returns:
- drivers for parameters
-
-