mirror of https://github.com/nymea/nymea.git
Also include big jumps in the calculation for the standard deviation
parent
96ae3cd01a
commit
1b33015354
|
|
@ -124,11 +124,11 @@ void StateValueFilterAdaptive::update()
|
|||
m_outputValueCount++;
|
||||
}
|
||||
}
|
||||
|
||||
// Poor mans solution to calculate standard deviation. Not as precise, but much faster than looping over history again
|
||||
m_standardDeviation = ((m_standardDeviation * m_windowSize) + qAbs(changeRatioToAverage)) / (m_windowSize + 1);
|
||||
}
|
||||
|
||||
// Poor mans solution to calculate standard deviation. Not as precise, but much faster than looping over history again
|
||||
m_standardDeviation = ((m_standardDeviation * m_windowSize) + qAbs(changeRatioToAverage)) / (m_windowSize + 1);
|
||||
|
||||
// reset stats on overflow of counters
|
||||
if (m_inputValueCount < m_outputValueCount) {
|
||||
m_outputValueCount = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue