Class InhomogeneousLinearLeastSquaresLateration3DSolver
java.lang.Object
com.irurueta.navigation.lateration.LaterationSolver<P>
com.irurueta.navigation.lateration.InhomogeneousLinearLeastSquaresLaterationSolver<com.irurueta.geometry.Point3D>
com.irurueta.navigation.lateration.InhomogeneousLinearLeastSquaresLateration3DSolver
public class InhomogeneousLinearLeastSquaresLateration3DSolver
extends InhomogeneousLinearLeastSquaresLaterationSolver<com.irurueta.geometry.Point3D>
Linearly solves the lateration problem.
-
Field Summary
Fields inherited from class com.irurueta.navigation.lateration.LaterationSolver
distances, EPSILON, estimatedPositionCoordinates, listener, locked, positions
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.InhomogeneousLinearLeastSquaresLateration3DSolver
(com.irurueta.geometry.Point3D[] positions, double[] distances) Constructor.InhomogeneousLinearLeastSquaresLateration3DSolver
(com.irurueta.geometry.Point3D[] positions, double[] distances, LaterationSolverListener<com.irurueta.geometry.Point3D> listener) Constructor.InhomogeneousLinearLeastSquaresLateration3DSolver
(com.irurueta.geometry.Sphere[] spheres) Constructor.InhomogeneousLinearLeastSquaresLateration3DSolver
(com.irurueta.geometry.Sphere[] spheres, LaterationSolverListener<com.irurueta.geometry.Point3D> listener) Constructor.InhomogeneousLinearLeastSquaresLateration3DSolver
(LaterationSolverListener<com.irurueta.geometry.Point3D> listener) Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncom.irurueta.geometry.Point3D
Gets estimated position.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
internalSetSpheres
(com.irurueta.geometry.Sphere[] spheres) Internally sets spheres defining positions and Euclidean distances.void
setSpheres
(com.irurueta.geometry.Sphere[] spheres) Sets spheres defining positions and Euclidean distances.Methods inherited from class com.irurueta.navigation.lateration.InhomogeneousLinearLeastSquaresLaterationSolver
getType, solve
Methods inherited from class com.irurueta.navigation.lateration.LaterationSolver
getDistances, getEstimatedPosition, getEstimatedPositionCoordinates, getListener, getPositions, internalSetPositionsAndDistances, isLocked, isReady, setListener, setPositionsAndDistances
-
Constructor Details
-
InhomogeneousLinearLeastSquaresLateration3DSolver
public InhomogeneousLinearLeastSquaresLateration3DSolver()Constructor. -
InhomogeneousLinearLeastSquaresLateration3DSolver
public InhomogeneousLinearLeastSquaresLateration3DSolver(com.irurueta.geometry.Point3D[] positions, double[] distances) Constructor.- Parameters:
positions
- known positions of static nodes.distances
- euclidean distances from static nodes to mobile node.- Throws:
IllegalArgumentException
- if either positions or distances are null, don't have the same length or their length is smaller than required (4 points).
-
InhomogeneousLinearLeastSquaresLateration3DSolver
public InhomogeneousLinearLeastSquaresLateration3DSolver(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 4.
-
-
Method Details
-
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 spheres is null or length of array of spheres is less than 2.LockedException
- if instance is busy solving the lateration problem.
-
getNumberOfDimensions
public int getNumberOfDimensions()Gets number of dimensions of provided points.- Specified by:
getNumberOfDimensions
in classLaterationSolver<com.irurueta.geometry.Point3D>
- Returns:
- always returns 2 dimensions.
-
getMinRequiredPositionsAndDistances
public int getMinRequiredPositionsAndDistances()Minimum required number of positions and distances. At least 4 positions and distances will be required to linearly solve a 3D problem.- Specified by:
getMinRequiredPositionsAndDistances
in classLaterationSolver<com.irurueta.geometry.Point3D>
- Returns:
- minimum required number of positions and distances.
-
getEstimatedPosition
public com.irurueta.geometry.Point3D getEstimatedPosition()Gets estimated position.- Specified by:
getEstimatedPosition
in classLaterationSolver<com.irurueta.geometry.Point3D>
- Returns:
- estimated position.
-
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 than 4.
-