filter clear function

This commit is contained in:
philsson 2018-09-23 14:29:19 +02:00
parent 50df1cf9d2
commit f9745a2e44
3 changed files with 9 additions and 2 deletions

View File

@ -17,8 +17,8 @@ float ImuFusion::getAngle(float dT)
m_angle += dT*rot;
//float ratio = 0.99;
float ratio = 0.95f;
float ratio = 0.99;
//float ratio = 0.95f;
//float ratio = 0.9996;
float rawAngle = m_pImu->read_acc_deg(axis); // conversion from G to Deg

View File

@ -16,6 +16,11 @@ float incrementalLPF::filter(float latestValue)
return m_filtered;
}
void incrementalLPF::clear()
{
m_filtered = 0;
}
pt1FilterApply4::pt1FilterApply4(float freqCut)
: m_freqCut(freqCut)
, m_RC(1.0f / (2.0f * (float)PI * m_freqCut))

View File

@ -11,6 +11,8 @@ public:
float filter(float latestValue);
void clear();
private:
float m_filtered;