Real-time capacity of lead-acid battery