DUNE: Uniform Navigational Environment
2016.05.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().
Referenced by Monitors::FuelLevel::FuelFilter::update().
|
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::FuelFilter::onVoltage().
|
inline |
Get temperature value.
References BM_TEMPERATURE, and DUNE::Math::MovingAverage< T >::mean().
Referenced by Monitors::FuelLevel::FuelFilter::update().
|
inline |
Get voltage value.
References BM_VOLTAGE, and DUNE::Math::MovingAverage< T >::mean().
|
inline |
Check if we have measurements.
References BM_CURRENT, BM_TEMPERATURE, and BM_VOLTAGE.
Referenced by Monitors::FuelLevel::FuelFilter::update().
|
inline |
Set message entities.
[in] | eids | array of entity ids |
Referenced by Monitors::FuelLevel::FuelFilter::FuelFilter().
|
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::FuelFilter::onCurrent(), Monitors::FuelLevel::FuelFilter::onTemperature(), Monitors::FuelLevel::FuelFilter::onVoltage(), 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().