batteryCapacityForDischargeTime(dischargeTime, loadCurrent)

import electronics.battery.dischargetime-1

Calculate the capacity of a battery for a given discarge time with a constant load.

import electronics.battery.dischargetime-1;
batteryCapacityForDischargeTime( 10 hours, 100 mA )
dischargeTimethe desired discharge time.
loadCurrentload current.
kPeukerts constant. It depends on battery type. If not given 1.3 is assumed.
dischargeRatethe discarge rate of the battery. If not given 20 hour rate is assumed (good for 99% of specifications).
return valuethe capacity of the battery.

NOTE: This version of battery capacity specification is used in most of the cases. If you are looking for Peukert's capacity (rarely used), check out batteryCapacityForDischargeTime1H.

For more details, see's_law,