NiMH Batteries and Fuel Gauge
The best way to determine a new capacity is learned by cycling the battery. One needs a non-vol memory register to save these parameters.  

Read about the demo board and consider using it as it has some nice software.
http://www.linear.com/docs/44117  Although this software compares only a stored profile of the Panasonic LiPo cell.