Package PamDetection

Class LocContents

java.lang.Object
PamDetection.LocContents
All Implemented Interfaces:
LocalisationInfo

public class LocContents extends Object implements LocalisationInfo
Class for holding information on what a type of information a localisation has. This is the typical class used throughout PAMGuard but specialised localisers might using a different subclass of LocalisationInfo.
Author:
Jamie Macaulay
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int[]
     
    static final int
    The localisation has ambiguity i.e.
    static final int
    Localisation has a a bearing value.
    static final int
    There is an error value associated with a bearing result
    static final int
    The localisation has a depth value
    static final int
    The localisation has a depth error
    static final int
    Has an echo measurement
    static final int
    The localisation is geo-referenced i.e.
    static final int
    Errors parallel and perpendicular to the ships track.
    static final int
    The localisation has a range value
    static final int
    The localisation has an associated range error
    static final int
    Time delays are present
    static final int
    The localisation has a 2D location relative to the hydrophone array
    static final int
    The localisation has a 3D location relative co-ordinate frame of the hydrophone array.
    static final int[]
    Main types of interest.
  • Constructor Summary

    Constructors
    Constructor
    Description
    LocContents(int cont)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addLocContent(int flagsToAdd)
    Add a flag to the loclaisation.
    int
    The integer specifying which flags are present in the loclaisation.
    static String
    getTypeString(int type)
     
    boolean
    hasLocContent(int requiredContent)
    Check that the localisation has specific content.
    int
    removeLocContent(int flagsToRemove)
    Remove a lfag from the loclaisation
    void
    setLocContent(int locContents)
    Set the overall bitmap flag.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • HAS_TIMEDELAYS

      public static final int HAS_TIMEDELAYS
      Time delays are present
      See Also:
    • HAS_ECHO

      public static final int HAS_ECHO
      Has an echo measurement
      See Also:
    • HAS_BEARING

      public static final int HAS_BEARING
      Localisation has a a bearing value.
      This is either 2 bearings representing a hyperbole, 2 bearings from a planar array or 1 3D bearing.
      See Also:
    • HAS_BEARINGERROR

      public static final int HAS_BEARINGERROR
      There is an error value associated with a bearing result
      See Also:
    • HAS_RANGE

      public static final int HAS_RANGE
      The localisation has a range value
      See Also:
    • HAS_DEPTH

      public static final int HAS_DEPTH
      The localisation has a depth value
      See Also:
    • HAS_RANGEERROR

      public static final int HAS_RANGEERROR
      The localisation has an associated range error
      See Also:
    • HAS_DEPTHERROR

      public static final int HAS_DEPTHERROR
      The localisation has a depth error
      See Also:
    • HAS_LATLONG

      public static final int HAS_LATLONG
      The localisation is geo-referenced i.e. has a latitude and longitude
      See Also:
    • HAS_XY

      public static final int HAS_XY
      The localisation has a 2D location relative to the hydrophone array
      See Also:
    • HAS_XYZ

      public static final int HAS_XYZ
      The localisation has a 3D location relative co-ordinate frame of the hydrophone array.
      See Also:
    • HAS_AMBIGUITY

      public static final int HAS_AMBIGUITY
      The localisation has ambiguity i.e. multiple results are present.
      See Also:
    • HAS_PERPENDICULARERRORS

      public static final int HAS_PERPENDICULARERRORS
      Errors parallel and perpendicular to the ships track.
      See Also:
    • allTypes

      public static final int[] allTypes
    • mainTypes

      public static final int[] mainTypes
      Main types of interest.
  • Constructor Details

    • LocContents

      public LocContents(int cont)
  • Method Details

    • getTypeString

      public static String getTypeString(int type)
    • setLocContent

      public void setLocContent(int locContents)
      Description copied from interface: LocalisationInfo
      Set the overall bitmap flag. This deletes all porevious flags.
      Specified by:
      setLocContent in interface LocalisationInfo
      Parameters:
      locContents - a set of flags specifying which data are available within this localisation object.
    • getLocContent

      public int getLocContent()
      The integer specifying which flags are present in the loclaisation.
      Specified by:
      getLocContent in interface LocalisationInfo
      Returns:
      bitmap of localisation contents.
    • addLocContent

      public void addLocContent(int flagsToAdd)
      Description copied from interface: LocalisationInfo
      Add a flag to the loclaisation.
      Specified by:
      addLocContent in interface LocalisationInfo
      Parameters:
      flagsToAdd - localisation flags to add to existing flags.
    • removeLocContent

      public int removeLocContent(int flagsToRemove)
      Description copied from interface: LocalisationInfo
      Remove a lfag from the loclaisation
      Specified by:
      removeLocContent in interface LocalisationInfo
      Parameters:
      flagsToRemove - bitmap of localisation flags to remove.
      Returns:
      new or remaining localisation content flags.
    • hasLocContent

      public boolean hasLocContent(int requiredContent)
      Check that the localisation has specific content.
      Specified by:
      hasLocContent in interface LocalisationInfo
      Parameters:
      requiredContent - specified content
      Returns:
      true if specified content exists, false otherwise.