Class GroupLocalisation
- Direct Known Subclasses:
CTLocalisation
,HyperbolicGroupLocalisation
- Author:
- Jamie Macaulay
-
Constructor Summary
ConstructorDescriptionGroupLocalisation
(PamDataUnit pamDataUnit, GroupLocResult targetMotionResult) -
Method Summary
Modifier and TypeMethodDescriptionint
addGroupLocaResult
(GroupLocResult groupLocResult) Add a target motion result and return the number of results now in the localisationboolean
void
Clear previous localisation results.int
Get the number of localisation results present.double[]
getErrorDirection
(int iSide) Get an angle that the errors are to be plotted relative to.getGroupLocaResult
(int iSide) Get all group localisation results.double
getHeight
(int iSide) Get height of the detection in meters.double
getHeightError
(int iSide) The error in the height.getLatLong
(int iSide) Return the latlong for a location.getLocError
(int iSide) Get the loclaisation error.double
getParallelError
(int iSide) Get the error parallel to the track line (in meters).double
getPerpendiculaError
(int iSide) Get the error perpendicular to the track line (in meters).double
getRange
(int iSide) Get the range for a specific side (where ambiguity exists)double
getRangeError
(int iSide) The error on the range.void
setTargetMotionResult
(GroupLocResult targetMotionResult) Set a target motion result.void
Sort the localisation results in oder based on AIC and Chi2.toString()
Methods inherited from class PamDetection.AbstractLocalisation
addLocContents, getAngleErrors, getArrayOrientationVectors, getBearing, getBearing, getBearingError, getBearingReference, getDepth, getLocContents, getNumLatLong, getParentDetection, getPlanarAngles, getPlanarVector, getRealWorldVectors, getReferenceHydrophones, getSubArrayType, getTimeDelayChIndex, getTimeDelayErrors, getTimeDelays, getWorldVectors, hasLocContent, removeLocContents, setArrayAxis, setLocContents, setParentDetection, setReferenceHydrophones, setSubArrayType
-
Constructor Details
-
GroupLocalisation
-
-
Method Details
-
setTargetMotionResult
Set a target motion result.- Parameters:
targetMotionResult
- - the target motion result
-
getLatLong
Description copied from class:AbstractLocalisation
Return the latlong for a location. There may be more than one of them if there is side to side ambiguity.- Overrides:
getLatLong
in classAbstractLocalisation
- Parameters:
iSide
- 0, 1, 2, etc.- Returns:
- LatLong information
-
getPerpendiculaError
public double getPerpendiculaError(int iSide) Description copied from class:AbstractLocalisation
Get the error perpendicular to the track line (in meters). Perpendicular error can be two things. It can be the error perpendicular to a track line or it can be the y error from a static system- Overrides:
getPerpendiculaError
in classAbstractLocalisation
- Parameters:
iSide
- 0, 1, 2, etc.- Returns:
- the error in metres.
-
addGroupLocaResult
Add a target motion result and return the number of results now in the localisation- Parameters:
groupLocResult
- New tm result- Returns:
- number of results in localisaion.
-
getGroupLocaResult
- Returns:
- the targetMotionResult
-
getGroupLocResults
Get all group localisation results.- Returns:
- the targetMotionResult
-
getOriginLatLong
- Overrides:
getOriginLatLong
in classAbstractLocalisation
- Returns:
- the latlong of the centre of the hydrophones associated with the channels used in this detection. If no channels are set, then it returns the GPS location for the time of the detection.
-
toString
- Overrides:
toString
in classAbstractLocalisation
-
getRange
public double getRange(int iSide) Description copied from class:AbstractLocalisation
Get the range for a specific side (where ambiguity exists)- Overrides:
getRange
in classAbstractLocalisation
- Returns:
- range
-
getAngles
public double[] getAngles()- Overrides:
getAngles
in classAbstractLocalisation
- Returns:
- Angles to detection in radians. The number of angles will be 0, 1 or 2.
***************** CHANGES FROM AUGUST 2017 *******************
Now oriented the 'globe' differently, so that the first angle can be between -Pi and +Pi or between 0 and 2Pi. The second angle is the elevation angle which is either up (+ve angles) or down (-ve angles) having a range of -Pi/2 to +Pi/2. This change will only affect data from volumetric arrays when the animal is at significant depth. Changes are being made to data from click and whistle detectors which used the older system to maintain compatibility.For a point array, null should be returned.
For a line array a single angle is returned which is the angle relative to the first orientation vector with 0 being in line with the orientation vector (can be thought of as colatitude).
For a planar or volumetric array, two angles should be returned, the first being the colongitude, the second being the latitude. Imagine a globe, with North vertical and 0 longitude pointing along the main axis of the array geometry.
-
bearingAmbiguity
public boolean bearingAmbiguity()- Overrides:
bearingAmbiguity
in classAbstractLocalisation
- Returns:
- true if the bearing is subject to a left right (or rotational) ambiguity about the reference bearing.
-
getRangeError
public double getRangeError(int iSide) Description copied from class:AbstractLocalisation
The error on the range. The range is A direct line from the origin to the localisation. It includes depth.- Overrides:
getRangeError
in classAbstractLocalisation
- Returns:
- The error on the range estimation in meters.
-
getParallelError
public double getParallelError(int iSide) Description copied from class:AbstractLocalisation
Get the error parallel to the track line (in meters). Parallel error can be two things. It can be the error parallel to a track line or it can be the x error from a static system- Overrides:
getParallelError
in classAbstractLocalisation
- Parameters:
iSide
- 0, 1, 2, etc.- Returns:
- the error in metres.
-
getErrorDirection
Description copied from class:AbstractLocalisation
Get an angle that the errors are to be plotted relative to. This is the real world angle. So if plotted relative to the direction of a ship the angle will be the direction of the ship. If plotted in y= north and x=east Cartesian then the error direction will be 0- Overrides:
getErrorDirection
in classAbstractLocalisation
- Returns:
- Error direction (radians)
-
getHeight
public double getHeight(int iSide) Description copied from class:AbstractLocalisation
Get height of the detection in meters. Depth is -height.- Overrides:
getHeight
in classAbstractLocalisation
- Returns:
- The height of the detection in meters.
-
getHeightError
public double getHeightError(int iSide) Description copied from class:AbstractLocalisation
The error in the height. (height is -depth).- Overrides:
getHeightError
in classAbstractLocalisation
- Returns:
- The error on the depth estimation in meters.
-
getLocError
Description copied from class:AbstractLocalisation
Get the loclaisation error. The error class allows users to specify an error in any direction. The error is plotted relative to- Overrides:
getLocError
in classAbstractLocalisation
- Parameters:
iSide
- - the ambiguity index.- Returns:
-
getAmbiguityCount
public int getAmbiguityCount()Description copied from class:AbstractLocalisation
Get the number of localisation results present.
Note: There are two types of ambiguity, ambiguity in 'raw' localisation data e.g. 3D bearings from a planar array and ambiguity in localisation result e.g. multiple possible animal locations. This function return the number of localisation results e.g. usually 2 for a towed stereo or planar array.- Overrides:
getAmbiguityCount
in classAbstractLocalisation
- Returns:
- the number of localisation results available.
-
clearLocResults
public void clearLocResults()Clear previous localisation results. -
sortLocResults
public void sortLocResults()Sort the localisation results in oder based on AIC and Chi2.
-