13 #error "This header is C++-only." 32 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
34 using Vector = Eigen::Matrix<Scalar, Dim, 1>;
44 : impl_(cutoff_hz, Vector::Zero())
54 impl_.
reset(Vector::Zero());
68 std::uint64_t timestamp_ns,
71 impl_.
addSample(sample, timestamp_ns, weight);
89 return impl_.filter_timestamp_ns;
98 return impl_.initialized;
void addSample(Vector const &sample, std::uint64_t timestamp_ns, Scalar weight=1)
Filter a sample, with an optional weight.
Definition: t_lowpass_vector.hpp:67
void addSample(Value const &sample, timepoint_ns timestamp_ns, Scalar weight=1)
Filter a sample, with an optional weight.
Definition: t_lowpass.hpp:75
LowPassIIRVectorFilter(Scalar cutoff_hz) noexcept
Constructor.
Definition: t_lowpass_vector.hpp:43
std::uint64_t getTimestampNs() const noexcept
Access the time of last update.
Definition: t_lowpass_vector.hpp:87
void reset(Value const &val) noexcept
Reset the filter to just-created state.
Definition: t_lowpass.hpp:58
bool isInitialized() const noexcept
Access whether we have initialized state.
Definition: t_lowpass_vector.hpp:96
void reset() noexcept
Reset the filter to just-created state.
Definition: t_lowpass_vector.hpp:52
Vector const & getState() const noexcept
Access the filtered value.
Definition: t_lowpass_vector.hpp:78
Definition: t_fusion.hpp:25
A very simple low-pass filter, using a "one-pole infinite impulse response" design (one-pole IIR)...
Definition: t_lowpass_vector.hpp:29