Package difar

Class SonobuoyManager

All Implemented Interfaces:
PamObserver, ProcessAnnotator

public class SonobuoyManager extends PamProcess
SonobuoyManager should contain all of the Sonobuoy related functions in the DIFAR module. Previous to 2018-07-24, These functions were split between SonobuoyManager and DifarControl. To the Difar Module (invalid input: '&' SonobuoyManager) a sonobuoy is essentially an Array.Streamer (or perhaps StreamerDataUnit) with some additional methods and annotations added by the DIFAR module. These additional methods include routines for deploying, calibrating, editing, and ending sonobuoys. SonobuoyManager also manages the data structure for the SonobuoyLog (SonobuoyManagerPanel) Eventually it might make sense to extend Array.Streamer instead of using custom module-specific annotations.
Author:
brian_mil
  • Field Details

  • Constructor Details

    • SonobuoyManager

      public SonobuoyManager(DifarControl difarControl)
  • Method Details

    • addSonobuoyAnnotation

      public void addSonobuoyAnnotation(StreamerDataUnit sdu, TimestampAnnotationType annotation, long timestamp)
    • overwriteSonobuoyData

      public void overwriteSonobuoyData(StreamerDataUnit sdu)
    • pamStart

      public void pamStart()
      Description copied from class: PamProcess
      Called for each process to tell it to start (may not be necessary for processes which are listening for data anyway).
      Specified by:
      pamStart in class PamProcess
    • pamStop

      public void pamStop()
      Description copied from class: PamProcess
      Stops the process.
      Specified by:
      pamStop in class PamProcess
    • newData

      public void newData(PamObservable o, PamDataUnit arg)
      Overrides:
      newData in class PamProcess
    • setupProcess

      public void setupProcess()
      DIFAR module uses PAMGuard's ArrayManager very differently than modules that require a static or towed array. Here we load sonobuoy deployments from the PAMGuard database in normal and mixed-mode, so that we don't duplicate sonobuoy deployments every time PAMGuard restarts. Add an annotation for sonobuoy end time
      Overrides:
      setupProcess in class PamProcess
    • endBuoy

      public void endBuoy(int channel, long endTime, boolean overwrite)
      Add a data annotation for the finishing time of a sonobuoy.
      Parameters:
      channel -
      endTime - TODO
      overwrite - TODO
      difarControl - TODO
    • deployBuoy

      public void deployBuoy(int channel)
      Deploy a DIFAR buoy. In reality this means show only the streamer dialog for a single channel.
      Parameters:
      channel - channel number. If invalid input: '<' 0 or if the streamer can't be found, then show the full array dialog
      difarControl - TODO
    • getCalCorrectionHistogram

      public CalibrationHistogram getCalCorrectionHistogram(DifarControl difarControl, int channel)
    • getCalibrationHistogram

      public CalibrationHistogram getCalibrationHistogram(DifarControl difarControl, int channel)
    • showCalibrationDialog

      public void showCalibrationDialog(int channel)
      Shows the calibration dialog for a particular channel.
      Parameters:
      channel -
      difarControl - TODO
    • updateSonobuoyTableData

      public void updateSonobuoyTableData()
      Called after changes have been made to the sonobuoy data: buoy deployed, buoy ended, buoy calibrated, or buoy manually edited
    • getCompassCorrection

      public double getCompassCorrection(int channel, long timeMillis)
    • updateCorrection

      public boolean updateCorrection(Streamer streamer, long calibrationStartTime, Double newHead, Double std, int numClips)