Class EventBasedManeuverTriggers

  • All Implemented Interfaces:
    ManeuverTriggers, EventHandler<EventDetector>

    public class EventBasedManeuverTriggers
    extends Object
    implements ManeuverTriggers, EventHandler<EventDetector>
    Maneuver triggers based on start and stop detectors. This allow a succession of burn interval. 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.
    Since:
    10.2
    Author:
    Mikael Fillastre, Andrea Fiorentino
    • Constructor Detail

      • EventBasedManeuverTriggers

        public EventBasedManeuverTriggers​(AbstractDetector<? extends EventDetector> startFiringDetector,
                                          AbstractDetector<? extends EventDetector> stopFiringDetector)
        Constructor.

        This legacy constructor forbids backward propagation.

        Parameters:
        startFiringDetector - Detector to start firing, only detect increasing sign change
        stopFiringDetector - Detector to stop firing, only detect increasing sign change. e.g. it can be a negate detector of the start detector.
      • EventBasedManeuverTriggers

        public EventBasedManeuverTriggers​(AbstractDetector<? extends EventDetector> startFiringDetector,
                                          AbstractDetector<? extends EventDetector> stopFiringDetector,
                                          boolean allowBackwardPropagation)
        Constructor.
        Parameters:
        startFiringDetector - Detector to start firing, only detect increasing sign change
        stopFiringDetector - Detector to stop firing, only detect increasing sign change. e.g. it can be a negate detector of the start detector.
        allowBackwardPropagation - if true, backward propagation is allowed
        Since:
        11.1
    • Method Detail

      • getStartFiringDetector

        public AbstractDetector<? extends EventDetector> getStartFiringDetector()
        Getter for the start firing detector.
        Returns:
        Detectors to start firing,
      • getStopFiringDetector

        public AbstractDetector<? extends EventDetector> getStopFiringDetector()
        Getter for the stop firing detector.
        Returns:
        Detectors to stop firing
      • init

        public void init​(SpacecraftState initialState,
                         AbsoluteDate target)
        Initialization method called at propagation start.

        The default implementation does nothing.

        Specified by:
        init in interface ManeuverTriggers
        Parameters:
        initialState - initial spacecraft state (at the start of propagation).
        target - date of propagation. Not equal to initialState.getDate().
      • checkInitialFiringState

        protected void checkInitialFiringState​(SpacecraftState initialState)
        Method to set the firing state on initialization. can be overloaded by sub classes.
        Parameters:
        initialState - initial spacecraft state
      • isFiringOnInitialState

        protected boolean isFiringOnInitialState​(SpacecraftState initialState)
        Method to check if the thruster is firing on initialization. can be called by sub classes
        Parameters:
        initialState - initial spacecraft state
        Returns:
        true if firing
      • setFiring

        public void setFiring​(boolean firing,
                              AbsoluteDate date)
        Set the firing start or end date depending on the firing flag. There is no effect if the firing state is not changing.
        Parameters:
        firing - true to start a maneuver, false to stop
        date - date of event
      • isFiring

        public boolean isFiring​(AbsoluteDate date,
                                double[] parameters)
        Find out if the maneuver is firing or not.
        Specified by:
        isFiring in interface ManeuverTriggers
        Parameters:
        date - current date
        parameters - maneuver triggers parameters
        Returns:
        true if the maneuver is firing, false otherwise
      • isFiring

        public <T extends CalculusFieldElement<T>> boolean isFiring​(FieldAbsoluteDate<T> date,
                                                                    T[] parameters)
        Find out if the maneuver is firing or not.
        Specified by:
        isFiring in interface ManeuverTriggers
        Type Parameters:
        T - type of the field elements
        Parameters:
        date - current date
        parameters - maneuver triggers parameters
        Returns:
        true if the maneuver is firing, false otherwise
      • eventOccurred

        public 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.
        Specified by:
        eventOccurred in interface EventHandler<EventDetector>
        Parameters:
        s - SpaceCraft state to be used in the evaluation
        detector - object with appropriate type that can be used in determining correct return state
        increasing - with the event occurred in an "increasing" or "decreasing" slope direction
        Returns:
        the Action that the calling detector should pass back to the evaluation system
      • isFiring

        public boolean isFiring​(AbsoluteDate date)
        Check if maneuvering is on.
        Parameters:
        date - current date
        Returns:
        true if maneuver is on at this date
      • getTriggeredEnd

        public AbsoluteDate getTriggeredEnd()
        Getter for the triggered date of engine stop.
        Returns:
        Triggered date of engine stop
      • getTriggeredStart

        public AbsoluteDate getTriggeredStart()
        Getter triggered date of engine start.
        Returns:
        Triggered date of engine start