Class MagneticFieldDetector

  • All Implemented Interfaces:
    EventDetector

    public class MagneticFieldDetector
    extends AbstractDetector<MagneticFieldDetector>
    Detector for Earth magnetic field strength.

    The detector is based on the field intensity calculated at the satellite's latitude and longitude, either at sea level or at satellite altitude, depending on the value chosen for the atSeaLevel indicator.
    It can detect flyovers of the South-Atlantic anomaly with a classically accepted limit value of 32,000 nT at sea level.

    Author:
    Romaric Her
    • Method Detail

      • create

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

        public void init​(SpacecraftState s0,
                         AbsoluteDate 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

        This implementation sets the direction of propagation and initializes the event handler. If a subclass overrides this method it should call super.init(s0, t).

        Specified by:
        init in interface EventDetector
        Overrides:
        init in class AbstractDetector<MagneticFieldDetector>
        Parameters:
        s0 - initial state
        t - target time for the integration
      • g

        public double g​(SpacecraftState s)
        Compute the value of the detection function.

        The returned value is the difference between the field intensity at spacecraft location, taking atSeaLevel switch into account, and the fixed threshold value.

        Parameters:
        s - the current state information: date, kinematics, attitude
        Returns:
        difference between the field intensity at spacecraft location and the fixed threshold value