DUNE: Uniform Navigational Environment  2.6.0-rc4
DUNE::Plans::PowerModel Class Reference

Detailed Description

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

Consider ONLY positive speed.

Public Member Functions

 PowerModel (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
 

Constructor & Destructor Documentation

DUNE::Plans::PowerModel::PowerModel ( Parsers::Config cfg)
inline

Constructor.

Parameters
[in]cfgreference to Config parser

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

Member Function Documentation

float DUNE::Plans::PowerModel::computeHotelEnergy ( float  duration) const
inline

Compute energy consumed by minimal resources.

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

Compute energy consumed by IMU.

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

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::Plans::PowerModel::computePayloadEnergy ( const std::string &  label,
float  duration 
) const
inline

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::Plans::PowerModel::getBatteryCapacity ( void  ) const
inline

Get the battery capacity.

Returns
battery energy capacity in Wh
void DUNE::Plans::PowerModel::validate ( void  ) const
inline

Validate the model.

Collaboration diagram for DUNE::Plans::PowerModel:
Collaboration graph