Localiser
Class PairBearingLocaliser

java.lang.Object
  extended by Localiser.PairBearingLocaliser
All Implemented Interfaces:
BearingLocaliser

public class PairBearingLocaliser
extends java.lang.Object
implements BearingLocaliser

Really simple BearingLocaliser which works with two element closely spaced arrays.

Author:
Doug Gillespie

Field Summary
private  PamVector[] arrayAxis
           
private  int arrayType
           
private  PamArray currentArray
           
private  int[] phoneNumbers
           
private  double spacing
           
private  double spacingError
           
private  double speedOfSound
           
private  double speedOfSoundError
           
private  double timingError
           
 
Constructor Summary
PairBearingLocaliser(int[] hydrophoneList, double timingError)
           
PairBearingLocaliser(int hydrophoneBitMap, double timingError)
           
 
Method Summary
 PamVector[] getArrayAxis()
          Get the principle axis of the array
 int getArrayType()
           
 double[][] localise(double[] delays)
          Calculate angles theta and phi, based on a set of delays.
 void prepare(int[] arrayElements, double timingError)
          Do any preparation necessary (e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

phoneNumbers

private int[] phoneNumbers

spacing

private double spacing

spacingError

private double spacingError

speedOfSound

private double speedOfSound

speedOfSoundError

private double speedOfSoundError

currentArray

private PamArray currentArray

arrayAxis

private PamVector[] arrayAxis

arrayType

private int arrayType

timingError

private double timingError
Constructor Detail

PairBearingLocaliser

public PairBearingLocaliser(int hydrophoneBitMap,
                            double timingError)

PairBearingLocaliser

public PairBearingLocaliser(int[] hydrophoneList,
                            double timingError)
Method Detail

prepare

public void prepare(int[] arrayElements,
                    double timingError)
Description copied from interface: BearingLocaliser
Do any preparation necessary (e.g. creation of look up tables)

Specified by:
prepare in interface BearingLocaliser
Parameters:
arrayElements - list of hydrophone array elements in the sub array for this localiser.
timingError - 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).

getArrayAxis

public PamVector[] getArrayAxis()
Description copied from interface: BearingLocaliser
Get the principle axis of the array

Specified by:
getArrayAxis in interface BearingLocaliser
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 interface BearingLocaliser
Returns:
the type of array - linear, planar, volumetric, etc.

localise

public double[][] localise(double[] delays)
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 interface BearingLocaliser
Parameters:
delays - array of delay times.
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.