Class WhistleBearingInfo

java.lang.Object
PamDetection.AbstractLocalisation
whistlesAndMoans.WhistleBearingInfo
Direct Known Subclasses:
ClipLocalisation

public class WhistleBearingInfo extends AbstractLocalisation
  • Constructor Details

    • WhistleBearingInfo

      public WhistleBearingInfo(PamDataUnit pamDataUnit, BearingLocaliser bearingLocaliser, int hydrophones, double[][] anglesAndErrors)
  • Method Details

    • getAngles

      public double[] getAngles()
      Overrides:
      getAngles in class AbstractLocalisation
      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 class AbstractLocalisation
      Returns:
      Reference bearing in radians.
    • bearingAmbiguity

      public boolean bearingAmbiguity()
      Overrides:
      bearingAmbiguity in class AbstractLocalisation
      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 class AbstractLocalisation
      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 class AbstractLocalisation
      Returns:
      array of time delays in seconds.
    • setLocContents

      public void setLocContents(LocalisationInfo locContents)
      Overrides:
      setLocContents in class AbstractLocalisation
      Parameters:
      locContents - a set of flags specifying which data are available within this localisation object.
    • addLocContents

      public void addLocContents(int flagsToAdd)
      Overrides:
      addLocContents in class AbstractLocalisation
      Parameters:
      flagsToAdd - localisation flags to add to existing flags.