Class WhistleBearingInfo
- Direct Known Subclasses:
ClipLocalisation
-
Constructor Summary
ConstructorDescriptionWhistleBearingInfo
(PamDataUnit pamDataUnit, BearingLocaliser bearingLocaliser, int hydrophones, double[][] anglesAndErrors) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addLocContents
(int flagsToAdd) boolean
double[]
double
Get the reference bearing in radians.double
getRange
(int side) Get the range for a specific side (where ambiguity exists)double[]
Time delays in seconds.void
setLocContents
(LocalisationInfo locContents) Methods inherited from class PamDetection.AbstractLocalisation
getAmbiguityCount, getAngleErrors, getArrayOrientationVectors, getBearing, getBearing, getBearingError, getDepth, getErrorDirection, getHeight, getHeightError, getLatLong, getLocContents, getLocError, getNumLatLong, getOriginLatLong, getParallelError, getParentDetection, getPerpendiculaError, getPlanarAngles, getPlanarVector, getRangeError, getRealWorldVectors, getReferenceHydrophones, getSubArrayType, getTimeDelayChIndex, getTimeDelayErrors, getWorldVectors, hasLocContent, removeLocContents, setArrayAxis, setParentDetection, setReferenceHydrophones, setSubArrayType, toString
-
Constructor Details
-
WhistleBearingInfo
public WhistleBearingInfo(PamDataUnit pamDataUnit, BearingLocaliser bearingLocaliser, int hydrophones, double[][] anglesAndErrors)
-
-
Method Details
-
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.
-
getBearingReference
public double getBearingReference()Description copied from class:AbstractLocalisation
Get the reference bearing in radians. This is relative to North, moving in a clockwise direction as would other bearings.
now that the general code for localisation using vectors has been sorted out so that the getWorldVectors now returns vectors which are correct in the general xyz frame of the array geometry, all that is actually needed here now is the array heading at the time of the event, while in previous versions, this required the actual bearing between two hydrophones (which was the same as the array heading for linear arrays which is why it all worked).- Overrides:
getBearingReference
in classAbstractLocalisation
- Returns:
- Reference bearing in radians.
-
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.
-
getRange
public double getRange(int side) Description copied from class:AbstractLocalisation
Get the range for a specific side (where ambiguity exists)- Overrides:
getRange
in classAbstractLocalisation
- Returns:
- range
-
getTimeDelays
public double[] getTimeDelays()Description copied from class:AbstractLocalisation
Time delays in seconds.
These are calculated between every hydrophone pair in a group. To get the pairs use IndexM1() and IndexM2() functions. For example for four hydrophones in an array;
IndexM1=0 0 0 1 1 2
IndexM2=1 2 3 2 3 3
So the first time delay will be between hydrophones 0 and 1, the second time delay between hydrophones 0 and 2 and so on. Time delay convention. The time delay is positive if it hits the indexM1 hydrophone BEFORE hitting the indexM2 hydrophone.- Overrides:
getTimeDelays
in classAbstractLocalisation
- Returns:
- array of time delays in seconds.
-
setLocContents
- Overrides:
setLocContents
in classAbstractLocalisation
- Parameters:
locContents
- a set of flags specifying which data are available within this localisation object.
-
addLocContents
public void addLocContents(int flagsToAdd) - Overrides:
addLocContents
in classAbstractLocalisation
- Parameters:
flagsToAdd
- localisation flags to add to existing flags.
-