|
EnigmaIOT
0.9.8
Secure sensor and gateway platform based on ESP8266 and ESP32
|
Go to the documentation of this file.
12 #if defined(ARDUINO) && ARDUINO >= 100
52 int divide (
float* array,
int start,
int end);
60 void quicksort (
float* array,
int start,
int end);
float medianFilter(float value)
Median filter calculation of next value.
uint8_t _order
Filter order. Numbre of samples to store for calculations.
float addValue(float value)
Pushes a new value for calculation. Until the buffer is filled up to filter order,...
~FilterClass()
Frees up dynamic memory.
FilterClass(FilterType_t type, uint8_t order)
Creates a new filter class.
FilterType_t
Type of filter.
float addWeigth(float coeff)
Adds a new weighting value. It is pushed on the array so latest value will be used for older data.
float aveFilter(float value)
Average filter calculation of next value.
void clear()
Resets state of the filter to an initial value.
void quicksort(float *array, int start, int end)
Sorting function that uses QuickSort algorythm.
float * _orderedValues
Values ordered for median calculation.
int divide(float *array, int start, int end)
Divide function to be used on Quick Sort.
uint _index
Used to point latest entered value while number of values less than order.
float * _weightValues
Weight values for average calculation. By default all them have value of 1 for arithmetic average.
FilterType_t _filterType
Filter type from FilterType_t.
float * _rawValues
Raw values store.