Class TargetMotionControl

java.lang.Object
PamController.PamControlledUnit
targetMotionModule.TargetMotionControl
All Implemented Interfaces:
DisplayLocaliserMenu, PamSettings, SettingsNameProvider

public class TargetMotionControl extends PamControlledUnit implements PamSettings, DisplayLocaliserMenu
Target motion module. Allows users to localise using target motion based algorithms. Utilises the hydrophone and streamer origin models in the @see Array package to determine the location of towed array hydrophones.
Author:
Doug Gillespie and Jamie Macaulay
  • Field Details

    • CURRENT_DETECTIONS_CHANGED

      public static final int CURRENT_DETECTIONS_CHANGED
      used whenever the current detections selected by the user have been changed
      See Also:
    • LOCALISATION_STARTED

      public static final int LOCALISATION_STARTED
      used when the localiser has started
      See Also:
    • LOCALISATION_WAITING

      public static final int LOCALISATION_WAITING
      The localiser is awaiting input form the user to save results,
      See Also:
    • LOCALISATION_DONE

      public static final int LOCALISATION_DONE
      The localiser is done
      See Also:
    • LOCALISATION_RESULTS_ADDED

      public static final int LOCALISATION_RESULTS_ADDED
      new localisation results are present and need added
      See Also:
    • RANGE_CHANGED

      public static final int RANGE_CHANGED
      used whenever the map range is changed
      See Also:
    • ALGORITHM_SELECTION_CHANGED

      public static final int ALGORITHM_SELECTION_CHANGED
      a selected algorithm has been changed.
      See Also:
    • HYDROPHONE_DATA_CHANGED

      public static final int HYDROPHONE_DATA_CHANGED
      hydrophone or streamer positions have been changed.
      See Also:
    • DETECTION_INFO_CALC_START

      public static final int DETECTION_INFO_CALC_START
      Started to calc the target motion information
      See Also:
    • DETECTION_INFO_CALC_END

      public static final int DETECTION_INFO_CALC_END
      Threadc calculating the target motion information has changed.
      See Also:
    • DETECTION_INFO_CALC_PROGRESS

      public static final int DETECTION_INFO_CALC_PROGRESS
      Update panels with thread progress.
      See Also:
  • Constructor Details

    • TargetMotionControl

      public TargetMotionControl(String unitName)
  • Method Details

    • getDataBlocks

      public ArrayList<PamDataBlock> getDataBlocks()
    • notifyModelChanged

      public void notifyModelChanged(int changeType)
      Description copied from class: PamControlledUnit
      General notification when the PAMGAURD model changes.
      Overrides:
      notifyModelChanged in class PamControlledUnit
      Parameters:
      changeType - type of change
    • calcTMDetectionInfo

      public void calcTMDetectionInfo(ArrayList<PamDataUnit> currentDetections, TargetMotionLocaliserProvider dataBlock)
      Calculates the targetMotiojnInfo for a set of detections. Called from the control panel which passes the selected detection information to this function.
    • update

      public void update(int flag)
      Update tmControl
      Parameters:
      flag -
    • getSettingsReference

      public Serializable getSettingsReference()
      Specified by:
      getSettingsReference in interface PamSettings
      Returns:
      The serialisable object that will be stored
    • getSettingsVersion

      public long getSettingsVersion()
      Specified by:
      getSettingsVersion in interface PamSettings
      Returns:
      An integer version number for the settings
    • restoreSettings

      public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
      Specified by:
      restoreSettings in interface PamSettings
      Returns:
      true if successful The object performs final checks (if needed) and then casts the settings data pamcontrolledunitSettings.settings into the correct type and uses as required
    • getCurrentDataBlock

      public PamDataBlock getCurrentDataBlock()
    • getTargetMotionLocaliser

      public TargetMotionLocaliser getTargetMotionLocaliser()
    • getTargetMotionMainPanel

      public TargetMotionMainPanel getTargetMotionMainPanel()
    • addLocaliserMenuItem

      public void addLocaliserMenuItem(JPopupMenu menu, PamDataUnit selectedDetion)
      Specified by:
      addLocaliserMenuItem in interface DisplayLocaliserMenu
    • getOfflineFunctions

      public TMOfflineFunctions getOfflineFunctions()
    • getTargetMotionDataBlock

      public TargetMotionDataBlock getTargetMotionDataBlock()
    • setTargetMotionDataBlock

      public void setTargetMotionDataBlock(TargetMotionDataBlock targetMotionDataBlock)
    • save

      public void save(boolean saveAll)
      Save localisation data
      Parameters:
      saveAll - - save all localisation results if true. If false then save only the currently selected best result.
    • getTargetMotionSQLLogging

      public TargetMotionSQLLogging getTargetMotionSQLLogging()
    • setTargetMotionSQLLogging

      public TargetMotionSQLLogging setTargetMotionSQLLogging(TargetMotionSQLLogging targetMotionSQLLogging)
    • calcStreamerPath

      public ArrayList<ArrayList<GpsData>> calcStreamerPath(TMManager.TMInfoWorker tmWorker)
      Calculate the path of all streamers over the loaded GPS data. Takes a long time to calculate as we have to iterate through database to find streamers and hydrophiones then model the streamer position.
      Parameters:
      tmWorker - - the thread this function is carried out on. Can be null
    • calcStreamerPath

      public static ArrayList<ArrayList<GpsData>> calcStreamerPath(TargetMotionInformation tmInfo, long millisStart, long millisEnd, TMManager.TMInfoWorker tmWorker)
      Calculate the path of all streamers over the loaded GPS data. Takes a long time to calculate as we have to iterate through database to find streamers and hydrophiones then model the streamer position.
      Parameters:
      millisStart - - calculate streamer path from millisStart
      millisEnd - - calculate streamer path up to millisEnd
      tmWorker - - the thread this function is carried out on. Can be null.
    • getCurrentTMinfo

      public TargetMotionInformation getCurrentTMinfo()
    • setCurrentTMinfo

      public void setCurrentTMinfo(TargetMotionInformation currentTMinfo)
    • getTaregtMotionManager

      public TMManager getTaregtMotionManager()
    • setTaregtMotionManager

      public void setTaregtMotionManager(TMManager taregtMotionManager)