|
| Integrator (uint32_t auto_reset_interval=4000, bool coning_compensation=false) |
|
| Integrator (const Integrator &)=delete |
|
Integrator & | operator= (const Integrator &)=delete |
|
| Integrator (Integrator &&)=delete |
|
Integrator & | operator= (Integrator &&)=delete |
|
bool | put (const uint64_t ×tamp, const matrix::Vector3f &val, matrix::Vector3f &integral, uint32_t &integral_dt) |
| Put an item into the integral. More...
|
|
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. More...
|
|
matrix::Vector3f | get (bool reset, uint32_t &integral_dt) |
| Get the current integral and reset the integrator if needed. More...
|
|
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. More...
|
|
void | set_autoreset_interval (uint32_t auto_reset_interval) |
| Set auto reset interval during runtime. More...
|
|
§ get()
matrix::Vector3f Integrator::get |
( |
bool |
reset, |
|
|
uint32_t & |
integral_dt |
|
) |
| |
Get the current integral and reset the integrator if needed.
- Parameters
-
reset | Reset the integral to zero. |
integral_dt | Get the dt in us of the current integration (only if reset). |
- Returns
- the integral since the last read-reset
§ get_and_filtered()
matrix::Vector3f Integrator::get_and_filtered |
( |
bool |
reset, |
|
|
uint32_t & |
integral_dt, |
|
|
matrix::Vector3f & |
filtered_val |
|
) |
| |
Get the current integral and reset the integrator if needed.
Additionally give the integral over the samples differentiated by the integration time (mean filtered values).
- Parameters
-
reset | Reset the integral to zero. |
integral_dt | Get the dt in us of the current integration (only if reset). |
filtered_val | The integral differentiated by the integration time. |
- Returns
- the integral since the last read-reset
§ put()
bool Integrator::put |
( |
const uint64_t & |
timestamp, |
|
|
const matrix::Vector3f & |
val, |
|
|
matrix::Vector3f & |
integral, |
|
|
uint32_t & |
integral_dt |
|
) |
| |
Put an item into the integral.
- Parameters
-
timestamp | Timestamp of the current value. |
val | Item to put. |
integral | Current integral in case the integrator did reset, else the value will not be modified |
integral_dt | Get the dt in us of the current integration (only if reset). |
- Returns
- true if putting the item triggered an integral reset and the integral should be published.
§ put_with_interval()
bool Integrator::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.
- Parameters
-
interval_us | Interval in us since last integration. |
val | Item to put. |
integral | Current integral in case the integrator did reset, else the value will not be modified |
integral_dt | Get the dt in us of the current integration (only if reset). Note that this values might not be accurate vs. hrt_absolute_time because it is just the sum of the supplied intervals. |
- Returns
- true if putting the item triggered an integral reset and the integral should be published.
§ set_autoreset_interval()
void Integrator::set_autoreset_interval |
( |
uint32_t |
auto_reset_interval | ) |
|
|
inline |
Set auto reset interval during runtime.
This won't reset the integrator.
- Parameters
-
auto_reset_interval | New reset time interval for the integrator (+- 10%). |
The documentation for this class was generated from the following files: