Package clickDetector

Class ClickLocalisation

java.lang.Object
PamDetection.AbstractLocalisation
clickDetector.ClickLocalisation

public class ClickLocalisation extends AbstractLocalisation
  • Constructor Details

    • ClickLocalisation

      public ClickLocalisation(ClickDetection parentDetection, int locContents, int referenceHydrophones, int subArrayType, PamVector[] arrayOrientation)
  • Method Details

    • 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.
    • getBearing

      public double getBearing(int iSide)
      Description copied from class: AbstractLocalisation
      Get the bearing in radians, relative to the bearing reference
      Overrides:
      getBearing in class AbstractLocalisation
      Parameters:
      iSide - which side is the bearing on
      Returns:
      bearing in radians
      See Also:
    • getFirstDelay

      public double getFirstDelay()
    • setFirstDelay

      public void setFirstDelay(double delays)
    • setAnglesAndErrors

      public void setAnglesAndErrors(double[][] anglesAndErrors)
      Parameters:
      anglesAndErrors - the anglesAndErrors to set
    • 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.

    • getAngleErrors

      public double[] getAngleErrors()
      Overrides:
      getAngleErrors in class AbstractLocalisation
      Returns:
      Angle errors to detection in radians. The number of angles will be 0, 1 or 2.

      For a point array, null should be returned.

      For a line array a single error 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 errors should be returned, the first being the error on colatitude, the second being the longitude which will be between 0 and pi for a planar array and either -pi to pi or 0 to 2pi for a volumetric array.

    • 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.
    • setTimeDelays

      public void setTimeDelays(double[] timeDelays)
      Set the time delays
      Parameters:
      timeDelays - . List of time delays for this click detection obeying indexM1 and indexM2 rules. If the no. of delays doesn not satisfty group size then the delays are not set.
    • setTimeDelay

      public void setTimeDelay(int idelay, double timeDelay)
      Set a time delay.
      Parameters:
      idelay - - which delay to set
      timeDelays - - new time delays values
    • getTimeDelayErrors

      public double[] getTimeDelayErrors()
      Description copied from class: AbstractLocalisation
      Time delay errors
      Overrides:
      getTimeDelayErrors in class AbstractLocalisation
      Returns:
    • setAngles

      public void setAngles(double[] angles)
    • setAngleErrors

      public void setAngleErrors(double[] angleErrors)
    • getAnglesAndErrors

      public double[][] getAnglesAndErrors()
      Returns:
      the anglesAndErrors