Class PROSACRobustRssiPositionEstimator3D

java.lang.Object
com.irurueta.navigation.indoor.position.RobustPositionEstimator<com.irurueta.geometry.Point3D,RssiReading<? extends RadioSource>,RobustRssiPositionEstimatorListener<com.irurueta.geometry.Point3D>>
com.irurueta.navigation.indoor.position.RobustRssiPositionEstimator<com.irurueta.geometry.Point3D>
com.irurueta.navigation.indoor.position.RobustRssiPositionEstimator3D
com.irurueta.navigation.indoor.position.PROSACRobustRssiPositionEstimator3D

public class PROSACRobustRssiPositionEstimator3D extends RobustRssiPositionEstimator3D
Robustly estimates 3D position using located radio sources and their RSSI readings at unknown locations and using PROSAC algorithm to discard outliers. This kind of estimator can be used to robustly determine the 3D position of a given device by getting RSSI readings at an unknown location of different radio sources whose 3D locations are known.
  • Field Details

    • sourceQualityScores

      private double[] sourceQualityScores
      Quality scores corresponding to each provided located radio source. The larger the score value the better the quality of the radio source.
    • fingerprintReadingsQualityScores

      private double[] fingerprintReadingsQualityScores
      Quality scores corresponding to each reading within provided fingerprint. The larger the score value the better the quality of the reading.
  • Constructor Details

    • PROSACRobustRssiPositionEstimator3D

      public PROSACRobustRssiPositionEstimator3D()
      Constructor.
    • PROSACRobustRssiPositionEstimator3D

      public PROSACRobustRssiPositionEstimator3D(List<? extends RadioSourceLocated<com.irurueta.geometry.Point3D>> 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.
    • PROSACRobustRssiPositionEstimator3D

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

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

      public PROSACRobustRssiPositionEstimator3D(RobustRssiPositionEstimatorListener<com.irurueta.geometry.Point3D> listener)
      Constructor.
      Parameters:
      listener - listener in charge of handling events.
    • PROSACRobustRssiPositionEstimator3D

      public PROSACRobustRssiPositionEstimator3D(List<? extends RadioSourceLocated<com.irurueta.geometry.Point3D>> sources, RobustRssiPositionEstimatorListener<com.irurueta.geometry.Point3D> 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.
    • PROSACRobustRssiPositionEstimator3D

      public PROSACRobustRssiPositionEstimator3D(RssiFingerprint<? extends RadioSource,? extends RssiReading<? extends RadioSource>> fingerprint, RobustRssiPositionEstimatorListener<com.irurueta.geometry.Point3D> listener)
      Constructor.
      Parameters:
      fingerprint - fingerprint containing 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.
    • PROSACRobustRssiPositionEstimator3D

      public PROSACRobustRssiPositionEstimator3D(List<? extends RadioSourceLocated<com.irurueta.geometry.Point3D>> sources, RssiFingerprint<? extends RadioSource,? extends RssiReading<? extends RadioSource>> fingerprint, RobustRssiPositionEstimatorListener<com.irurueta.geometry.Point3D> listener)
      Constructor.
      Parameters:
      sources - located radio sources used for lateration.
      fingerprint - fingerprint containing 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.
    • PROSACRobustRssiPositionEstimator3D

      public PROSACRobustRssiPositionEstimator3D(double[] sourceQualityScores, double[] fingerprintReadingQualityScores)
      Constructor.
      Parameters:
      sourceQualityScores - quality scores corresponding to each provided located radio source. The larger the score value the better the quality of the radio source.
      fingerprintReadingQualityScores - quality scores corresponding to readings within provided fingerprint. The larger the score the better the quality of the reading.
    • PROSACRobustRssiPositionEstimator3D

      public PROSACRobustRssiPositionEstimator3D(double[] sourceQualityScores, double[] fingerprintReadingQualityScores, List<? extends RadioSourceLocated<com.irurueta.geometry.Point3D>> sources)
      Constructor.
      Parameters:
      sourceQualityScores - quality scores corresponding to each provided located radio source. The larger the score value the better the quality of the radio source.
      fingerprintReadingQualityScores - quality scores corresponding to readings within provided fingerprint. The larger the score the better the quality of the reading.
      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.
    • PROSACRobustRssiPositionEstimator3D

      public PROSACRobustRssiPositionEstimator3D(double[] sourceQualityScores, double[] fingerprintReadingQualityScores, RssiFingerprint<? extends RadioSource,? extends RssiReading<? extends RadioSource>> fingerprint)
      Constructor.
      Parameters:
      sourceQualityScores - quality scores corresponding to each provided located radio source. The larger the score value the better the quality of the radio source.
      fingerprintReadingQualityScores - quality scores corresponding to readings within provided fingerprint. The larger the score the better the quality of the reading.
      fingerprint - fingerprint containing RSSI readings at an unknown location for provided located radio sources.
      Throws:
      IllegalArgumentException - if provided fingerprint is null.
    • PROSACRobustRssiPositionEstimator3D

      public PROSACRobustRssiPositionEstimator3D(double[] sourceQualityScores, double[] fingerprintReadingQualityScores, List<? extends RadioSourceLocated<com.irurueta.geometry.Point3D>> sources, RssiFingerprint<? extends RadioSource,? extends RssiReading<? extends RadioSource>> fingerprint)
      Constructor.
      Parameters:
      sourceQualityScores - quality scores corresponding to each provided located radio source. The larger the score value the better the quality of the radio source.
      fingerprintReadingQualityScores - quality scores corresponding to readings within provided fingerprint. The larger the score the better the quality of the reading.
      sources - located radio sources used for lateration.
      fingerprint - fingerprint containing 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.
    • PROSACRobustRssiPositionEstimator3D

      public PROSACRobustRssiPositionEstimator3D(double[] sourceQualityScores, double[] fingerprintReadingQualityScores, RobustRssiPositionEstimatorListener<com.irurueta.geometry.Point3D> listener)
      Constructor.
      Parameters:
      sourceQualityScores - quality scores corresponding to each provided located radio source. The larger the score value the better the quality of the radio source.
      fingerprintReadingQualityScores - quality scores corresponding to readings within provided fingerprint. The larger the score the better the quality of the reading.
      listener - listener in charge of handling events.
    • PROSACRobustRssiPositionEstimator3D

      public PROSACRobustRssiPositionEstimator3D(double[] sourceQualityScores, double[] fingerprintReadingQualityScores, List<? extends RadioSourceLocated<com.irurueta.geometry.Point3D>> sources, RobustRssiPositionEstimatorListener<com.irurueta.geometry.Point3D> listener)
      Constructor.
      Parameters:
      sourceQualityScores - quality scores corresponding to each provided located radio source. The larger the score value the better the quality of the radio source.
      fingerprintReadingQualityScores - quality scores corresponding to readings within provided fingerprint. The larger the score the better the quality of the reading.
      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.
    • PROSACRobustRssiPositionEstimator3D

      public PROSACRobustRssiPositionEstimator3D(double[] sourceQualityScores, double[] fingerprintReadingQualityScores, RssiFingerprint<? extends RadioSource,? extends RssiReading<? extends RadioSource>> fingerprint, RobustRssiPositionEstimatorListener<com.irurueta.geometry.Point3D> listener)
      Constructor.
      Parameters:
      sourceQualityScores - quality scores corresponding to each provided located radio source. The larger the score value the better the quality of the radio source.
      fingerprintReadingQualityScores - quality scores corresponding to readings within provided fingerprint. The larger the score the better the quality of the reading.
      fingerprint - fingerprint containing 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.
    • PROSACRobustRssiPositionEstimator3D

      public PROSACRobustRssiPositionEstimator3D(double[] sourceQualityScores, double[] fingerprintReadingQualityScores, List<? extends RadioSourceLocated<com.irurueta.geometry.Point3D>> sources, RssiFingerprint<? extends RadioSource,? extends RssiReading<? extends RadioSource>> fingerprint, RobustRssiPositionEstimatorListener<com.irurueta.geometry.Point3D> listener)
      Constructor.
      Parameters:
      sourceQualityScores - quality scores corresponding to each provided located radio source. The larger the score value the better the quality of the radio source.
      fingerprintReadingQualityScores - quality scores corresponding to readings within provided fingerprint. The larger the score the better the quality of the reading.
      sources - located radio sources used for lateration.
      fingerprint - fingerprint containing 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

    • getSourceQualityScores

      public double[] getSourceQualityScores()
      Returns quality scores corresponding to each radio source. The larger the score value the better the quality of the sample.
      Overrides:
      getSourceQualityScores in class RobustPositionEstimator<com.irurueta.geometry.Point3D,RssiReading<? extends RadioSource>,RobustRssiPositionEstimatorListener<com.irurueta.geometry.Point3D>>
      Returns:
      quality scores corresponding to each radio source.
    • setSourceQualityScores

      public void setSourceQualityScores(double[] sourceQualityScores) throws com.irurueta.navigation.LockedException
      Sets quality scores corresponding to each radio source. The larger the score value the better the quality of the radio source.
      Overrides:
      setSourceQualityScores in class RobustPositionEstimator<com.irurueta.geometry.Point3D,RssiReading<? extends RadioSource>,RobustRssiPositionEstimatorListener<com.irurueta.geometry.Point3D>>
      Parameters:
      sourceQualityScores - quality scores corresponding to each radio source.
      Throws:
      com.irurueta.navigation.LockedException - if this instance is locked.
      IllegalArgumentException - if provided quality scores length is smaller than minimum required samples.
    • getFingerprintReadingsQualityScores

      public double[] getFingerprintReadingsQualityScores()
      Gets quality scores corresponding to each reading within provided fingerprint. The larger the score value the better the quality of the reading. This implementation always returns null. Subclasses using quality scores must implement proper behavior.
      Overrides:
      getFingerprintReadingsQualityScores in class RobustPositionEstimator<com.irurueta.geometry.Point3D,RssiReading<? extends RadioSource>,RobustRssiPositionEstimatorListener<com.irurueta.geometry.Point3D>>
      Returns:
      quality scores corresponding to each reading within provided fingerprint.
    • setFingerprintReadingsQualityScores

      public void setFingerprintReadingsQualityScores(double[] fingerprintReadingsQualityScores) throws com.irurueta.navigation.LockedException
      Sets quality scores corresponding to each reading within provided fingerprint. The larger the score value the better the quality of the reading. This implementation makes no action. Subclasses using quality scores must implement proper behavior.
      Overrides:
      setFingerprintReadingsQualityScores in class RobustPositionEstimator<com.irurueta.geometry.Point3D,RssiReading<? extends RadioSource>,RobustRssiPositionEstimatorListener<com.irurueta.geometry.Point3D>>
      Parameters:
      fingerprintReadingsQualityScores - quality scores corresponding to each reading within provided fingerprint.
      Throws:
      com.irurueta.navigation.LockedException - if this instance is locked.
      IllegalArgumentException - if provided quality scores length is smaller than minimum required samples.
    • 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 solver 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 solver 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 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.Point3D,RssiReading<? extends RadioSource>,RobustRssiPositionEstimatorListener<com.irurueta.geometry.Point3D>>
      Returns:
      method being used for robust estimation.
    • init

      private void init()
      Initializes robust lateration solver.
    • internalSetSourceQualityScores

      private void internalSetSourceQualityScores(double[] sourceQualityScores)
      Sets quality scores corresponding to each provided located radio source. This method is used internally and does not check whether instance is locked or not.
      Parameters:
      sourceQualityScores - quality scores to be set.
      Throws:
      IllegalArgumentException - if provided quality scores length is smaller than 3 samples.
    • internalSetFingerprintReadingsQualityScores

      private void internalSetFingerprintReadingsQualityScores(double[] fingerprintReadingsQualityScores)
      Sets quality scores corresponding to each provided reading within provided fingerprint. This method is used internally and does not check whether instance is locked or not.
      Parameters:
      fingerprintReadingsQualityScores - quality scores to be set.
      Throws:
      IllegalArgumentException - if provided quality scores length is smaller than 3 samples.