Use linear regression to get better predicted battery times
For hardware that has no rate data we use the differences in charge over a time
period to work out the effective rate. Using linear regression this estimation
is much more realistic.
To do this, introduce a simple circular buffer and use an index to calculate
the rate on each update.
Signed-off-by: Richard Hughes <email address hidden>
I'm pretty sure some of you will be fixed by this upstream commit:
commit b971b43c45bef92 51e1d6389716b9f be107802c7
Author: Leonardo Robol <email address hidden>
Date: Wed Oct 19 17:13:12 2011 +0100
Use linear regression to get better predicted battery times
For hardware that has no rate data we use the differences in charge over a time
period to work out the effective rate. Using linear regression this estimation
is much more realistic.
To do this, introduce a simple circular buffer and use an index to calculate
the rate on each update.
Signed-off-by: Richard Hughes <email address hidden>