Class FieldBetaAngleDetector<T extends CalculusFieldElement<T>>

  • Type Parameters:
    T - The field type
    All Implemented Interfaces:
    FieldEventDetector<T>

    public class FieldBetaAngleDetector<T extends CalculusFieldElement<T>>
    extends FieldAbstractDetector<FieldBetaAngleDetector<T>,​T>
    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(FieldSpacecraftState) 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 FieldAbstractDetector.withHandler(FieldEventHandler) after construction.

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

      • FieldBetaAngleDetector

        @DefaultDataContext
        public FieldBetaAngleDetector​(T 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)
      • FieldBetaAngleDetector

        public FieldBetaAngleDetector​(Field<T> field,
                                      T betaAngleThreshold,
                                      FieldPVCoordinatesProvider<T> celestialBodyProvider,
                                      Frame inertialFrame)
        Class constructor.
        Parameters:
        field - the field instance
        betaAngleThreshold - beta angle threshold (radians)
        celestialBodyProvider - coordinate provider for the celestial provider
        inertialFrame - inertial frame in which to compute the beta angle
      • FieldBetaAngleDetector

        protected FieldBetaAngleDetector​(FieldEventDetectionSettings<T> detectionSettings,
                                         FieldEventHandler<T> handler,
                                         T betaAngleThreshold,
                                         FieldPVCoordinatesProvider<T> 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 - event 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
        Since:
        13.0
    • Method Detail

      • getCelestialBodyProvider

        public FieldPVCoordinatesProvider<T> 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 T getBetaAngleThreshold()
        The beta angle threshold (radians).
        Returns:
        the beta angle threshold (radians)
      • withCelestialProvider

        public FieldBetaAngleDetector<T> withCelestialProvider​(FieldPVCoordinatesProvider<T> 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 FieldBetaAngleDetector<T> withBetaThreshold​(T 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
        Returns:
        the new detector instance
      • withInertialFrame

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

        public static <T extends CalculusFieldElement<T>> T calculateBetaAngle​(FieldSpacecraftState<T> state,
                                                                               FieldPVCoordinatesProvider<T> 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.

        Type Parameters:
        T - The field type
        Parameters:
        state - spacecraft state
        celestialBodyProvider - celestial body coordinate provider
        Returns:
        the beta angle (radians)
      • calculateBetaAngle

        public static <T extends CalculusFieldElement<T>> T calculateBetaAngle​(FieldSpacecraftState<T> state,
                                                                               FieldPVCoordinatesProvider<T> celestialBodyProvider,
                                                                               Frame frame)
        Calculate the beta angle between the orbit plane and the celestial body.
        Type Parameters:
        T - The field type
        Parameters:
        state - spacecraft state
        celestialBodyProvider - celestial body coordinate provider
        frame - inertial frame in which beta angle will be computed
        Returns:
        the beta angle (radians)