36 #include <px4_platform_common/defines.h> 64 const float ohm = tanf(
M_PI_F / fr);
65 const float c = 1.0f + 2.0f * cosf(
M_PI_F / 4.0
f) * ohm + ohm * ohm;
71 _a1 = 2.0f * (ohm * ohm - 1.0f) / c;
72 _a2 = (1.0f - 2.0f * cosf(
M_PI_F / 4.0
f) * ohm + ohm * ohm) / c;
79 if (PX4_ISFINITE(dval(0)) && PX4_ISFINITE(dval(1)) && PX4_ISFINITE(dval(2))) {
matrix::Vector3f _delay_element_2
A class to implement a second order low pass filter on a Vector3f Based on LowPassFilter2p.hpp by Leonard Hall LeonardTHall@gmail.com
void set_cutoff_frequency(float sample_freq, float cutoff_freq)
matrix::Vector3f reset(const matrix::Vector3f &sample)
matrix::Vector3f _delay_element_1
Vector< float, 6 > f(float t, const Matrix< float, 6, 1 > &, const Matrix< float, 3, 1 > &)
matrix::Vector3f apply(const matrix::Vector3f &sample)
Add a new raw value to the filter.