Package Localiser.algorithms.locErrors
Class EllipticalError
java.lang.Object
Localiser.algorithms.locErrors.EllipticalError
- All Implemented Interfaces:
LocaliserError
- Direct Known Subclasses:
LikilihoodError
,MCMCEllipticalError
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
-
Field Summary
-
Constructor Summary
ConstructorDescriptionEllipticalError
(double[][] points) Generate an error ellipse from a set of points.EllipticalError
(double[] angles, double[] errors) -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
double[]
double
Return the error in a particular direction.Get the real world error direction.Functions fro drawing the localisation errordouble[]
getErrorEllipse2D
(int planeXy) Get the 2D elliptical error.double
A description of the loclaisation error.void
setErrorEllipse
(ErrorEllipse errorEllipse) toString()
-
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
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 interfaceLocaliserError
- Parameters:
errorDirection
- - the direction of the error to find- Returns:
- the value of the error in the direction specified.
-
getJsonErrorString
- Specified by:
getJsonErrorString
in interfaceLocaliserError
- Returns:
- Error in a JSON format for writing to database.
-
getErrorDraw
Description copied from interface:LocaliserError
Functions fro drawing the localisation error- Specified by:
getErrorDraw
in interfaceLocaliserError
- Returns:
- a class containing fucntion to draw localisation error with.
-
setErrorEllipse
-
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
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 interfaceLocaliserError
- Returns:
- the real world error direction.
-
getEllipseDim
public double[] getEllipseDim()- Returns:
-
getAngles
public double[] getAngles()- Returns:
-
getStringResult
Description copied from interface:LocaliserError
A description of the loclaisation error.- Specified by:
getStringResult
in interfaceLocaliserError
- Returns:
- locisation error.
-
toString
-
getErrorMagnitude
public double getErrorMagnitude()- Specified by:
getErrorMagnitude
in interfaceLocaliserError
- Returns:
- the total of the magnitude of the error in all directions.
-