How to measure battery capacity when buying new energy