DUNE: Uniform Navigational Environment  2016.09.0
DUNE::Power::Model Class Reference

Detailed Description

Utility class to compute offline power conversions and hold model parameters.

Consider ONLY positive speed.

Public Member Functions

 Model (Parsers::Config *cfg)
 
void validate (void) const
 
float computeMotionEnergy (float rpm, float duration) const
 
float computePayloadEnergy (const std::string &label, float duration) const
 
float computeHotelEnergy (float duration) const
 
float computeIMUEnergy (float duration) const
 
float getBatteryCapacity (void) const
 
float getPowerConsumptionHotel (void) const
 
float getPowerConsumptionFull (void) const
 

Constructor & Destructor Documentation

DUNE::Power::Model::Model ( Parsers::Config cfg)

Constructor.

Parameters
[in]cfgreference to Config parser

References DUNE::Parsers::Config::get().

Member Function Documentation

float DUNE::Power::Model::computeHotelEnergy ( float  duration) const

Compute energy consumed by minimal resources.

Parameters
[in]durationamount of time in seconds
Returns
energy consumed in Wh
float DUNE::Power::Model::computeIMUEnergy ( float  duration) const

Compute energy consumed by IMU.

Parameters
[in]durationamount of time in seconds
Returns
energy consumed in Wh
float DUNE::Power::Model::computeMotionEnergy ( float  rpm,
float  duration 
) const

Compute energy consumed by motor for some RPM value.

Parameters
[in]rpmvalue of rpms to convert from
[in]durationamount of time rotating at rpm
Returns
energy consumed in Wh

References DUNE::Math::piecewiseLI().

float DUNE::Power::Model::computePayloadEnergy ( const std::string &  label,
float  duration 
) const

Compute energy consumed by a payload entity.

Parameters
[in]labelname of the payload
[in]durationamount of time active
Returns
energy consumed in Wh
float DUNE::Power::Model::getBatteryCapacity ( void  ) const
inline

Get the battery capacity.

Returns
battery energy capacity in Wh
float DUNE::Power::Model::getPowerConsumptionFull ( void  ) const
inline
float DUNE::Power::Model::getPowerConsumptionHotel ( void  ) const
inline
void DUNE::Power::Model::validate ( void  ) const

Validate the model.

Collaboration diagram for DUNE::Power::Model:
Collaboration graph