#include "battery.h" Battery::Battery() : activeBattery(batteries[LiionPhosphate]), seriesCells(0), parallelCells(0), systemVoltage(0), peakPower(0), packDischargeRate(0), packChargeRate(0), packWeight(0), packEnergy(0) { } void Battery::changeBatteryChemistry(int name) { activeBattery= batteries[name]; } void Battery::setSystemVoltage(double voltage) { systemVoltage = voltage; } void Battery::setPeakSystemPower(double power) { peakPower = power; } void Battery::calculate() { seriesCells = ceil(systemVoltage/activeBattery.nominalVoltage); }