Package difar
Class SonobuoyManager
java.lang.Object
PamguardMVC.PamProcess
difar.SonobuoyManager
- All Implemented Interfaces:
PamObserver
,ProcessAnnotator
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSonobuoyAnnotation
(StreamerDataUnit sdu, TimestampAnnotationType annotation, long timestamp) void
deployBuoy
(int channel) Deploy a DIFAR buoy.void
endBuoy
(int channel, long endTime, boolean overwrite) Add a data annotation for the finishing time of a sonobuoy.getCalCorrectionHistogram
(DifarControl difarControl, int channel) getCalibrationHistogram
(DifarControl difarControl, int channel) double
getCompassCorrection
(int channel, long timeMillis) void
newData
(PamObservable o, PamDataUnit arg) void
void
pamStart()
Called for each process to tell it to start (may not be necessary for processes which are listening for data anyway).void
pamStop()
Stops the process.void
DIFAR module uses PAMGuard's ArrayManager very differently than modules that require a static or towed array.void
showCalibrationDialog
(int channel) Shows the calibration dialog for a particular channel.boolean
updateCorrection
(Streamer streamer, long calibrationStartTime, Double newHead, Double std, int numClips) void
Called after changes have been made to the sonobuoy data: buoy deployed, buoy ended, buoy calibrated, or buoy manually editedMethods inherited from class PamguardMVC.PamProcess
absMillisecondsToSamples, absSamplesToMilliseconds, addData, addMultiPlexDataBlock, addOutputDataBlock, changedThreading, clearOldData, createAnnotations, destroyProcess, dumpBufferStatus, flushDataBlockBuffers, getAncestorDataBlock, getAnnotation, getChainPosition, getCompatibleDataUnits, getCpuPercent, getFrequencyRange, getLastSourceNotificationObject, getLastSourceNotificationType, getMuiltiplexDataBlock, getNumAnnotations, getNumMuiltiplexDataBlocks, getNumOutputDataBlocks, getObserverName, getObserverObject, getOfflineData, getOfflineData, getOutputDataBlock, getOutputDataBlocks, getPamControlledUnit, getParentDataBlock, getParentDataBlocks, getParentProcess, getProcessCheck, getProcessName, getRawSourceDataBlock, getRawSourceDataBlock, getRequiredDataHistory, getSampleRate, getSourceDataBlock, getSourceProcess, hasOutputDatablock, isCanMultiThread, isExternalProcess, isMultiplex, makePamProcess, masterClockUpdate, noteNewSettings, notifyModelChanged, prepareProcess, prepareProcessOK, processNewBuoyData, receiveSourceNotification, relMillisecondsToSamples, relSamplesToMilliseconds, removeAllDataBlocks, removeAllMultiPlexDataBlocks, removeMultiPlexDataBlock, removeObservable, removeOutputDatablock, resetDataBlocks, saveViewerData, setCanMultiThread, setExternalProcess, setMultiplex, setParentDataBlock, setParentDataBlock, setProcessCheck, setProcessName, setSampleRate, toString, updateData
-
Field Details
-
COLUMN_DATABASEID
public static final int COLUMN_DATABASEID- See Also:
-
COLUMN_NAME
public static final int COLUMN_NAME- See Also:
-
COLUMN_TIMESTAMP
public static final int COLUMN_TIMESTAMP- See Also:
-
COLUMN_ENDTIME
public static final int COLUMN_ENDTIME- See Also:
-
COLUMN_CHANNEL
public static final int COLUMN_CHANNEL- See Also:
-
COLUMN_LATITUDE
public static final int COLUMN_LATITUDE- See Also:
-
COLUMN_LONGITUDE
public static final int COLUMN_LONGITUDE- See Also:
-
COLUMN_DEPTH
public static final int COLUMN_DEPTH- See Also:
-
COLUMN_HEADING
public static final int COLUMN_HEADING- See Also:
-
COLUMN_COMPASSCORRECTION
public static final int COLUMN_COMPASSCORRECTION- See Also:
-
COLUMN_CALSTDDEV
public static final int COLUMN_CALSTDDEV- See Also:
-
sonobuoyEndTimeAnnotation
-
calMeanAnnotation
-
calStdDevAnnotation
-
buoyDataBlock
-
columnNames
-
tableData
-
tableDataModel
-
-
Constructor Details
-
SonobuoyManager
-
-
Method Details
-
addSonobuoyAnnotation
public void addSonobuoyAnnotation(StreamerDataUnit sdu, TimestampAnnotationType annotation, long timestamp) -
overwriteSonobuoyData
-
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 classPamProcess
-
pamStop
public void pamStop()Description copied from class:PamProcess
Stops the process.- Specified by:
pamStop
in classPamProcess
-
newData
- Overrides:
newData
in classPamProcess
-
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 classPamProcess
-
endBuoy
public void endBuoy(int channel, long endTime, boolean overwrite) Add a data annotation for the finishing time of a sonobuoy.- Parameters:
channel
-endTime
- TODOoverwrite
- TODOdifarControl
- 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 dialogdifarControl
- TODO
-
getCalCorrectionHistogram
-
getCalibrationHistogram
-
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
-