Class NonLinearLeastSquaresLateration3DSolver

java.lang.Object
com.irurueta.navigation.lateration.LaterationSolver<P>
com.irurueta.navigation.lateration.NonLinearLeastSquaresLaterationSolver<com.irurueta.geometry.Point3D>
com.irurueta.navigation.lateration.NonLinearLeastSquaresLateration3DSolver

public class NonLinearLeastSquaresLateration3DSolver extends NonLinearLeastSquaresLaterationSolver<com.irurueta.geometry.Point3D>
Solves a Trilateration problem with an instance of the least squares optimizer.
  • Constructor Details

    • NonLinearLeastSquaresLateration3DSolver

      public NonLinearLeastSquaresLateration3DSolver()
      Constructor.
    • NonLinearLeastSquaresLateration3DSolver

      public NonLinearLeastSquaresLateration3DSolver(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 (3 for 2D points or 4 for 3D points) or fitter is null.
    • NonLinearLeastSquaresLateration3DSolver

      public NonLinearLeastSquaresLateration3DSolver(com.irurueta.geometry.Point3D initialPosition)
      Constructor.
      Parameters:
      initialPosition - initial position to start lateration solving.
    • NonLinearLeastSquaresLateration3DSolver

      public NonLinearLeastSquaresLateration3DSolver(com.irurueta.geometry.Point3D[] positions, double[] distances, com.irurueta.geometry.Point3D initialPosition)
      Constructor.
      Parameters:
      positions - known positions of static nodes.
      distances - euclidean distances from static nodes to mobile node.
      initialPosition - initial position to start lateration solving.
      Throws:
      IllegalArgumentException - if either positions or distances are null, don't have the same length or their length is smaller than required (3 for 2D points or 4 for 3D points) or fitter is null.
    • NonLinearLeastSquaresLateration3DSolver

      public NonLinearLeastSquaresLateration3DSolver(LaterationSolverListener<com.irurueta.geometry.Point3D> listener)
      Constructor.
      Parameters:
      listener - listener to be notified of events raised by this instance.
    • NonLinearLeastSquaresLateration3DSolver

      public NonLinearLeastSquaresLateration3DSolver(com.irurueta.geometry.Point3D[] positions, double[] distances, LaterationSolverListener<com.irurueta.geometry.Point3D> listener)
      Constructor.
      Parameters:
      positions - known positions of static nodes.
      distances - euclidean distances from static nodes to mobile node.
      listener - listener to be notified of events raised by this instance.
      Throws:
      IllegalArgumentException - if either positions or distances are null, don't have the same length or their length is smaller than required (3 for 2D points or 4 for 3D points) or fitter is null.
    • NonLinearLeastSquaresLateration3DSolver

      public NonLinearLeastSquaresLateration3DSolver(com.irurueta.geometry.Point3D initialPosition, LaterationSolverListener<com.irurueta.geometry.Point3D> listener)
      Constructor.
      Parameters:
      initialPosition - initial position to start lateration solving.
      listener - listener to be notified of events raised by this instance.
    • NonLinearLeastSquaresLateration3DSolver

      public NonLinearLeastSquaresLateration3DSolver(com.irurueta.geometry.Point3D[] positions, double[] distances, com.irurueta.geometry.Point3D initialPosition, LaterationSolverListener<com.irurueta.geometry.Point3D> listener)
      Constructor.
      Parameters:
      positions - known positions of static nodes.
      distances - euclidean distances from static nodes to mobile node.
      initialPosition - initial position to start lateration solving.
      listener - listener to be notified of events raised by this instance.
      Throws:
      IllegalArgumentException - if either positions or distances are null, don't have the same length or their length is smaller than required (3 for 2D points or 4 for 3D points) or fitter is null.
    • NonLinearLeastSquaresLateration3DSolver

      public NonLinearLeastSquaresLateration3DSolver(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 2.
    • NonLinearLeastSquaresLateration3DSolver

      public NonLinearLeastSquaresLateration3DSolver(com.irurueta.geometry.Sphere[] spheres, com.irurueta.geometry.Point3D initialPosition)
      Constructor.
      Parameters:
      spheres - spheres defining positions and distances.
      initialPosition - initial position to start lateration solving.
      Throws:
      IllegalArgumentException - if spheres is null or if length of spheres array is less than 2.
    • NonLinearLeastSquaresLateration3DSolver

      public NonLinearLeastSquaresLateration3DSolver(com.irurueta.geometry.Sphere[] spheres, LaterationSolverListener<com.irurueta.geometry.Point3D> listener)
      Constructor.
      Parameters:
      spheres - spheres defining positions and distances.
      listener - listener to be notified of events raised by this instance.
      Throws:
      IllegalArgumentException - if spheres is null or if length of spheres array is less than 2.
    • NonLinearLeastSquaresLateration3DSolver

      public NonLinearLeastSquaresLateration3DSolver(com.irurueta.geometry.Sphere[] spheres, com.irurueta.geometry.Point3D initialPosition, LaterationSolverListener<com.irurueta.geometry.Point3D> listener)
      Constructor.
      Parameters:
      spheres - spheres defining positions and distances.
      initialPosition - initial position to start lateration solving.
      listener - listener to be notified of events raised by this instance.
      Throws:
      IllegalArgumentException - if spheres is null or if length of spheres array is less than 2.
    • NonLinearLeastSquaresLateration3DSolver

      public NonLinearLeastSquaresLateration3DSolver(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.
      distanceStandardDeviations - standard deviations of provided measured distances.
      Throws:
      IllegalArgumentException - if either positions, distances or standard deviations are null, don't have the same length of their length is smaller than required (2 points).
    • NonLinearLeastSquaresLateration3DSolver

      public NonLinearLeastSquaresLateration3DSolver(com.irurueta.geometry.Point3D[] positions, double[] distances, double[] distanceStandardDeviations, com.irurueta.geometry.Point3D initialPosition)
      Constructor.
      Parameters:
      positions - known positions of static nodes.
      distances - euclidean distances from static nodes to mobile node.
      distanceStandardDeviations - standard deviations of provided measured distances.
      initialPosition - initial position to start lateration solving.
      Throws:
      IllegalArgumentException - if either positions, distances or standard deviations are null, don't have the same length of their length is smaller than required (2 points).
    • NonLinearLeastSquaresLateration3DSolver

      public NonLinearLeastSquaresLateration3DSolver(com.irurueta.geometry.Point3D[] positions, double[] distances, double[] distanceStandardDeviations, LaterationSolverListener<com.irurueta.geometry.Point3D> listener)
      Constructor.
      Parameters:
      positions - known positions of static nodes.
      distances - euclidean distances from static nodes to mobile node.
      distanceStandardDeviations - standard deviations of provided measured distances.
      listener - listener to be notified of events raised by this instance.
      Throws:
      IllegalArgumentException - if either positions, distances or standard deviations are null, don't have the same length of their length is smaller than required (2 points).
    • NonLinearLeastSquaresLateration3DSolver

      public NonLinearLeastSquaresLateration3DSolver(com.irurueta.geometry.Point3D[] positions, double[] distances, double[] distanceStandardDeviations, com.irurueta.geometry.Point3D initialPosition, LaterationSolverListener<com.irurueta.geometry.Point3D> listener)
      Constructor.
      Parameters:
      positions - known positions of static nodes.
      distances - euclidean distances from static nodes to mobile node.
      distanceStandardDeviations - standard deviations of provided measured distances.
      initialPosition - initial position to start lateration solving.
      listener - listener to be notified of events raised by this instance.
      Throws:
      IllegalArgumentException - if either positions, distances or standard deviations are null, don't have the same length of their length is smaller than required (2 points).
    • NonLinearLeastSquaresLateration3DSolver

      public NonLinearLeastSquaresLateration3DSolver(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 or if length of spheres array is less than 2.
    • NonLinearLeastSquaresLateration3DSolver

      public NonLinearLeastSquaresLateration3DSolver(com.irurueta.geometry.Sphere[] spheres, double[] distanceStandardDeviations, com.irurueta.geometry.Point3D initialPosition)
      Constructor.
      Parameters:
      spheres - spheres defining positions and distances.
      distanceStandardDeviations - standard deviations of provided measured distances.
      initialPosition - initial position to start lateration solving.
      Throws:
      IllegalArgumentException - if spheres is null or if length of spheres array is less than 2.
    • NonLinearLeastSquaresLateration3DSolver

      public NonLinearLeastSquaresLateration3DSolver(com.irurueta.geometry.Sphere[] spheres, double[] distanceStandardDeviations, LaterationSolverListener<com.irurueta.geometry.Point3D> listener)
      Constructor.
      Parameters:
      spheres - spheres defining positions and distances.
      distanceStandardDeviations - standard deviations of provided measured distances.
      listener - listener to be notified of events raised by this instance.
      Throws:
      IllegalArgumentException - if spheres is null or if length of spheres array is less than 2.
    • NonLinearLeastSquaresLateration3DSolver

      public NonLinearLeastSquaresLateration3DSolver(com.irurueta.geometry.Sphere[] spheres, double[] distanceStandardDeviations, com.irurueta.geometry.Point3D initialPosition, LaterationSolverListener<com.irurueta.geometry.Point3D> listener)
      Constructor.
      Parameters:
      spheres - spheres defining positions and distances.
      distanceStandardDeviations - standard deviations of provided measured distances.
      initialPosition - initial position to start lateration solving.
      listener - listener to be notified of events raised by this instance.
      Throws:
      IllegalArgumentException - if spheres is null or if length of spheres array is less than 2.
  • 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

      public void setSpheres(com.irurueta.geometry.Sphere[] spheres) throws LockedException
      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.
    • 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 circles radii.
      Throws:
      IllegalArgumentException - if spheres is null, length of arrays is less than 2 or don't have the same length.
      LockedException - if instance is busy solving the lateration problem.
    • getNumberOfDimensions

      public int getNumberOfDimensions()
      Gets number of dimensions of provided points.
      Specified by:
      getNumberOfDimensions in class LaterationSolver<com.irurueta.geometry.Point3D>
      Returns:
      always returns 3 dimensions.
    • getMinRequiredPositionsAndDistances

      public int getMinRequiredPositionsAndDistances()
      Minimum required number of positions and distances. At least 4 positions and distances will be required to solve a 3D problem.
      Specified by:
      getMinRequiredPositionsAndDistances in class LaterationSolver<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 class LaterationSolver<com.irurueta.geometry.Point3D>
      Returns:
      estimated position.
    • internalSetSpheres

      public 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 2.
    • 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 circles radii.
      Throws:
      IllegalArgumentException - if spheres is null, length of arrays is less than 2 or don't have the same length.