Class AbstractManeuverTriggers
- java.lang.Object
-
- org.orekit.forces.maneuvers.trigger.AbstractManeuverTriggers
-
- All Implemented Interfaces:
ManeuverTriggers
,EventDetectorsProvider
,ParameterDriversProvider
- Direct Known Subclasses:
IntervalEventTrigger
,StartStopEventsTrigger
public abstract class AbstractManeuverTriggers extends Object implements ManeuverTriggers
Base class for triggers.- Since:
- 11.1
- Author:
- Luc Maisonobe
-
-
Field Summary
-
Fields inherited from interface org.orekit.propagation.events.EventDetectorsProvider
DATATION_ACCURACY
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractManeuverTriggers()
Simple constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <T extends CalculusFieldElement<T>>
voidaddResetter(Field<T> field, FieldManeuverTriggersResetter<T> resetter)
Add a resetter.void
addResetter(ManeuverTriggersResetter resetter)
Add a resetter.protected <T extends CalculusFieldElement<T>>
FieldSpacecraftState<T>applyResetters(FieldSpacecraftState<T> state)
Apply resetters.protected SpacecraftState
applyResetters(SpacecraftState state)
Apply resetters.TimeSpanMap<Boolean>
getFirings()
Get the firings detected during last propagation.<T extends CalculusFieldElement<T>>
voidinit(FieldSpacecraftState<T> initialState, FieldAbsoluteDate<T> target)
Initialization method called at propagation start.void
init(SpacecraftState initialState, AbsoluteDate target)
Initialization method called at propagation start.protected <T extends CalculusFieldElement<T>>
voidinitializeResetters(FieldSpacecraftState<T> initialState, FieldAbsoluteDate<T> target)
Initialize resetters.protected void
initializeResetters(SpacecraftState initialState, AbsoluteDate target)
Initialize resetters.boolean
isFiring(AbsoluteDate date, double[] parameters)
Find out if the maneuver is firing or not.<S extends CalculusFieldElement<S>>
booleanisFiring(FieldAbsoluteDate<S> date, S[] parameters)
Find out if the maneuver is firing or not.protected abstract boolean
isFiringOnInitialState(SpacecraftState initialState, boolean isForward)
Method to check if the thruster is firing on initialization.protected <T extends CalculusFieldElement<T>>
voidnotifyResetters(FieldSpacecraftState<T> state, boolean start)
Notify resetters.protected void
notifyResetters(SpacecraftState state, boolean start)
Notify resetters.-
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
getEventDetectors, getEventDetectors, getFieldEventDetectors, getFieldEventDetectors
-
Methods inherited from interface org.orekit.forces.maneuvers.trigger.ManeuverTriggers
getName
-
Methods inherited from interface org.orekit.utils.ParameterDriversProvider
getNbParametersDriversValue, getParameterDriver, getParameters, getParameters, getParameters, getParameters, getParametersAllValues, getParametersAllValues, getParametersDrivers, isSupported
-
-
-
-
Method Detail
-
init
public void init(SpacecraftState initialState, AbsoluteDate target)
Initialization method called at propagation start.The default implementation does nothing.
- Specified by:
init
in interfaceManeuverTriggers
- Parameters:
initialState
- initial spacecraft state (at the start of propagation).target
- date of propagation. Not equal toinitialState.getDate()
.
-
init
public <T extends CalculusFieldElement<T>> void init(FieldSpacecraftState<T> initialState, FieldAbsoluteDate<T> target)
Initialization method called at propagation start.The default implementation does nothing.
- Specified by:
init
in interfaceManeuverTriggers
- Type Parameters:
T
- type of the elements- Parameters:
initialState
- initial spacecraft state (at the start of propagation).target
- date of propagation. Not equal toinitialState.getDate()
.
-
isFiringOnInitialState
protected abstract boolean isFiringOnInitialState(SpacecraftState initialState, boolean isForward)
Method to check if the thruster is firing on initialization. can be called by sub classes- Parameters:
initialState
- initial spacecraft stateisForward
- if true, propagation will be in the forward direction- Returns:
- true if firing in propagation direction
-
isFiring
public boolean isFiring(AbsoluteDate date, double[] parameters)
Find out if the maneuver is firing or not.- Specified by:
isFiring
in interfaceManeuverTriggers
- Parameters:
date
- current dateparameters
- maneuver triggers parameters- Returns:
- true if the maneuver is firing, false otherwise
-
isFiring
public <S extends CalculusFieldElement<S>> boolean isFiring(FieldAbsoluteDate<S> date, S[] parameters)
Find out if the maneuver is firing or not.- Specified by:
isFiring
in interfaceManeuverTriggers
- Type Parameters:
S
- type of the field elements- Parameters:
date
- current dateparameters
- maneuver triggers parameters- Returns:
- true if the maneuver is firing, false otherwise
-
getFirings
public TimeSpanMap<Boolean> getFirings()
Get the firings detected during last propagation.- Returns:
- firings detected during last propagation
-
addResetter
public void addResetter(ManeuverTriggersResetter resetter)
Add a resetter.- Specified by:
addResetter
in interfaceManeuverTriggers
- Parameters:
resetter
- resetter to add
-
addResetter
public <T extends CalculusFieldElement<T>> void addResetter(Field<T> field, FieldManeuverTriggersResetter<T> resetter)
Add a resetter.- Specified by:
addResetter
in interfaceManeuverTriggers
- Type Parameters:
T
- type of the field elements- Parameters:
field
- field to which the state belongsresetter
- resetter to add
-
initializeResetters
protected void initializeResetters(SpacecraftState initialState, AbsoluteDate target)
Initialize resetters.- Parameters:
initialState
- initial statetarget
- target date for the propagation
-
notifyResetters
protected void notifyResetters(SpacecraftState state, boolean start)
Notify resetters.- Parameters:
state
- spacecraft state at trigger date (before applying the maneuver)start
- if true, the trigger is the start of the maneuver
-
applyResetters
protected SpacecraftState applyResetters(SpacecraftState state)
Apply resetters.- Parameters:
state
- spacecraft state at trigger date- Returns:
- reset state
-
initializeResetters
protected <T extends CalculusFieldElement<T>> void initializeResetters(FieldSpacecraftState<T> initialState, FieldAbsoluteDate<T> target)
Initialize resetters.- Type Parameters:
T
- type of the field elements- Parameters:
initialState
- initial statetarget
- target date for the propagation
-
notifyResetters
protected <T extends CalculusFieldElement<T>> void notifyResetters(FieldSpacecraftState<T> state, boolean start)
Notify resetters.- Type Parameters:
T
- type of the field elements- Parameters:
state
- spacecraft state at trigger date (before applying the maneuver)start
- if true, the trigger is the start of the maneuver
-
applyResetters
protected <T extends CalculusFieldElement<T>> FieldSpacecraftState<T> applyResetters(FieldSpacecraftState<T> state)
Apply resetters.- Type Parameters:
T
- type of the field elements- Parameters:
state
- spacecraft state at trigger date- Returns:
- reset state
-
-