From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- .../Aufgabenblatt1/DFTApp/src/DFTProcessor.h | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Master/Modellbildung_und_Simulation/Aufgabenblatt1/DFTApp/src/DFTProcessor.h (limited to 'Master/Modellbildung_und_Simulation/Aufgabenblatt1/DFTApp/src/DFTProcessor.h') diff --git a/Master/Modellbildung_und_Simulation/Aufgabenblatt1/DFTApp/src/DFTProcessor.h b/Master/Modellbildung_und_Simulation/Aufgabenblatt1/DFTApp/src/DFTProcessor.h new file mode 100644 index 0000000..96ef46e --- /dev/null +++ b/Master/Modellbildung_und_Simulation/Aufgabenblatt1/DFTApp/src/DFTProcessor.h @@ -0,0 +1,62 @@ +/* + * DFTProcessor.h + * + * Created on: 29.04.2011 + * Author: sven + */ + +#ifndef DFTPROCESSOR_H_ +#define DFTPROCESSOR_H_ + +#ifndef DFTAPP_PARAMETERS_H_ + #include "DFTAppParameters.h" +#endif + +#include + +struct SpectralData +{ + unsigned mFreq; + double mAmplitude; + double mPhase; +}; + +class DFTProcessor { +public: + DFTProcessor(DFTAppParameters&); + virtual ~DFTProcessor(); + const std::vector& getInputData() const + { + return mInputData; + } + const std::vector& getRe() const + { + return mRe; + } + const std::vector& getIm() const + { + return mIm; + } + const std::vector& getIdft() const + { + return mIdft; + } + const std::vector& getSpectrum() const + { + return mSpectrum; + } +private: + DFTAppParameters& mParams; + unsigned mNumDftSamples; + unsigned mSampleRate; + std::vector mInputData; + std::vector mRe; + std::vector mIm; + std::vector mIdft; + std::vector mSpectrum; + + void writeSpectrumToCSV(); + void startGnuPlot(); +}; + +#endif /* DFTPROCESSOR_H_ */ -- cgit v1.2.3