public class EventBasedManeuverTriggers extends Object implements ManeuverTriggers, EventHandler<EventDetector>
Constructor and Description |
---|
EventBasedManeuverTriggers(AbstractDetector<? extends EventDetector> startFiringDetector,
AbstractDetector<? extends EventDetector> stopFiringDetector)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkInitialFiringState(SpacecraftState initialState)
Method to set the firing state on initialization.
|
Action |
eventOccurred(SpacecraftState s,
EventDetector detector,
boolean increasing)
eventOccurred method mirrors the same interface method as in
EventDetector
and its subclasses, but with an additional parameter that allows the calling
method to pass in an object from the detector which would have potential
additional data to allow the implementing class to determine the correct
return state. |
Stream<EventDetector> |
getEventsDetectors()
Get the event detectors associated with the triggers.
|
<T extends RealFieldElement<T>> |
getFieldEventsDetectors(Field<T> field)
Get the event detectors associated with the triggers.
|
AbstractDetector<? extends EventDetector> |
getStartFiringDetector()
Getter for the start firing detector.
|
AbstractDetector<? extends EventDetector> |
getStopFiringDetector()
Getter for the stop firing detector.
|
AbsoluteDate |
getTriggeredEnd()
Getter for the triggered date of engine stop.
|
AbsoluteDate |
getTriggeredStart()
Getter triggered date of engine start.
|
void |
init(SpacecraftState initialState,
AbsoluteDate target)
Initialization method.
|
boolean |
isFiring(AbsoluteDate date)
Check if maneuvering is on.
|
boolean |
isFiring(AbsoluteDate date,
double[] parameters)
Find out if the maneuver is firing or not.
|
<T extends RealFieldElement<T>> |
isFiring(FieldAbsoluteDate<T> date,
T[] parameters)
Find out if the maneuver is firing or not.
|
protected boolean |
isFiringOnInitialState(SpacecraftState initialState)
Method to check if the thruster is firing on initialization.
|
void |
setFiring(boolean firing,
AbsoluteDate date)
Set the firing start or end date depending on the firing flag.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName, getParametersDrivers
resetState
public EventBasedManeuverTriggers(AbstractDetector<? extends EventDetector> startFiringDetector, AbstractDetector<? extends EventDetector> stopFiringDetector)
startFiringDetector
- Detector to start firing, only detect increasing
sign changestopFiringDetector
- Detector to stop firing, only detect increasing
sign change. e.g. it can be a negate detector of
the start detector.public AbstractDetector<? extends EventDetector> getStartFiringDetector()
public AbstractDetector<? extends EventDetector> getStopFiringDetector()
public void init(SpacecraftState initialState, AbsoluteDate target)
init
in interface ManeuverTriggers
init
in interface EventHandler<EventDetector>
initialState
- initial spacecraft state (at the start of propagation).target
- date of propagation. Not equal to initialState.getDate()
.protected void checkInitialFiringState(SpacecraftState initialState)
initialState
- initial spacecraft stateprotected boolean isFiringOnInitialState(SpacecraftState initialState)
initialState
- initial spacecraft statepublic Stream<EventDetector> getEventsDetectors()
getEventsDetectors
in interface ManeuverTriggers
public <T extends RealFieldElement<T>> Stream<FieldEventDetector<T>> getFieldEventsDetectors(Field<T> field)
getFieldEventsDetectors
in interface ManeuverTriggers
T
- extends RealFieldElement<T>field
- field to which the state belongspublic void setFiring(boolean firing, AbsoluteDate date)
firing
- true to start a maneuver, false to stopdate
- date of eventpublic boolean isFiring(AbsoluteDate date, double[] parameters)
isFiring
in interface ManeuverTriggers
date
- current dateparameters
- maneuver triggers parameterspublic <T extends RealFieldElement<T>> boolean isFiring(FieldAbsoluteDate<T> date, T[] parameters)
isFiring
in interface ManeuverTriggers
T
- extends RealFieldElement<T>date
- current dateparameters
- maneuver triggers parameterspublic Action eventOccurred(SpacecraftState s, EventDetector detector, boolean increasing)
EventDetector
and its subclasses, but with an additional parameter that allows the calling
method to pass in an object from the detector which would have potential
additional data to allow the implementing class to determine the correct
return state.eventOccurred
in interface EventHandler<EventDetector>
s
- SpaceCraft state to be used in the evaluationdetector
- object with appropriate type that can be used in determining correct return stateincreasing
- with the event occurred in an "increasing" or "decreasing" slope directionpublic boolean isFiring(AbsoluteDate date)
date
- current datepublic AbsoluteDate getTriggeredEnd()
public AbsoluteDate getTriggeredStart()
Copyright © 2002-2020 CS GROUP. All rights reserved.