Class PROSACRobustRangingPositionEstimator2D
java.lang.Object
com.irurueta.navigation.indoor.position.RobustPositionEstimator<com.irurueta.geometry.Point2D,RangingReading<? extends RadioSource>,RobustRangingPositionEstimatorListener<com.irurueta.geometry.Point2D>>
com.irurueta.navigation.indoor.position.RobustRangingPositionEstimator<com.irurueta.geometry.Point2D>
com.irurueta.navigation.indoor.position.RobustRangingPositionEstimator2D
com.irurueta.navigation.indoor.position.PROSACRobustRangingPositionEstimator2D
Robustly estimates 2D position using located radio sources and their ranging readings
at unknown locations and using PROSAC algorithm to discard outliers.
This kind of estimator can be used to robustly determine the 2D position of a given
device by getting ranging readings at an unknown location of different radio sources
whose 2D locations are known.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate double[]Quality scores corresponding to each reading within provided fingerprint.private double[]Quality scores corresponding to each provided located radio source.Fields inherited from class com.irurueta.navigation.indoor.position.RobustPositionEstimator
DEFAULT_EVENLY_DISTRIBUTE_READINGS, DEFAULT_ROBUST_METHOD, DEFAULT_USE_RADIO_SOURCE_POSITION_COVARIANCE, FALLBACK_DISTANCE_STANDARD_DEVIATION, fingerprint, laterationSolver, listener, preliminarySubsetSize, sources, trilaterationSolverListener -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.PROSACRobustRangingPositionEstimator2D(double[] sourceQualityScores, double[] fingerprintReadingQualityScores) Constructor.PROSACRobustRangingPositionEstimator2D(double[] sourceQualityScores, double[] fingerprintReadingQualityScores, RobustRangingPositionEstimatorListener<com.irurueta.geometry.Point2D> listener) Constructor.PROSACRobustRangingPositionEstimator2D(double[] sourceQualityScores, double[] fingerprintReadingQualityScores, RangingFingerprint<? extends RadioSource, ? extends RangingReading<? extends RadioSource>> fingerprint) Constructor.PROSACRobustRangingPositionEstimator2D(double[] sourceQualityScores, double[] fingerprintReadingQualityScores, RangingFingerprint<? extends RadioSource, ? extends RangingReading<? extends RadioSource>> fingerprint, RobustRangingPositionEstimatorListener<com.irurueta.geometry.Point2D> listener) Constructor.PROSACRobustRangingPositionEstimator2D(double[] sourceQualityScores, double[] fingerprintReadingQualityScores, List<? extends RadioSourceLocated<com.irurueta.geometry.Point2D>> sources) Constructor.PROSACRobustRangingPositionEstimator2D(double[] sourceQualityScores, double[] fingerprintReadingQualityScores, List<? extends RadioSourceLocated<com.irurueta.geometry.Point2D>> sources, RobustRangingPositionEstimatorListener<com.irurueta.geometry.Point2D> listener) Constructor.PROSACRobustRangingPositionEstimator2D(double[] sourceQualityScores, double[] fingerprintReadingQualityScores, List<? extends RadioSourceLocated<com.irurueta.geometry.Point2D>> sources, RangingFingerprint<? extends RadioSource, ? extends RangingReading<? extends RadioSource>> fingerprint) Constructor.PROSACRobustRangingPositionEstimator2D(double[] sourceQualityScores, double[] fingerprintReadingQualityScores, List<? extends RadioSourceLocated<com.irurueta.geometry.Point2D>> sources, RangingFingerprint<? extends RadioSource, ? extends RangingReading<? extends RadioSource>> fingerprint, RobustRangingPositionEstimatorListener<com.irurueta.geometry.Point2D> listener) Constructor.PROSACRobustRangingPositionEstimator2D(RobustRangingPositionEstimatorListener<com.irurueta.geometry.Point2D> listener) Constructor.PROSACRobustRangingPositionEstimator2D(RangingFingerprint<? extends RadioSource, ? extends RangingReading<? extends RadioSource>> fingerprint) Constructor.PROSACRobustRangingPositionEstimator2D(RangingFingerprint<? extends RadioSource, ? extends RangingReading<? extends RadioSource>> fingerprint, RobustRangingPositionEstimatorListener<com.irurueta.geometry.Point2D> listener) Constructor.PROSACRobustRangingPositionEstimator2D(List<? extends RadioSourceLocated<com.irurueta.geometry.Point2D>> sources) Constructor.PROSACRobustRangingPositionEstimator2D(List<? extends RadioSourceLocated<com.irurueta.geometry.Point2D>> sources, RobustRangingPositionEstimatorListener<com.irurueta.geometry.Point2D> listener) Constructor.PROSACRobustRangingPositionEstimator2D(List<? extends RadioSourceLocated<com.irurueta.geometry.Point2D>> sources, RangingFingerprint<? extends RadioSource, ? extends RangingReading<? extends RadioSource>> fingerprint) Constructor.PROSACRobustRangingPositionEstimator2D(List<? extends RadioSourceLocated<com.irurueta.geometry.Point2D>> sources, RangingFingerprint<? extends RadioSource, ? extends RangingReading<? extends RadioSource>> fingerprint, RobustRangingPositionEstimatorListener<com.irurueta.geometry.Point2D> listener) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]Gets quality scores corresponding to each reading within provided fingerprint.com.irurueta.numerical.robust.RobustEstimatorMethodReturns method being used for robust estimation.double[]Returns quality scores corresponding to each radio source.doubleGets threshold to determine whether samples are inliers or not when testing possible solutions.private voidinit()Initializes robust lateration solver.private voidinternalSetFingerprintReadingsQualityScores(double[] fingerprintReadingsQualityScores) Sets quality scores corresponding to each provided reading within provided fingerprint.private voidinternalSetSourceQualityScores(double[] sourceQualityScores) Sets quality scores corresponding to each provided located radio source.booleanIndicates whether inliers must be computed and kept.booleanIndicates whether residuals must be computed and kept.voidsetComputeAndKeepInliersEnabled(boolean computeAndKeepInliers) Specifies whether inliers must be computed and kept.voidsetComputeAndKeepResidualsEnabled(boolean computeAndKeepResiduals) Specifies whether residuals must be computed and kept.voidsetFingerprintReadingsQualityScores(double[] fingerprintReadingsQualityScores) Sets quality scores corresponding to each reading within provided fingerprint.voidsetSourceQualityScores(double[] sourceQualityScores) Sets quality scores corresponding to each radio source.voidsetThreshold(double threshold) Sets threshold to determine whether samples are inliers or not when testing possible solutions.Methods inherited from class com.irurueta.navigation.indoor.position.RobustRangingPositionEstimator2D
create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, getMinRequiredSources, setPositionsDistancesDistanceStandardDeviationsAndQualityScoresMethods inherited from class com.irurueta.navigation.indoor.position.RobustPositionEstimator
buildPositionsDistancesDistanceStandardDeviationsAndQualityScores, estimate, getConfidence, getCovariance, getDistances, getDistanceStandardDeviations, getEstimatedPosition, getEvenlyDistributeReadings, getFallbackDistanceStandardDeviation, getFingerprint, getInitialPosition, getInliersData, getListener, getMaxIterations, getNumberOfDimensions, getPositions, getPreliminarySubsetSize, getProgressDelta, getSources, internalSetFingerprint, internalSetSources, isCovarianceKept, isHomogeneousLinearSolverUsed, isLinearSolverUsed, isLocked, isPreliminarySolutionRefined, isRadioSourcePositionCovarianceUsed, isReady, isResultRefined, setConfidence, setCovarianceKept, setEvenlyDistributeReadings, setFallbackDistanceStandardDeviation, setFingerprint, setHomogeneousLinearSolverUsed, setInitialPosition, setLinearSolverUsed, setListener, setMaxIterations, setPreliminarySolutionRefined, setPreliminarySubsetSize, setProgressDelta, setRadioSourcePositionCovarianceUsed, setResultRefined, setSources
-
Field Details
-
sourceQualityScores
private double[] sourceQualityScoresQuality scores corresponding to each provided located radio source. The larger the score value the better the quality of the radio source. -
fingerprintReadingsQualityScores
private double[] fingerprintReadingsQualityScoresQuality scores corresponding to each reading within provided fingerprint. The larger the score value the better the quality of the reading.
-
-
Constructor Details
-
PROSACRobustRangingPositionEstimator2D
public PROSACRobustRangingPositionEstimator2D()Constructor. -
PROSACRobustRangingPositionEstimator2D
public PROSACRobustRangingPositionEstimator2D(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.
-
PROSACRobustRangingPositionEstimator2D
public PROSACRobustRangingPositionEstimator2D(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.
-
PROSACRobustRangingPositionEstimator2D
public PROSACRobustRangingPositionEstimator2D(double[] sourceQualityScores, double[] fingerprintReadingQualityScores, List<? extends RadioSourceLocated<com.irurueta.geometry.Point2D>> 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.
-
-
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:
getSourceQualityScoresin classRobustPositionEstimator<com.irurueta.geometry.Point2D,RangingReading<? extends RadioSource>, RobustRangingPositionEstimatorListener<com.irurueta.geometry.Point2D>> - 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:
setSourceQualityScoresin classRobustPositionEstimator<com.irurueta.geometry.Point2D,RangingReading<? extends RadioSource>, RobustRangingPositionEstimatorListener<com.irurueta.geometry.Point2D>> - 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:
getFingerprintReadingsQualityScoresin classRobustPositionEstimator<com.irurueta.geometry.Point2D,RangingReading<? extends RadioSource>, RobustRangingPositionEstimatorListener<com.irurueta.geometry.Point2D>> - 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:
setFingerprintReadingsQualityScoresin classRobustPositionEstimator<com.irurueta.geometry.Point2D,RangingReading<? extends RadioSource>, RobustRangingPositionEstimatorListener<com.irurueta.geometry.Point2D>> - 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.
-
isComputeAndKeepResidualsEnabled
public boolean isComputeAndKeepResidualsEnabled()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:
getMethodin classRobustPositionEstimator<com.irurueta.geometry.Point2D,RangingReading<? extends RadioSource>, RobustRangingPositionEstimatorListener<com.irurueta.geometry.Point2D>> - 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.
-