Class GroupLocalisation

java.lang.Object
PamDetection.AbstractLocalisation
Localiser.detectionGroupLocaliser.GroupLocalisation
Direct Known Subclasses:
CTLocalisation, HyperbolicGroupLocalisation

public class GroupLocalisation extends AbstractLocalisation
Used to store localisation results if a group of PamDetections (rather than one) is used.
Author:
Jamie Macaulay
  • Constructor Details

  • Method Details

    • setTargetMotionResult

      public void setTargetMotionResult(GroupLocResult targetMotionResult)
      Set a target motion result.
      Parameters:
      targetMotionResult - - the target motion result
    • getLatLong

      public LatLong getLatLong(int iSide)
      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 class AbstractLocalisation
      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 class AbstractLocalisation
      Parameters:
      iSide - 0, 1, 2, etc.
      Returns:
      the error in metres.
    • addGroupLocaResult

      public int addGroupLocaResult(GroupLocResult groupLocResult)
      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

      public GroupLocResult getGroupLocaResult(int iSide)
      Returns:
      the targetMotionResult
    • getGroupLocResults

      public GroupLocResult[] getGroupLocResults()
      Get all group localisation results.
      Returns:
      the targetMotionResult
    • getOriginLatLong

      public GpsData getOriginLatLong()
      Overrides:
      getOriginLatLong in class AbstractLocalisation
      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

      public String toString()
      Overrides:
      toString in class AbstractLocalisation
    • getRange

      public double getRange(int iSide)
      Description copied from class: AbstractLocalisation
      Get the range for a specific side (where ambiguity exists)
      Overrides:
      getRange in class AbstractLocalisation
      Returns:
      range
    • 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.

    • 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.
    • 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 class AbstractLocalisation
      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 class AbstractLocalisation
      Parameters:
      iSide - 0, 1, 2, etc.
      Returns:
      the error in metres.
    • getErrorDirection

      public PamVector getErrorDirection(int iSide)
      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 class AbstractLocalisation
      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 class AbstractLocalisation
      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 class AbstractLocalisation
      Returns:
      The error on the depth estimation in meters.
    • getLocError

      public LocaliserError getLocError(int iSide)
      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 class AbstractLocalisation
      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 class AbstractLocalisation
      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.