9 #ifndef GRT_PEAK_DETECTION_HEADER
10 #define GRT_PEAK_DETECTION_HEADER
13 #include "../PreProcessingModules/DoubleMovingAverageFilter.h"
14 #include "../PreProcessingModules/DeadZone.h"
19 unsigned int peakType;
20 unsigned int peakIndex;
22 PeakInfo(
unsigned int peakType = 0,
unsigned int peakIndex = 0,Float peakValue = 0){
23 this->peakType = peakType;
24 this->peakIndex = peakIndex;
25 this->peakValue = peakValue;
30 #define DEFAULT_GLOBAL_MAXIMA_VALUE -1.0e+99
31 #define DEFAULT_GLOBAL_MINIMA_VALUE 1.0e+99
35 PeakDetection(
const UINT lowPassFilterSize = 5,
const UINT searchWindowSize = 5);
43 bool setSearchWindowSize(
const UINT searchWindowSize);
45 bool update(
const Float x );
53 unsigned int inputTimeoutCounter;
54 unsigned int inputTimeoutLimit;
55 unsigned int maximaCounter;
56 unsigned int minimaCounter;
57 unsigned int lowPassFilterSize;
58 unsigned int searchWindowSize;
59 unsigned int searchHistorySize;
60 Float deadZoneThreshold;
71 enum PeakTypes{NO_PEAK_FOUND=0,LOCAL_MAXIMA_FOUND,LOCAL_MINIMA_FOUND,GLOBAL_MAXIMA_FOUND,GLOBAL_MINIMA_FOUND};
77 #endif //GRT_PEAK_DETECTION_HEADER
The CircularBuffer class provides a data structure for creating a dynamic circular buffer (also known...