![]() |
DUNE: Uniform Navigational Environment
2022.04.0
|
Battery data for Fuel Level.
Public Types | |
| enum | BatteryMeasures { BM_VOLTAGE, BM_CURRENT, BM_TEMPERATURE, BM_TOTAL } |
Public Member Functions | |
| BatteryData (const unsigned window_size[BM_TOTAL]) | |
| ~BatteryData (void) | |
| void | setEntities (unsigned eids[]) |
| bool | update (BatteryMeasures bm, uint8_t entity, float value) |
| bool | update (const IMC::Voltage *msg) |
| bool | update (const IMC::Current *msg) |
| bool | update (const IMC::Temperature *msg) |
| float | getEnergyDrop (float timestep) const |
| float | getVoltage (void) const |
| float | getCurrent (void) const |
| float | getTemperature (void) const |
| bool | gotMeasurements (void) const |
|
inline |
|
inline |
Destructor.
References BM_TOTAL.
|
inline |
Get current value.
References BM_CURRENT, and DUNE::Math::MovingAverage< T >::mean().
|
inline |
Compute energy drop.
| [in] | timestep | elapsed time to use in computation |
References BM_CURRENT, BM_VOLTAGE, and DUNE::Math::MovingAverage< T >::mean().
|
inline |
Get temperature value.
References BM_TEMPERATURE, and DUNE::Math::MovingAverage< T >::mean().
|
inline |
Get voltage value.
References BM_VOLTAGE, and DUNE::Math::MovingAverage< T >::mean().
|
inline |
Check if we have measurements.
References BM_CURRENT, BM_TEMPERATURE, BM_TOTAL, and BM_VOLTAGE.
|
inline |
Set message entities.
| [in] | eids | array of entity ids |
|
inline |
Update a measurement.
| [in] | bm | battery measure type |
| [in] | entity | entity id to set |
| [in] | value | measure value to update with |
References DUNE::Math::MovingAverage< T >::update().
Referenced by update().
|
inline |
Update Voltage.
| [in] | msg | voltage message pointer |
References BM_VOLTAGE, and update().
|
inline |
Update Current.
| [in] | msg | current message pointer |
References BM_CURRENT, and update().
|
inline |
Update Temperature.
| [in] | msg | temperature message pointer |
References BM_TEMPERATURE, and update().
