Class FieldAbstractDetector<D extends FieldAbstractDetector<D,​T>,​T extends CalculusFieldElement<T>>

    • Field Detail

      • DEFAULT_MAXCHECK

        public static final double DEFAULT_MAXCHECK
        Default maximum checking interval (s).
        See Also:
        Constant Field Values
      • DEFAULT_THRESHOLD

        public static final double DEFAULT_THRESHOLD
        Default convergence threshold (s).
        See Also:
        Constant Field Values
      • DEFAULT_MAX_ITER

        public static final int DEFAULT_MAX_ITER
        Default cmaximum number of iterations in the event time search.
        See Also:
        Constant Field Values
    • Constructor Detail

      • FieldAbstractDetector

        protected FieldAbstractDetector​(FieldAdaptableInterval<T> maxCheck,
                                        T threshold,
                                        int maxIter,
                                        FieldEventHandler<T> handler)
        Build a new instance.
        Parameters:
        maxCheck - maximum checking interval
        threshold - convergence threshold (s)
        maxIter - maximum number of iterations in the event time search
        handler - event handler to call at event occurrences
    • Method Detail

      • init

        public void init​(FieldSpacecraftState<T> s0,
                         FieldAbsoluteDate<T> t)
        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

        Specified by:
        init in interface FieldEventDetector<D extends FieldAbstractDetector<D,​T>>
        Parameters:
        s0 - initial state
        t - target time for the integration
      • g

        public abstract T g​(FieldSpacecraftState<T> s)
        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 FieldEventDetector<D extends FieldAbstractDetector<D,​T>>
        Parameters:
        s - the current state information: date, kinematics, attitude
        Returns:
        value of the switching function
      • withMaxCheck

        public D withMaxCheck​(double newMaxCheck)
        Setup the maximum checking interval.

        This will override a maximum checking interval if it has been configured previously.

        Parameters:
        newMaxCheck - maximum checking interval (s)
        Returns:
        a new detector with updated configuration (the instance is not changed)
        Since:
        12.0
      • withMaxCheck

        public D withMaxCheck​(FieldAdaptableInterval<T> newMaxCheck)
        Setup the maximum checking interval.

        This will override a maximum checking interval if it has been configured previously.

        Parameters:
        newMaxCheck - maximum checking interval (s)
        Returns:
        a new detector with updated configuration (the instance is not changed)
        Since:
        12.0
      • withMaxIter

        public D withMaxIter​(int newMaxIter)
        Setup the maximum number of iterations in the event time search.

        This will override a number of iterations if it has been configured previously.

        Parameters:
        newMaxIter - maximum number of iterations in the event time search
        Returns:
        a new detector with updated configuration (the instance is not changed)
        Since:
        6.1
      • withThreshold

        public D withThreshold​(T newThreshold)
        Setup the convergence threshold.

        This will override a convergence threshold if it has been configured previously.

        Parameters:
        newThreshold - convergence threshold (s)
        Returns:
        a new detector with updated configuration (the instance is not changed)
        Since:
        6.1
      • withHandler

        public D withHandler​(FieldEventHandler<T> newHandler)
        Setup the event handler to call at event occurrences.

        This will override a handler if it has been configured previously.

        Parameters:
        newHandler - event handler to call at event occurrences
        Returns:
        a new detector with updated configuration (the instance is not changed)
        Since:
        6.1
      • create

        protected abstract D create​(FieldAdaptableInterval<T> newMaxCheck,
                                    T newThreshold,
                                    int newMaxIter,
                                    FieldEventHandler<T> newHandler)
        Build a new instance.
        Parameters:
        newMaxCheck - maximum checking interval
        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
      • isForward

        public boolean isForward()
        Check if the current propagation is forward or backward.
        Returns:
        true if the current propagation is forward
        Since:
        7.2