Package targetMotionModule
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 Summary
Modifier and TypeFieldDescriptionstatic final int
a selected algorithm has been changed.static final int
used whenever the current detections selected by the user have been changedstatic final int
Threadc calculating the target motion information has changed.static final int
Update panels with thread progress.static final int
Started to calc the target motion informationstatic final int
hydrophone or streamer positions have been changed.static final int
The localiser is donestatic final int
new localisation results are present and need addedstatic final int
used when the localiser has startedstatic final int
The localiser is awaiting input form the user to save results,static final int
used whenever the map range is changed -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addLocaliserMenuItem
(JPopupMenu menu, PamDataUnit selectedDetion) calcStreamerPath
(TargetMotionInformation tmInfo, long millisStart, long millisEnd, TMManager.TMInfoWorker tmWorker) Calculate the path of all streamers over the loaded GPS data.calcStreamerPath
(TMManager.TMInfoWorker tmWorker) Calculate the path of all streamers over the loaded GPS data.void
calcTMDetectionInfo
(ArrayList<PamDataUnit> currentDetections, TargetMotionLocaliserProvider dataBlock) Calculates the targetMotiojnInfo for a set of detections.long
void
notifyModelChanged
(int changeType) General notification when the PAMGAURD model changes.boolean
restoreSettings
(PamControlledUnitSettings pamControlledUnitSettings) void
save
(boolean saveAll) Save localisation datavoid
setCurrentTMinfo
(TargetMotionInformation currentTMinfo) void
setTaregtMotionManager
(TMManager taregtMotionManager) void
setTargetMotionDataBlock
(TargetMotionDataBlock targetMotionDataBlock) setTargetMotionSQLLogging
(TargetMotionSQLLogging targetMotionSQLLogging) void
update
(int flag) Update tmControlMethods inherited from class PamController.PamControlledUnit
addOfflineTaskGroup, addOtherRelatedMenuItems, addPamProcess, addPamProcess, addRelatedMenuItems, canClose, canPlayViewerSound, createDetectionMenu, createDisplayMenu, createFileMenu, createHelpMenu, flushDataBlockBuffers, getBackupInformation, getFrameNumber, getGUI, getGuiFrame, getInstanceIndex, getModuleStatus, getModuleStatusManager, getModuleSummary, getModuleSummary, getNumOfflineTaskGroups, getNumPamProcesses, getOfflineState, getOfflineTaskGroup, getPamConfiguration, getPamController, getPamModuleInfo, getPamProcess, getPamView, getPlugin, getShortUnitType, getSidePanel, getTabClipCopier, getTabPanel, getTabSpecificMenuBar, getToolbarComponent, getUnitName, getUnitType, getVerboseLevel, gotoTab, isInMainConfiguration, isNetRx, isViewer, pamClose, pamHasStopped, pamToStart, playViewerSound, removePamProcess, removeUnit, rename, saveViewerData, setFrameNumber, setModuleStatusManager, setPamConfiguration, setPamController, setPamModuleInfo, setPamView, setSidePanel, setTabPanel, setToolbarComponent, setupControlledUnit, stopViewerSound, tellModule, terminalPrint, terminalPrintln, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface PamController.PamSettings
getUnitType
Methods inherited from interface PamController.SettingsNameProvider
getUnitName
-
Field Details
-
CURRENT_DETECTIONS_CHANGED
public static final int CURRENT_DETECTIONS_CHANGEDused whenever the current detections selected by the user have been changed- See Also:
-
LOCALISATION_STARTED
public static final int LOCALISATION_STARTEDused when the localiser has started- See Also:
-
LOCALISATION_WAITING
public static final int LOCALISATION_WAITINGThe localiser is awaiting input form the user to save results,- See Also:
-
LOCALISATION_DONE
public static final int LOCALISATION_DONEThe localiser is done- See Also:
-
LOCALISATION_RESULTS_ADDED
public static final int LOCALISATION_RESULTS_ADDEDnew localisation results are present and need added- See Also:
-
RANGE_CHANGED
public static final int RANGE_CHANGEDused whenever the map range is changed- See Also:
-
ALGORITHM_SELECTION_CHANGED
public static final int ALGORITHM_SELECTION_CHANGEDa selected algorithm has been changed.- See Also:
-
HYDROPHONE_DATA_CHANGED
public static final int HYDROPHONE_DATA_CHANGEDhydrophone or streamer positions have been changed.- See Also:
-
DETECTION_INFO_CALC_START
public static final int DETECTION_INFO_CALC_STARTStarted to calc the target motion information- See Also:
-
DETECTION_INFO_CALC_END
public static final int DETECTION_INFO_CALC_ENDThreadc calculating the target motion information has changed.- See Also:
-
DETECTION_INFO_CALC_PROGRESS
public static final int DETECTION_INFO_CALC_PROGRESSUpdate panels with thread progress.- See Also:
-
-
Constructor Details
-
TargetMotionControl
-
-
Method Details
-
getDataBlocks
-
notifyModelChanged
public void notifyModelChanged(int changeType) Description copied from class:PamControlledUnit
General notification when the PAMGAURD model changes.- Overrides:
notifyModelChanged
in classPamControlledUnit
- 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
- Specified by:
getSettingsReference
in interfacePamSettings
- Returns:
- The serialisable object that will be stored
-
getSettingsVersion
public long getSettingsVersion()- Specified by:
getSettingsVersion
in interfacePamSettings
- Returns:
- An integer version number for the settings
-
restoreSettings
- Specified by:
restoreSettings
in interfacePamSettings
- 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
-
getTargetMotionLocaliser
-
getTargetMotionMainPanel
-
addLocaliserMenuItem
- Specified by:
addLocaliserMenuItem
in interfaceDisplayLocaliserMenu
-
getOfflineFunctions
-
getTargetMotionDataBlock
-
setTargetMotionDataBlock
-
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
-
setTargetMotionSQLLogging
public TargetMotionSQLLogging setTargetMotionSQLLogging(TargetMotionSQLLogging targetMotionSQLLogging) -
calcStreamerPath
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 millisStartmillisEnd
- - calculate streamer path up to millisEndtmWorker
- - the thread this function is carried out on. Can be null.
-
getCurrentTMinfo
-
setCurrentTMinfo
-
getTaregtMotionManager
-
setTaregtMotionManager
-