20 #ifndef GNSS_SDR_EXPONENTIAL_SMOOTHER_H 21 #define GNSS_SDR_EXPONENTIAL_SMOOTHER_H 51 void set_min_value(
float value);
52 void set_offset(
float offset);
53 float smooth(
float raw);
54 double smooth(
double raw);
57 std::vector<float> init_buffer_;
59 float one_minus_alpha_{0.999};
60 float old_value_{0.0};
61 float min_value_{25.0};
63 int samples_for_initialization_{200};
65 bool initializing_{
true};
71 #endif // GNSS_SDR_EXPONENTIAL_SMOOTHER_H Class that implements a first-order exponential smoother.
Exponential_Smoother & operator=(Exponential_Smoother &&)=default
Move assignment operator.
void set_samples_for_initialization(int num_samples)
Number of samples averaged for initialization. Default value: 200.
Exponential_Smoother()
Constructor.
~Exponential_Smoother()=default
Destructor.
void set_alpha(float alpha)
0 < alpha < 1. The higher, the most responsive, but more variance. Default value: 0...