13#error "This header is C++-only."
32 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
34 using Vector = Eigen::Matrix<Scalar, Dim, 1>;
52 impl_.
reset(Vector::Zero());
67 impl_.
addSample(sample, timestamp_ns, weight);
85 return impl_.filter_timestamp_ns;
94 return impl_.initialized;
A very simple low-pass filter, using a "one-pole infinite impulse response" design (one-pole IIR).
Definition: m_lowpass_float_vector.hpp:30
Vector const & getState() const noexcept
Get the filtered value.
Definition: m_lowpass_float_vector.hpp:74
void addSample(Vector const &sample, std::uint64_t timestamp_ns, Scalar weight=1)
Filter a sample, with an optional weight.
Definition: m_lowpass_float_vector.hpp:65
void reset() noexcept
Reset the filter to newly-created state.
Definition: m_lowpass_float_vector.hpp:50
std::uint64_t getTimestampNs() const noexcept
Get the time of last update.
Definition: m_lowpass_float_vector.hpp:83
LowPassIIRVectorFilter(Scalar cutoff_hz) noexcept
Constructor.
Definition: m_lowpass_float_vector.hpp:43
bool isInitialized() const noexcept
Get whether we have initialized state.
Definition: m_lowpass_float_vector.hpp:92
C++-only functionality in the Math helper library.
Definition: m_documentation.hpp:15
void addSample(Value const &sample, timepoint_ns timestamp_ns, Scalar weight=1)
Filter a sample, with an optional weight.
Definition: m_lowpass_float.hpp:76
void reset(Value const &val) noexcept
Reset the filter to newly-created state.
Definition: m_lowpass_float.hpp:59