Class DateDetector

    • Constructor Detail

      • DateDetector

        public DateDetector​(double maxCheck,
                            double threshold,
                            TimeStamped... dates)
        Build a new instance.

        First event dates are set here, but others can be added later with addEventDate(AbsoluteDate).

        Parameters:
        maxCheck - maximum checking interval (s)
        threshold - convergence threshold (s)
        dates - list of event dates
        See Also:
        addEventDate(AbsoluteDate)
      • DateDetector

        public DateDetector​(AbsoluteDate target)
        Build a new instance.

        This constructor is dedicated to single date detection. max check interval is set to 1.0e10, so almost no other date can be added. Tolerance is set to 1.0e-9.

        Parameters:
        target - target date
        See Also:
        addEventDate(AbsoluteDate)
    • Method Detail

      • create

        protected DateDetector create​(double newMaxCheck,
                                      double newThreshold,
                                      int newMaxIter,
                                      EventHandler<? super DateDetector> newHandler)
        Build a new instance.
        Specified by:
        create in class AbstractDetector<DateDetector>
        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
      • g

        public double g​(SpacecraftState s)
        Compute the value of the switching function. This function measures the difference between the current and the target date.
        Specified by:
        g in interface EventDetector
        Specified by:
        g in class AbstractDetector<DateDetector>
        Parameters:
        s - the current state information: date, kinematics, attitude
        Returns:
        value of the switching function
      • getDate

        public AbsoluteDate getDate()
        Get the current event date according to the propagator.
        Specified by:
        getDate in interface TimeStamped
        Returns:
        event date