Class LMedSRobustLateration3DSolver
java.lang.Object
com.irurueta.navigation.lateration.RobustLaterationSolver<com.irurueta.geometry.Point3D>
com.irurueta.navigation.lateration.RobustLateration3DSolver
com.irurueta.navigation.lateration.LMedSRobustLateration3DSolver
Robustly solves the lateration problem by finding the best pairs of 3D
positions and distances among the provided ones using LMedS algorithm to
discard outliers.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final double
Default value to be used for stop threshold.static final double
Minimum allowed stop threshold value.private double
Threshold 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.lateration.RobustLateration3DSolver
homogeneousLinearSolver, inhomogeneousLinearSolver, innerDistances, innerDistanceStandardDeviations, innerPositions, nonLinearSolver
Fields inherited from class com.irurueta.navigation.lateration.RobustLaterationSolver
confidence, covariance, DEFAULT_CONFIDENCE, DEFAULT_KEEP_COVARIANCE, DEFAULT_MAX_ITERATIONS, DEFAULT_PROGRESS_DELTA, DEFAULT_REFINE_PRELIMINARY_SOLUTIONS, DEFAULT_REFINE_RESULT, DEFAULT_ROBUST_METHOD, DEFAULT_USE_HOMOGENEOUS_LINEAR_SOLVER, distances, distanceStandardDeviations, EPSILON, estimatedPosition, initialPosition, inliersData, keepCovariance, listener, locked, MAX_CONFIDENCE, MAX_PROGRESS_DELTA, maxIterations, MIN_CONFIDENCE, MIN_ITERATIONS, MIN_PROGRESS_DELTA, positions, preliminarySubsetSize, progressDelta, refinePreliminarySolutions, refineResult, useHomogeneousLinearSolver, useLinearSolver
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.LMedSRobustLateration3DSolver
(com.irurueta.geometry.Point3D[] positions, double[] distances) Constructor.LMedSRobustLateration3DSolver
(com.irurueta.geometry.Point3D[] positions, double[] distances, double[] distanceStandardDeviations) Constructor.LMedSRobustLateration3DSolver
(com.irurueta.geometry.Point3D[] positions, double[] distances, double[] distanceStandardDeviations, RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener) Constructor.LMedSRobustLateration3DSolver
(com.irurueta.geometry.Point3D[] positions, double[] distances, RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener) Constructor.LMedSRobustLateration3DSolver
(com.irurueta.geometry.Sphere[] spheres) Constructor.LMedSRobustLateration3DSolver
(com.irurueta.geometry.Sphere[] spheres, double[] distanceStandardDeviations) Constructor.LMedSRobustLateration3DSolver
(com.irurueta.geometry.Sphere[] spheres, double[] distanceStandardDeviations, RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener) Constructor.LMedSRobustLateration3DSolver
(com.irurueta.geometry.Sphere[] spheres, RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener) Constructor.LMedSRobustLateration3DSolver
(RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener) Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncom.irurueta.numerical.robust.RobustEstimatorMethod
Returns method being used for robust estimation.double
Returns threshold to be used to keep the algorithm iterating in case that best estimated threshold using median of residuals is not small enough.void
setStopThreshold
(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.com.irurueta.geometry.Point3D
solve()
Solves the lateration problem.Methods inherited from class com.irurueta.navigation.lateration.RobustLateration3DSolver
attemptRefine, 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, create, create, create, create, create, create, getMinRequiredPositionsAndDistances, getNumberOfDimensions, getSpheres, setPreliminarySubsetSize, setSpheres, setSpheresAndStandardDeviations, solvePreliminarySolutions
Methods inherited from class com.irurueta.navigation.lateration.RobustLaterationSolver
getConfidence, getCovariance, getDistances, getDistanceStandardDeviations, getEstimatedPosition, getInitialPosition, getInliersData, getListener, getMaxIterations, getPositions, getPreliminarySubsetSize, getProgressDelta, getQualityScores, internalSetPositionsAndDistances, internalSetPositionsDistancesAndStandardDeviations, isCovarianceKept, isHomogeneousLinearSolverUsed, isLinearSolverUsed, isLocked, isPreliminarySolutionRefined, isReady, isResultRefined, setConfidence, setCovarianceKept, setHomogeneousLinearSolverUsed, setInitialPosition, setLinearSolverUsed, setListener, setMaxIterations, setPositionsAndDistances, setPositionsDistancesAndStandardDeviations, setPreliminarySolutionRefined, setProgressDelta, setQualityScores, 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
-
LMedSRobustLateration3DSolver
public LMedSRobustLateration3DSolver()Constructor. -
LMedSRobustLateration3DSolver
public LMedSRobustLateration3DSolver(com.irurueta.geometry.Point3D[] positions, double[] distances) Constructor.- Parameters:
positions
- known positions of static nodes.distances
- euclidean distances from static nodes to mobile node to be estimated.- Throws:
IllegalArgumentException
- if either positions or distances are null, don't have the same length or their length is smaller than required (4 points).
-
LMedSRobustLateration3DSolver
public LMedSRobustLateration3DSolver(com.irurueta.geometry.Point3D[] positions, double[] distances, double[] distanceStandardDeviations) Constructor.- Parameters:
positions
- known positions of static nodes.distances
- euclidean distances from static nodes to mobile node to be estimated.distanceStandardDeviations
- standard deviations of provided measured distances.- Throws:
IllegalArgumentException
- if either positions or distances are null, don't have the same length or their length is smaller than required (4 points).
-
LMedSRobustLateration3DSolver
public LMedSRobustLateration3DSolver(com.irurueta.geometry.Sphere[] spheres) Constructor.- Parameters:
spheres
- spheres defining positions and distances.- Throws:
IllegalArgumentException
- if spheres is null or if length of spheres array is less than required (4 points).
-
LMedSRobustLateration3DSolver
public LMedSRobustLateration3DSolver(com.irurueta.geometry.Sphere[] spheres, double[] distanceStandardDeviations) Constructor.- Parameters:
spheres
- spheres defining positions and distances.distanceStandardDeviations
- standard deviations of provided measured distances.- Throws:
IllegalArgumentException
- if spheres is null, length of spheres array is less than required (4 points) or don't have the same length.
-
-
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
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.LockedException
- if this solver is locked.
-
solve
public com.irurueta.geometry.Point3D solve() throws LockedException, NotReadyException, com.irurueta.numerical.robust.RobustEstimatorExceptionSolves the lateration problem.- Specified by:
solve
in classRobustLaterationSolver<com.irurueta.geometry.Point3D>
- Returns:
- estimated position.
- Throws:
LockedException
- if instance is busy solving the lateration problem.NotReadyException
- is solver 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:
getMethod
in classRobustLaterationSolver<com.irurueta.geometry.Point3D>
- Returns:
- method being used for robust estimation.
-