Class LMedSRobustRangingRadioSourceEstimator2D<S extends RadioSource>
java.lang.Object
com.irurueta.navigation.indoor.radiosource.RobustRadioSourceEstimator<com.irurueta.geometry.Point2D,RangingReadingLocated<S,com.irurueta.geometry.Point2D>,RobustRangingRadioSourceEstimatorListener<S,com.irurueta.geometry.Point2D>>
com.irurueta.navigation.indoor.radiosource.RobustRangingRadioSourceEstimator<S,com.irurueta.geometry.Point2D>
com.irurueta.navigation.indoor.radiosource.RobustRangingRadioSourceEstimator2D<S>
com.irurueta.navigation.indoor.radiosource.LMedSRobustRangingRadioSourceEstimator2D<S>
- Type Parameters:
S- aRadioSourcetype.
public class LMedSRobustRangingRadioSourceEstimator2D<S extends RadioSource>
extends RobustRangingRadioSourceEstimator2D<S>
Robustly estimated 2D position of a radio source (e.g. Wi-Fi
access point or bluetooth beacon), by discarding outliers using LMedS
algorithm.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.irurueta.navigation.indoor.radiosource.RobustRangingRadioSourceEstimator
RobustRangingRadioSourceEstimator.Solution<P extends com.irurueta.geometry.Point<?>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleDefault value to be used for stop threshold.static final doubleMinimum allowed stop threshold value.private doubleThreshold to be used to keep the algorithm iterating in case that best estimated threshold using median of residuals is not small enough.Fields inherited from class com.irurueta.navigation.indoor.radiosource.RobustRangingRadioSourceEstimator2D
innerEstimatorFields inherited from class com.irurueta.navigation.indoor.radiosource.RobustRangingRadioSourceEstimator
DEFAULT_USE_READING_POSITION_COVARIANCES, initialPosition, useReadingPositionCovariancesFields inherited from class com.irurueta.navigation.indoor.radiosource.RobustRadioSourceEstimator
confidence, covariance, DEFAULT_CONFIDENCE, DEFAULT_KEEP_COVARIANCE, DEFAULT_MAX_ITERATIONS, DEFAULT_PROGRESS_DELTA, DEFAULT_REFINE_RESULT, DEFAULT_ROBUST_METHOD, estimatedPosition, estimatedPositionCovariance, inliersData, keepCovariance, listener, locked, MAX_CONFIDENCE, MAX_PROGRESS_DELTA, maxIterations, MIN_CONFIDENCE, MIN_ITERATIONS, MIN_PROGRESS_DELTA, preliminarySubsetSize, progressDelta, readings, refineResult -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.LMedSRobustRangingRadioSourceEstimator2D(com.irurueta.geometry.Point2D initialPosition) Constructor.LMedSRobustRangingRadioSourceEstimator2D(com.irurueta.geometry.Point2D initialPosition, RobustRangingRadioSourceEstimatorListener<S, com.irurueta.geometry.Point2D> listener) Constructor.LMedSRobustRangingRadioSourceEstimator2D(RobustRangingRadioSourceEstimatorListener<S, com.irurueta.geometry.Point2D> listener) Constructor.LMedSRobustRangingRadioSourceEstimator2D(List<? extends RangingReadingLocated<S, com.irurueta.geometry.Point2D>> readings) Constructor.LMedSRobustRangingRadioSourceEstimator2D(List<? extends RangingReadingLocated<S, com.irurueta.geometry.Point2D>> readings, com.irurueta.geometry.Point2D initialPosition) Constructor.LMedSRobustRangingRadioSourceEstimator2D(List<? extends RangingReadingLocated<S, com.irurueta.geometry.Point2D>> readings, com.irurueta.geometry.Point2D initialPosition, RobustRangingRadioSourceEstimatorListener<S, com.irurueta.geometry.Point2D> listener) Constructor.LMedSRobustRangingRadioSourceEstimator2D(List<? extends RangingReadingLocated<S, com.irurueta.geometry.Point2D>> readings, RobustRangingRadioSourceEstimatorListener<S, com.irurueta.geometry.Point2D> listener) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidestimate()Robustly estimates position for a radio source.com.irurueta.numerical.robust.RobustEstimatorMethodReturns method being used for robust estimation.doubleReturns threshold to be used to keep the algorithm iterating in case that best estimated threshold using median of residuals is not small enough.voidsetStopThreshold(double stopThreshold) Sets threshold to be used to keep the algorithm iterating in case that best estimated threshold using median of residuals is not small enough.Methods inherited from class com.irurueta.navigation.indoor.radiosource.RobustRangingRadioSourceEstimator2D
attemptRefine, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, getEstimatedRadioSource, getMinReadings, getNumberOfDimensions, isHomogeneousLinearSolverUsed, setHomogeneousLinearSolverUsed, solvePreliminarySolutionsMethods inherited from class com.irurueta.navigation.indoor.radiosource.RobustRangingRadioSourceEstimator
getInitialPosition, getUseReadingPositionCovariance, isReady, residual, setInitialPosition, setUseReadingPositionCovariancesMethods inherited from class com.irurueta.navigation.indoor.radiosource.RobustRadioSourceEstimator
areValidReadings, getConfidence, getCovariance, getEstimatedPosition, getEstimatedPositionCovariance, getInliersData, getListener, getMaxIterations, getPreliminarySubsetSize, getProgressDelta, getQualityScores, getReadings, internalSetReadings, isCovarianceKept, isLocked, isResultRefined, setConfidence, setCovarianceKept, setListener, setMaxIterations, setPreliminarySubsetSize, setProgressDelta, setQualityScores, setReadings, setResultRefined
-
Field Details
-
DEFAULT_STOP_THRESHOLD
public static final double DEFAULT_STOP_THRESHOLDDefault value to be used for stop threshold. Stop threshold can be used to avoid keeping the algorithm unnecessarily 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 iterating 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.- See Also:
-
MIN_STOP_THRESHOLD
public static final double MIN_STOP_THRESHOLDMinimum allowed stop threshold value.- See Also:
-
stopThreshold
private double stopThresholdThreshold 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 iterating 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.
-
-
Constructor Details
-
LMedSRobustRangingRadioSourceEstimator2D
public LMedSRobustRangingRadioSourceEstimator2D()Constructor. -
LMedSRobustRangingRadioSourceEstimator2D
public LMedSRobustRangingRadioSourceEstimator2D(List<? extends RangingReadingLocated<S, com.irurueta.geometry.Point2D>> readings) Constructor. Sets radio signal ranging readings belonging to the same radio source.- Parameters:
readings- radio signal ranging readings belonging to the same radio source.- Throws:
IllegalArgumentException- if readings are not valid.
-
LMedSRobustRangingRadioSourceEstimator2D
public LMedSRobustRangingRadioSourceEstimator2D(com.irurueta.geometry.Point2D initialPosition) Constructor.- Parameters:
initialPosition- initial position to start the estimation or radio source position.
-
LMedSRobustRangingRadioSourceEstimator2D
public LMedSRobustRangingRadioSourceEstimator2D(List<? extends RangingReadingLocated<S, com.irurueta.geometry.Point2D>> readings, com.irurueta.geometry.Point2D initialPosition) Constructor. Sets radio signal readings belonging to the same radio source.- Parameters:
readings- radio signal readings belonging to the same radio source.initialPosition- initial position to start the estimation of radio source position.- Throws:
IllegalArgumentException- if readings are not valid.
-
-
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.
-
estimate
public void estimate() throws com.irurueta.navigation.LockedException, com.irurueta.navigation.NotReadyException, com.irurueta.numerical.robust.RobustEstimatorExceptionRobustly estimates position for a radio source.- Specified by:
estimatein classRobustRadioSourceEstimator<com.irurueta.geometry.Point2D,RangingReadingLocated<S extends RadioSource, com.irurueta.geometry.Point2D>, RobustRangingRadioSourceEstimatorListener<S extends RadioSource, com.irurueta.geometry.Point2D>> - Throws:
com.irurueta.navigation.LockedException- if instance is busy during estimation.com.irurueta.navigation.NotReadyException- if estimator is not ready.com.irurueta.numerical.robust.RobustEstimatorException- if estimation fails for any reason (i.e. numerical instability, no solution available, etc).
-
getMethod
public com.irurueta.numerical.robust.RobustEstimatorMethod getMethod()Returns method being used for robust estimation.- Specified by:
getMethodin classRobustRangingRadioSourceEstimator<S extends RadioSource,com.irurueta.geometry.Point2D> - Returns:
- method being used for robust estimation.
-