![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Real-time spectrum analyzer for ST Nucleo F401RE using Seeed Studio 2.8'' TFT Touch Shield V2.0.
Dependencies: SeeedStudioTFTv2 UITDSP_ADDA UIT_FFT_Real mbed
SpactrumAnalysisClasses/FFT_Analysis.hpp
- Committer:
- MikamiUitOpen
- Date:
- 2015-07-26
- Revision:
- 0:c5b026c2d07e
File content as of revision 0:c5b026c2d07e:
//------------------------------------------------------- // Class for spectrum analysis using FFT (Header) // Copyright (c) 2014 MIKAMI, Naoki, 2014/12/30 //------------------------------------------------------- #ifndef FFT_ANALYZER_HPP #define FFT_ANALYZER_HPP #include "fftReal.hpp" #include "Hamming.hpp" #include "PeakHolder.hpp" namespace Mikami { class FftAnalyzer { public: FftAnalyzer(int nData, int nFft); ~FftAnalyzer(); void Execute(float xn[], float db[]); private: const int N_DATA_; const int N_FFT_; HammingWindow hm_; FftReal fft_; PeakHolder* pkHolder_; float* xData; // Data to be analyzed float* xFft; // Input for FFT Complex* yFft; // Output of FFT float* normY; // Powerspectrum float Sqr(float x) { return x*x; } }; } #endif // FFT_ANALYZER_HPP