11 m_fSumOfSquareDiff(0.0f) {}
22 Real fDelta = f_value - m_fMean;
23 m_fMean += fDelta /
static_cast<Real>(m_unCounter);
24 m_fSumOfSquareDiff += fDelta * (f_value - m_fMean);
31 return m_unCounter > 1 ?
32 (m_fSumOfSquareDiff /
static_cast<Real>(m_unCounter - 1))
41 m_fSmoothingFactor(f_smoothing_factor),
42 m_bInitialized(false) {}
49 m_fPreviousOutput = f_input + m_fSmoothingFactor * (m_fPreviousOutput - f_input);
52 m_fPreviousOutput = f_input;
53 m_bInitialized =
true;
55 return m_fPreviousOutput;
62 m_bInitialized =
false;
float Real
Collects all ARGoS code.
The namespace containing all the ARGoS related code.
Real GetVariance() const
Returns the variance of the signal.
void Append(Real f_value)
Appends a new piece of data and recalculates the statistics.
Real Filter(Real f_input)
Applies the filter to the given value.
void Reset()
Resets the filter.
CRCLowPassFilter(Real f_smoothing_factor)
Class constructor.