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);
bool initialized
Definition: t_lowpass.hpp:102
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
Eigen::Matrix< double, Dim, 1 > Vector
Definition: t_lowpass_vector.hpp:34
Value state
Definition: t_lowpass.hpp:100
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
struct vive_imu_sample sample[3]
Definition: vive_protocol.h:210
timepoint_ns filter_timestamp_ns
Definition: t_lowpass.hpp:103
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