Package bearinglocaliser.algorithms
Class BaseFFTBearingAlgorithm
java.lang.Object
bearinglocaliser.algorithms.BaseFFTBearingAlgorithm
- All Implemented Interfaces:
 BearingAlgorithm
- Direct Known Subclasses:
 TOADBearingAlgorithm,WrappedBeamFormAlgorithm
- 
Constructor Summary
ConstructorsConstructorDescriptionBaseFFTBearingAlgorithm(BearingProcess bearingProcess, BearingAlgorithmParams algorithmParams, int groupIndex)  - 
Method Summary
Modifier and TypeMethodDescriptionintfrequencyToBin(double frequency) Convert a frequency to the nearest bin.int[]frequencyToBin(double[] frequency) Convert an array of frequency values to the nearest bins.longbooleanprepare()booleanprocess(PamDataUnit pamDataUnit, double sampleRate, BearingAlgorithmGroup bearingAlgoGroup) abstract BearingLocalisationprocessFFTData(PamDataUnit pamDataUnit, BearingAlgorithmGroup beamGroup, FFTDataList fftDataList) this is where we end up when any raw or FFT data has been extracted and, where necessary FFT'd so we've an array of FFT data over all channels in the group.voidsetAlgorithmParams(BearingAlgorithmParams algorithmParams) voidsetParams(BearingAlgorithmParams bearingAlgoParams) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface bearinglocaliser.algorithms.BearingAlgorithm
createDataDisplay 
- 
Constructor Details
- 
BaseFFTBearingAlgorithm
public BaseFFTBearingAlgorithm(BearingProcess bearingProcess, BearingAlgorithmParams algorithmParams, int groupIndex)  
 - 
 - 
Method Details
- 
getRequiredDataHistory
- Specified by:
 getRequiredDataHistoryin interfaceBearingAlgorithm
 - 
setParams
- Specified by:
 setParamsin interfaceBearingAlgorithm
 - 
getParams
- Specified by:
 getParamsin interfaceBearingAlgorithm
 - 
prepare
public boolean prepare()- Specified by:
 preparein interfaceBearingAlgorithm
 - 
process
public boolean process(PamDataUnit pamDataUnit, double sampleRate, BearingAlgorithmGroup bearingAlgoGroup) - Specified by:
 processin interfaceBearingAlgorithm
 - 
frequencyToBin
public int frequencyToBin(double frequency) Convert a frequency to the nearest bin. The range of the bin will be from 0 to fftLength()/2 inclusive, so when looping to a higher limit, loop to invalid input: '<' the top bin number!- Parameters:
 frequency- Frequency in Hz- Returns:
 - FFT bin number.
 
 - 
frequencyToBin
public int[] frequencyToBin(double[] frequency) Convert an array of frequency values to the nearest bins. The range of the bins will be from 0 to fftLength()/2 inclusive, so when looping to a higher limit, loop to invalid input: '<' the top bin number!- Parameters:
 frequency- Frequencies in Hz- Returns:
 - FFT bin numbers.
 
 - 
processFFTData
public abstract BearingLocalisation processFFTData(PamDataUnit pamDataUnit, BearingAlgorithmGroup beamGroup, FFTDataList fftDataList) this is where we end up when any raw or FFT data has been extracted and, where necessary FFT'd so we've an array of FFT data over all channels in the group.- Parameters:
 pamDataUnit-beamGroup-fftDataList-- Returns:
 - a valid bearing loclaisation or null if it can't be computed
 
 - 
getFftSourceData
- Returns:
 - the fftSourceData
 
 - 
getAlgorithmParams
- Returns:
 - the algorithmParams
 
 - 
setAlgorithmParams
 
 -