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
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intString[]Object[][]Fields inherited from class PamguardMVC.PamProcess
outputDataBlocks, parentDataBlock, processName, sampleRate - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddSonobuoyAnnotation(StreamerDataUnit sdu, TimestampAnnotationType annotation, long timestamp) voiddeployBuoy(int channel) Deploy a DIFAR buoy.voidendBuoy(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) doublegetCompassCorrection(int channel, long timeMillis) voidnewData(PamObservable o, PamDataUnit arg) voidvoidpamStart()Called for each process to tell it to start (may not be necessary for processes which are listening for data anyway).voidpamStop()Stops the process.voidDIFAR module uses PAMGuard's ArrayManager very differently than modules that require a static or towed array.voidshowCalibrationDialog(int channel) Shows the calibration dialog for a particular channel.protected voidCheck all the SQL Logging additions are set up correctly.booleanupdateCorrection(Streamer streamer, long calibrationStartTime, Double newHead, Double std, int numClips) voidCalled 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
- 
sortSQLLogging
protected void sortSQLLogging()Check all the SQL Logging additions are set up correctly. - 
addSonobuoyAnnotation
public void addSonobuoyAnnotation(StreamerDataUnit sdu, TimestampAnnotationType annotation, long timestamp)  - 
overwriteSonobuoyData
 - 
pamStart
public void pamStart()Description copied from class:PamProcessCalled for each process to tell it to start (may not be necessary for processes which are listening for data anyway).- Specified by:
 pamStartin classPamProcess
 - 
pamStop
public void pamStop()Description copied from class:PamProcessStops the process.- Specified by:
 pamStopin classPamProcess
 - 
newData
- Overrides:
 newDatain 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:
 setupProcessin 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
 
 -