T
- type of the interval detectorpublic abstract class IntervalEventTrigger<T extends AbstractDetector<T>> extends AbstractManeuverTriggers
Firing intervals correspond to time spans with positive value of the event detector
g
function.
StartStopEventsTrigger
Constructor and Description |
---|
IntervalEventTrigger(T prototypeFiringIntervalDetector)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract <D extends FieldEventDetector<S>,S extends CalculusFieldElement<S>> |
convertIntervalDetector(Field<S> field,
T detector)
Convert a primitive firing intervals detector into a field firing intervals detector.
|
Stream<EventDetector> |
getEventsDetectors()
Get the event detectors associated with the triggers.
|
<S extends CalculusFieldElement<S>> |
getFieldEventsDetectors(Field<S> field)
Get the event detectors associated with the triggers.
|
T |
getFiringIntervalDetector()
Getter for the firing interval detector.
|
protected boolean |
isFiringOnInitialState(SpacecraftState initialState,
boolean isForward)
Method to check if the thruster is firing on initialization.
|
addResetter, addResetter, applyResetters, applyResetters, getFirings, init, init, initializeResetters, initializeResetters, isFiring, isFiring, notifyResetters, notifyResetters
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName, getParametersDrivers
public IntervalEventTrigger(T prototypeFiringIntervalDetector)
Note that the intervalDetector
passed as an argument is used only
as a prototype from which a new detector will be built using its
withHandler
method to
set up an internal handler. The original event handler from the prototype
will be ignored and never called.
If the trigger is used in a field-based propagation
,
the detector will be automatically converted to a field equivalent. Beware however that the
eventOccurred
of the converted propagator will call the method with the same name in the prototype
detector, in order to get the correct return value.
prototypeFiringIntervalDetector
- prototype detector for firing intervalpublic T getFiringIntervalDetector()
protected boolean isFiringOnInitialState(SpacecraftState initialState, boolean isForward)
isFiringOnInitialState
in class AbstractManeuverTriggers
initialState
- initial spacecraft stateisForward
- if true, propagation will be in the forward directionpublic Stream<EventDetector> getEventsDetectors()
public <S extends CalculusFieldElement<S>> Stream<FieldEventDetector<S>> getFieldEventsDetectors(Field<S> field)
S
- type of the field elementsfield
- field to which the state belongsprotected abstract <D extends FieldEventDetector<S>,S extends CalculusFieldElement<S>> FieldAbstractDetector<D,S> convertIntervalDetector(Field<S> field, T 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;
}
D
- type of the event detectorS
- type of the field elementsfield
- field to which the state belongsdetector
- primitive firing intervals detector to convertCopyright © 2002-2022 CS GROUP. All rights reserved.