autotest: Extrapolate minutes_battery_life for power_LoadTest.

In its current form power_LoadTest reports minutes_battery_life as the
number of minutes the battery lasted running the multiple iterations
of the 1 hour 60/20/10/10 payload.

While performing the test over the fully charged to fully discharged
battery is vital as what real world use will be it makes it hard to
get the results due to long runtime.  Additonally even over the full
discharge there are small inaccuracies depending upon how charged the
battery was or what level we allowed it to discharge to that are
currently not accounted for.

This change extrapolates the minutes_battery_life_tested by applying
the following equation:

  minutes_battery_life = minutes_battery_life_tested * scale -
                         low_battery_seconds
  scale = (wh_energy_full_design / wh_energy_used) * usable_battery
  usable_battery = (1 - low_battery_percent)

Where:
  wh_energy_used = ah_charge_used * MEAN(v_voltage)
  low_battery_percent & low_battery_seconds are values determined by
    power manager.  Note, only one will be non-zero.

This change should fix / allow the following:
  1. More accurate battery_life estimates over the life of a battery.
    A fresh battery that can be overcharged will not benefit nor will a
    tired battery penalize the results.
  2. Runs < full drain.  As such I'm adding a control file for 1 hour
    run with plan to add it to nightly

BUG=chromium-os:35824
TEST=run test for 1hr using control.1hour
Change-Id: I24eb65a93d9b1a8ed79103e9ab623f0ce22269c9
Reviewed-on: https://gerrit.chromium.org/gerrit/37318
Commit-Ready: Todd Broch <tbroch@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
Tested-by: Todd Broch <tbroch@chromium.org>
3 files changed