1. Given the fact my Hardware(wireless) consumes different currents during transmission,reception and while its sleeping.
How does one measure the Battery charge consumption at any given point of time and thereby calculate the battery life?
Is there any reference circuit, Documents and the math involved in calculation?
Maxim, Microchip(PIC) and some other specialty chip makers make "battery gas gauges" combined with battery charge controller chips. They use ADs and non-volatile (flash?) memory to store a running integral of AHin vs AHout. The integral is reset when the charge controller deems the battery fully charged, and then meters from there. The idea is, that at any time, the running integral should be predictive of "remaining" charge in the battery. Some of these dynamically determine an estimate of battery-capacity based on recent charge/discharge cycles.