How to calculate the remaining power of lead-acid batteries