LibreVNA/Software/PC_Application/averaging.h
2020-09-17 15:51:20 +02:00

25 lines
523 B
C++

#ifndef AVERAGING_H
#define AVERAGING_H
#include "Device/device.h"
#include <deque>
#include <complex>
class Averaging
{
public:
Averaging();
void reset();
void setAverages(unsigned int a);
Protocol::Datapoint process(Protocol::Datapoint d);
Protocol::SpectrumAnalyzerResult process(Protocol::SpectrumAnalyzerResult d);
unsigned int getLevel();
private:
std::vector<std::deque<std::array<std::complex<double>, 4>>> avg;
int maxPoints;
unsigned int averages;
};
#endif // AVERAGING_H