diff options
Diffstat (limited to 'battery.cpp')
-rw-r--r-- | battery.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/battery.cpp b/battery.cpp index e91b05f..5be2fc8 100644 --- a/battery.cpp +++ b/battery.cpp @@ -3,7 +3,13 @@ Battery::Battery() : activeBattery(batteries[0]), seriesCells(0), - parallelCells(0) + parallelCells(0), + systemVoltage(0), + peakPower(0), + packDischargeRate(0), + packChargeRate(0), + packWeight(0), + packEnergy(0) { } @@ -12,3 +18,20 @@ 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); + + +} |