Lithium battery pack capacity calculation formula