Class RobustLateration3DSolver
java.lang.Object
com.irurueta.navigation.lateration.RobustLaterationSolver<com.irurueta.geometry.Point3D>
com.irurueta.navigation.lateration.RobustLateration3DSolver
- Direct Known Subclasses:
LMedSRobustLateration3DSolver
,MSACRobustLateration3DSolver
,PROMedSRobustLateration3DSolver
,PROSACRobustLateration3DSolver
,RANSACRobustLateration3DSolver
public abstract class RobustLateration3DSolver
extends RobustLaterationSolver<com.irurueta.geometry.Point3D>
This is an abstract class to robustly solve the lateration problem by
finding the best pairs of 3D positions and distances among the provided
ones.
Implementations of this class should be able to detect and discard outliers
in order to find the best solution.
-
Field Summary
FieldsModifier and TypeFieldDescriptionHomogeneous linear lateration solver internally used by a robust algorithm.Inhomogeneous linear lateration solver internally used by a robust algorithm.protected double[]
Distances for linear inner solver used during robust estimation.protected double[]
Standard deviations for non-linear inner solver used during robust estimation.protected com.irurueta.geometry.Point3D[]
Positions for linear inner solver used during robust estimation.protected NonLinearLeastSquaresLateration3DSolver
Non-linear lateration solver internally used to refine solution found by robust algorithm.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
ConstructorsModifierConstructorDescriptionprotected
Constructor.protected
RobustLateration3DSolver
(com.irurueta.geometry.Point3D[] positions, double[] distances) Constructor.protected
RobustLateration3DSolver
(com.irurueta.geometry.Point3D[] positions, double[] distances, double[] distanceStandardDeviations) Constructor.protected
RobustLateration3DSolver
(com.irurueta.geometry.Point3D[] positions, double[] distances, double[] distanceStandardDeviations, RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener) Constructor.protected
RobustLateration3DSolver
(com.irurueta.geometry.Point3D[] positions, double[] distances, RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener) Constructor.protected
RobustLateration3DSolver
(com.irurueta.geometry.Sphere[] spheres) Constructor.protected
RobustLateration3DSolver
(com.irurueta.geometry.Sphere[] spheres, double[] distanceStandardDeviations) Constructor.protected
RobustLateration3DSolver
(com.irurueta.geometry.Sphere[] spheres, double[] distanceStandardDeviations, RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener) Constructor.protected
RobustLateration3DSolver
(com.irurueta.geometry.Sphere[] spheres, RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener) Constructor.protected
RobustLateration3DSolver
(RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected com.irurueta.geometry.Point3D
attemptRefine
(com.irurueta.geometry.Point3D position) Attempts to refine estimated position if refinement is requested.static RobustLateration3DSolver
create()
Creates a robust 3D lateration solver using default robust method.static RobustLateration3DSolver
create
(double[] qualityScores) Creates a robust 3D lateration solver using default robust method.static RobustLateration3DSolver
create
(double[] qualityScores, com.irurueta.geometry.Point3D[] positions, double[] distances) Creates a robust 3D lateration solver using default robust method.static RobustLateration3DSolver
create
(double[] qualityScores, com.irurueta.geometry.Point3D[] positions, double[] distances, double[] distanceStandardDeviations) Creates a robust 3D lateration solver using default robust method.static RobustLateration3DSolver
create
(double[] qualityScores, com.irurueta.geometry.Point3D[] positions, double[] distances, double[] distanceStandardDeviations, RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener) Creates a robust 3D lateration solver using default robust method.static RobustLateration3DSolver
create
(double[] qualityScores, com.irurueta.geometry.Point3D[] positions, double[] distances, double[] distanceStandardDeviations, RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.static RobustLateration3DSolver
create
(double[] qualityScores, com.irurueta.geometry.Point3D[] positions, double[] distances, double[] distanceStandardDeviations, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.static RobustLateration3DSolver
create
(double[] qualityScores, com.irurueta.geometry.Point3D[] positions, double[] distances, RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener) Creates a robust 3D lateration solver using default robust method.static RobustLateration3DSolver
create
(double[] qualityScores, com.irurueta.geometry.Point3D[] positions, double[] distances, RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.static RobustLateration3DSolver
create
(double[] qualityScores, com.irurueta.geometry.Point3D[] positions, double[] distances, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.static RobustLateration3DSolver
create
(double[] qualityScores, com.irurueta.geometry.Sphere[] spheres) Creates a robust 3D lateration solver using default robust method.static RobustLateration3DSolver
create
(double[] qualityScores, com.irurueta.geometry.Sphere[] spheres, double[] distanceStandardDeviations) Creates a robust 3D lateration solver using default robust method.static RobustLateration3DSolver
create
(double[] qualityScores, com.irurueta.geometry.Sphere[] spheres, double[] distanceStandardDeviations, RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener) Creates a robust 3D lateration solver using default robust method.static RobustLateration3DSolver
create
(double[] qualityScores, com.irurueta.geometry.Sphere[] spheres, double[] distanceStandardDeviations, RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.static RobustLateration3DSolver
create
(double[] qualityScores, com.irurueta.geometry.Sphere[] spheres, double[] distanceStandardDeviations, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.static RobustLateration3DSolver
create
(double[] qualityScores, com.irurueta.geometry.Sphere[] spheres, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.static RobustLateration3DSolver
create
(double[] qualityScores, RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener) Creates a robust 3D lateration solver using default robust method.static RobustLateration3DSolver
create
(double[] qualityScores, RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.static RobustLateration3DSolver
create
(double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.static RobustLateration3DSolver
create
(com.irurueta.geometry.Point3D[] positions, double[] distances) Creates a robust 3D lateration solver using default robust method.static RobustLateration3DSolver
create
(com.irurueta.geometry.Point3D[] positions, double[] distances, double[] distanceStandardDeviations) Creates a robust 3D lateration solver using default robust method.static RobustLateration3DSolver
create
(com.irurueta.geometry.Point3D[] positions, double[] distances, double[] distanceStandardDeviations, RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener) Creates a robust 3D lateration solver using default robust method.static RobustLateration3DSolver
create
(com.irurueta.geometry.Point3D[] positions, double[] distances, double[] distanceStandardDeviations, RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.static RobustLateration3DSolver
create
(com.irurueta.geometry.Point3D[] positions, double[] distances, double[] distanceStandardDeviations, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.static RobustLateration3DSolver
create
(com.irurueta.geometry.Point3D[] positions, double[] distances, RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener) Creates a robust 3D lateration solver using default robust method.static RobustLateration3DSolver
create
(com.irurueta.geometry.Point3D[] positions, double[] distances, RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.static RobustLateration3DSolver
create
(com.irurueta.geometry.Point3D[] positions, double[] distances, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.static RobustLateration3DSolver
create
(com.irurueta.geometry.Sphere[] spheres) Creates a robust 3D lateration solver using default robust method.static RobustLateration3DSolver
create
(com.irurueta.geometry.Sphere[] spheres, double[] distanceStandardDeviations) Creates a robust 3D lateration solver using default robust method.static RobustLateration3DSolver
create
(com.irurueta.geometry.Sphere[] spheres, double[] distanceStandardDeviations, RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener) Creates a robust 3D lateration solver using default robust method.static RobustLateration3DSolver
create
(com.irurueta.geometry.Sphere[] spheres, double[] distanceStandardDeviations, RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.static RobustLateration3DSolver
create
(com.irurueta.geometry.Sphere[] spheres, double[] distanceStandardDeviations, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.static RobustLateration3DSolver
create
(com.irurueta.geometry.Sphere[] spheres, RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener) Creates a robust 3D lateration solver using default robust method.static RobustLateration3DSolver
create
(com.irurueta.geometry.Sphere[] spheres, RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.static RobustLateration3DSolver
create
(com.irurueta.geometry.Sphere[] spheres, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.static RobustLateration3DSolver
create
(RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener) Creates a robust 3D lateration solver using default robust method.static RobustLateration3DSolver
create
(RobustLaterationSolverListener<com.irurueta.geometry.Point3D> listener, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.static RobustLateration3DSolver
create
(com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.int
Minimum required number of positions and distances.int
Gets number of dimensions of provided points.com.irurueta.geometry.Sphere[]
Gets spheres defined by provided positions and distances.private void
init()
Setup inner positions and distances.private void
internalSetSpheres
(com.irurueta.geometry.Sphere[] spheres) Internally sets spheres defining positions and Euclidean distances.private void
internalSetSpheresAndStandardDeviations
(com.irurueta.geometry.Sphere[] spheres, double[] radiusStandardDeviations) Internally sets spheres defining positions and Euclidean distances along with the standard deviations of provided spheres radii.void
setPreliminarySubsetSize
(int preliminarySubsetSize) Sets size of subsets to be checked during robust estimation.void
setSpheres
(com.irurueta.geometry.Sphere[] spheres) Sets spheres defining positions and Euclidean distances.void
setSpheresAndStandardDeviations
(com.irurueta.geometry.Sphere[] spheres, double[] radiusStandardDeviations) Sets spheres defining positions and Euclidean distances along with the standard deviations of provided spheres radii.protected void
solvePreliminarySolutions
(int[] samplesIndices, List<com.irurueta.geometry.Point3D> solutions) Solves a preliminary solution for a subset of samples picked by a robust estimator.Methods inherited from class com.irurueta.navigation.lateration.RobustLaterationSolver
getConfidence, getCovariance, getDistances, getDistanceStandardDeviations, getEstimatedPosition, getInitialPosition, getInliersData, getListener, getMaxIterations, getMethod, 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, solve
-
Field Details
-
inhomogeneousLinearSolver
Inhomogeneous linear lateration solver internally used by a robust algorithm. -
homogeneousLinearSolver
Homogeneous linear lateration solver internally used by a robust algorithm. -
nonLinearSolver
Non-linear lateration solver internally used to refine solution found by robust algorithm. -
innerPositions
protected com.irurueta.geometry.Point3D[] innerPositionsPositions for linear inner solver used during robust estimation. -
innerDistances
protected double[] innerDistancesDistances for linear inner solver used during robust estimation. -
innerDistanceStandardDeviations
protected double[] innerDistanceStandardDeviationsStandard deviations for non-linear inner solver used during robust estimation.
-
-
Constructor Details
-
RobustLateration3DSolver
protected RobustLateration3DSolver()Constructor. -
RobustLateration3DSolver
protected RobustLateration3DSolver(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).
-
RobustLateration3DSolver
protected RobustLateration3DSolver(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).
-
RobustLateration3DSolver
protected RobustLateration3DSolver(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).
-
RobustLateration3DSolver
protected RobustLateration3DSolver(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
-
getNumberOfDimensions
public int getNumberOfDimensions()Gets number of dimensions of provided points.- Specified by:
getNumberOfDimensions
in classRobustLaterationSolver<com.irurueta.geometry.Point3D>
- Returns:
- always returns 2 dimensions.
-
getMinRequiredPositionsAndDistances
public int getMinRequiredPositionsAndDistances()Minimum required number of positions and distances. At least 3 positions will be required.- Specified by:
getMinRequiredPositionsAndDistances
in classRobustLaterationSolver<com.irurueta.geometry.Point3D>
- Returns:
- minimum required number of positions and distances.
-
setPreliminarySubsetSize
Sets size of subsets to be checked during robust estimation. This has to be at leastgetMinRequiredPositionsAndDistances()
.- Overrides:
setPreliminarySubsetSize
in classRobustLaterationSolver<com.irurueta.geometry.Point3D>
- Parameters:
preliminarySubsetSize
- size of subsets to be checked during robust estimation.- Throws:
LockedException
- if instance is busy solving the lateration problem.IllegalArgumentException
- if provided value is less thangetMinRequiredPositionsAndDistances()
.
-
getSpheres
public com.irurueta.geometry.Sphere[] getSpheres()Gets spheres defined by provided positions and distances.- Returns:
- spheres defined by provided positions and distances.
-
setSpheres
Sets spheres defining positions and Euclidean distances.- Parameters:
spheres
- spheres defining positions and distances.- Throws:
IllegalArgumentException
- if sphere is null or length of array of spheres is less than 4.LockedException
- if instance is busy solving the lateration problem.
-
setSpheresAndStandardDeviations
public void setSpheresAndStandardDeviations(com.irurueta.geometry.Sphere[] spheres, double[] radiusStandardDeviations) throws LockedException Sets spheres defining positions and Euclidean distances along with the standard deviations of provided spheres radii.- Parameters:
spheres
- spheres defining positions and distances.radiusStandardDeviations
- standard deviations of spheres radii.- Throws:
IllegalArgumentException
- if spheres is null, length of arrays is less than 4 or don't have the same length.LockedException
- if instance is busy solving the lateration problem.
-
create
public static RobustLateration3DSolver create(com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.- Parameters:
method
- robust estimator method.- Returns:
- a new robust 3D lateration solver.
-
create
public static RobustLateration3DSolver create(com.irurueta.geometry.Point3D[] positions, double[] distances, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.- Parameters:
positions
- known positions of static nodes.distances
- euclidean distances from static nodes to mobile node to be estimated.method
- robust estimator method.- Returns:
- a new robust 3D lateration solver.
- Throws:
IllegalArgumentException
- if either positions or distances are null, don't have the same length or their length is smaller than required (4 points).
-
create
public static RobustLateration3DSolver create(com.irurueta.geometry.Point3D[] positions, double[] distances, double[] distanceStandardDeviations, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.- Parameters:
positions
- known positions of static nodes.distances
- euclidean distances from static nodes to mobile node to be estimated.distanceStandardDeviations
- if either positions or distances are null, don't have the same length or their length is smaller than required (4 points).method
- robust estimator method.- Returns:
- a new robust 3D lateration solver.
- Throws:
IllegalArgumentException
- if either positions or distances are null, don't have the same length or their length is smaller than required (4 points).
-
create
public static RobustLateration3DSolver create(com.irurueta.geometry.Sphere[] spheres, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.- Parameters:
spheres
- spheres defining positions and distances.method
- robust estimator method.- Returns:
- a new robust 3D lateration solver.
- Throws:
IllegalArgumentException
- if spheres is null, length of spheres array is less than required (4 points) or don't have the same length.
-
create
public static RobustLateration3DSolver create(com.irurueta.geometry.Sphere[] spheres, double[] distanceStandardDeviations, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.- Parameters:
spheres
- spheres defining positions and distances.distanceStandardDeviations
- standard deviations of provided measured distances.method
- robust estimator method.- Returns:
- a new robust 3D lateration solver.
- Throws:
IllegalArgumentException
- if spheres is null, length of spheres array is less than required (4 points) or don't have the same length.
-
create
public static RobustLateration3DSolver create(double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.- Parameters:
qualityScores
- quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.method
- robust estimator method.- Returns:
- a new robust 3D lateration solver.
- Throws:
IllegalArgumentException
- if quality scores is null, length of quality scores is less than required minimum (4 samples).
-
create
public static RobustLateration3DSolver create(double[] qualityScores, com.irurueta.geometry.Point3D[] positions, double[] distances, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.- Parameters:
qualityScores
- quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.positions
- known positions of static nodes.distances
- euclidean distances from static nodes to mobile node to be estimated.method
- robust estimator method.- Returns:
- a new robust 3D lateration solver.
- Throws:
IllegalArgumentException
- if either positions, distances or quality scores are null, don't have the same length or their length is smaller than required (4 points).
-
create
public static RobustLateration3DSolver create(double[] qualityScores, com.irurueta.geometry.Point3D[] positions, double[] distances, double[] distanceStandardDeviations, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.- Parameters:
qualityScores
- quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.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.method
- robust estimator method.- Returns:
- a new robust 3D lateration solver.
- Throws:
IllegalArgumentException
- if either positions, distances, quality scores or standard deviations are null, don't have the same length or their length is smaller than required (4 points).
-
create
public static RobustLateration3DSolver create(double[] qualityScores, com.irurueta.geometry.Sphere[] spheres, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.- Parameters:
qualityScores
- quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.spheres
- spheres defining positions and distances.method
- robust estimator method.- Returns:
- a new robust 3D lateration solver.
- Throws:
IllegalArgumentException
- if either spheres or quality scores are null don't have the same length or their length is less than required (4 points).
-
create
public static RobustLateration3DSolver create(double[] qualityScores, com.irurueta.geometry.Sphere[] spheres, double[] distanceStandardDeviations, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust 3D lateration solver.- Parameters:
qualityScores
- quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.spheres
- spheres defining positions and distances.distanceStandardDeviations
- standard deviations of provided measured distances.method
- robust estimator method.- Returns:
- a new robust 3D lateration solver.
- Throws:
IllegalArgumentException
- if either spheres, quality scores or standard deviations are null, don't have the same length or their length is less than required (4 points).
-
create
Creates a robust 3D lateration solver using default robust method.- Returns:
- a new robust 3D lateration solver.
-
create
public static RobustLateration3DSolver create(com.irurueta.geometry.Point3D[] positions, double[] distances) Creates a robust 3D lateration solver using default robust method.- Parameters:
positions
- known positions of static nodes.distances
- euclidean distances from static nodes to mobile node to be estimated.- Returns:
- a new robust 3D lateration solver.
- Throws:
IllegalArgumentException
- if either positions or distances are null, don't have the same length or their length is smaller than required (4 points).
-
create
public static RobustLateration3DSolver create(com.irurueta.geometry.Point3D[] positions, double[] distances, double[] distanceStandardDeviations) Creates a robust 3D lateration solver using default robust method.- Parameters:
positions
- known positions of static nodes.distances
- euclidean distances from static nodes to mobile node to be estimated.distanceStandardDeviations
- if either positions or distances are null, don't have the same length or their length is smaller than required (4 points).- Returns:
- a new robust 3D lateration solver.
- Throws:
IllegalArgumentException
- if either positions or distances are null, don't have the same length or their length is smaller than required (4 points).
-
create
Creates a robust 3D lateration solver using default robust method.- Parameters:
spheres
- spheres defining positions and distances.- Returns:
- a new robust 3D lateration solver.
- Throws:
IllegalArgumentException
- if spheres is null, length of spheres array is less than required (4 points) or don't have the same length.
-
create
public static RobustLateration3DSolver create(com.irurueta.geometry.Sphere[] spheres, double[] distanceStandardDeviations) Creates a robust 3D lateration solver using default robust method.- Parameters:
spheres
- spheres defining positions and distances.distanceStandardDeviations
- standard deviations of provided measured distances.- Returns:
- a new robust 3D lateration solver.
- Throws:
IllegalArgumentException
- if spheres is null, length of spheres array is less than required (4 points) or don't have the same length.
-
create
Creates a robust 3D lateration solver using default robust method.- Parameters:
qualityScores
- quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.- Returns:
- a new robust 3D lateration solver.
- Throws:
IllegalArgumentException
- if quality scores is null, length of quality scores is less than required minimum (4 samples).
-
create
public static RobustLateration3DSolver create(double[] qualityScores, com.irurueta.geometry.Point3D[] positions, double[] distances) Creates a robust 3D lateration solver using default robust method.- Parameters:
qualityScores
- quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.positions
- known positions of static nodes.distances
- euclidean distances from static nodes to mobile node to be estimated.- Returns:
- a new robust 3D lateration solver.
- Throws:
IllegalArgumentException
- if either positions, distances or quality scores are null, don't have the same length or their length is smaller than required (4 points).
-
create
public static RobustLateration3DSolver create(double[] qualityScores, com.irurueta.geometry.Point3D[] positions, double[] distances, double[] distanceStandardDeviations) Creates a robust 3D lateration solver using default robust method.- Parameters:
qualityScores
- quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.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.- Returns:
- a new robust 3D lateration solver.
- Throws:
IllegalArgumentException
- if either positions, distances, quality scores or standard deviations are null, don't have the same length or their length is smaller than required (4 points).
-
create
public static RobustLateration3DSolver create(double[] qualityScores, com.irurueta.geometry.Sphere[] spheres) Creates a robust 3D lateration solver using default robust method.- Parameters:
qualityScores
- quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.spheres
- spheres defining positions and distances.- Returns:
- a new robust 3D lateration solver.
- Throws:
IllegalArgumentException
- if either spheres or quality scores are null, don't have the same length or their length is less than required (4 points).
-
create
public static RobustLateration3DSolver create(double[] qualityScores, com.irurueta.geometry.Sphere[] spheres, double[] distanceStandardDeviations) Creates a robust 3D lateration solver using default robust method.- Parameters:
qualityScores
- quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.spheres
- spheres defining positions and distances.distanceStandardDeviations
- standard deviations of provided measured distances.- Returns:
- a new robust 3D lateration solver.
- Throws:
IllegalArgumentException
- if either spheres, quality scores or standard deviations are null, don't have the same length or their length is less than required (4 points).
-
attemptRefine
protected com.irurueta.geometry.Point3D attemptRefine(com.irurueta.geometry.Point3D position) Attempts to refine estimated position if refinement is requested. This method returns a refined solution or provided input if refinement is not requested or has failed. If refinement is enabled, and it is requested to keep covariance, this method will also keep covariance of refined position.- Parameters:
position
- position estimated by a robust estimator without refinement.- Returns:
- solution after refinement (if requested) or provided non-refined estimated position if not requested or refinement failed.
-
solvePreliminarySolutions
protected void solvePreliminarySolutions(int[] samplesIndices, List<com.irurueta.geometry.Point3D> solutions) Solves a preliminary solution for a subset of samples picked by a robust estimator.- Parameters:
samplesIndices
- indices of samples picked by the robust estimator.solutions
- list where estimated preliminary solution will be stored.
-
internalSetSpheres
private void internalSetSpheres(com.irurueta.geometry.Sphere[] spheres) Internally sets spheres defining positions and Euclidean distances.- Parameters:
spheres
- spheres defining positions and distances.- Throws:
IllegalArgumentException
- if spheres is null or length of array of spheres is less thangetMinRequiredPositionsAndDistances()
-
internalSetSpheresAndStandardDeviations
private void internalSetSpheresAndStandardDeviations(com.irurueta.geometry.Sphere[] spheres, double[] radiusStandardDeviations) Internally sets spheres defining positions and Euclidean distances along with the standard deviations of provided spheres radii.- Parameters:
spheres
- spheres defining positions and distances.radiusStandardDeviations
- standard deviations of spheres radii.- Throws:
IllegalArgumentException
- if spheres is null, length of arrays is less than 4 or don't have the same length.
-
init
private void init()Setup inner positions and distances.
-