45 #include <mathlib/mathlib.h> 51 Integrator(uint32_t auto_reset_interval = 4000 ,
bool coning_compensation =
false);
134 void _reset(uint32_t &integral_dt);
void _reset(uint32_t &integral_dt)
Integrator & operator=(const Integrator &)=delete
uint64_t _last_reset_time
last auto-announcement of integral value
matrix::Vector3f _last_val
previous input
int reset(enum LPS22HB_BUS busid)
Reset the driver.
bool _coning_comp_on
true to turn on coning corrections
matrix::Vector3f get_and_filtered(bool reset, uint32_t &integral_dt, matrix::Vector3f &filtered_val)
Get the current integral and reset the integrator if needed.
bool put(const uint64_t ×tamp, const matrix::Vector3f &val, matrix::Vector3f &integral, uint32_t &integral_dt)
Put an item into the integral.
matrix::Vector3f _last_alpha
previous value of _alpha
void set_autoreset_interval(uint32_t auto_reset_interval)
Set auto reset interval during runtime.
bool put_with_interval(unsigned interval_us, matrix::Vector3f &val, matrix::Vector3f &integral, uint32_t &integral_dt)
Put an item into the integral but provide an interval instead of a timestamp.
matrix::Vector3f _alpha
integrated value before coning corrections are applied
matrix::Vector3f _beta
accumulated coning corrections
Integrator(uint32_t auto_reset_interval=4000, bool coning_compensation=false)
matrix::Vector3f _last_delta_alpha
integral from previous previous sampling interval
uint32_t _auto_reset_interval
the interval after which the content will be published and the integrator reset, 0 if no auto-reset ...
uint64_t _last_integration_time
timestamp of the last integration step