mozilla / MozStumbler

Android Stumbler for Mozilla
http://location.services.mozilla.com
Mozilla Public License 2.0
619 stars 212 forks source link

Research GPS scan frequency impact on battery #1284

Open garvankeeley opened 9 years ago

garvankeeley commented 9 years ago

After #1270, the next step is to look at a variable GPS scan frequency. But this should be evidence based, and we don't have the data as to how the freq affects battery life. On new devices, Google reports a fully-active GPS as 7% an hour.

cascheberg commented 9 years ago

Do you want to find out how well Android optimizes LocationManager.requestLocationUpdates()? Do you know if power profiles are useful in general?

If you want to have variable GPS position reporting frequency, which I think would be really great, you probably must only trigger cell and wifis scans when a new GPS position is reported, so that you do not lose accuracy. I think on the network scanner side the result should the the same as using passive stumbling. It also means that only GPS is running if the user is not moving to a new position, so you also save the energy of cell and wifi scans. In fact, that is what I was thinking about and mentioning in #1055 ;)

Further ideas:

garvankeeley commented 9 years ago

We currently scan at 0.5 Hz, and consume ~7%/hr on a Nexus 5. What is the battery consumption if we scan at these intervals: 5 sec, 10 sec, 30 sec, 1 min, 5 min, 10 min 15 min, etc.

I suspect that in the smaller ranges, there is little to no battery savings (that the GPS chip remains active with a timeout). At approx. what interval do we see a drop in power usage, and how can me make use of scanning rates beyond that interval to create additional low power modes.

This would tell us: 1) shorter intervals: is there any value to having users change the active scanning GPS freq. for battery savings? 2) longer intervals: can we use this as part of motion detection and keep power consumption low?

znmeb commented 9 years ago

I should probably gather more data, but I fired up Stumbler tonight at dinner. Then I went to the grocery store and home and the whole time must have been about a half hour. The battery was drained enough to give me a warning and the phone got hot!

So I'm going to charge it up again and try and get some actual data. I don't like the fact that it got hot at all!