whistleDetector
Class WhistleDelays

java.lang.Object
  extended by whistleDetector.WhistleDelays

public class WhistleDelays
extends java.lang.Object

Class containing functions to calulate the delay between a detected whistle on one channel and the signal on an adjacent channel.

Existing FFT (spectrgram) data is used during the calculation.

The correlation function is calculated for each time partition along the length of the whistle and these correlations summed to overcome the problem of aliassing.

As the correlations are caculated, the spectrum is band limited in each time partition to only include acoustic energy close to the whistle contour. In this way, it is possible to independently calculate bearings to simultaneously occurring overlapping whistles.

Author:
Doug Gillespie

Field Summary
static int INVALID_DELAY
           
static int NO_CHANNEL_DATA
           
 
Constructor Summary
WhistleDelays()
           
 
Method Summary
static int getDelay(PamDataBlock fftDataBlock, WhistleShape whistle, int delayChannel)
          Calculate the delay.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INVALID_DELAY

public static final int INVALID_DELAY
See Also:
Constant Field Values

NO_CHANNEL_DATA

public static final int NO_CHANNEL_DATA
See Also:
Constant Field Values
Constructor Detail

WhistleDelays

public WhistleDelays()
Method Detail

getDelay

public static int getDelay(PamDataBlock fftDataBlock,
                           WhistleShape whistle,
                           int delayChannel)
Calculate the delay.

The whistle knows which channel it was detected on. Tell this functin which channel to calculate the dealy to. If FFT data for that channel does not exist, then return NO_CHANNEL_DATA

Parameters:
fftDataBlock - PamDataBlock of spectrgram data
whistle - Whistle contour from the whistle detector
delayChannel - channel to measure the delay to
Returns:
delay in samples