This object is in archive! 

When Locus is started don't pan map to some new position before GPS signal has been acquired

Andrew Heard shared this question 8 years ago
Answered

I often find when I start up Locus inside (i.e. GPS signal will not be acquired) that the map is panned to some unknoqn place (possibly lat/lon = 0/0 although haven't checked) resulting in a blank display. Shouldn't the previous position be retained until a actual GPS position is acquired? What I have to do when this occurs is go to my list of points and move the map to one that I know is nearby, or do lots of zooming & panning.

I have the setting > GPS > Run at startup > Always

Replies (13)

photo
1

Good day Andrew,


and when you start Locus, centering (bottom left button) is enabled? Because if not, Locus should stay on a place where you left it during last close. If centering is enabled, Locus tries to get at least some location (based on wi-fi, cell-id) and center to this Locus. Please check next time if Locus really center to 0, 0. If so, this should only means that your device returns invalid location and Locus center on it. So simple check if location is non-zero, should solve this.

photo
1

Thanks Menion. We are thinking along similar lines. I too think it is being moved to 0,0. I can't tell yet, I normally have the top/left panel (coordinate) hidden by other buttons that are of more use to me (to save space). It was happening to me every couple of days while cycle touring for the last 7 weeks overseas. I've just tried to reproduce back here now home, but of course, no luck yet. But surely whether centering button is enabled or not, if the GPS icon is orange i.e. has not yet acquired a signal, then the map should not be moved? If I do find the coordinate is 0,0 it may explain, but doesn't solve the problem.

photo
1

Ok, so I've just added small check to function that handle received locations. In cases, this location will have coordinates 0 and 0, it will be ignored. You will see if it helps next time.


And just for your information - orange GPS buttons means that Locus already received location from wi-fi or cell-ID (generally called in Android as "Network location"). Green color then means valid fix location from GPS.

photo
1

I'll keep an eye out, although less navigation planned for a while. Was used very heavily in last 7 weeks - an "indispensable aid". Thank goodness for Locus. So much better than my old Garmin eTrex.


Orange GPS button - weird - I always have wifi & cell based location disabled. While cycling I always have the phone in flight mode with mobile and wifi disabled to save power. But as soon as I run Locus this button will always be orange (until green of course), even in remote places where I m sure there is no mobile signal and definitely no wifi. How can that be?

photo
1

> And just for your information - orange GPS buttons means that Locus

already received location from wi-fi or cell-ID (generally called in

Android as "Network location")


just for my clearly understanding:

i only use GPS satellite and A-GPS is disabled in device setting, but i also see orange GPS button ?

photo
1

Ah sorry for confusion. I'll try it better for second time:


Orange GPS buttons means that Locus has enabled internal system (listeners) for receiving locations. Green button then means, that Locus already received valid GPS location. You may also see a green dashed or blue full circle on a map. Where green circle display received location from wi-fi

or cell-ID (generally called in Android as "Network location"). It may also use some older, cached value or also some older GPS location. Blue

color then means valid fix location from GPS so it match green GPS button in panel. Uff :).

photo
1

thanks for detailed discription ;-)

photo
1

OK I get all that. It is consistent and provides the user with lots of useful diagnostics. The description is consistent with the manual although the "green dashed or blue full circle for wifi" could be added to that manual section.

So back to my original observation - if map centering is enabled but GPS icon is orange (valid location not found yet) why should the map be occasionally repositioned to 0,0? I have only seen it occur when Locus is starting, and only when inside where GPS will never be received. Yes, ignoring a 0,0 fix is a workaround but doesn't it suggest ignoring another problem?

photo
1

Andrew, hard to say. Without device in my hands, I'm unable to say from where these 0, 0 values comes. I'm also not sure, that a small change I made, may helps here. We will see :).

photo
1

yes, always difficult to reproduce these things, certainly don't spend any more time on it

but as a general principle (requirement/ specification) would you agree that if the GPS button is orange then the map should not be moved?

photo
1

Nope :). Not precise GPS position or position from cell-id/wi-fi is good enough to move map on this place. Every position is better then nothing or 0,0.

photo
1

I have observed a similar problem, but after wakeup from screen off.

I start Locus and enable centering. I wait until a valid GPS location has been received and the map as been centered. Then I turn the screen off (or wait until the system shuts it off) and continue to move (walk or cycle). When I now wake the phone up (turn the screen on), the following happens:

1. The map is shown centered at the previous position (as expected).

2. GPS is started.

3. The map is centered at a different position that is somewhere in the surrounding, but neither the current nor the previous position.

4. Only when a valid GPS location has been received, the map is centered at the current position (as expected).

I wonder why step 3 happens and how I can avoid it. Normally I would expect that the map remains centered at the last known position until the new position has been received. Any ideas on that?

photo
1

Roger - maybe you can observe & report the following when the map is incorrectly moved - check the GPS coordinate (top left panel), and the GPS button color:

55f8eeb0b5c5e5af8c088d9c7870e624

photo
1

Hello Roger,


step 3 has logical explanation I believe.


When you turn off screen, GPS is in your case also turned off.


When you turn on screen, Locus restore previous state so it turn on GPS as well. Anyway because GPS fix (precise location) usually takes some time, Locus firstly tries to get as least some location over wi-fi/cell-id. So you probably firstly see this location for a while.

photo
1

Hi Menion, thank you for the quick reply. You are right, that matches with my observations: I have noticed that when the problem occurs the map is always centered at a nearby village or town (where one would expect some wi-fi networks) or near a major street (where one would expect a cell-phone base station.

So it should not happen when I disable the wi-fi/cell id location service and use "GPS only".

On the other hand I wouldn't like to disable wi-fi/cell id location generally as it is often useful with other applications.

The optimal solution would be if Locus would center the map on wi-fi/cell id location only if GPS fix is not possible in reasonable time (e.g. 30 seconds).

photo
1

@Andrew, up to now I didn't know that there is a setting to display the coordinates in the top left panel, so thank your for the hint!

photo
1

I have finally been able to witness this problem and quick enough to obtain a screen capture. Below is map centered on bogus S27/E133 - in the middle of South Australian dessert, 1000km from proper GPS coordinate. This occurred when I tapped the bottom/ left map center button. But the GPS icon is orange and when I displayed the GPS screen only 1 satellite had been detected, and position it not displayed. So again I ask, why is the map position moved when a valid GPS fix has not yet been established?

929c2c9bb45688815bcdcab5b730828c

The map was moved correctly 30s later. BUT if I had been inside with no access to GPS (or cell or wifi signal) then I would now have to (tediously) manually move the map to a valid position

photo
1

Hmm interesting. 1000 km is really too far.


Before Locus gets valid GPS fix, it tries to get location over Wi-fi, BTS. And if some such location is found, it's then used. Usually it works correctly, so I do not understand why different between you and this location is so far.


Anyway I have just improved this function and added testing on age of this secondary location. I'll try 5 minutes. When this location will be older, it won't be used. Thanks to this, we may at least see, if wi-fi/bts location is old and incorrect or new and incorrect. In first case, it won't be used - so problem solved. In second case, it will be used, so I may probably only do some settings to config.cfg to "not use use wi-fi/bts" location for centering.

photo
1

clever ideas, I will monitor for you, but has been a few months since last problem because not cycle touring at present

photo
1

I haven't experienced a problem with the latest beta 3.14.1 yet, too early to tell, but below is screen capture (using 3.14.0) of map being moved even when the GPS was disabled. Wifi/ BTS disabled at time.

17b80dfab6656141132e41cafe187d34

photo
1

Hello, hmm ... and what should I do with this screenshot? :)

photo
1

Nothing I suppose, because you've since made a code change, but I thought you may be interested that the map was still moved even when no GPS/ Wifi/ BTS.

photo
1

Ah. I still expect that there will be some problems related to this. Anyway one by another, I'm sure all such problems will be fixed ;). Thanks

Replies have been locked on this page!