|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectPamguardMVC.PamDataUnit
public abstract class PamDataUnit
Class for units of PAM data.
PamDataUnit's are held in ArrayLists within PamDataBlocks.
When a PamDataUnit is added to a PamDataBlock any PamProcesses that subscribe to that PamDataBlock receive a notification and can retrieve the PamDataUnits from the block.
Any data derived from acoustic data should subclass from AcousticDataUnit
PamDataBlock,
AcousticDataUnit| Field Summary | |
|---|---|
protected int |
absBlockIndex
Absolute block index, needed for searches once NPDU's start getting deleted off the front of the storage |
protected int |
channelBitmap
map of channels used in the data. |
protected AbstractLocalisation |
localisation
Localisation information |
protected LatLong |
oLL
|
protected long |
timeMilliseconds
time the NewPamDataUnit was created based using standard Java time |
| Constructor Summary | |
|---|---|
PamDataUnit(long timeMilliseconds)
|
|
| Method Summary | |
|---|---|
int |
getAbsBlockIndex()
|
int |
getChannelBitmap()
|
int |
getDatabaseIndex()
|
int |
getDatabaseUpdateOf()
|
protected GpsData |
getGpsPosition()
Used when no hydrophone information is specified to get the nearest ships GPS position. |
long |
getLastUpdateTime()
|
AbstractLocalisation |
getLocalisation()
|
LatLong |
getOriginLatLong(boolean recalculate)
Get the latlongof the mean hydrophone position at the time of this detection. |
double |
getPairAngle(int pair,
boolean recalculate)
Return the angle between pairs of hydorphones. |
PamDataBlock |
getParentDataBlock()
|
long |
getTimeMilliseconds()
|
int |
getUpdateCount()
|
void |
setAbsBlockIndex(int absBlockIndex)
|
void |
setChannelBitmap(int channelBitmap)
|
void |
setDatabaseIndex(int databaseIndex)
|
void |
setDatabaseUpdateOf(int databaseUpdateOf)
|
void |
setLastUpdateTime(long lastUpdateTime)
|
void |
setLocalisation(AbstractLocalisation localisation)
|
void |
setOriginLatLong(LatLong oll)
|
void |
setParentDataBlock(PamDataBlock parentDataBlock)
|
void |
setTimeMilliseconds(long timeMilliseconds)
|
void |
updateDataUnit(long updateTime)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected long timeMilliseconds
protected int absBlockIndex
protected int channelBitmap
N.B the PamDataBlock also has a channelBitmap. The channelBitmap in a PamDataBlock is a list of channels that might be present in the data units. The channelBitmap in the data unit represents channels that are actually present in that data unit. For instance, if sampling 2 channels (ch0 and ch1) of raw audio data, the channelBitmap in the data block would equal 3, but the channel maps in the data units (which contain one channel of data each) will alternate between 1 and 2.
note that these are the software channels and that there may not be a 1:1 relationship between software channels and hydrophones.
This parameter is included in PamDataUnit and not in the subclass AcousticDataUnit since it is sometimes needed by non acoustic data.
protected AbstractLocalisation localisation
protected LatLong oLL
| Constructor Detail |
|---|
public PamDataUnit(long timeMilliseconds)
| Method Detail |
|---|
public void setAbsBlockIndex(int absBlockIndex)
public void setParentDataBlock(PamDataBlock parentDataBlock)
public void setTimeMilliseconds(long timeMilliseconds)
public int getAbsBlockIndex()
public PamDataBlock getParentDataBlock()
public long getTimeMilliseconds()
public void updateDataUnit(long updateTime)
public int getUpdateCount()
public int getChannelBitmap()
public void setChannelBitmap(int channelBitmap)
public AbstractLocalisation getLocalisation()
public void setLocalisation(AbstractLocalisation localisation)
localisation - The localisation to set.public LatLong getOriginLatLong(boolean recalculate)
recalculate -
public void setOriginLatLong(LatLong oll)
public double getPairAngle(int pair,
boolean recalculate)
pair - recalculate -
protected GpsData getGpsPosition()
public long getLastUpdateTime()
public void setLastUpdateTime(long lastUpdateTime)
public int getDatabaseIndex()
public void setDatabaseIndex(int databaseIndex)
public int getDatabaseUpdateOf()
public void setDatabaseUpdateOf(int databaseUpdateOf)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||