|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectArray.ArrayManager
public class ArrayManager
Manager for different array configurations. Each array configuration is stored in it's own serialised file, which is separate from other Pam Settings so that they can be stored, emailed around, etc. In it' main seriales file controlled by PamSettingsManager, Pamguard keeps a list of recently used arrays.
The dialog ArrayDialog alows the user to load arrays from file, create new arrays, edit arrays, etc.
PamArray| Field Summary | |
|---|---|
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. |
private static java.lang.String |
arrayFileType
|
private DepthControl |
depthControl
|
(package private) java.util.ArrayList<PamArray> |
recentArrays
|
private static ArrayManager |
singleInstance
|
| Constructor Summary | |
|---|---|
private |
ArrayManager()
|
| Method Summary | |
|---|---|
void |
addArray(PamArray newArray)
|
private boolean |
areInLine(PamVector[] pvs)
Test to see if a load of inter-pair vectors are in line or not. |
private boolean |
areOnPlane(PamVector[] pvs)
Check to see if inter pair vectors define a volume or just a plane. |
private void |
createDefaultArray()
|
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 |
getArrayType()
|
int |
getArrayType(int phones)
|
int |
getArrayType(PamArray array)
|
int |
getArrayType(PamArray array,
int phones)
|
static java.lang.String |
getArrayTypeString(int arrayType)
|
PamVector[] |
getArrayVectors(PamArray array,
int phones)
|
PamArray |
getCurrentArray()
|
DepthControl |
getDepthControl()
|
private PamVector[] |
getLineArrayVector(PamVector[] arrayVectors)
|
private double |
getMaxVolume(PamVector[] pvs)
|
java.lang.String |
getObserverName()
|
PamObserver |
getObserverObject()
|
private PamVector[] |
getPlaneArrayVectors(PamVector[] arrayVectors)
|
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. |
java.lang.String |
getUnitName()
|
java.lang.String |
getUnitType()
|
private PamVector[] |
getVolumeArrayVectors(PamVector[] arrayVectors)
|
static PamArray |
loadArrayFromFile(java.lang.String fileName)
|
void |
masterClockUpdate(long milliSeconds,
long sampleNumber)
|
void |
noteNewSettings()
|
void |
notifyModelChanged(int changeType)
|
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 |
static void |
showArrayDialog(java.awt.Frame parentFrame)
|
void |
update(PamObservable o,
PamDataUnit arg)
Informs the PamObserver that new data have been added to the Observable class |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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
private static ArrayManager singleInstance
private static final java.lang.String arrayFileType
java.util.ArrayList<PamArray> recentArrays
private DepthControl depthControl
| Constructor Detail |
|---|
private ArrayManager()
| Method Detail |
|---|
private void createDefaultArray()
public PamObserver getObserverObject()
getObserverObject in interface PamObserverpublic static ArrayManager getArrayManager()
public void notifyModelChanged(int changeType)
public static java.lang.String getArrayFileType()
public java.util.ArrayList<PamArray> getRecentArrays()
public int getArrayCount()
public static 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 PamSettingspublic long getSettingsVersion()
getSettingsVersion in interface PamSettingspublic java.lang.String getUnitName()
getUnitName in interface PamSettingspublic java.lang.String getUnitType()
getUnitType in interface PamSettingspublic boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
restoreSettings in interface PamSettingspublic 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 PamObservero - PamObservable class requiring the dataarg - optional argument from PamObservable
public void noteNewSettings()
noteNewSettings in interface PamObserverpublic void removeObservable(PamObservable o)
PamObserver
removeObservable in interface PamObserver
public void setSampleRate(float sampleRate,
boolean notify)
PamObserver
setSampleRate in interface PamObservernotify - 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 PamObservero - Reference to the Observable (a PamDataBlock)arg - Reference to the new PamDataUnitpublic int getArrayType()
public int getArrayType(int phones)
phones -
public int getArrayType(PamArray array)
array - a PAMGUARD array
public int getArrayType(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 numbers
public PamVector[] getArrayDirections()
public PamVector[] getArrayDirection(int phones)
phones - bitmap of hydrophones
public PamVector[] getArrayDirections(PamArray array)
array - array
public 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.
private PamVector[] getLineArrayVector(PamVector[] arrayVectors)
private PamVector[] getPlaneArrayVectors(PamVector[] arrayVectors)
private PamVector[] getVolumeArrayVectors(PamVector[] arrayVectors)
public PamVector[] getArrayVectors(PamArray array,
int phones)
public static java.lang.String getArrayTypeString(int arrayType)
private boolean areInLine(PamVector[] pvs)
pvs - inter-hydrophone vectors.
private boolean areOnPlane(PamVector[] pvs)
pvs - array of inter phone vectors
private double getMaxVolume(PamVector[] pvs)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||