Package Localiser.algorithms.locErrors
Class SimpleError
java.lang.Object
Localiser.algorithms.locErrors.SimpleError
- All Implemented Interfaces:
LocaliserError
Simple error class. Stores a perpendicular, parallel and depth error and an angle for the perpindicular error.
The perpendicular error is perpendicular to a track line if one exists. Otherwise it points in the y axis direction. Parallel error is parallel to a track line or if no track line exists it is in the x direction. The direction of the depth error remains the same no matter the track line.
The perpendicular error is perpendicular to a track line if one exists. Otherwise it points in the y axis direction. Parallel error is parallel to a track line or if no track line exists it is in the x direction. The direction of the depth error remains the same no matter the track line.
- Author:
- Jamie Macaulay
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSimpleError
(Double[] xyzError) /** Create a simple error.SimpleError
(Double[] xyzError, Double angle) Create a simple error.SimpleError
(Double x, Double y, Double z, Double angle) Create a simple error. -
Method Summary
Modifier and TypeMethodDescriptionformatErrorValue
(Double err) double
Get a simple error.Get the real world error direction.Functions fro drawing the localisation errordouble
A description of the loclaisation error.void
setPerpAngle
(double errorAngle) void
setPerpVector
(PamVector errorVector) toString()
-
Constructor Details
-
SimpleError
/** Create a simple error.- Parameters:
xyzError
- - an array of the x/perpindicular y/parallel and z error in meters {x y z}
-
SimpleError
Create a simple error.- Parameters:
xyzError
- - an array of the x/perpindicular y/parallel and z error in meters {x y z}angle
- the angle of the perpindicular error in RADIANS.
-
SimpleError
Create a simple error.- Parameters:
x
- - the x/perpendicualar error in metersy
- - the y/parallel error in metersz
- - the z error in metersangle
- - the angle of the perpendicular error in RADIANS
-
-
Method Details
-
getError
Get a simple error. This is slightly more difficult for simple errors as there is a lack of reference info. An elliptical fit cannot be used bacause a perpindicular and parallel error cannot describe an error ellipse of unknown orientation. Therefore only three inputs are possible here LocaliserError.xdirVec, LocaliserError.ydirVec and LocaliserError.zdirVec. Otherwise NaN will be returned.- Specified by:
getError
in interfaceLocaliserError
- Parameters:
errorDirection
- - the direction of the error.- 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.
-
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.
-
getStringResult
Description copied from interface:LocaliserError
A description of the loclaisation error.- Specified by:
getStringResult
in interfaceLocaliserError
- Returns:
- locisation error.
-
formatErrorValue
-
toString
-
getPerpError
-
getParallelError
-
setPerpVector
-
setPerpAngle
public void setPerpAngle(double errorAngle) -
getPerpAngle
-
getDepthError
-
getErrorMagnitude
public double getErrorMagnitude()- Specified by:
getErrorMagnitude
in interfaceLocaliserError
- Returns:
- the total of the magnitude of the error in all directions.
-