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
ConstructorsModifierConstructorDescriptionprotectedCreate an empty elliptical error.EllipticalError(double[][] points) Generate an error ellipse from a set of points.EllipticalError(double[] angles, double[] errors)  - 
Method Summary
Modifier and TypeMethodDescriptiondouble[]double[]doubleReturn 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.doubleA description of the loclaisation error.voidsetErrorEllipse(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
protected EllipticalError()Create an empty elliptical error. The error ellipse needs to be set explicitly. - 
EllipticalError
public EllipticalError(double[] angles, double[] errors)  
 - 
 - 
Method Details
- 
getError
Description copied from interface:LocaliserErrorReturn the error in a particular direction. The direction is based on the 3D Cartesian co-ordinate grid the localisation took place in.- Specified by:
 getErrorin interfaceLocaliserError- Parameters:
 errorDirection- - the direction of the error to find- Returns:
 - the value of the error in the direction specified.
 
 - 
getJsonErrorString
- Specified by:
 getJsonErrorStringin interfaceLocaliserError- Returns:
 - Error in a JSON format for writing to database.
 
 - 
getErrorDraw
Description copied from interface:LocaliserErrorFunctions fro drawing the localisation error- Specified by:
 getErrorDrawin 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:LocaliserErrorGet 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:
 getErrorDirectionin interfaceLocaliserError- Returns:
 - the real world error direction.
 
 - 
getEllipseDim
public double[] getEllipseDim()- Returns:
 
 - 
getAngles
public double[] getAngles()- Returns:
 
 - 
getStringResult
Description copied from interface:LocaliserErrorA description of the loclaisation error.- Specified by:
 getStringResultin interfaceLocaliserError- Returns:
 - locisation error.
 
 - 
toString
 - 
getErrorMagnitude
public double getErrorMagnitude()- Specified by:
 getErrorMagnitudein interfaceLocaliserError- Returns:
 - the total of the magnitude of the error in all directions.
 
 
 -