Wrong conversion for mAh to mWh
Ryan Lortie
desrt at desrt.ca
Tue May 2 16:18:25 PDT 2006
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).
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.
Cheers.
On Tue, 2006-02-05 at 22:45 +0200, Johannes Berg wrote:
> On Tue, 2006-05-02 at 20:39 +0100, Richard Hughes wrote:
> > when we should be doing:
> >
> > mWh = mAh * ( mV / 1000)
>
> Since you're dealing with a computer you should probably do
>
> mWh = (mAh * mV) / 1000
>
> instead ;)
>
> But yes, sounds saner than just mAh * mV to me at least.
>
> johannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 703 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/hal/attachments/20060502/79c337b3/attachment.pgp
More information about the hal
mailing list