Class AlignmentDetector

    • Constructor Detail

      • AlignmentDetector

        public AlignmentDetector​(Orbit orbit,
                                 PVCoordinatesProvider body,
                                 double alignAngle)
        Build a new alignment detector.

        The orbit is used only to set an upper bound for the max check interval to period/3 and to set the convergence threshold according to orbit size.

        Parameters:
        orbit - initial orbit
        body - the body to align
        alignAngle - the alignment angle (rad)
      • AlignmentDetector

        public AlignmentDetector​(double maxCheck,
                                 double threshold,
                                 PVCoordinatesProvider body,
                                 double alignAngle)
        Build a new alignment detector.
        Parameters:
        maxCheck - maximum checking interval (s)
        threshold - convergence threshold (s)
        body - the body to align
        alignAngle - the alignment angle (rad)
      • AlignmentDetector

        public AlignmentDetector​(EventDetectionSettings detectionSettings,
                                 PVCoordinatesProvider body,
                                 double alignAngle)
        Build a new alignment detector.
        Parameters:
        detectionSettings - detection settings
        body - the body to align
        alignAngle - the alignment angle (rad)
        Since:
        13.0
      • AlignmentDetector

        public AlignmentDetector​(double threshold,
                                 Orbit orbit,
                                 PVCoordinatesProvider body,
                                 double alignAngle)
        Build a new alignment detector.

        The orbit is used only to set an upper bound for the max check interval to period/3.

        Parameters:
        threshold - convergence threshold (s)
        orbit - initial orbit
        body - the body to align
        alignAngle - the alignment angle (rad)
      • AlignmentDetector

        protected AlignmentDetector​(EventDetectionSettings detectionSettings,
                                    EventHandler handler,
                                    PVCoordinatesProvider body,
                                    double alignAngle)
        Protected constructor with full parameters.

        This constructor is not public as users are expected to use the builder API with the various withXxx() methods to set up the instance in a readable manner without using a huge amount of parameters.

        Parameters:
        detectionSettings - detection settings
        handler - event handler to call at event occurrences
        body - the body to align
        alignAngle - the alignment angle (rad)
        Since:
        13.0
    • Method Detail

      • getPVCoordinatesProvider

        public PVCoordinatesProvider getPVCoordinatesProvider()
        Get the body to align.
        Returns:
        the body to align
      • getAlignAngle

        public double getAlignAngle()
        Get the alignment angle (rad).
        Returns:
        the alignment angle
      • g

        public double g​(SpacecraftState s)
        Compute the value of the switching function. This function measures the difference between the alignment angle and the angle between the satellite position and the body position projection in the orbital plane.
        Parameters:
        s - the current state information: date, kinematics, attitude
        Returns:
        value of the switching function