Class PairBearingLocaliser
java.lang.Object
Localiser.algorithms.timeDelayLocalisers.bearingLoc.PairBearingLocaliser
- All Implemented Interfaces:
BearingLocaliser
,LocalisationAlgorithm
,LocalisationAlgorithmInfo
Really simple BearingLocaliser which works with two element closely
spaced arrays.
- Author:
- Doug Gillespie
-
Constructor Summary
ConstructorDescriptionPairBearingLocaliser
(int[] hydrophoneList, long timeMillis, double timingError) PairBearingLocaliser
(int hydrophoneBitMap, long timeMillis, double timingError) -
Method Summary
Modifier and TypeMethodDescriptionGet information about the localisation algorithm.Get the algorithm nameGet the principle axis of the arrayint
int
Get a hydrophone map for this localiserint
Get the likely content flags for this localiser.Get the algorithm parameters.double
double
Get something that can make LocalisationType objects of a form a bit bespoke to the type of localiser.double[][]
localise
(double[] delays, long timeMillis) Calculate angles theta and phi, based on a set of delays.void
prepare
(int[] arrayElements, long timeMillis, double timingError) Do any preparation necessary (e.g.
-
Constructor Details
-
PairBearingLocaliser
public PairBearingLocaliser(int hydrophoneBitMap, long timeMillis, double timingError) -
PairBearingLocaliser
public PairBearingLocaliser(int[] hydrophoneList, long timeMillis, double timingError)
-
-
Method Details
-
prepare
public void prepare(int[] arrayElements, long timeMillis, double timingError) Description copied from interface:BearingLocaliser
Do any preparation necessary (e.g. creation of look up tables)- Specified by:
prepare
in interfaceBearingLocaliser
- Parameters:
arrayElements
- list of hydrophone array elements in the sub array for this localiser.timeMillis
- , current time for this localisationtimingError
- expected timing error for each measurement (typically 1/12 of an ADC bin, or less if interpolation is being used in the cross correlation function).
-
getLocalisationContents
public int getLocalisationContents()Description copied from interface:LocalisationAlgorithmInfo
Get the likely content flags for this localiser.- Specified by:
getLocalisationContents
in interfaceLocalisationAlgorithmInfo
- Returns:
- localisation flags.
- See Also:
-
getArrayAxis
Description copied from interface:BearingLocaliser
Get the principle axis of the array- Specified by:
getArrayAxis
in interfaceBearingLocaliser
- Returns:
- for a linear array this will be a vector along the array;
for a planar array, this will be the vector on the plane between two hydrophones which is closest to the y axis.
-
getArrayType
public int getArrayType()- Specified by:
getArrayType
in interfaceBearingLocaliser
- Returns:
- the type of array - linear, planar, volumetric, etc.
-
localise
public double[][] localise(double[] delays, long timeMillis) Description copied from interface:BearingLocaliser
Calculate angles theta and phi, based on a set of delays. The number of delays should be equal to n(n-1)/2 where n is the number of hydrophone elements in the sub array.- Specified by:
localise
in interfaceBearingLocaliser
- Parameters:
delays
- array of delay times.timeMillis
- of this detection. This is relatively unused except in situation where hydrophone elements are moving relative to each other with time.- Returns:
- theta, phi and their estimated errors all in radians.
Data are packed into a two row array, the first row of which contains one or two angles, the second (optional) row contains the errors on those angles.
-
getHydrophoneMap
public int getHydrophoneMap()Description copied from interface:BearingLocaliser
Get a hydrophone map for this localiser- Specified by:
getHydrophoneMap
in interfaceBearingLocaliser
- Returns:
- bitmap of used hydrophones.
-
getSpacing
public double getSpacing()- Returns:
- the spacing
-
getSpeedOfSound
public double getSpeedOfSound()- Returns:
- the speedOfSound
-
getAlgorithmName
Description copied from interface:LocalisationAlgorithmInfo
Get the algorithm name- Specified by:
getAlgorithmName
in interfaceLocalisationAlgorithmInfo
- Returns:
- algorithm name
-
getParameters
Description copied from interface:LocalisationAlgorithmInfo
Get the algorithm parameters. Something else can turn these into xml for Tethys.- Specified by:
getParameters
in interfaceLocalisationAlgorithmInfo
- Returns:
- algorithm parameters object. Might be null;
-
getAlgorithmInfo
Description copied from interface:LocalisationAlgorithm
Get information about the localisation algorithm.- Specified by:
getAlgorithmInfo
in interfaceLocalisationAlgorithm
- Returns:
- algorithm information.
-
getTethysCreator
Description copied from interface:LocalisationAlgorithm
Get something that can make LocalisationType objects of a form a bit bespoke to the type of localiser. This may be better than having the standard functions in LocalizationBuilder guess what's best.- Specified by:
getTethysCreator
in interfaceLocalisationAlgorithm
- Returns:
- can be null in which case standard functions will do the best they can.
-