A battery pack capacity calculation formula