Locus Map - forum

Development => Other features => Topic started by: franc on May 21, 2013, 11:34:25

Title: Energy consumption in Locus while tracking
Post by: franc on May 21, 2013, 11:34:25
Hello,

in another forum (//http://www.android-hilfe.de/karten-navigation/157283-ist-denn-nun-besser-locus-oder-oruxmaps-3.html#post5792368) , where there is a discussion about Locus and Orux I saw this picture about energy consumption in Locus vs. Orux while tracking:

http://www.bilder-upload.eu/upload/6609 ... 125610.jpg (http://www.bilder-upload.eu/upload/6609d5-1369125610.jpg)

If this is really authentic, I mean if a thorowly test on more than one device with more than one OS etc. would show the same result, would it be possible to reduce the energy taken by locus while tracking?
Or could it be some mis-settings in the tracking that Locus consume more energy?

Thank you!

frank
Title: Re: Energy consumption in Locus while tracking
Post by: Menion on May 21, 2013, 18:58:41
Hello Franc,
  result visible on image is of course possible, but I'm unable to say if compare is correct or not. There is a few factors that have influence on CPU usage. Some of main factors as they come on my mind are for example

- was map screen visible sometimes during a record? If so, then same time on both apps?
- were used vector maps? They're much more CPU consuming then raster maps
- were enabled any sensors? Pressure, rotation, gravity?
- was set same frequency of logging
- were number of items on map same in both apps? Because even if screen is turned off, Locus still do some small tasks to check if there isn't need any activity after screen has moved ...

  anyway if there will be a way to find, where should be (if any) problem in Locus with battery usage, I'll gladly improve it. Anyway, monitoring battery usage just by comparing of one measure with different program that should have different settings, isn't best way. Suggest to precisely check settings and do some more tests. For example once start Locus first, then Orux, then after some tests restart device and start programs in opposite way, this should have also influence on visible values of CPU/battery usage, etc etc ...
Title: Re: Energy consumption in Locus while tracking
Post by: franc on May 21, 2013, 19:35:09
Thank you for the analysis.
On spare time, I will try this comparison with hopefully similar parameters in both apps.
Title: Re: Energy consumption in Locus while tracking
Post by: tommi on May 21, 2013, 21:10:29
I doubt parallel run of both programs will give reliable results. E.g. sensor usage is sometimes counted wrongly (see viewtopic.php?f=38&t=3005 (http://forum.locusmap.eu/viewtopic.php?f=38&t=3005) (sorry, only for Premium members :)).
Why is CPU usage in the test much higher for Locus (vector maps etc.?)?

@Menion:
What are the things Locus does when screen is off?
Surely Locus needs to calcuate POI alarm, Guide to, navigation, etc.
But no vector map tile calculation, calculation and display of map objects, map items, track shift over screen, etc..
Title: Re: Energy consumption in Locus while tracking
Post by: Menion on May 21, 2013, 21:42:00
you're thinking correctly. Imagine all locations (waypoints and track points) has pre-computed coordinates, and once per second, when new GPS location arrive, I just move these locations to new place by simple +X px, +Y px. That's all I do. No maps are rendered, no images are drawn ...

steps are
- 1. new GPS location
- 2. move all map items
- 3. call refresh on map
- 4. draw map tiles
- 5. draw map items

and only 1. and 2. points are done when you have screen off. You may test it on your own. Do you know trick with nmea files placed into Locus/cache/nmea directory? You may use them for GPS simulation. Then you may at home, simulate track record. Start record, turn off screen and when you turn it on, you'll see firstly your old location before you turned screen off, then big jump on current location and then finally start Locus draw a map ...

Anyway there exists some special methods for measuring which function too most CPU, so in spare time, I can check it ...

EDIT:
 I've just checked it and
50% of power took simulator that read and parse NMEA data from SD card
15% took Altitude manager to compute Geoid height and optimize measured altitude
13% for my big suprise took track record widget even if screen was off and widget is on not-visible page of homescreen. Good to know and good place to optimize
5% took formatting texts for some text fields in top bar etc ...
and rest took handling of location by track record service and some more stuff around

so these 50% (by simulator) really do just from time to time, read a line from text file and parse it. Not much work and it's 50% of CPU that Locus consumed. So this mean that locus consume really really small CPU for this task.

Anyway you bring me to new task on tomorrow ... check widget :)
Title: Re: Energy consumption in Locus while tracking
Post by: franc on August 16, 2014, 19:20:58
I just tracked again some track with locus and at the same time with GPSLogger, just to compare energy consumption.
So here my battery report as glued screenshot attached.

Locus used for about 40 minutes about 6 % of battery, but the other pure tracking app, GPSLogger, didn't even be mentioned in the battery list at all!
Is there something wrong with my locus settings then?
Should I disable NMEA or how can I get normal tracking results?

I have the Widget enabled, I use tracking foot with 1m/10s/100m
In GPSLogger I use track every 5 seconds (no more settings with this).

Can I do something here or is it just better not to use locus track recording if I need low battery consumption?

Thank.

Title: Re: Energy consumption in Locus while tracking
Post by: franc on August 17, 2014, 11:58:12
It is even worse!
Now I tracked over an hour, without any display use, I started tracking with the widget and stopped it and immediately looked to Battery, this is what I see, 30 % Locus! This is unusable then, this tracking. I must have a setting which pulls the battery empty, or how could that be (see attached Screenshot)?


Title: Re: Energy consumption in Locus while tracking
Post by: franc on August 17, 2014, 15:34:00
Yes, you surely right, but the test with both apps, Locus and Gpslogger simultaneously tracking the same time and Locus is 30 % and the other app is not even mentioned is a very clear thing.
Either I have misconfigured Locus and it should not be mentioned as well, or Locus just needs much more battery.
I started my SGS2 with nearly 100% battery and after this tracking was in the fifties % which is much less.

I like the tracking of locus, I used to track with locus before, it has this nice export feature.
But this huge power consumption for just tracking is too much, unfortunetly.
Title: Re: Energy consumption in Locus while tracking
Post by: szebenyib on August 17, 2014, 17:15:43
I would not believe those numbers one hundred percent. I don't know how much Locus consumes. But maybe the first app to start GPS will get the penalty and the other one will not receive anything from the GPS consumption.
Title: Re: Energy consumption in Locus while tracking
Post by: Menion on August 17, 2014, 21:02:47
guys, I don't want to write here anythink long, because on this topic I already wrote almost a small book

Simply: don't trust internal battery monitor. Mainly on older devices, always first app that start using any sensor is that one which count battery. Try some other monitor like GSAM (recommended by my personal experience)
Title: Re: Energy consumption in Locus while tracking
Post by: franc on August 18, 2014, 07:30:21
Maybe this wrong. I just started this time for sure first GPSLogger, then, after a minute, locus,  starting it over the widget.
Still I have now 6% battery for locus, not mentioned GPSLogger, all the time screen on with other apps, but never locus.

I guess it's more like taking my 40 tons lorry to get cigarettes around the corner instead of taking the bicycle ;)

But I guess the real test would be to start locus tracking in airplane mode for an hour with full battery and then look only at the battery percentage loss.
Same then with the other tracking app.
Title: Re: Energy consumption in Locus while tracking
Post by: franc on August 18, 2014, 17:12:07
Now a better test with your battery app "Gsam", which should be real, as you told, but doesn't differ from my OS-battery report:

(http://img.tapatalk.com/d/14/08/18/ja8ury5a.jpg)

(http://img.tapatalk.com/d/14/08/18/utu6yzu9.jpg)

(http://img.tapatalk.com/d/14/08/18/nuzydysy.jpg)

(http://img.tapatalk.com/d/14/08/18/ehynyqa8.jpg)

First I started GPSLogger (II) and only after this, Locus via widget.
Stopping the track record again in the end with the widget and then, when Locus pops up, I just deleted the track not to consume battery by auto export.
I started with 96% on battery and ended after 25 minutes with 85%.
If these 11% are right, then Locus used in one hour about 3% battery.

Please tell me that I MUST have some misconfiguration in Locus, because this cannot be that Locus consumes so much, can it?
What can it be that makes locus so hungry?
Network was off.
Title: Re: Energy consumption in Locus while tracking
Post by: Menion on August 18, 2014, 17:44:05
hmm and why Locus has during 33m power on, turned GPS on only 24 min and your second app only a minute??

Anyway as you see, during that time, Locus spend 5x times more time by some CPU operations.

But such measuring has really only sense, when you use same conditions on both apps, they will run separately (not both at once), longer time and in airplane mode. Best on just factory reseted device :)
Title: Re: Energy consumption in Locus while tracking
Post by: franc on August 18, 2014, 18:24:27
Quote from: menion on August 18, 2014, 17:44:05
hmm and why Locus has during 33m power on, turned GPS on only 24 min and your second app only a minute??
Anyway as you see, during that time, Locus spend 5x times more time by some CPU operations...
This is what I don't understand, WHAT in hells and heavens name is locus doing all the time using CPU?
It just need to track. What could that be, that is running with this track-recording in Locus?

Quote from: menion on August 18, 2014, 17:44:05...But such measuring has really only sense, when you use same conditions on both apps, they will run separately (not both at once), longer time and in airplane mode. Best on just factory reseted device :)
True, indeed!
And beside this, even when Locus needs 3% an hour, this would mean 30% for ten hours, which I would never reach, never.
The system would drain the battery much earlier, not a 3% an hour App. Would mean maybe 10 minutes more tracking, I guess, if Locus would consume only 0.3%, like a smaller tracking app (a "bicycle").
Title: Re: Energy consumption in Locus while tracking
Post by: franc on August 19, 2014, 07:40:12
I mean this:

(http://img.tapatalk.com/d/14/08/19/3a7ezu2u.jpg)

(http://img.tapatalk.com/d/14/08/19/asuja8ug.jpg)

(http://img.tapatalk.com/d/14/08/19/jajepesa.jpg)

(http://img.tapatalk.com/d/14/08/19/4ypybeme.jpg)

In 50 minutes, Locus consumed 56% from 6% of the battery as Gsam reports (or 45% of 7% in 70 minutes as OS reports).
This was measured with airport mode on.

Or:
(http://img.tapatalk.com/d/14/08/21/jy6a4u8y.jpg)

(http://img.tapatalk.com/d/14/08/21/myqu3una.jpg)
This without airplane mode.

I am now sure, GPSLogger II consumes about a tenth of it, but all in all its not much.
Will be only interesting for long time tracking, I mean tracking for several hours or even a day. There I won't be able to use locus if I have not a bunch of spare and full batteries with me.
Locus is just not a tracking app.

Roger and over.
   
Title: Re: Energy consumption in Locus while tracking
Post by: Bucky Kid on September 11, 2014, 10:12:59
I have measured both Locus and Orux for 5 hours and the apps self suck only few part of battery energy (though Orux comes out of this a little better with 1.8% of consumption share against 3.6% of Locus consumption share). On my measurement the main suckers are Android System and Kernel (more than 40% of consumption). Maybe because these use the GPS service?
Both GPS apps were running in foreground with GPS on + track recording, screen most of time off.
With Locus running I have reached overall battery drain -14.4%/hour while with OruxMaps I've reached only -10.4%. But this is not too precise because background internet data were active during whole measurement and display was on with Locus a bit longer.
Title: Re: Energy consumption in Locus while tracking
Post by: franc on September 15, 2014, 17:06:28
Try this: disable all radio (by airplane mode), disable GPS and let locus run in background (as service) starting with a full battery. Don't use the phone (display off) for an hour.
You can do this with orux as well. Now you see the nearly pure battery consumption through locus.
Title: Re: Energy consumption in Locus while tracking
Post by: Menion on September 15, 2014, 19:04:48
wait, you see that Locus consume battery even when no track recording, navigation is running and GPS is disabled?

This doesn't make sense. Only features that are running permanently even when Locus is on background are LiveTracking and Periodic Updates (menu > misc). When these two features are disabled, there should absolutely no live ...

If you still have some battery consumption by Locus even then, please create for me backup of your settings and share it with me, I'll try it also.
Title: Re: Energy consumption in Locus while tracking
Post by: franc on September 16, 2014, 06:18:28
Quote from: menion on September 15, 2014, 19:04:48
wait, you see that Locus consume battery even when no track recording, navigation is running and GPS is disabled?...
Yes, indeed!

Quote from: menion on September 15, 2014, 19:04:48
...
This doesn't make sense. Only features that are running permanently even when Locus is on background are LiveTracking and Periodic Updates (menu > misc). When these two features are disabled, there should absolutely no live ...
Hoppsa! I had the setting Enable periodic updates enabled. Will try it again without. But I don't find "LifeTracking" setting.
I have set "Locus as a service" (very useful).

Quote from: menion on September 15, 2014, 19:04:48...If you still have some battery consumption by Locus even then, please create for me backup of your settings and share it with me, I'll try it also.
I just sent you settings backup (through locus > backup settings  > share) as mail (subject: settings)

Here I let locus run in background with globally disabled GPS module and radio off (airplane mode) for 1.5 hours, display rarely on and never locus in foreground (see attached Screenshot for energy consume). Somethings wrong I guess, then. That is what i ment before (see my previous posts)

Like you say, should not be using beside of the "Enable periodic Updates" but I had airplane mode on!

EDIT: I just tested again with disabled check of updates and it's the same, nothing to do with it.
(http://img.tapatalk.com/d/14/09/16/u6erega5.jpg)

(http://img.tapatalk.com/d/14/09/16/yta5y2av.jpg)
Title: Re: Energy consumption in Locus while tracking
Post by: franc on September 20, 2014, 00:04:57
@menion: Could you find anything in my settings?
Title: Re: Energy consumption in Locus while tracking
Post by: Menion on September 20, 2014, 07:44:15
Quote from: franc on September 16, 2014, 06:18:28

Quote from: menion on September 15, 2014, 19:04:48
...
This doesn't make sense. Only features that are running permanently even when Locus is on background are LiveTracking and Periodic Updates (menu > misc). When these two features are disabled, there should absolutely no live ...
Hoppsa! I had the setting Enable periodic updates enabled. Will try it again without. But I don't find "LifeTracking" setting.


Sorry, I expected you'll try it again without periodic updates, to have more comparable results.
Title: Re: Energy consumption in Locus while tracking
Post by: franc on September 20, 2014, 08:12:39
Misunderstanding. I did this already, in my previous post I showed screenshots from this and also from before with this setting enabled.

Did you get my settings (per mail)?
Title: Re: Energy consumption in Locus while tracking
Post by: Menion on September 20, 2014, 08:17:44
ah I miss that sorry. I've got you settings. Will check it during a week ...
Title: Re: Energy consumption in Locus while tracking
Post by: franc on September 29, 2014, 14:54:07
Quote from: menion on September 20, 2014, 08:17:44
..Will check it during a week ...
Did you find something weird in my settings?
I ask because I will hike for three weeks soon (friday) and there I would love to keep a long time locus running (and nothing else) on my phone with one battery :)
Title: Re: Energy consumption in Locus while tracking
Post by: Menion on September 30, 2014, 08:47:29
Hi franc,

seems you use "Show view" on a map. Just a few days ago I was solving one issue with this function & battery in Locus. There was small permanent battery consumption even when Locus was in background. Solved now.

Anyway I see no problem in your settings that should have influence on your battery, except above "Show view" (which enable hardware orientation sensor).

Best should be an experiment and try to find which function cause these battery problem. Because no matter what I do, when Locus is in background, I see 0% battery consumption by Locus when no function is running.
Title: Re: Energy consumption in Locus while tracking
Post by: silber1 on September 30, 2014, 11:15:45
I generally use "Battery doctor" from play store, to kill all unneccesary progs in background. Together with flymodus and activated bluetooth and an extern BT-gps-mouse, I have no problem to use Locus for more than 10 hours with my S4.
Last track yesterdy was 15 km 5 hours and still 80 % battery left. :)
Title: Re: Energy consumption in Locus while tracking
Post by: Menion on September 30, 2014, 11:33:34
Quote from: silber1 on September 30, 2014, 11:15:45
Last track yesterdy was 15 km 5 hours and still 80 % battery left. :)

Very nice score.

Anyway issue I found few days ago thanks to one guy, was that Locus, even correctly closed, remained orientation sensor activated! So till you restarted device, it consumed battery even that Locus was killed. Some issue in Android Xperia Z1C (don't know if also in any other devices).
Title: Re: Energy consumption in Locus while tracking
Post by: franc on October 10, 2014, 21:35:58
Disabling the Show View didn't change it.

My goal is, that I could run locus in the background (as service) all the time during a long hike, in airplane mode, with GPS activated (to check position fast) and no need to change the battery.
Not possible at the moment.
Locus is the main consumer then.
But this must be related to my constellation (OS and apps), when you tell me that locus doesn't consume any in background.
Will soon install CM11 and see further then.
If not, will buy new and better phone (e.g. SGS4).
Title: Re: Energy consumption in Locus while tracking
Post by: Menion on October 11, 2014, 15:39:25
franc, even that I should because I created Locus, I'm not saying on 100% that Locus cannot consume any extra battery. There should be any problem and I'll really gladly fix it, trust me. But it's very complicated to find a reason when something like this do not happen to me.

So only possibility I see is to test various options and find a reason. I'm watching my usage more carefully now, but still no problem. Sorry.
Title: Re: Energy consumption in Locus while tracking
Post by: franc on October 11, 2014, 17:26:48
Will tell you here when on CM11 how things go. Since then thank you much for best support anyway!!!
Title: Re: Energy consumption in Locus while tracking
Post by: Menion on October 13, 2014, 06:35:00
there is nothing to thanks. I'll be glad to hear a news from CM11. Quite interested if same settings may cause difference on different rom ...
Title: Re: Energy consumption in Locus while tracking
Post by: Bucky Kid on October 17, 2014, 08:06:55
So I have made measurement in airplane mode and Locus is consuming 43.3% battery but overall battery drain with turned on GPS and track recording is only 5.5% / hour which is good I think.

(http://i.imgur.com/Dnp3CZ9s.png) (http://imgur.com/Dnp3CZ9.png) (http://i.imgur.com/qqipxLhs.png) (http://imgur.com/qqipxLh.png) (http://i.imgur.com/uJV52Ujs.png) (http://imgur.com/uJV52Uj.png).

I do a easurement with Oruxmaps tomorrow for comparison.
Title: Re: Energy consumption in Locus while tracking
Post by: Menion on October 17, 2014, 12:20:16
5.5% per hour ... very nice. I'm proud on Locus :)