Wrong conversion for mAh to mWh

Richard Hughes hughsient at gmail.com
Wed May 3 00:30:59 PDT 2006


On Tue, 2006-05-02 at 19:18 -0400, Ryan Lortie wrote:
> mAh * mV = µWh, (1/1000 * 1/1000 = 1/1mil).
> 
> This is not a bug since the "normalised" values aren't promised to be in
> any unit at all -- they are only guaranteed to be in a consistent unit
> across all batteries in the system (remember that we original brought
> this in to solve the multiple-batteries-with-different-voltage problem).

Umm yes, but if we do my fix, the values sit nicely as mWh. We even say
that the normalised values are mWh further down the file.

> Relying on this value to be in mW is a mistake.  With APM, for example,
> we will not have _any_ way of correcting this unit to mW.

Which we don't. It's trivial to go from mAh to mWh tho, so I think we
should do this, rather than present the value as µWh which IMO is crazy.

Richard.



More information about the hal mailing list