|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectPamDetection.AbstractLocalisation
public abstract class AbstractLocalisation
Class for localisation information.
Each AbstractLocalisation should be uniquely linked to a single PamDataUnit, since this class is abstract, where the actual data are stored (in the data unit or in the localisation) is up to the programmer.
This class has been through a number of iterations during 2007 and may well go through a few more before we are all happy with it. The main problem has been whether to reference positions purely by a hydrophone number, a time, a distance and bearing, or simply by a LatLong. It's ended up as a mixture of both.
Things are made worse by ambiguities which means that there may be one or more of each type of information. The key is to correctly set the types of information held within a particular localisation so that other parts of Pamguard may query it and act accordingly. It is vital that the PamDataBlock which will hold the PamDataUnits associated with a localisation have their localisationContents member correctly set to the full range of POSSIBLE localisation information types for the data units they will contain. This is important for the database and the various displays, which will all query the PamDataBlocks before the contain any PamDataUnits in order to see which columns to put in database tables, whether or not the data within a PamDataBlock may plot on a particular display, etc.
PamDataUnit,
PamDataBlock| Field Summary | |
|---|---|
private PamVector[] |
arrayAxis
Principle axis of the array geometry. |
private int |
arrayType
Type of array, point, line, plane, volume, etc. |
static int |
HAS_AMBIGUITY
|
static int |
HAS_BEARING
|
static int |
HAS_BEARINGERROR
|
static int |
HAS_DEPTH
|
static int |
HAS_DEPTHERROR
|
static int |
HAS_LATLONG
|
static int |
HAS_PERPENDICULARERRORS
Errors parallel and perpendicular to the ships track. |
static int |
HAS_RANGE
|
static int |
HAS_RANGEERROR
|
static int |
HAS_XY
|
static int |
HAS_XYZ
|
private int |
locContents
bitmap of flags saying what's in the localisation information |
private PamDataUnit |
pamDataUnit
reference to parent PamDetection object |
private int |
referenceHydrophones
All localisation must be relative to at least one hydrophone. |
| Constructor Summary | |
|---|---|
AbstractLocalisation(PamDataUnit pamDataUnit,
int locContents,
int referenceHydrophones)
|
|
AbstractLocalisation(PamDataUnit pamDataUnit,
int locContents,
int referenceHydrophones,
int arrayType,
PamVector[] arrayAxis)
|
|
| Method Summary | |
|---|---|
void |
addLocContents(int flagsToAdd)
|
boolean |
bearingAmbiguity()
|
double[] |
getAngles()
|
PamVector[] |
getArrayOrientationVectors()
|
double |
getBearing()
Deprecated. |
double |
getBearing(int iSide)
Deprecated. |
double |
getBearingError()
Deprecated. |
double |
getBearingError(int iSide)
|
double |
getBearingReference()
Get the reference bearing in radians. |
double |
getDepth()
Deprecated. |
double |
getDepth(int iSide)
|
double |
getDepthError()
Deprecated. |
double |
getDepthError(int iSide)
|
double |
getErrorDirection(int iSide)
Get an angle that the errors are to be plotted relative to. |
LatLong |
getLatLong(int iSide)
Return the latlong for a location. |
int |
getLocContents()
|
int |
getNumLatLong()
|
LatLong |
getOriginLatLong()
|
double |
getParallelError(int iSide)
Get the error parallel to the trackline (in meters) |
PamDataUnit |
getParentDetection()
|
double |
getPerpendiculaError(int iSide)
Get the error perpedicular to the track line (in meters) |
double[] |
getPlanarAngles()
returns angles projected onto the surface. |
double |
getRange()
Deprecated. |
double |
getRange(int iSide)
Get the range for a specific side (where ambiguity exists) |
double |
getRangeError()
Deprecated. |
double |
getRangeError(int iSide)
|
int |
getReferenceHydrophones()
|
int |
getSubArrayType()
|
boolean |
hasLocContent(int requiredContent)
Check that the localisation has specific content. |
int |
removeLocContents(int flagsToRemove)
|
void |
setLocContents(int locContents)
|
void |
setParentDetection(PamDetection parentDetection)
|
void |
setReferenceHydrophones(int referenceHydrophones)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int HAS_BEARING
public static final int HAS_RANGE
public static final int HAS_DEPTH
public static final int HAS_BEARINGERROR
public static final int HAS_RANGEERROR
public static final int HAS_DEPTHERROR
public static final int HAS_LATLONG
public static final int HAS_XY
public static final int HAS_XYZ
public static final int HAS_AMBIGUITY
public static final int HAS_PERPENDICULARERRORS
private PamDataUnit pamDataUnit
private int locContents
private int arrayType
private PamVector[] arrayAxis
private int referenceHydrophones
| Constructor Detail |
|---|
public AbstractLocalisation(PamDataUnit pamDataUnit,
int locContents,
int referenceHydrophones)
public AbstractLocalisation(PamDataUnit pamDataUnit,
int locContents,
int referenceHydrophones,
int arrayType,
PamVector[] arrayAxis)
| Method Detail |
|---|
public int getSubArrayType()
Added DG 6 January 2010
public PamVector[] getArrayOrientationVectors()
public double[] getPlanarAngles()
public double[] getAngles()
For a point array, null should be returned.
For a line array a single angle is returned which is the angle relative to the first orientation vector with 0 being in line with the orientation vector (can be thought of as colatitude).
For a planar or volumetric array, two angles should be returned, the first being the colatitude, the second being the longitude which will be between 0 and pi for a planar array and either -pi to pi or 0 to 2pi for a volumetirc array.
public int getLocContents()
public void setLocContents(int locContents)
locContents - a set of flags specifying which data are available within this localisation object.public void addLocContents(int flagsToAdd)
flagsToAdd - localisation flags to add to existing flags.public int removeLocContents(int flagsToRemove)
flagsToRemove - bitmap of localisation flags to remove.
public boolean hasLocContent(int requiredContent)
requiredContent - specified content
public PamDataUnit getParentDetection()
public void setParentDetection(PamDetection parentDetection)
parentDetection - Parent detection containing this localisation informationpublic int getReferenceHydrophones()
public void setReferenceHydrophones(int referenceHydrophones)
referenceHydrophones - a bitmap of hydrophone numbers that form a reference position for this localisation@Deprecated public double getBearing()
@Deprecated public double getBearing(int iSide)
iSide - which side is the bearing on
getBearingReferencepublic double getBearingReference()
public boolean bearingAmbiguity()
@Deprecated public double getRange()
public double getRange(int iSide)
iSide -
@Deprecated public double getDepth()
public double getDepth(int iSide)
@Deprecated public double getBearingError()
public double getBearingError(int iSide)
iSide -
@Deprecated public double getRangeError()
public double getRangeError(int iSide)
@Deprecated public double getDepthError()
public double getDepthError(int iSide)
public LatLong getOriginLatLong()
public LatLong getLatLong(int iSide)
iSide - 0, 1, 2, etc.
public int getNumLatLong()
public double getPerpendiculaError(int iSide)
iSide - 0, 1, 2, etc.
public double getParallelError(int iSide)
iSide - 0, 1, 2, etc.
public double getErrorDirection(int iSide)
iSide -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||