Class BooleanDetector

    • Method Detail

      • andCombine

        public static BooleanDetector andCombine​(EventDetector... detectors)
        Create a new event detector that is the logical AND of the given event detectors.

        The created event detector's g function is positive if and only if the g functions of all detectors in detectors are positive.

        The starting interval, threshold, and iteration count are set to the most stringent (minimum) of all the detectors. The event handlers of the underlying detectors are not used, instead the default handler is ContinueOnEvent.

        Parameters:
        detectors - the operands. Must contain at least one detector.
        Returns:
        a new event detector that is the logical AND of the operands.
        Throws:
        NoSuchElementException - if detectors is empty.
        See Also:
        BooleanDetector, andCombine(Collection), orCombine(EventDetector...), notCombine(EventDetector)
      • andCombine

        public static BooleanDetector andCombine​(Collection<? extends EventDetector> detectors)
        Create a new event detector that is the logical AND of the given event detectors.

        The created event detector's g function is positive if and only if the g functions of all detectors in detectors are positive.

        The starting interval, threshold, and iteration count are set to the most stringent (minimum) of the detectors. The event handlers of the underlying detectors are not used, instead the default handler is ContinueOnEvent.

        Parameters:
        detectors - the operands. Must contain at least one detector.
        Returns:
        a new event detector that is the logical AND of the operands.
        Throws:
        NoSuchElementException - if detectors is empty.
        See Also:
        BooleanDetector, andCombine(EventDetector...), orCombine(Collection), notCombine(EventDetector)
      • orCombine

        public static BooleanDetector orCombine​(EventDetector... detectors)
        Create a new event detector that is the logical OR or the given event detectors.

        The created event detector's g function is positive if and only if at least one of g functions of the event detectors in detectors is positive.

        The starting interval, threshold, and iteration count are set to the most stringent (minimum) of the detectors. The event handlers of the underlying EventDetectors are not used, instead the default handler is ContinueOnEvent.

        Parameters:
        detectors - the operands. Must contain at least one detector.
        Returns:
        a new event detector that is the logical OR of the operands.
        Throws:
        NoSuchElementException - if detectors is empty.
        See Also:
        BooleanDetector, orCombine(Collection), andCombine(EventDetector...), notCombine(EventDetector)
      • orCombine

        public static BooleanDetector orCombine​(Collection<? extends EventDetector> detectors)
        Create a new event detector that is the logical OR or the given event detectors.

        The created event detector's g function is positive if and only if at least one of g functions of the event detectors in detectors is positive.

        The starting interval, threshold, and iteration count are set to the most stringent (minimum) of the detectors. The event handlers of the underlying EventDetectors are not used, instead the default handler is ContinueOnEvent.

        Parameters:
        detectors - the operands. Must contain at least one detector.
        Returns:
        a new event detector that is the logical OR of the operands.
        Throws:
        NoSuchElementException - if detectors is empty.
        See Also:
        BooleanDetector, orCombine(EventDetector...), andCombine(Collection), notCombine(EventDetector)
      • g

        public double g​(SpacecraftState s)
        Description copied from class: AbstractDetector
        Compute the value of the switching function. This function must be continuous (at least in its roots neighborhood), as the integrator will need to find its roots to locate the events.
        Specified by:
        g in interface EventDetector
        Specified by:
        g in class AbstractDetector<BooleanDetector>
        Parameters:
        s - the current state information: date, kinematics, attitude
        Returns:
        value of the switching function
      • create

        protected BooleanDetector create​(double newMaxCheck,
                                         double newThreshold,
                                         int newMaxIter,
                                         EventHandler<? super BooleanDetector> newHandler)
        Description copied from class: AbstractDetector
        Build a new instance.
        Specified by:
        create in class AbstractDetector<BooleanDetector>
        Parameters:
        newMaxCheck - maximum checking interval (s)
        newThreshold - convergence threshold (s)
        newMaxIter - maximum number of iterations in the event time search
        newHandler - event handler to call at event occurrences
        Returns:
        a new instance of the appropriate sub-type
      • init

        public void init​(SpacecraftState s0,
                         AbsoluteDate t)
        Description copied from class: AbstractDetector
        Initialize event handler at the start of a propagation.

        This method is called once at the start of the propagation. It may be used by the event handler to initialize some internal data if needed.

        The default implementation does nothing

        This implementation sets the direction of propagation and initializes the event handler. If a subclass overrides this method it should call super.init(s0, t).

        Specified by:
        init in interface EventDetector
        Overrides:
        init in class AbstractDetector<BooleanDetector>
        Parameters:
        s0 - initial state
        t - target time for the integration