Class RANSACRobustMixedPositionEstimator2D

java.lang.Object
com.irurueta.navigation.indoor.position.RobustPositionEstimator<com.irurueta.geometry.Point2D,Reading<? extends RadioSource>,RobustMixedPositionEstimatorListener<com.irurueta.geometry.Point2D>>
com.irurueta.navigation.indoor.position.RobustMixedPositionEstimator<com.irurueta.geometry.Point2D>
com.irurueta.navigation.indoor.position.RobustMixedPositionEstimator2D
com.irurueta.navigation.indoor.position.RANSACRobustMixedPositionEstimator2D

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

    • RANSACRobustMixedPositionEstimator2D

      public RANSACRobustMixedPositionEstimator2D()
      Constructor.
    • RANSACRobustMixedPositionEstimator2D

      public RANSACRobustMixedPositionEstimator2D(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.
    • RANSACRobustMixedPositionEstimator2D

      public RANSACRobustMixedPositionEstimator2D(Fingerprint<? extends RadioSource,? extends Reading<? extends RadioSource>> fingerprint)
      Constructor.
      Parameters:
      fingerprint - fingerprint containing readings at an unknown location for provided located radio sources.
      Throws:
      IllegalArgumentException - if provided fingerprint is null.
    • RANSACRobustMixedPositionEstimator2D

      public RANSACRobustMixedPositionEstimator2D(List<? extends RadioSourceLocated<com.irurueta.geometry.Point2D>> sources, Fingerprint<? extends RadioSource,? extends Reading<? extends RadioSource>> fingerprint)
      Constructor.
      Parameters:
      sources - located radio sources used for lateration.
      fingerprint - fingerprint containing 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.
    • RANSACRobustMixedPositionEstimator2D

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

      public RANSACRobustMixedPositionEstimator2D(List<? extends RadioSourceLocated<com.irurueta.geometry.Point2D>> sources, RobustMixedPositionEstimatorListener<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.
    • RANSACRobustMixedPositionEstimator2D

      public RANSACRobustMixedPositionEstimator2D(Fingerprint<? extends RadioSource,? extends Reading<? extends RadioSource>> fingerprint, RobustMixedPositionEstimatorListener<com.irurueta.geometry.Point2D> listener)
      Constructor.
      Parameters:
      fingerprint - fingerprint containing readings at an unknown location for provided located radio sources.
      listener - listener in charge of handling events.
      Throws:
      IllegalArgumentException - if provided fingerprint is null.
    • RANSACRobustMixedPositionEstimator2D

      public RANSACRobustMixedPositionEstimator2D(List<? extends RadioSourceLocated<com.irurueta.geometry.Point2D>> sources, Fingerprint<? extends RadioSource,? extends Reading<? extends RadioSource>> fingerprint, RobustMixedPositionEstimatorListener<com.irurueta.geometry.Point2D> listener)
      Constructor.
      Parameters:
      sources - located radio sources used for lateration.
      fingerprint - fingerprint containing 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

    • getThreshold

      public double getThreshold()
      Gets threshold to determine whether samples are inliers or not when testing possible solutions. The threshold refers to the amount of error on distance between estimated position and distances provided for each sample.
      Returns:
      threshold to determine whether samples are inliers or not.
    • setThreshold

      public void setThreshold(double threshold) throws com.irurueta.navigation.LockedException
      Sets threshold to determine whether samples are inliers or not when testing possible solutions. The threshold refers to the amount of error on distance between estimated position and distances provided for each sample.
      Parameters:
      threshold - threshold to determine whether samples are inliers or not.
      Throws:
      IllegalArgumentException - if provided value is equal or less than zero.
      com.irurueta.navigation.LockedException - if this estimator is locked.
    • isComputeAndKeepInliersEnabled

      public boolean isComputeAndKeepInliersEnabled()
      Indicates whether inliers must be computed and kept.
      Returns:
      true if inliers must be computed and kept, false if inliers only need to be computed but not kept.
    • setComputeAndKeepInliersEnabled

      public void setComputeAndKeepInliersEnabled(boolean computeAndKeepInliers) throws com.irurueta.navigation.LockedException
      Specifies whether inliers must be computed and kept.
      Parameters:
      computeAndKeepInliers - true if inliers must be computed and kept, false if inliers only need to be computed but not kept.
      Throws:
      com.irurueta.navigation.LockedException - if this estimator is locked.
    • isComputeAndKeepResiduals

      public boolean isComputeAndKeepResiduals()
      Indicates whether residuals must be computed and kept.
      Returns:
      true if residuals must be computed and kept, false if residuals only need to be computed but not kept.
    • setComputeAndKeepResidualsEnabled

      public void setComputeAndKeepResidualsEnabled(boolean computeAndKeepResiduals) throws com.irurueta.navigation.LockedException
      Specifies whether residuals must be computed and kept.
      Parameters:
      computeAndKeepResiduals - true if residuals must be computed and kept, false if residuals only need to be computed but not kept.
      Throws:
      com.irurueta.navigation.LockedException - if this estimator 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,Reading<? extends RadioSource>,RobustMixedPositionEstimatorListener<com.irurueta.geometry.Point2D>>
      Returns:
      method being used for robust estimation.
    • init

      private void init()
      Initializes robust lateration solver.