argos::CBatteryDischargeModelTimeMotion Class Reference

A battery discharge model in which the charge decreases with both time and motion. More...

#include <battery_equipped_entity.h>

Inheritance diagram for argos::CBatteryDischargeModelTimeMotion:
Collaboration diagram for argos::CBatteryDischargeModelTimeMotion:

Public Member Functions

 CBatteryDischargeModelTimeMotion ()
 
virtual void Init (TConfigurationNode &t_tree)
 Initializes the resource. More...
 
void SetDelta (Real f_delta)
 
void SetPosFactor (Real f_factor)
 
void SetOrientFactor (Real f_factor)
 
virtual void SetBattery (CBatteryEquippedEntity *pc_battery)
 
virtual void operator() ()
 
- Public Member Functions inherited from argos::CBatteryDischargeModel
 CBatteryDischargeModel ()
 
virtual ~CBatteryDischargeModel ()
 
virtual void Reset ()
 Resets the resource. More...
 
virtual void Destroy ()
 Undoes whatever was done by Init(). More...
 
- Public Member Functions inherited from argos::CBaseConfigurableResource
virtual ~CBaseConfigurableResource ()
 Class destructor. More...
 

Protected Attributes

const SAnchorm_psAnchor
 
CVector3 m_cOldPosition
 
CQuaternion m_cOldOrientation
 
Real m_fDelta
 
Real m_fPosFactor
 
Real m_fOrientFactor
 
- Protected Attributes inherited from argos::CBatteryDischargeModel
CBatteryEquippedEntitym_pcBattery
 

Detailed Description

A battery discharge model in which the charge decreases with both time and motion.

In this model, the charge is calculated as follows:

new charge = old charge - delta - pos_factor * (delta position) - orient_factor * (delta orientation)

Definition at line 227 of file battery_equipped_entity.h.

Constructor & Destructor Documentation

argos::CBatteryDischargeModelTimeMotion::CBatteryDischargeModelTimeMotion ( )
inline

Definition at line 231 of file battery_equipped_entity.h.

Member Function Documentation

void argos::CBatteryDischargeModelTimeMotion::Init ( TConfigurationNode t_tree)
virtual

Initializes the resource.

Parameters
t_treethe base of the XML configuration tree to parse
Exceptions
CARGoSExceptionif an error occurs

Reimplemented from argos::CBatteryDischargeModel.

Definition at line 217 of file battery_equipped_entity.cpp.

void argos::CBatteryDischargeModelTimeMotion::operator() ( )
virtual

Implements argos::CBatteryDischargeModel.

Definition at line 250 of file battery_equipped_entity.cpp.

void argos::CBatteryDischargeModelTimeMotion::SetBattery ( CBatteryEquippedEntity pc_battery)
virtual

Reimplemented from argos::CBatteryDischargeModel.

Definition at line 226 of file battery_equipped_entity.cpp.

void argos::CBatteryDischargeModelTimeMotion::SetDelta ( Real  f_delta)
inline

Definition at line 239 of file battery_equipped_entity.h.

void argos::CBatteryDischargeModelTimeMotion::SetOrientFactor ( Real  f_factor)
inline

Definition at line 247 of file battery_equipped_entity.h.

void argos::CBatteryDischargeModelTimeMotion::SetPosFactor ( Real  f_factor)
inline

Definition at line 243 of file battery_equipped_entity.h.

Member Data Documentation

CQuaternion argos::CBatteryDischargeModelTimeMotion::m_cOldOrientation
protected

Definition at line 259 of file battery_equipped_entity.h.

CVector3 argos::CBatteryDischargeModelTimeMotion::m_cOldPosition
protected

Definition at line 258 of file battery_equipped_entity.h.

Real argos::CBatteryDischargeModelTimeMotion::m_fDelta
protected

Definition at line 260 of file battery_equipped_entity.h.

Real argos::CBatteryDischargeModelTimeMotion::m_fOrientFactor
protected

Definition at line 262 of file battery_equipped_entity.h.

Real argos::CBatteryDischargeModelTimeMotion::m_fPosFactor
protected

Definition at line 261 of file battery_equipped_entity.h.

const SAnchor* argos::CBatteryDischargeModelTimeMotion::m_psAnchor
protected

Definition at line 257 of file battery_equipped_entity.h.