PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include <LowPassFilter2p.hpp>
Public Member Functions | |
LowPassFilter2p (float sample_freq, float cutoff_freq) | |
void | set_cutoff_frequency (float sample_freq, float cutoff_freq) |
float | apply (float sample) |
Add a new raw value to the filter. More... | |
float | get_cutoff_freq () const |
float | reset (float sample) |
Private Attributes | |
float | _cutoff_freq {0.0f} |
float | _a1 {0.0f} |
float | _a2 {0.0f} |
float | _b0 {0.0f} |
float | _b1 {0.0f} |
float | _b2 {0.0f} |
float | _delay_element_1 {0.0f} |
float | _delay_element_2 {0.0f} |
Definition at line 43 of file LowPassFilter2p.hpp.
|
inline |
Definition at line 47 of file LowPassFilter2p.hpp.
float math::LowPassFilter2p::apply | ( | float | sample | ) |
Add a new raw value to the filter.
Definition at line 75 of file LowPassFilter2p.cpp.
References _a1, _a2, _b0, _b1, _b2, _delay_element_1, and _delay_element_2.
Referenced by DfMpu9250Wrapper::_publish(), MS5525::collect(), SDP3X::collect(), MEASAirspeed::collect(), reset(), and control::BlockLowPass2::update().
|
inline |
Definition at line 64 of file LowPassFilter2p.hpp.
References lps22hb::reset().
Referenced by control::BlockLowPass2::update().
float math::LowPassFilter2p::reset | ( | float | sample | ) |
Definition at line 94 of file LowPassFilter2p.cpp.
References _b0, _b1, _b2, _delay_element_1, _delay_element_2, and apply().
void math::LowPassFilter2p::set_cutoff_frequency | ( | float | sample_freq, |
float | cutoff_freq | ||
) |
Definition at line 43 of file LowPassFilter2p.cpp.
References _a1, _a2, _b0, _b1, _b2, _cutoff_freq, _delay_element_1, _delay_element_2, f(), and M_PI_F.
Referenced by DfMpu9250Wrapper::DfMpu9250Wrapper(), and control::BlockLowPass2::update().
|
private |
Definition at line 73 of file LowPassFilter2p.hpp.
Referenced by apply(), and set_cutoff_frequency().
|
private |
Definition at line 74 of file LowPassFilter2p.hpp.
Referenced by apply(), and set_cutoff_frequency().
|
private |
Definition at line 76 of file LowPassFilter2p.hpp.
Referenced by apply(), reset(), and set_cutoff_frequency().
|
private |
Definition at line 77 of file LowPassFilter2p.hpp.
Referenced by apply(), reset(), and set_cutoff_frequency().
|
private |
Definition at line 78 of file LowPassFilter2p.hpp.
Referenced by apply(), reset(), and set_cutoff_frequency().
|
private |
Definition at line 71 of file LowPassFilter2p.hpp.
Referenced by set_cutoff_frequency().
|
private |
Definition at line 80 of file LowPassFilter2p.hpp.
Referenced by apply(), reset(), and set_cutoff_frequency().
|
private |
Definition at line 81 of file LowPassFilter2p.hpp.
Referenced by apply(), reset(), and set_cutoff_frequency().