#ifndef _FFT_BEACON_FINDER_ #define _FFT_BEACON_FINDER_ #include #include const size_t FFT_LEN = 512; class FFTBeaconFinder { private: int samplingrate; nco_crcf coarse_correction; fftplan fft; std::complex fft_in[FFT_LEN]; std::complex fft_out[FFT_LEN]; size_t pos; int next_fft_in; int last_center; float last_center_level; bool has_sync; int spectral_bin_to_fft_idx(int); public: FFTBeaconFinder(int); ~FFTBeaconFinder(); void reset_sync(); std::complex work(std::complex); }; #endif