Package whistleDetector
Class WhistleDelays
java.lang.Object
whistleDetector.WhistleDelays
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
getDelay
(PamDataBlock fftDataBlock, WhistleShape whistle, int delayChannel) Calculate the delay.
-
Field Details
-
INVALID_DELAY
public static final int INVALID_DELAY- See Also:
-
NO_CHANNEL_DATA
public static final int NO_CHANNEL_DATA- See Also:
-
-
Constructor Details
-
WhistleDelays
public WhistleDelays()
-
-
Method Details
-
getDelay
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 datawhistle
- Whistle contour from the whistle detectordelayChannel
- channel to measure the delay to- Returns:
- delay in samples
-