Determination of the capacity of the batteries