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
ConstructorsConstructorDescriptionSimpleError(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) doubleGet a simple error.Get the real world error direction.Functions fro drawing the localisation errordoubleA description of the loclaisation error.voidsetPerpAngle(double errorAngle) voidsetPerpVector(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:
 getErrorin interfaceLocaliserError- Parameters:
 errorDirection- - the direction of the error.- 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.
 
 - 
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.
 
 - 
getStringResult
Description copied from interface:LocaliserErrorA description of the loclaisation error.- Specified by:
 getStringResultin interfaceLocaliserError- Returns:
 - locisation error.
 
 - 
formatErrorValue
 - 
toString
 - 
getPerpError
 - 
getParallelError
 - 
setPerpVector
 - 
setPerpAngle
public void setPerpAngle(double errorAngle)  - 
getPerpAngle
 - 
getDepthError
 - 
getErrorMagnitude
public double getErrorMagnitude()- Specified by:
 getErrorMagnitudein interfaceLocaliserError- Returns:
 - the total of the magnitude of the error in all directions.
 
 
 -