Class DetectionGroupLocaliser2<T extends SuperDetection>

java.lang.Object
Localiser.detectionGroupLocaliser.DetectionGroupLocaliser2<T>
Type Parameters:
T - - the type of PamDataUnit
All Implemented Interfaces:
LocaliserModel<T>

public class DetectionGroupLocaliser2<T extends SuperDetection> extends Object implements LocaliserModel<T>
Localiser which deals with detections in which one or more groups of detections are being localised.
This localiser will usually be used with target motion localisation, however could also be used for situation with multiple unsynced systems. e.g. DIFAR buoys
This is a generic localiser which can implement multiple localisation algorithms. There are two main variables to set. What type of data to use for the localisation from the AbstractLoclaisation class e.g. time delays or bearings and the type of localisation algortihm to use.

Information of time delays, bearings, locations of hydrophones etc. is generated by a GroupLocInfo class. This can be subclassed and the getGroupLocInfo(T PamDetection) overridden to generate data more suited to different types of system. The default GroupLocInfo class is designed mainly for target motion localisation.

  • Field Details

    • AUTOMATIC

      public static final int AUTOMATIC
      Flag to use whatever the abstract localiser has. Will try with bearings first then will try with time delays.
      See Also:
    • BEARINGS_GROUP

      public static final int BEARINGS_GROUP
      Flag to use the bearings to localise.
      See Also:
    • TIMEDELAY_GROUP

      public static final int TIMEDELAY_GROUP
      Flag to use time delays localise.
      See Also:
  • Constructor Details

    • DetectionGroupLocaliser2

      public DetectionGroupLocaliser2(String name)
      Creates a default group localiser. Solves for two dimensions using the Simplex localisation method. Will by default set up the localisation problem with bearings rather than time delays.
    • DetectionGroupLocaliser2

      public DetectionGroupLocaliser2(String name, MinimisationAlgorithm locAlgorithm, int dataType, int nDim)
      Constructor for a group localiser.
      Parameters:
      name - - the name of the localiser. Will appear on dialogs, in the database etc.
      locAlgorithm - - the type of localisation algorithm to use e.g. Least Squares, Simplex etc.
      dataType - - the type of data to use for localisation, generally bearings or use raw time delays.
      nDim - - the number of dimensions to solve for. Either 2 or 3.
  • Method Details

    • getName

      public String getName()
      Description copied from interface: LocaliserModel
      Get the name which describes the localiser.
      Specified by:
      getName in interface LocaliserModel<T extends SuperDetection>
      Returns:
      the name of the localiser.
    • getToolTipText

      public String getToolTipText()
      Specified by:
      getToolTipText in interface LocaliserModel<T extends SuperDetection>
    • getLocContents

      public LocContents getLocContents()
      Description copied from interface: LocaliserModel
      The type of localisation information the localiser can accept. e.g. bearings, time delays etc. The types are defined in the AbstractLocalisation class.
      Specified by:
      getLocContents in interface LocaliserModel<T extends SuperDetection>
      Returns:
      integer bitmap of the type of localisation information the localiser can use.
    • getAlgorithmSettingsPane

      public LocaliserPane getAlgorithmSettingsPane()
      Description copied from interface: LocaliserModel
      Get the settings pane for the localiser. Allows users to change localiser settings.
      Specified by:
      getAlgorithmSettingsPane in interface LocaliserModel<T extends SuperDetection>
      Returns:
      the settings pane for the localiser.
    • runModel

      public GroupLocalisation runModel(T pamDataUnit, DetectionGroupOptions detectionGroupOptions, boolean addLoc)
      Description copied from interface: LocaliserModel
      Run the localisation model. Once completed the results are added to the AbstractLoclaisation class of the input PamDataUnit. Note that algorithms may run on a separate thread. Once processing has finished the notifyModelFinished function is called with a progress of 1;.
      Specified by:
      runModel in interface LocaliserModel<T extends SuperDetection>
      Parameters:
      pamDataUnit - the pamDataUnit. This can be a super unit if multiple detections are required.
      addLoc - automatically add the localisation result to the data unit, replacing it's current localisation info.
    • localiseMin

      public ArrayList<GroupLocResult> localiseMin(GroupLocInfo groupInfo, MinimisationFunction[] minFunctuion, MinimisationAlgorithm locAlgorithm)
      Use an algorithm to solve the minimisation function
      Parameters:
      minFunctuion - - the minimisation functions to solve for that particular localisation.
      Returns:
    • getMinimsationFunc

      public MinimisationFunction[] getMinimsationFunc(GroupLocInfo groupInfo, int locType)
      Create a minimisation function. Sets up the problem.
      Parameters:
      groupInfo - - the GroupLocInfo class which organises localisation information for group localisations.
      locType - - integer flag for the type of localisation information to use/
      Returns:
      an array of problems to solve. Will contain multiple minimisation functions if potential ambiguities exist.
    • getLocType

      public int getLocType()
      Get the locType. This is the type of information which is used in the loclaisation e.g. bearings, time delays.
      Returns:
      an integer flag of the locType
    • setLocType

      public void setLocType(int locType)
      Set the locType. This is the type of information which is used in the localisation e.g. bearings, time delays.
      Parameters:
      an - integer flag of the locType e.g. BEARINGS_GROUP, TIMEDELAY_GROUP;
    • setLocDim

      public void setLocDim(int nDim)
    • getLocDim

      public int getLocDim()
    • getGroupLocInfo

      public GroupLocInfo getGroupLocInfo(T PamDetection, DetectionGroupOptions detectionGroupOptions)
      Get the group detection info for a PamDataUnit. This is used to calculate information from a group of detections
      Parameters:
      detectionGroupOptions -
      Returns:
      the groupDetectionIndo
    • notifyModelProgress

      public void notifyModelProgress(double progress)
      Description copied from interface: LocaliserModel
      This should be called whenever the localiser has finished processing and, if the localisation process is long, then updates progress.
      Specified by:
      notifyModelProgress in interface LocaliserModel<T extends SuperDetection>
    • hasParams

      public boolean hasParams()
      Description copied from interface: LocaliserModel
      True if the model has parameters to set. If has the localiser has a settings pane it will have parameters. This generally puts an extra button onto a display panel.
      Specified by:
      hasParams in interface LocaliserModel<T extends SuperDetection>
    • setLocalisationAlgorithm

      public void setLocalisationAlgorithm(MinimisationAlgorithm minAlgorithm)
      Set the algorithm used to solve the loclaisation problem
      Parameters:
      minAlgorithm - the loclisation algorithm.