public class ArrayManager extends PamControlledUnit implements PamSettings, PamObserver
The dialog ArrayDialog allows the user to load arrays from file, create new arrays, edit arrays, etc.
PamArray
Modifier and Type | Field and Description |
---|---|
static int |
ARRAY_TYPE_LINE
Line array of two or more elements
|
static int |
ARRAY_TYPE_NONE
No array specified
|
static int |
ARRAY_TYPE_PLANE
Three or more Hydrophones all in the same plane
|
static int |
ARRAY_TYPE_POINT
Point array (single phone or multiple phones at same point)
|
static int |
ARRAY_TYPE_VOLUME
Four or more hydrophones not in the same plane.
|
Modifier and Type | Method and Description |
---|---|
void |
addArray(PamArray newArray) |
void |
fillXMLData(org.w3c.dom.Document doc,
org.w3c.dom.Element xmlElement)
Write Hydrophone array data into an XML element
|
int |
getArrayCount() |
PamVector[] |
getArrayDirection(int phones)
Get the principle direction vectors for a sub set of hydrophones
within the current array
|
PamVector[] |
getArrayDirections()
Get the principle direction vectors for the current array
|
PamVector[] |
getArrayDirections(PamArray array)
Get a set of vectors which define the principle coordinates of an array
|
PamVector[] |
getArrayDirections(PamArray array,
int phones)
Get a set of vectors which define the principle components of an array.
|
static java.lang.String |
getArrayFileType() |
static ArrayManager |
getArrayManager() |
int |
getArrayShape(PamArray array) |
int |
getArrayShape(PamArray array,
int phones) |
int |
getArrayType() |
int |
getArrayType(int phones) |
static java.lang.String |
getArrayTypeString(int arrayType) |
PamVector[] |
getArrayVectors(PamArray array,
int phones) |
PamArray |
getCurrentArray() |
DepthControl |
getDepthControl() |
static GPSDataBlock |
getGPSDataBlock()
Gets the GPS data block, if there is one.
|
HydrophoneDataBlock |
getHydrophoneDataBlock()
Called from the network receiver to create and assign some specific hydrophone streamer within an
array and to clone a streamer to make a new one if necessary
|
HydrophoneSQLLogging |
getHydrophoneSQLLogging() |
java.lang.String |
getObserverName() |
PamObserver |
getObserverObject() |
java.util.ArrayList<PamArray> |
getRecentArrays() |
long |
getRequiredDataHistory(PamObservable o,
java.lang.Object arg) |
java.io.Serializable |
getSettingsReference() |
long |
getSettingsVersion() |
int |
getSpatiallyUniquePhones(PamArray array,
int phones)
Take a list of phones and return a list of ones
which are at unique positions.
|
StreamerDataBlock |
getStreamerDatabBlock() |
java.lang.String |
getUnitName()
Returns the name of the unit
|
java.lang.String |
getUnitType() |
static PamArray |
loadArrayFromFile(java.lang.String fileName) |
void |
masterClockUpdate(long milliSeconds,
long sampleNumber) |
void |
noteNewSettings() |
void |
notifyModelChanged(int changeType)
General notification when the PAMGAURD model changes.
|
boolean |
removeArray(PamArray newArray) |
void |
removeObservable(PamObservable o)
called when an Observable (PamDataBlock) is removed from the system
|
boolean |
restoreSettings(PamControlledUnitSettings pamControlledUnitSettings) |
static boolean |
saveArrayToFile(PamArray array) |
void |
setCurrentArray(PamArray array) |
void |
setDepthControl(DepthControl depthControl) |
void |
setSampleRate(float sampleRate,
boolean notify)
New sample rate
|
void |
showArrayDialog(java.awt.Frame parentFrame) |
void |
showHydrophoneImportDialog(javax.swing.JFrame guiFrame) |
void |
showStreamerImportDialog(javax.swing.JFrame guiFrame) |
void |
update(PamObservable o,
PamDataUnit arg)
Informs the PamObserver that new data have been added to the Observable
class
|
addOfflineTaskGroup, addOtherRelatedMenuItems, addPamProcess, addRelatedMenuItems, addXMLParameter, addXMLParameter, addXMLParameter, addXMLParameter, canClose, canPlayViewerSound, createDetectionMenu, createDisplayMenu, createFileMenu, createHelpMenu, fillXMLElement, flushDataBlockBuffers, getFrameNumber, getGuiFrame, getModuleSummary, getNumOfflineTaskGroups, getNumPamProcesses, getOfflineTaskGroup, getPamController, getPamModuleInfo, getPamProcess, getPamView, getShortUnitType, getSidePanel, getTabClipCopier, getTabPanel, getTabSpecificMenuBar, getToolbarComponent, getVerboseLevel, gotoTab, isViewer, pamClose, pamHasStopped, pamToStart, playViewerSound, removePamProcess, removeUnit, rename, saveViewerData, setFrameNumber, setPamController, setPamModuleInfo, setPamView, setSidePanel, setTabPanel, setupControlledUnit, stopViewerSound, terminalPrint, terminalPrintln, toString
public static final int ARRAY_TYPE_NONE
public static final int ARRAY_TYPE_POINT
public static final int ARRAY_TYPE_LINE
public static final int ARRAY_TYPE_PLANE
public static final int ARRAY_TYPE_VOLUME
public PamObserver getObserverObject()
getObserverObject
in interface PamObserver
public static ArrayManager getArrayManager()
public void notifyModelChanged(int changeType)
PamControlledUnit
notifyModelChanged
in class PamControlledUnit
changeType
- type of changepublic static java.lang.String getArrayFileType()
public java.util.ArrayList<PamArray> getRecentArrays()
public int getArrayCount()
public void showArrayDialog(java.awt.Frame parentFrame)
public void addArray(PamArray newArray)
public void setCurrentArray(PamArray array)
public boolean removeArray(PamArray newArray)
public java.io.Serializable getSettingsReference()
getSettingsReference
in interface PamSettings
public long getSettingsVersion()
getSettingsVersion
in interface PamSettings
public java.lang.String getUnitName()
PamControlledUnit
getUnitName
in interface PamSettings
getUnitName
in class PamControlledUnit
public java.lang.String getUnitType()
getUnitType
in interface PamSettings
getUnitType
in class PamControlledUnit
public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
restoreSettings
in interface PamSettings
public PamArray getCurrentArray()
public static PamArray loadArrayFromFile(java.lang.String fileName)
public static boolean saveArrayToFile(PamArray array)
public DepthControl getDepthControl()
public void setDepthControl(DepthControl depthControl)
depthControl
- the depthControl to setpublic java.lang.String getObserverName()
getObserverName
in interface PamObserver
public long getRequiredDataHistory(PamObservable o, java.lang.Object arg)
getRequiredDataHistory
in interface PamObserver
o
- PamObservable class requiring the dataarg
- optional argument from PamObservablepublic void noteNewSettings()
noteNewSettings
in interface PamObserver
public void removeObservable(PamObservable o)
PamObserver
removeObservable
in interface PamObserver
public void setSampleRate(float sampleRate, boolean notify)
PamObserver
setSampleRate
in interface PamObserver
notify
- Notify other PamObservers and PamObservables in the chain.public void masterClockUpdate(long milliSeconds, long sampleNumber)
masterClockUpdate
in interface PamObserver
public void update(PamObservable o, PamDataUnit arg)
PamObserver
update
in interface PamObserver
o
- Reference to the Observable (a PamDataBlock)arg
- Reference to the new PamDataUnitpublic int getArrayType()
public int getArrayType(int phones)
phones
- public int getArrayShape(PamArray array)
array
- a PAMGUARD arraypublic int getArrayShape(PamArray array, int phones)
array
- a PAMGUARD arrayphones
- a sub array of phones in the pam array.public int getSpatiallyUniquePhones(PamArray array, int phones)
array
- hydrophone arrayphones
- bitmap of hydrophone numberspublic PamVector[] getArrayDirections()
public PamVector[] getArrayDirection(int phones)
phones
- bitmap of hydrophonespublic PamVector[] getArrayDirections(PamArray array)
array
- arraypublic PamVector[] getArrayDirections(PamArray array, int phones)
For a point array, null is returned
For a line array a vector pointing along the array in the direction closest to the y axis
For a planar array a vector pointing as closely as possible to the y axis and a second vector, perpendicular to the first, obeying a right hand rule, in the plane will be returned.
For a volumetric array, the above + the third vector (vec product of the other two).
array
- Pamguard arrayphones
- phones included in a sub array.public static java.lang.String getArrayTypeString(int arrayType)
public void fillXMLData(org.w3c.dom.Document doc, org.w3c.dom.Element xmlElement)
doc
- document rootxmlElement
- xml Element to fill with array data.public HydrophoneDataBlock getHydrophoneDataBlock()
buoyStats
- public StreamerDataBlock getStreamerDatabBlock()
public HydrophoneSQLLogging getHydrophoneSQLLogging()
public static GPSDataBlock getGPSDataBlock()
public void showHydrophoneImportDialog(javax.swing.JFrame guiFrame)
public void showStreamerImportDialog(javax.swing.JFrame guiFrame)