New GPS power control (was GPS update broken)

Started by zsero, November 09, 2011, 14:03:35

0 Members and 2 Guests are viewing this topic.

zsero

I have been using Locus free for some time and finally 2 months ago I decided to buy the full version, because I have experienced it to be very stable and reliable.

However in the last two months there was an update which made GPS updating unusable. What happens is that if I set the GPS updating to 60 seconds for example, the GPS goes crazy. By crazy I mean that it gets offseted by 500 meter, and keeps providing location from 500 meter away! I mean the accuracy is good, but I am in a different area of the city than where I am. It mirrors the corners / straight lines just like normally, but in a different area of the city.

Also, you would think it is only Locus, but when I exit Locus and start any other navigation program, the location is offseted even there. The ONLY way to get back to normal GPS is to restart and set the GPS switching to 0 in Locus. But this way I'm ruining my batteries very very fast.

This have been working in all past versions, it's gone crazy only now.

Also, even in past versions I experienced a strange behaviour. If I set GPS switching to 5 or 10 seconds, than it forces the setting to other applications too, just like the bug now. So if I set GPS update to 10 seconds in Locus, it affects navigation in any other GPS navigation program too, until a restart. It means that for example if I use Locus for walking and I prefer 60 second update and long battey life, then when I go back to the car and start an other navigation program then that program also gets the 60 second updates, instead of the normal one. The only way to fix was to go back to Locus and set a 1 second update or do a full restart.

So in both the bug and in the normal way of working, Locus "hacks" the GPS and then forgets about it.

I am using HTC Desire with an AOSP ROM (Android 2.3.3, Kernel 2.6.35.8).
  •  

Menion

#1
hello,
  on this is simple answer. I included this function because it's officially supported by Google SDK. Since I added it, I did no changes to this system, so as this works before cca 3 months, it have to be still same. Next thing is that you're not the only one with this issue, discuss on this topic was here already before, anyway I have no influence on this system. I only say GPS number of seconds you set, nothing more. So if this is causing troubles, leave it be!! I'm serious .. it's just another bugged feature of android

  anyway I have plan (and maybe thanks to this, i'll do it sooner) to implement own system for this GPS on/off mechanism that will surely works better
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

zsero

#2
Quote from: "menion"hello,
  on this is simple answer. I included this function because it's officially supported by Google SDK. Since I added it, I did no changes to this system, so as this works before cca 3 months, it have to be still same. Next thing is that you're not the only one with this issue, discuss on this topic was here already before, anyway I have no influence on this system. I only say GPS number of seconds you set, nothing more. So if this is causing troubles, leave it be!! I'm serious .. it's just another bugged feature of android

  anyway I have plan (and maybe thanks to this, i'll do it sooner) to implement own system for this GPS on/off mechanism that will surely works better

OK, but how can I turn it completely off? Setting it to 0 and restart?

It would be great if you could do a manual switching in the future, because for me it's the no. 1. feature of Locus! When you use your phone for hiking, you want it to work for 12 hours, what is perfectly achievable with a 60 second interval but impossible with a 1 second one.
  •  

Menion

#3
yes, with 0 sec you should disable it completely. If also restart is needed? Don't know ... rather do it ...

oki, I'll prioritize in my TODO list :)
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

zsero

#4
For me a full restart was always required to fix the system-wide effect of that setting.

Also, if you implement it in Locus it would be GREAT because you could finally control precisely the searching behaviour. For example you could set:
- turn on when Locus is started until first fix is found
- turn off for 60 seconds
- turn on until fix is found, but max. 10 seconds
- turn off for 60 seconds
...
Even better, if there was no fix found, you could increase the off period every time by 10%.

This way you could avoid situations like when you arrive from a trip and forget to turn off recording in a car or in a building, making the phone search for signal and thus drain the battery in a few hours.
  •  

Menion

#5
Fine, what about this settings?

is description clear? I think that these 3 (4) settings cover all that is needed ... suggestions? comments?

[attachment=1:1u0mba14]device-2011-11-09-235726.png[/attachment:1u0mba14][attachment=0:1u0mba14]device-2011-11-09-235732.png[/attachment:1u0mba14]
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

zsero

#6
I think this is perfect as it is! My only suggestion would be to make it very clear / make a switch to either use Android SDK polling interval OR this setting. Or do you plan removing the Android SDK way totally? If yes, then I think it's perfect!
  •  

Menion

#7
I already removed default way and completely replaced it by this one. OK .. I'll probably release some testing version before this will go out so there will be time to test it in field
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

zsero

#8
Quote from: "menion"I already removed default way and completely replaced it by this one. OK .. I'll probably release some testing version before this will go out so there will be time to test it in field

Great!

One thing came to my mind. I think the accuracy based "fix until" idea is not good, because think about the following:
- for example you set it to 50m
- in a city, between tall buildings maybe it takes a long time to achieve that accuracy, so your GPS will work mostly all the time
- in the nature, under clear sky, it will get 40m initially and stop, even if within 2-3 seconds it would go down to 35-25-15 meters, but it stops as soon as it achieves 50m.

So I think I would recommend "after fix, refine accuracy for n seconds" instead of the accuracy based method now.

Also, how to combine this with tracking is an interesting idea. I think for display it would make sense to display the points even during the "refining" period, but for tracking only save the last point. But I don't know how does the tracking system work and how would you prefer to implement this, it's just a idea.
  •  

Menion

#9
hmm, not sure if this is not more confusing for users then this (already quite complicated settings)

anyway I currently published new version on market, so please anyone ... test this feature. I think it's much better then previous version and it needs some using to discover possitives and negatives ... we'll see ;)
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

InfX

#10
Quote from: "menion"hmm, not sure if this is not more confusing for users then this (already quite complicated settings)

anyway I currently published new version on market, so please anyone ... test this feature. I think it's much better then previous version and it needs some using to discover possitives and negatives ... we'll see ;)

I've just noticed this feature while reading the change log on the market and wanted to thanks you for finally implementing something that actually allows using an HTC HD2 for GPS logging without being a battery hog (the GPS subsystem on the HD2 seems to consume full current the moment it is turned on, doesn't matter what params you pass to the LocationManager, it will draw over 100mA even if you requestLocationUpdates each 10 minutes!!!).

Something that looks confusing in the settings, though: while recording a track, it isn't clear what time interval is being used, or how they are combined.
  •  

zsero

#11
I will only have time to check it over the weekend but thanks for implementing it!

Yes, I think too that off time should actually be renamed: "GPS update interval" it would make it much easier to understand. Also "Max search time" sounds more natural to me. Also, I would rename the whole section to "Enable GPS power saving"

Here is how I would structure and name the settings. I think this way it would be a very easy to understand and would became a popular feature!

Enable GPS power saving []
- GPS Update interval
- Max search time
- Fix Accuracy
- Fix Time

(whichever happens earlier, set to 0 to disable)

Again, thanks for the great work, this is just a simple advice to make it easier to understand for general audiences. And also with this, I think Locus is actually better in every single way compared to commercial GPS devices, like Garmin devices whose only benefit was the 20 hour running time. I think with a 2 minute settings even my HTC Desire can do 20 hours in airplane mode. Thanks!
  •  

Menion

#12
you're welcome guys :)

I'll change names of variables later after some more tips will be here ;). Anyway InFX: both system are independent, so GPS have own settings for auto-off mode and also track recording have own system for checking if new point will be stored or not. If you'll be using auto-power off feature of GPS, you can set for track recording interval 0 for time and distance and only set accuracy value to same as in GPS settings. This will cause that only points with this accuracy will be saved
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

wvb

#13
Thanks for this, but it will be useful for geotagging my pictures on future trips and not draining the battery!

Sent from my GT-I9100 using Tapatalk
  •  

InfX

#14
Quote from: "menion"If you'll be using auto-power off feature of GPS, you can set for track recording interval 0 for time and distance and only set accuracy value to same as in GPS settings. This will cause that only points with this accuracy will be saved
Exactly what i thought, so ive just set it to 0,0,some huge accuracy number, and controlling the logging by the gps off thing.

Again, thanks for the feature :)
  •