Class EllipticalError

java.lang.Object
Localiser.algorithms.locErrors.EllipticalError
All Implemented Interfaces:
LocaliserError
Direct Known Subclasses:
LikilihoodError, MCMCEllipticalError

public class EllipticalError extends Object implements LocaliserError
A 3D elliptical error. Elliptical error is made up of 3 radii and a quaternion/euler angles representing the heading pitch and roll of the ellipse. This a good approximation of error for most situations, however will not be a good approximation for non symmetric or cmore complex errors.
Author:
Jamie Macaulay
  • Constructor Details

    • EllipticalError

      public EllipticalError(double[][] points)
      Generate an error ellipse from a set of points. The dimensions of the error ellipse is by default the 95% confidence interval of the points. The location of the ellipse is the mean of the points.
      Parameters:
      points - a scatter of points. Can be 2D or 3 set of points.
    • EllipticalError

      public EllipticalError(double[] angles, double[] errors)
  • Method Details

    • getError

      public double getError(PamVector errorDirection)
      Description copied from interface: LocaliserError
      Return the error in a particular direction. The direction is based on the 3D Cartesian co-ordinate grid the localisation took place in.
      Specified by:
      getError in interface LocaliserError
      Parameters:
      errorDirection - - the direction of the error to find
      Returns:
      the value of the error in the direction specified.
    • getJsonErrorString

      public String getJsonErrorString()
      Specified by:
      getJsonErrorString in interface LocaliserError
      Returns:
      Error in a JSON format for writing to database.
    • getErrorDraw

      public LocErrorGraphics getErrorDraw()
      Description copied from interface: LocaliserError
      Functions fro drawing the localisation error
      Specified by:
      getErrorDraw in interface LocaliserError
      Returns:
      a class containing fucntion to draw localisation error with.
    • setErrorEllipse

      public void setErrorEllipse(ErrorEllipse errorEllipse)
    • getErrorEllipse

      public ErrorEllipse getErrorEllipse()
    • getErrorEllipse2D

      public double[] getErrorEllipse2D(int planeXy)
      Get the 2D elliptical error.
      Parameters:
      planeXy - - the plane on which to find the ellipse for.
      Returns:
      the elliptical error.
    • getErrorDirection

      public PamVector getErrorDirection()
      Description copied from interface: LocaliserError
      Get the real world error direction. e.g. if the error is relative to north this will be [0,1,0] as per the PAMGuard co-ordinate system. If the error is relative to a boat heading then the vector will describe the direction of the boat. Used primarily to geo reference errors.
      Specified by:
      getErrorDirection in interface LocaliserError
      Returns:
      the real world error direction.
    • getEllipseDim

      public double[] getEllipseDim()
      Returns:
    • getAngles

      public double[] getAngles()
      Returns:
    • getStringResult

      public String getStringResult()
      Description copied from interface: LocaliserError
      A description of the loclaisation error.
      Specified by:
      getStringResult in interface LocaliserError
      Returns:
      locisation error.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getErrorMagnitude

      public double getErrorMagnitude()
      Specified by:
      getErrorMagnitude in interface LocaliserError
      Returns:
      the total of the magnitude of the error in all directions.