DUNE: Uniform Navigational Environment
2.5.1
|
Battery data for Fuel Level.
Public Types | |
enum | BatteryMeasures { BM_VOLTAGE, BM_CURRENT, BM_TEMPERATURE, BM_TOTAL } |
Public Member Functions | |
BatteryData (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().
Referenced by Monitors::FuelLevel::Task::computeInitialEstimate(), Monitors::FuelLevel::Task::getMergedEstimate(), and Monitors::FuelLevel::Task::task().
|
inline |
Compute energy drop.
[in] | timestep | elapsed time to use in computation |
References BM_CURRENT, BM_VOLTAGE, and DUNE::Math::MovingAverage< T >::mean().
Referenced by Monitors::FuelLevel::Task::consume().
|
inline |
Get temperature value.
References BM_TEMPERATURE, and DUNE::Math::MovingAverage< T >::mean().
Referenced by Monitors::FuelLevel::Task::computeInitialEstimate(), Monitors::FuelLevel::Task::getMergedEstimate(), and Monitors::FuelLevel::Task::task().
|
inline |
Get voltage value.
References BM_VOLTAGE, and DUNE::Math::MovingAverage< T >::mean().
Referenced by Monitors::FuelLevel::Task::getMapEstimate(), and Monitors::FuelLevel::Task::getModelEstimate().
|
inline |
Check if we have measurements.
References BM_CURRENT, BM_TEMPERATURE, and BM_VOLTAGE.
Referenced by Monitors::FuelLevel::Task::task().
|
inline |
Set message entities.
[in] | eids | array of entity ids |
Referenced by Monitors::FuelLevel::Task::onResourceAcquisition().
|
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 Monitors::FuelLevel::Task::consume(), and 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().