Locus Map - forum

Support => Troubles & Questions => Topic started by: zsero on November 09, 2011, 14:03:35

Title: New GPS power control (was GPS update broken)
Post by: zsero on November 09, 2011, 14:03:35
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).
Title: Re: GPS update broken
Post by: menion on November 09, 2011, 14:14:13
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
Title: Re: GPS update broken
Post by: zsero on November 09, 2011, 14:18:50
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.
Title: Re: GPS update broken
Post by: menion on November 09, 2011, 14:28:10
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 :)
Title: Re: GPS update broken
Post by: zsero on November 09, 2011, 14:47:01
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.
Title: Re: GPS update broken
Post by: menion on November 10, 2011, 00:00:19
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]
Title: Re: GPS update broken
Post by: zsero on November 10, 2011, 00:20:39
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!
Title: Re: GPS update broken
Post by: menion on November 10, 2011, 06:45:09
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
Title: Re: GPS update broken
Post by: zsero on November 10, 2011, 10:21:48
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.
Title: Re: GPS update broken
Post by: menion on November 10, 2011, 21:36:34
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 ;)
Title: Re: GPS update broken
Post by: InfX on November 11, 2011, 13:05:02
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.
Title: Re: GPS update broken
Post by: zsero on November 11, 2011, 13:17:16
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!
Title: Re: GPS update broken
Post by: menion on November 11, 2011, 13:40:15
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
Title: Re: GPS update broken
Post by: wvb on November 11, 2011, 15:29:04
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
Title: Re: Re: GPS update broken
Post by: InfX on November 11, 2011, 15:43:02
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 :)
Title: Re: Re: GPS update broken
Post by: zsero on November 11, 2011, 15:57:09
Quote from: "InfX"
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 :)

I thought you can set accuracy for 0 to disable it. Can someone confirm it?
Title: Re: New GPS power control (was GPS update broken)
Post by: zsero on November 11, 2011, 22:54:34
I have just tested this functionality and it works perfectly! I bought the vector addition as a small donation for this project!

I don't understand the 15 second min limit for max search, my HTC Desire usually gets a warm fix under 3-5 seconds, so for me the 15 second limit is way too high. Can you set the limit to 1 second?

Also, I think the "cold start" fix should not be limited. I mean that's when you start Locus for the first time. Actually for me, I always had the best results with any GPS application if I did the "cold start" process in GPS Status and immediately switched to Locus or any other navigation software. So for me it's not needed but I can imagine people using Locus without GPS Status and they would get in trouble for the first fix.

For me, usually:
- First fix can take up to 2 minutes
- On-off fix happens in around 3 seconds
Title: Re: New GPS power control (was GPS update broken)
Post by: InfX on November 11, 2011, 23:14:56
Something i would really wish to separate is the GPS power control while recording a track and GPS power control while using the application in general. For example, i only want a point recorder once a minute, yet, when i actually open the app activity and look at the map, i'd like it to run continuously.
Title: Re: New GPS power control (was GPS update broken)
Post by: zsero on November 12, 2011, 00:01:08
Quote from: "InfX"
Something i would really wish to separate is the GPS power control while recording a track and GPS power control while using the application in general. For example, i only want a point recorder once a minute, yet, when i actually open the app activity and look at the map, i'd like it to run continuously.

I think it's not possible to program the "look at the map" part :-)
- For me, I like that now if I'm looking at the map and searching for something then the GPS is off 95% of the time.
- On the other hand there are situations where you need to navigate corner by corner and you would like to keep the GPS refresh the position continuously.

So I think there are two different scenarios where only manual input could tell which one happens.

If menion is no crazy about our feature requests then then the perfect solution would be to have either:
- a GPS power control on/off button on the home screen
- a GPS power control option button: always on / 15 second / 90 second for example (ok, this need some more option and is quite complicated)

Also, I would love to see the option that this "GPS power control" button takes the place of the view-rotate button. I never used that button and I never understood why is it not replacable, like the top buttons.

But these are just ideas, I like that the system works really well even now.

Also, the simple on/off button could solve the "cold start" problem too. When you start the program for the first time you switch power control off, wait for the fix and switch power control on.
Title: Re: New GPS power control (was GPS update broken)
Post by: menion on November 12, 2011, 07:07:00
hmm are you using quick switch panel that can be added to right panel? I planned to add this "GPS auto-off" feature to this panel. It's logical solution I think ...

bottom rotate button .. hm :) I for example use it quite a lot, everytime I need to orientate in streets
Title: Re: New GPS power control (was GPS update broken)
Post by: zsero on November 12, 2011, 16:28:59
Quote from: "menion"
hmm are you using quick switch panel that can be added to right panel? I planned to add this "GPS auto-off" feature to this panel. It's logical solution I think ...

bottom rotate button .. hm :) I for example use it quite a lot, everytime I need to orientate in streets

I don't use the right click panel, I have a very minimalistic GUI setup and I like the maximum screen place available.

Can you not just make the rotate button user selectable, like any other top or quick switch button? Someone prefers rotation but someone never uses it.

Also, here is my updated idea for the GUI settings:

GPS power control []
- GPS Update interval
- Max search time
- disable for 1st fix


For the fix accuracy and fix time I think maybe they are not needed as at least on my phone the GPS "remembers" recent positions and provides almost the same accuracy as if it was continuous. Yesterday I was playing with it and I found the best performance if I set the accuracy to some huge number (1000m).
Title: Re: New GPS power control (was GPS update broken)
Post by: Gordonx42 on November 20, 2011, 16:17:58
I'm having some problems with the new GPS power control. Currently and in the past I've set the interval to 120 seconds. With the old method for this, it worked flawlessly. Now, the GPS is no longer updating automatically every 120 seconds. I have to load the GPS screen, disable and then re-enable GPS in order to get a fix. I've seen this problem on 2 separate hikes.  Is something wrong or am I doing something wrong? Is it possible to go back to the old gps battery saving function?
Title: Re: New GPS power control (was GPS update broken)
Post by: menion on November 20, 2011, 16:46:45
hi,
  old function will not be reverted. It causes only troubles. Al least for many people. New method have to work, so if there is any problem, we need to fix it. You say you set 120 secs. Tu which parameter ... to "Off time"? And what values you have for other parameters?
Title: Re: New GPS power control (was GPS update broken)
Post by: Gordonx42 on November 20, 2011, 16:57:51
Here are my settings:

Enable GPS auto-off - checked
Off time - 120s
Min accuracy - 30m
Max time search - 120s

("enable at start" and "disable when hidden" are both unchecked)

I've tried adjusting the above settings and I still didn't get it working right. Are there log files or anything else I can provide to help?

Also, a track has been recording during this. Not sure if it matters.

Thanks!
Title: Re: New GPS power control (was GPS update broken)
Post by: menion on November 20, 2011, 17:27:06
log will not help here. So I'm not sure if you understand how system work, so I'll try to describe and you'll it ..

- you start GPS in locus
- it will start searching for GPS for some time (max time search).
- if GPS will get any location, it check accuracy and if accuracy will be better or equal of 30m, it will disable for some time (off time)
- if during "max time search", not "valid" location will occur, gps will disable itself for "off time". Same as for case it find location during "max time search" interval ...

so, clear?

and now, are you sure that this system do not work? Anyone with same experience?

EDIT: hmm, when I lay down phone on desk, it just correctly disable/enable GPS every two minutes ...
Title: Re: New GPS power control (was GPS update broken)
Post by: Gordonx42 on November 20, 2011, 17:37:24
Yes, I understand the functionality. The GPS is not automatically turning back on after my specified "off time" with my current "min accuracy" and "max time search" settings.

I will try and reset all my settings to the default and see if anything changes.

Some more info:
HTC Droid Incredible
CyanogenMod 7.1
often running in airplane mode while using Locus
Track recording settings: 20m, 5s, 100m max accuracy
Title: Re: New GPS power control (was GPS update broken)
Post by: zsero on November 20, 2011, 18:35:42
Is your problem not the first initial fix? If you disable full screen in Locus, can you see the little GPS icon appearing and disappearing on the status bar?

For diagnosing, can you try doing the following:
1. Set the following settings in Locus:
Enable GPS at start: on
Off time: 30s
Min accuracy: 1000m
Max time search: 15s
2. Close Locus
3. Open GPS Status and get the first initial fix in GPS status. Wait a few seconds till your accuracy goes down to around 10-20 meters.
4. Close GPS Status and immediately start Locus
5. It should work
Title: Re: New GPS power control (was GPS update broken)
Post by: Gordonx42 on November 20, 2011, 20:05:53
Quote from: "zsero"
Is your problem not the first initial fix?

I'm able to get the initial fix and a fix when I manually enable/disable GPS. EDIT: The fix is fast too, a few seconds.

After resetting the settings I'm seeing better results. My GPS is automatically updating, but often times my "Last GPS fix" is 10 minutes or greater (I've had "off time" set for 120, 60, and 30 seconds during the testing). I also increased my "max time search" to 180 seconds.
Title: Re: New GPS power control (was GPS update broken)
Post by: Gordonx42 on November 21, 2011, 01:51:36
It seems to be updating every 120 seconds correctly while I have the screen on. However, with the screen off its gone as long as 40 minutes without updating the location. (I have the "Disable when hidden" option unchecked).
Title: Re: New GPS power control (was GPS update broken)
Post by: menion on November 21, 2011, 08:08:50
ah so that's the problem, GPS is turning off for you when screen turn off. Do you have last version (new release yesterday) and also did this happen also when new GPS auto-off feature is disabled?
Title: Re: New GPS power control (was GPS update broken)
Post by: zsero on November 21, 2011, 08:19:07
menion,
Thanks for the new release! Could you set the search time's min. limit to 1? 15 is way too high.
Title: Re: New GPS power control (was GPS update broken)
Post by: Gordonx42 on November 21, 2011, 13:49:54
Quote from: "menion"
ah so that's the problem, GPS is turning off for you when screen turn off. Do you have last version (new release yesterday) and also did this happen also when new GPS auto-off feature is disabled?

I updated to the latest version last night. I'll run some more tests when I get home tonight. (I never get GPS satellites in my office building).

Side note: just want to say that Locus is incredibly useful, versatile, customizable and well done. I love it.
Title: Re: New GPS power control (was GPS update broken)
Post by: Gordonx42 on November 22, 2011, 00:55:53
Quote from: "menion"
Do you have last version (new release yesterday) and also did this happen also when new GPS auto-off feature is disabled?

I have the last version and yes, it also happens when the GPS auto-off feature is disabled. (Sorry I didn't try that sooner). So I guess my problem has nothing to do with the GPS auto-off!

EDIT: I'm now testing with GPS status and it also doesn't get a GPS fix while the screen is off. Could this be a hardware or system issue?
Title: Re: New GPS power control (was GPS update broken)
Post by: menion on November 22, 2011, 06:53:54
hmm, everything is possible. Are you using any custom rom? and what version system? Also when you in locus for example enable track recording and then turn screen off, GPS also turn off? (this really should not happen!)
Title: Re: New GPS power control (was GPS update broken)
Post by: Gordonx42 on November 22, 2011, 13:50:31
I'm running CyanogenMod 7.1, android version 2.3.7. And yes, GPS gets disabled with the screen off while recording a track in Locus. I ran Google's "My Tracks" this morning on my way into the office: I had the screen off and the track was recorded the entire way correctly. Strange!
Title: Re: New GPS power control (was GPS update broken)
Post by: InfX on November 26, 2011, 22:38:31
Make sure you are not misinterpreting something entirely different as GPS disabled while the is screen off. I had a seemingly erratic track recording in Locus while testing the GPS auto-off features, that, at some point, for a moment, seemed to me like a GPS disabling while the screen is off, yet it wasn't. What it was is the track recording minimal interval and GPS auto-off interval both enabled, creating some strange behavior with the intervals, seemingly, drifting against each other, only recording a point when the on state for both happens to overlap.

PS: Try setting the time and distance intervals in track recording settings to 0, max accuracy to something much higher than the min accuracy in GPS auto off, and try again.
PPS: Don't get me wrong, this is most probably NOT it. I am just trying to coin in some possible directions, and it's easy enough to check it.
Title: Re: New GPS power control (was GPS update broken)
Post by: Gordonx42 on November 28, 2011, 19:46:14
Unfortunately it is happening whether track recording is enabled or not. I really think it's either system or hardware related.  I'm going to be upgrading to the g-nex soon, so I expect the problem will disappear.
Title: Re: New GPS power control (was GPS update broken)
Post by: Gordonx42 on December 27, 2011, 00:21:29
I'm still seeing this problem with my new rooted stock Samsung Galaxy Nexus: GPS auto-off does not get a GPS fix on the interval I set while the screen is off. What can I do to get this fixed? This is my favorite app for hiking and I need the ability to save my battery with this feature.

EDIT: For information purposes, I've tested this on the Motorola Droid (milestone), HTC Droid Incredible and Samsung Galaxy Nexus. It works perfectly on the Motorola Droid, but not on the Incredible or Galaxy Nexus.
Title: Re: New GPS power control (was GPS update broken)
Post by: menion on December 27, 2011, 17:57:06
you're correct .. I discovered same problem on my nexus ... for now, I suggest to disable this feature, I'll test it and try to fix ...
Title: Re: New GPS power control (was GPS update broken)
Post by: Gordonx42 on December 27, 2011, 18:01:28
Thanks menion, your application is the best.
Title: Re: New GPS power control (was GPS update broken)
Post by: menion on December 28, 2011, 18:59:24
hehe, thanks ... may you in some free time, try test version viewtopic.php?f=25&t=1404&p=8322#p8322 (http://forum.asamm.cz/viewtopic.php?f=25&t=1404&p=8322#p8322) ? thanks ...
Title: Re: New GPS power control (was GPS update broken)
Post by: Gordonx42 on December 28, 2011, 23:22:31
Unfortunately I'm still seeing the problem with that one.