Class LMedSRobustRangingAndRssiPositionEstimator2D


public class LMedSRobustRangingAndRssiPositionEstimator2D extends RobustRangingAndRssiPositionEstimator2D
Robustly estimates 2D position using located radio sources and their ranging+RSSI readings at unknown locations and using LMedS algorithm to discard outliers. This kind of estimator can be used to robustly determine the 2D position of a given device by getting ranging+RSSI readings at an unknown location of different radio sources whose 2D locations are known.
  • Constructor Details

    • LMedSRobustRangingAndRssiPositionEstimator2D

      public LMedSRobustRangingAndRssiPositionEstimator2D()
      Constructor.
    • LMedSRobustRangingAndRssiPositionEstimator2D

      public LMedSRobustRangingAndRssiPositionEstimator2D(List<? extends RadioSourceLocated<com.irurueta.geometry.Point2D>> sources)
      Constructor.
      Parameters:
      sources - located radio sources used for lateration.
      Throws:
      IllegalArgumentException - if provided sources is null or the number of provided sources is less than the required minimum.
    • LMedSRobustRangingAndRssiPositionEstimator2D

      public LMedSRobustRangingAndRssiPositionEstimator2D(RangingAndRssiFingerprint<? extends RadioSource,? extends RangingAndRssiReading<? extends RadioSource>> fingerprint)
      Constructor.
      Parameters:
      fingerprint - fingerprint containing ranging+RSSI readings at an unknown location for provided located radio sources.
      Throws:
      IllegalArgumentException - if provided fingerprint is null.
    • LMedSRobustRangingAndRssiPositionEstimator2D

      public LMedSRobustRangingAndRssiPositionEstimator2D(List<? extends RadioSourceLocated<com.irurueta.geometry.Point2D>> sources, RangingAndRssiFingerprint<? extends RadioSource,? extends RangingAndRssiReading<? extends RadioSource>> fingerprint)
      Constructor.
      Parameters:
      sources - located radio sources used for lateration.
      fingerprint - fingerprint containing ranging+RSSI readings at an unknown location for provided located radio sources.
      Throws:
      IllegalArgumentException - if either provided sources or fingerprint is null or the number of provided sources is less than the required minimum.
    • LMedSRobustRangingAndRssiPositionEstimator2D

      public LMedSRobustRangingAndRssiPositionEstimator2D(RobustRangingAndRssiPositionEstimatorListener<com.irurueta.geometry.Point2D> listener)
      Constructor.
      Parameters:
      listener - listener in charge of handling events.
    • LMedSRobustRangingAndRssiPositionEstimator2D

      public LMedSRobustRangingAndRssiPositionEstimator2D(List<? extends RadioSourceLocated<com.irurueta.geometry.Point2D>> sources, RobustRangingAndRssiPositionEstimatorListener<com.irurueta.geometry.Point2D> listener)
      Constructor.
      Parameters:
      sources - located radio sources used for lateration.
      listener - listener in charge of handling events.
      Throws:
      IllegalArgumentException - if provided sources is null or the number of provided sources is less than the required minimum.
    • LMedSRobustRangingAndRssiPositionEstimator2D

      public LMedSRobustRangingAndRssiPositionEstimator2D(RangingAndRssiFingerprint<? extends RadioSource,? extends RangingAndRssiReading<? extends RadioSource>> fingerprint, RobustRangingAndRssiPositionEstimatorListener<com.irurueta.geometry.Point2D> listener)
      Constructor.
      Parameters:
      fingerprint - fingerprint containing ranging+RSSI readings at an unknown location for provided location radio sources.
      listener - listener in charge of handling events.
      Throws:
      IllegalArgumentException - if provided fingerprint is null.
    • LMedSRobustRangingAndRssiPositionEstimator2D

      public LMedSRobustRangingAndRssiPositionEstimator2D(List<? extends RadioSourceLocated<com.irurueta.geometry.Point2D>> sources, RangingAndRssiFingerprint<? extends RadioSource,? extends RangingAndRssiReading<? extends RadioSource>> fingerprint, RobustRangingAndRssiPositionEstimatorListener<com.irurueta.geometry.Point2D> listener)
      Constructor.
      Parameters:
      sources - located radio sources used for lateration.
      fingerprint - fingerprint containing ranging+RSSI readings at an unknown location for provided located radio sources.
      listener - listener in charge of handling events.
      Throws:
      IllegalArgumentException - if either provided sources or fingerprint is null or the number of provided sources is less than the required minimum.
  • Method Details

    • getStopThreshold

      public double getStopThreshold()
      Returns threshold to be used to keep the algorithm iterating in case that best estimated threshold using median of residuals is not small enough. Once a solution is found that generates a threshold below this value, the algorithm will stop. The stop threshold can be used to prevent the LMedS algorithm to iterate too many times in cases where samples have a very similar accuracy. For instance, in cases where proportion of outliers is very small (close to 0%), and samples are very accurate (i.e. 1e-6), the algorithm would iterate for a long time trying to find the best solution when indeed there is no need to do that if a reasonable threshold has already been reached. Because of this behaviour the stop threshold can be set to a value much lower than the one typically used in RANSAC, and yet the algorithm could still produce even smaller thresholds in estimated results.
      Returns:
      stop threshold to stop the algorithm prematurely when a certain accuracy has been reached.
    • setStopThreshold

      public void setStopThreshold(double stopThreshold) throws com.irurueta.navigation.LockedException
      Sets threshold to be used to keep the algorithm iterating in case that best estimated threshold using median of residuals is not small enough. Once a solution is found that generates a threshold below this value, the algorithm will stop. The stop threshold can be used to prevent the LMedS algorithm to iterate too many times in cases where samples have a very similar accuracy. For instance, in cases where proportion of outliers is very small (close to 0%), and samples are very accurate (i.e. 1e-6), the algorithm would iterate for a long time trying to find the best solution when indeed there is no need to do that if a reasonable threshold has already been reached. Because of this behaviour the stop threshold can be set to a value much lower than the one typically used in RANSAC, and yet the algorithm could still produce even smaller thresholds in estimated results.
      Parameters:
      stopThreshold - stop threshold to stop the algorithm prematurely when a certain accuracy has been reached.
      Throws:
      IllegalArgumentException - if provided value is zero or negative.
      com.irurueta.navigation.LockedException - if this solver is locked.
    • getMethod

      public com.irurueta.numerical.robust.RobustEstimatorMethod getMethod()
      Returns method being used for robust estimation.
      Specified by:
      getMethod in class RobustPositionEstimator<com.irurueta.geometry.Point2D,RangingAndRssiReading<? extends RadioSource>,RobustRangingAndRssiPositionEstimatorListener<com.irurueta.geometry.Point2D>>
      Returns:
      method being used for robust estimation.
    • init

      private void init()
      Initializes robust lateration solver.