public abstract class AbstractDetectionMatch extends java.lang.Object implements DetectionMatchModel
Constructor and Description |
---|
AbstractDetectionMatch(PamDataUnit pamDataUnit) |
AbstractDetectionMatch(PamDataUnit pamDataUnit,
java.lang.Integer detectionType) |
Modifier and Type | Method and Description |
---|---|
static int |
calcHydrophoneNumber(int numberOfDelays)
For N synchronised hydrophones there are N*(N-1)/2 time delays.
|
static int |
calcTDNumber(int numberofHydrophones)
For N synchronised hydrophones there are N*(N-1)/2 time delays.
|
static boolean |
containsChannel(int[] channels,
int channel)
Simple functions which return true if the array channels contains the int channel.
|
PamDataUnit |
findClosestDetection(int[] channelMap)
Gets the detection closest detection to the primary detection within the channel map and within time windows.
|
java.util.ArrayList<PamDataUnit> |
findDetectionGroup()
We want to be into and out of the PamDataBlock as quickly and as few times as possible.
|
PamDataUnit |
getDetection() |
java.util.ArrayList<PamDataUnit> |
getDetectionGroup() |
static java.util.ArrayList<PamDetection> |
getDetectionMap(java.util.ArrayList<TDArrayList<java.lang.Double>> timeDelayPossibility)
Every time delay possibility corresponds to a set of detections, up to one for each channel.
|
java.lang.Integer |
getDetectionType() |
double[] |
getHydrophoneDistances(long timeMillis)
Get the current array and calculate the distances between every hydrophone element;
|
java.util.ArrayList<PamVector> |
getHydrophones(long timeMillis) |
java.util.ArrayList<javax.vecmath.Point3f> |
getHydrophones3f(long timeMillis) |
int |
getNumberofHydrophones()
Get the number of hydrophones in the hydrophone array,
|
DetectionMatchWorker |
getObserverThread()
Get the observer thread.
|
PamDataBlock |
getParentDetections() |
int |
getPrimaryChannel()
Get the primary hydrophone channel.
|
TDArrayList<java.lang.Double> |
getTDErrrorsAll()
Calculate all the time delay errors for this pamDetection.
|
static double |
getTimeDelayError(int H0,
int H1,
long timeMillis,
PamArray currentArray)
Returns the location time delay error between hydrophones H0 and H1 based on location error specified by the user in the hydrophone array manager.
|
double |
getTimeWindowAddition()
Get the time window addition.
|
double[] |
getTimeWindows(long timeMillis)
Time windows are needed to match clicks.
|
double[] |
getTimeWindows(long timeMillis,
int[] channels)
Time windows are needed to match clicks.
|
static java.util.ArrayList<java.lang.Integer> |
indexM1(int numberOfHydrophones)
IndexM1 and IndexM2 specify which hydrophones to calculate time delays between.
|
static java.util.ArrayList<java.lang.Integer> |
indexM2(int numberOfHydrophones)
IndexM1 and IndexM2 specify which hydrophones to calculate time delays between.
|
static <T> int[][] |
mapPossibleCombinations(java.util.ArrayList<java.util.ArrayList<T>> dataAll)
Make a map of all possible detections or time delays.
|
void |
setDetection(PamDetection parentDetection) |
void |
setDetectionType(java.lang.Integer detectionType) |
void |
setObserverThread(DetectionMatchWorker observerThread)
Set the observer thread for time delay calculation.
|
void |
setParentDetections(PamDataBlock parentBlock)
Set Pamdatablock
|
void |
setTimeWindowAddition(double timeWindowAddition) |
static boolean |
testTimeDelays(java.util.ArrayList<java.util.ArrayList<java.lang.Double>> timeDelays)
Simple function to test time delays are not all null.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canLocalise, getGroupTimeDelays, getNMatchDetections, getNPossibilities
public AbstractDetectionMatch(PamDataUnit pamDataUnit)
public AbstractDetectionMatch(PamDataUnit pamDataUnit, java.lang.Integer detectionType)
public java.util.ArrayList<PamDataUnit> findDetectionGroup()
findDetectionGroup
in interface DetectionMatchModel
public java.util.ArrayList<PamDataUnit> getDetectionGroup()
public PamDataUnit findClosestDetection(int[] channelMap)
public int getNumberofHydrophones()
public double[] getHydrophoneDistances(long timeMillis)
public static boolean containsChannel(int[] channels, int channel)
channels
- public java.util.ArrayList<PamVector> getHydrophones(long timeMillis)
public java.util.ArrayList<javax.vecmath.Point3f> getHydrophones3f(long timeMillis)
public double[] getTimeWindows(long timeMillis)
public double[] getTimeWindows(long timeMillis, int[] channels)
public int getPrimaryChannel()
public PamDataUnit getDetection()
public void setDetection(PamDetection parentDetection)
parentDetection
- Parent detection containing this detection match informationpublic PamDataBlock getParentDetections()
public void setParentDetections(PamDataBlock parentBlock)
parentBlock
- public static java.util.ArrayList<java.lang.Integer> indexM2(int numberOfHydrophones)
public static java.util.ArrayList<java.lang.Integer> indexM1(int numberOfHydrophones)
public static int calcHydrophoneNumber(int numberOfDelays)
public static int calcTDNumber(int numberofHydrophones)
public static double getTimeDelayError(int H0, int H1, long timeMillis, PamArray currentArray)
channel
- number H0channel
- number H1speed
- of sound cpublic TDArrayList<java.lang.Double> getTDErrrorsAll()
public void setDetectionType(java.lang.Integer detectionType)
public java.lang.Integer getDetectionType()
public double getTimeWindowAddition()
public void setTimeWindowAddition(double timeWindowAddition)
public static <T> int[][] mapPossibleCombinations(java.util.ArrayList<java.util.ArrayList<T>> dataAll)
List
- of to calculate all possible combination of elements for;public static java.util.ArrayList<PamDetection> getDetectionMap(java.util.ArrayList<TDArrayList<java.lang.Double>> timeDelayPossibility)
timeDelayPossibility-
- set of time delays.public static boolean testTimeDelays(java.util.ArrayList<java.util.ArrayList<java.lang.Double>> timeDelays)
timeDelays
- public DetectionMatchWorker getObserverThread()
public void setObserverThread(DetectionMatchWorker observerThread)
observerThread
-