Successive-approximation algorithm for estimating capacity of Li-ion batteries. (15th September 2018)