Class BetaAngleDetector

  • All Implemented Interfaces:
    EventDetector

    public class BetaAngleDetector
    extends AbstractDetector<BetaAngleDetector>
    Finder for beta angle crossing events.

    Locate events when the beta angle (the angle between the orbit plane and the celestial body) crosses a threshold. The g(SpacecraftState) function is negative when the beta angle is above the threshold and positive when the beta angle is below the threshold.

    The inertial frame provided must have it's origin centered at the satellite's orbit plane. The beta angle is computed as the angle between the celestial body's position in this frame with the satellite's orbital momentum vector.

    The default implementation behavior is to stop propagation at the first event date occurrence. This can be changed by calling AbstractDetector.withHandler(EventHandler) after construction.

    Since:
    12.1
    Author:
    Joe Reed
    See Also:
    Propagator.addEventDetector(EventDetector)
    • Constructor Detail

      • BetaAngleDetector

        @DefaultDataContext
        public BetaAngleDetector​(double betaAngleThreshold)
        Solar beta angle constructor.

        This method uses the default data context, assigns the sun as the celestial body and uses GCRF as the inertial frame.

        Parameters:
        betaAngleThreshold - beta angle threshold (radians)
      • BetaAngleDetector

        public BetaAngleDetector​(double betaAngleThreshold,
                                 PVCoordinatesProvider celestialBodyProvider,
                                 Frame inertialFrame)
        Class constructor.
        Parameters:
        betaAngleThreshold - beta angle threshold (radians)
        celestialBodyProvider - coordinate provider for the celestial provider
        inertialFrame - inertial frame in which to compute the beta angle
      • BetaAngleDetector

        protected BetaAngleDetector​(EventDetectionSettings detectionSettings,
                                    EventHandler handler,
                                    double betaAngleThreshold,
                                    PVCoordinatesProvider celestialBodyProvider,
                                    Frame inertialFrame)
        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
        betaAngleThreshold - beta angle threshold (radians)
        celestialBodyProvider - coordinate provider for the celestial provider
        inertialFrame - inertial frame in which to compute the beta angle
    • Method Detail

      • getCelestialBodyProvider

        public PVCoordinatesProvider getCelestialBodyProvider()
        Coordinate provider for the celestial body.
        Returns:
        celestial body's coordinate provider
      • getInertialFrame

        public Frame getInertialFrame()
        The inertial frame in which beta angle is computed.
        Returns:
        the inertial frame
      • getBetaAngleThreshold

        public double getBetaAngleThreshold()
        The beta angle threshold (radians).
        Returns:
        the beta angle threshold (radians)
      • withCelestialProvider

        public BetaAngleDetector withCelestialProvider​(PVCoordinatesProvider newProvider)
        Create a new instance with the provided coordinate provider.

        This method does not change the current instance.

        Parameters:
        newProvider - the new coordinate provider
        Returns:
        the new detector instance
      • withBetaThreshold

        public BetaAngleDetector withBetaThreshold​(double newBetaAngleThreshold)
        Create a new instance with the provided beta angle threshold.

        This method does not change the current instance.

        Parameters:
        newBetaAngleThreshold - the beta angle threshold (radians)
        Returns:
        the new detector instance
      • withInertialFrame

        public BetaAngleDetector withInertialFrame​(Frame newFrame)
        Create a new instance with the provided inertial frame.

        This method does not change the current instance.

        Parameters:
        newFrame - the inertial frame
        Returns:
        the new detector instance
      • g

        public double g​(SpacecraftState 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.
        Parameters:
        s - the current state information: date, kinematics, attitude
        Returns:
        value of the switching function
      • calculateBetaAngle

        public static double calculateBetaAngle​(SpacecraftState state,
                                                PVCoordinatesProvider celestialBodyProvider)
        Calculate the beta angle between the orbit plane and the celestial body.

        This method computes the beta angle using the frame from the spacecraft state.

        Parameters:
        state - spacecraft state
        celestialBodyProvider - celestial body coordinate provider
        Returns:
        the beta angle (radians)
      • calculateBetaAngle

        public static double calculateBetaAngle​(SpacecraftState state,
                                                PVCoordinatesProvider celestialBodyProvider,
                                                Frame frame)
        Calculate the beta angle between the orbit plane and the celestial body.
        Parameters:
        state - spacecraft state
        celestialBodyProvider - celestial body coordinate provider
        frame - inertial frame in which beta angle will be computed
        Returns:
        the beta angle (radians)