A
- type of the start detectorO
- type of the stop detectorpublic abstract class StartStopEventsTrigger<A extends AbstractDetector<A>,O extends AbstractDetector<O>> extends AbstractManeuverTriggers
The thruster starts firing when the start detector becomes positive. The thruster stops firing when the stop detector becomes positive. The 2 detectors should not be positive at the same time. A date detector is not suited as it does not delimit an interval. They can be both negative at the same time.
IntervalEventTrigger
DATATION_ACCURACY
Modifier | Constructor and Description |
---|---|
protected |
StartStopEventsTrigger(A prototypeStartDetector,
O prototypeStopDetector)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract <D extends FieldAbstractDetector<D,S>,S extends org.hipparchus.CalculusFieldElement<S>> |
convertStartDetector(org.hipparchus.Field<S> field,
A detector)
Convert a primitive firing start detector into a field firing start detector.
|
protected abstract <D extends FieldAbstractDetector<D,S>,S extends org.hipparchus.CalculusFieldElement<S>> |
convertStopDetector(org.hipparchus.Field<S> field,
O detector)
Convert a primitive firing stop detector into a field firing stop detector.
|
Stream<EventDetector> |
getEventDetectors()
Get the discrete events related to the model.
|
<S extends org.hipparchus.CalculusFieldElement<S>> |
getFieldEventDetectors(org.hipparchus.Field<S> field)
Get the discrete events related to the model.
|
A |
getStartDetector()
Getter for the firing start detector.
|
O |
getStopDetector()
Getter for the firing stop detector.
|
void |
init(SpacecraftState initialState,
AbsoluteDate target)
Initialization method called at propagation start.
|
protected boolean |
isFiringOnInitialState(SpacecraftState initialState,
boolean isForward)
Method to check if the thruster is firing on initialization.
|
addResetter, addResetter, applyResetters, applyResetters, getFirings, init, initializeResetters, initializeResetters, isFiring, isFiring, notifyResetters, notifyResetters
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName
getNbParametersDriversValue, getParameterDriver, getParameters, getParameters, getParameters, getParameters, getParametersAllValues, getParametersAllValues, getParametersDrivers, isSupported
getEventDetectors, getFieldEventDetectors
protected StartStopEventsTrigger(A prototypeStartDetector, O prototypeStopDetector)
Note that the startDetector
and stopDetector
passed as an argument are used only
as a prototypes from which new detectors will be built using their
withHandler
methods to
set up internal handlers. The original event handlers 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.
prototypeStartDetector
- prototype detector for firing startprototypeStopDetector
- prototype detector for firing stoppublic A getStartDetector()
public O getStopDetector()
public void init(SpacecraftState initialState, AbsoluteDate target)
The default implementation does nothing.
init
in interface ManeuverTriggers
init
in class AbstractManeuverTriggers
initialState
- initial spacecraft state (at the start of propagation).target
- date of propagation. Not equal to initialState.getDate()
.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> getEventDetectors()
This method is not intended to be called several time, only once by a propagator, as it has the side effect of rebuilding the events detectors when called
public <S extends org.hipparchus.CalculusFieldElement<S>> Stream<FieldEventDetector<S>> getFieldEventDetectors(org.hipparchus.Field<S> field)
This method is not intended to be called several time, only once by a propagator, as it has the side effect of rebuilding the events detectors when called
S
- extends CalculusFieldElement<T>field
- field to which the state belongsprotected abstract <D extends FieldAbstractDetector<D,S>,S extends org.hipparchus.CalculusFieldElement<S>> FieldAbstractDetector<D,S> convertStartDetector(org.hipparchus.Field<S> field, A 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 FieldAbstractDetector<D, S>, S extends CalculusFieldElement<S>>
FieldAbstractDetector<D, S> convertStartDetector(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 start detector to convertprotected abstract <D extends FieldAbstractDetector<D,S>,S extends org.hipparchus.CalculusFieldElement<S>> FieldAbstractDetector<D,S> convertStopDetector(org.hipparchus.Field<S> field, O 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 FieldAbstractDetector<D, S>, S extends CalculusFieldElement<S>>
FieldAbstractDetector<D, S> convertStopDetector(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 stop detector to convertCopyright © 2002-2023 CS GROUP. All rights reserved.