A method includes determining that a battery has entered a transition
phase based on the occurrence of a change in direction of current flow
through the battery. In response to determining that the battery is in
the transition phase, a capacity of the battery is determined based on a
transition phase battery capacity model of capacity-vs.-voltage.