Class BaseFFTBearingAlgorithm

java.lang.Object
bearinglocaliser.algorithms.BaseFFTBearingAlgorithm
All Implemented Interfaces:
BearingAlgorithm
Direct Known Subclasses:
TOADBearingAlgorithm, WrappedBeamFormAlgorithm

public abstract class BaseFFTBearingAlgorithm extends Object implements BearingAlgorithm
  • Constructor Details Link icon

  • Method Details Link icon

    • getRequiredDataHistory Link icon

      public long getRequiredDataHistory(PamObservable o, Object arg)
      Specified by:
      getRequiredDataHistory in interface BearingAlgorithm
    • setParams Link icon

      public void setParams(BearingAlgorithmParams bearingAlgoParams)
      Specified by:
      setParams in interface BearingAlgorithm
    • getParams Link icon

      public BearingAlgorithmParams getParams()
      Specified by:
      getParams in interface BearingAlgorithm
    • prepare Link icon

      public boolean prepare()
      Specified by:
      prepare in interface BearingAlgorithm
    • process Link icon

      public boolean process(PamDataUnit pamDataUnit, double sampleRate, BearingAlgorithmGroup bearingAlgoGroup)
      Specified by:
      process in interface BearingAlgorithm
    • frequencyToBin Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      public FFTDataBlock getFftSourceData()
      Returns:
      the fftSourceData
    • getAlgorithmParams Link icon

      public BearingAlgorithmParams getAlgorithmParams()
      Returns:
      the algorithmParams
    • setAlgorithmParams Link icon

      public void setAlgorithmParams(BearingAlgorithmParams algorithmParams)