Issues with GPS fix in mountain areas

215 views
Skip to first unread message

Manu EL

unread,
Aug 15, 2019, 4:57:04 AM8/15/19
to Osmand
Hello, I often can't get GPS fix in mountain areas with osmand. When using GPS Test, the constellation shows 10 or more satellites above me, which are green, but the number of used satellites is 0 => no fix. Randomly it may work again (like 9 or 10 satellites used out of 10 satellites seen) then loses fix again. I have noticed that behaviour only when I'm in mountains area. Otherwise Osmand gets GPS fix easily. It occurs with other localisation apps. But often osmand is also launched simultaneously. I don't understand. I have a Samsung galaxy A3 with Android 6.0.1.
Would you have any idea? Thank you

Poutnik Fornntp

unread,
Aug 15, 2019, 6:02:59 AM8/15/19
to osm...@googlegroups.com, Manu EL
Does the issue happen if the mobile data have not been recently available
nor used during GPS usage ?

In such a case, GPS fix without help of internet based aGPS data may take
minutes.

But generally , it is matter of the hardware/firmware and Android.

OSMAnd just uses Android location services.



Dne 15. srpna 2019 10:57:10 Manu EL <monmobil...@gmail.com> napsal:
> --
> You received this message because you are subscribed to the Google Groups
> "Osmand" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to osmand+un...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/osmand/9acda064-6732-4451-ab78-5b94115af79c%40googlegroups.com.



Manu EL

unread,
Aug 15, 2019, 1:09:25 PM8/15/19
to Osmand
Thank you for your reply. Yes, I usually turn off mobile connection when in the mountains to save battery, and most of the time I am out of network coverage. But my problem is that when I finally get a fix, the issue can occur 1h later, get a fix 15min later then issue again few minutes later. If it was just a long cold fix, the issue should not happen again in the following hours, what do you think? I suspected a problem with my GPS hardware/firmware, or let's say a bad 'alchemy' with the app software which would make the GPS hardware/firmware crash. I don't know !! When you go off-track, it is a very annoying issue.

Max1234Ita

unread,
Aug 16, 2019, 3:41:41 PM8/16/19
to Osmand
I agree with Poutnik, it could be a problem in your device.

You can try installing some GPS-aid app, i.e "GPS status & toolbox", to check if location services are working well.
Additionally, if you are in a mobile-covered area, the above app will improve your fix speed by forcing download of AGPS data from the network (do it once, lasts several days) or some diagnostic, like "Sensor sense", which can check if the GPS receiver works properly.

As a last resource, you can decide to rely on an external GPS receiver, i.e. Garmin GLO or similar. Even though this solution will cost a little, the external hardware is usually faster and more precise than the integrated one, so it may be worth the cost.

Cheers,
Max

Manu EL

unread,
Aug 16, 2019, 4:31:14 PM8/16/19
to Osmand
Thanks. I have installed GPS status & toolbox. I will do some testing when back in the mountains, soon! Will post here if something new. Thank you!

Manu EL

unread,
Aug 18, 2019, 3:32:11 PM8/18/19
to Osmand
I've done some testing. I use GPS only, no A-GPS. Mobile connection is off (airplane mode).

Testing
In the village (900m above sea level) : everything is fine with the GPS.
In the mountains (> 1000m) : I start the smartphone. I open 'GPS Test' app => I get a GPS fix. Then I put the app in the background or lock the screen, then I reselect the app => impossible to get a fix
Same behaviour with Osmand. Same when I close the app and then relaunch it.

Workaround 1
In GPS Test, I go in the A-GPS menu, do 'clear cache' or 'clear & update'. Still no fix in GPS Test. But if I send GPS Test in the background then select Osmand, I get a fix after 1 minute in Osmand (would be the same with GPS Test : if I send GPS Test in the background then reselect GPS Test, I get a fix after 1 minute in GPS Test). This workaround can be used in emergency but is not convenient. My hypothesis is that the GPS cache is somehow corrupted when the app is sent to background or closed. Any app launched at this point will fail to get a fix, until the GPS cache is cleared.

Workaround 2
In Osmand, I start a trace recording with recording interval set to 3 minutes (to preserve battery). From this point, I can send Osmand in the background or lock the screen without losing the GPS fix. It may consume a bit of battery, but at least, I can use the GPS in mountains. That's great.

This is a strange bug, considering it happens only in altitude, or depending on some other parameters I'm not aware of.

If anybody thinks about a real fix for this issue, please tell me!!

Massimo Mula

unread,
Aug 18, 2019, 3:51:45 PM8/18/19
to osm...@googlegroups.com
Could it be some issue related to energy saving in your device? 
You can try looking into Applications and/or Battery settings: if one of the apps using the GPS receiver is set to be put to sleep automatically, just change the settings to "never sleep" (menu and options names may be different depending on the Android version you have)

BTW: AGPS only works when a network connection is available, since it downloads from there all the data almanacs that would be received from the satellites (download only  takes a couple seconds, receiving on-the-air from satellites would require several minutes).
You can update data via AGPS when you are in the village: they will then be valid for several days (7 if I remember well), even if no network is present.

Regards,
Max

--
You received this message because you are subscribed to a topic in the Google Groups "Osmand" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/osmand/kAmLjznVFLE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to osmand+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osmand/7824c6fd-b132-4719-9cd0-df705aad9632%40googlegroups.com.

Majka

unread,
Aug 19, 2019, 3:47:43 AM8/19/19
to Osmand
Another vote for battery saving. GPS is usually first to go. Track recording pokes hard the usage, so it won't get "optimised".

Greg Troxel

unread,
Aug 19, 2019, 7:56:56 AM8/19/19
to Manu EL, Osmand
Manu EL <monmobil...@gmail.com> writes:

> I've done some testing. I use GPS only, no A-GPS. Mobile connection is off (airplane mode).
>
> Testing
> In the village (900m above sea level) : everything is fine with the GPS.
> In the mountains (> 1000m) : I start the smartphone. I open 'GPS Test' app => I get a GPS fix. Then I put the app in the background or lock the screen, then I reselect the app => impossible to get a fix
> Same behaviour with Osmand. Same when I close the app and then relaunch it.

These are not particularly high elevations, relative to GPS
functionality. I've been to 3000m and spent days over 2000m with no GPS
trouble.

> Workaround 1
> In GPS Test, I go in the A-GPS menu, do 'clear cache' or 'clear &
> update'. Still no fix in GPS Test. But if I send GPS Test in the

You say "no fix", but I wonder how long you are waiting. With a clear
sky view, you should generally start to track satellites within a
minute, often much faster. For each, once you have received it for 30s
solid it can be used in a fix.

In GPS Test, you'll see flags for each satellite (text view, "Status").
I typically see "AE" for satellites not used in the fix, and "AEU" for
those used. A is for Almanac (long term, lets you find satellite
roughly in terms of is it above the horizon and doppler shift) and E is
for Ephemeris (precise orbit, good enough to compute position). Almanac
lasts for weeks, and Ephemeris is good for a few hours.

You can tell if the satellite is being received by a non-blank C/N0
field. Generally, reception with reasonable strength (>15?) and E
leads to usage in the fix.


For GLONASS satellites, I see A if not tracked and AEU or AU for those
being tracked.

A-GPS will speed this up. As I understand it, mostly getting you the
per-satellite precise orbits right away, instead of having to receive
for 30s. I have never heard that A-GPS matters much if you can sit
still for a few minutes with a good sky view. For me, I seem to get E
for GPS, and not for GLONASS.

So I wonder what you are seeing while waiting: are satellites showing up
with non-blank C/N0? Do any have "AE" or "A"? A screenshot would be
interesting if you are willing to share.

> background then select Osmand, I get a fix after 1 minute in Osmand
> (would be the same with GPS Test : if I send GPS Test in the
> background then reselect GPS Test, I get a fix after 1 minute in GPS
> Test). This workaround can be used in emergency but is not
> convenient. My hypothesis is that the GPS cache is somehow corrupted
> when the app is sent to background or closed. Any app launched at this
> point will fail to get a fix, until the GPS cache is cleared.

If so this sounds like a bug in your particular phone's operating system.

> Workaround 2
> In Osmand, I start a trace recording with recording interval set to 3
> minutes (to preserve battery). From this point, I can send Osmand in
> the background or lock the screen without losing the GPS fix. It may
> consume a bit of battery, but at least, I can use the GPS in
> mountains. That's great.
>
> This is a strange bug, considering it happens only in altitude, or depending on some other parameters I'm not aware of.
>
> If anybody thinks about a real fix for this issue, please tell me!!

Perhaps file a bug with your the maintainer of your phone's operating
system.

Also, I have seen phones get excessively warm partly from GPS, and
partly trying to find cell towers that aren't there. But you said
airplane mode, so that should keep power usage from the cell modem
zero/low and thus not heat up.

Lodro Gyamtso

unread,
Aug 21, 2019, 1:29:55 AM8/21/19
to Osmand
Hi manu EL,

have you tried at the moment the issue appears on your Samsung A3, any other smartphone device, to see the GNSS receiver capabilities ? Don't forget that the GNSS receiver on any smartphone works without the need of GSM modem. You may have the device into airplane mode without any problem for navigation needs. Exactly as i am doing from 2012 into my 4 smartphone different devices i had. Also, i can track my route with the screen off, to save battery.

At the end i remind to you the company Garmin. Devices like the new GPS Map 66S, can work from 8 up to 20 hours. The working hours depends from the user navigation needs. Into track recording mode with the screen off, can last a lot of days. Just only with 2 AA batteries.


Lodro Gyamtso

unread,
Aug 21, 2019, 2:06:24 AM8/21/19
to Osmand
I need to add one more info.
- smartphone devices into open area can locate us from 10-20 seconds into cold start. hot start into 1-3 seconds.
i have test from 2012 until today, over 400 android devices and all of them it was into airplane mode. from android 2.3.4 up to android 9


On Thursday, August 15, 2019 at 11:57:04 AM UTC+3, Manu EL wrote:

Manu EL

unread,
Aug 27, 2019, 5:34:03 AM8/27/19
to Osmand
Thank you to all.
I did not get better results by modifying battery settings.
I know that 1000m is not high elevation. I was just pointing that my issue occurs when I am above 1000m. I have screenshots from "GPS Test" app but do not know how to post them.
As I am in the mountains, I am still using my workaround. I will reset my phone when at home but won't be able to see immediately if this solves the issue because I live far from the mountains.

Manu EL

unread,
Aug 27, 2019, 5:41:52 AM8/27/19
to Osmand
Now using the desktop version of Google groups, I can post screenshots from GPS Test
Screenshot_20190822-093457.png
Screenshot_20190822-093447.png

Akkana Peck

unread,
Aug 28, 2019, 6:25:29 PM8/28/19
to Osmand
Seeing this over 1000m may be just a coincidence. I use OsmAnd
to log hikes ranging from 1500m (the lowest elevation you can find
near here) to over 3000m.

Is it possible that there's more thick tree cover when you're in the
mountains? I used to have an older (Garmin) GPS that had a very
difficult time getting a fix when in the forest (back when I lived
near sea level, so altitude wasn't a factor). I used to try to stop
in a clearing before turning on the GPS so it would get its fix; but
even then, it would often lose the fix several times during a forest
hike. With a Garmin, that was especially annoying because it ended
up adding wildly wrong points to the track, sometimes points that
were miles away from the correct location. OsmAnd seems much more
sensible about what it does when the GPS loses its fix (which with
my current phone usually only happens in deep canyons).

...Akkana
> --
> You received this message because you are subscribed to the Google Groups "Osmand" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to osmand+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/osmand/c381aa4e-66a1-4de7-be39-16541a75bc0e%40googlegroups.com.

Lodro Gyamtso

unread,
Aug 29, 2019, 5:55:01 AM8/29/19
to Osmand
Hi Manu EL,

if this time you are reading my post, the problem exist, please do the follow steps.

- side by side with your smartphone, check one other smartphone device. If the other works OK then ...
1. hard reset your smartphone
2. or go your device to one samsung authorized repair service

if all previous steps fail, then by a new device. For outdoor activities into android word, i will suggest Samsung Xcover 4s

of course all of this are my personal opinions

Lodro Gyamtso

unread,
Aug 29, 2019, 6:01:52 AM8/29/19
to Osmand
sorry for my bad English

"android world" is the correct, not android word

Rowan H

unread,
Aug 30, 2019, 5:45:33 AM8/30/19
to Osmand
It seems to me that people are reading with expectations rather than reading what you are writing.

This is what I read...You are getting a solid GPS lock in other applications but when you switch to osmand that connection is reset.
Occasionally if osmand goes to the background and back to the foreground it is reset again.

You can confirm this by getting a strong lock in gpstest in airplane mode, switching to osmand, and then switching back to gpstest to see if it is busy acquiring a lock again. Gpstest does not reset the GPS when it goes to the foreground.

If you see gpstest looking for a lock, then the GPS has been initialized by the APP you opened...osmand. All of those other settings power/battery/etc only affect the device if it goes into power mode(the best way to keep your device out of power mode is to attach a charged battery pack and leave it connected.) Devices attached to power sources don't experience power related performance drops, and you may find that you get cell service farther away as well since the cellular radio will use a higher transmission powered if it is getting power.

If you still experience lock loss with a battery after an immediate application switch then it is not a power issue, but an application one. That is a developer issue and needs to be handled as a bug or by contacting support. They will need device information, android version etc. All of these things no one has thought to ask you, and since we are not developers cannot for the most part answer.

Since osmand is resetting the GPS every time the application goes to the foreground its killing your established lock. Since you are in airplane mode, the GPS isn't doing a warm reset, since towers are not available, but instead a cold one. I have seen this problem before.

Altitude has little to do with this or speed really. I have successfully maintained airplane mode GPS locks at commercial air transportation speeds(550kmh) and altitudes(11455m) for 5 hour flights. Speed was a bit wonky over 500kmh mainly because consumer units don't expect you to be going that fast so it messes with the averaging profile that smooths position information. All applications see the averaged cleaned data. If were to look at the raw dirty data, even with a sub 3m lock the position reported could be anywhere within that circle. If two points are reported on opposite sides of that circle you are doing 10kmh between them. At a 30m error circle its 108 kmh between the edges. The averaged data has you going much slower, but also lagged slightly when you first start moving.

Greg Troxel

unread,
Aug 30, 2019, 8:13:03 AM8/30/19
to Rowan H, Osmand
Rowan H <Ro...@rowanhawkins.com> writes:

> Since osmand is resetting the GPS every time the application goes to
> the foreground its killing your established lock. Since you are in
> airplane mode, the GPS isn't doing a warm reset, since towers are not
> available, but instead a cold one. I have seen this problem before.

I don't think this is true. As I understand the API, there is no
"reset", there is "subscribe to precise location using the android API
and "stop subscribing". The OS will then put the GPS receiver chip in
and out of power-saving deep sleep or whatever makes sense for that
particular hardware.

I have no reason to think that previous ephemeris data is discarded
(should be discarded, or is on my device) during unsubscribe/subscribe.
Lots of apps subscribe every N minutes until they get a fix and then
stop; that's normal behavior.

> Altitude has little to do with this or speed really. I have

Agreed that any place on the earth surface is not high enough to cause problems.

Lodro Gyamtso

unread,
Aug 31, 2019, 5:08:45 AM8/31/19
to Osmand


On Friday, August 30, 2019 at 12:45:33 PM UTC+3, Rowan H wrote:
It seems to me that people are reading with expectations rather than reading what you are writing.

This is what I read...You are getting a solid GPS lock in other applications but when you switch to osmand that connection is reset


Hi Rowan H,

please read the post from Manu El on 27 Aug. We can see the 2 screen-shoots from GPS Test app, with good signal level but with no 3D fix location. For me, this device
behavior is for service or replaced. That's why I believe, that your opinion is faulty.

Manu EL

unread,
Sep 7, 2019, 5:21:32 AM9/7/19
to Osmand
Thanks to all for your help. I realize that there are some misunderstandings.

Some precisions :
1. The issue I have is not limited to Osmand app
2. The issue may very well not be related to altitude. Indeed, I sometimes get a normal behaviour at 1000m, 2000m or 3000m for few moments. The fact is that I have not noticed it below 1000m. But I fully agree it may be caused by something else that I am unaware of. I would need more testing under 1000m (without activating track recording, which I often activate when I am not in the mountains and have not concerns with recharging batteries).
3. I don't think it's related to trees
4. Testing with other phones show no issues. Actually, getting a fix is no problem with my phone when using workarounds. I mean getting a GPS fix is very easy anywhere I have been as soon as my phone is in the correct state. I am NOT talking about any difficulties to get GPS signals and a fix. I'm just talking about a bad state my phone goes in.

As I said, I'll reset my phone when I'll have the opportunity. For now, I think we can consider this thread closed.
Thank you again !

MAx1234 Ita

unread,
Sep 8, 2019, 1:08:11 AM9/8/19
to Osmand
Just one last question: is the Android you have in your cell a Stock version or maybe you have installed any modded/unofficial rom?

In some cases, modded roms are derived from other devices (i.e. with the same cpu) and could not fully support all the hardware in yours: I had a similar experience, several years ago, when I installed a Cyanogen mod in my cell: it was nice but I completely lost the FM radio and GPS functionality.

If this is your case, try also reverting to a standard rom from Samsung; anyway,if the
Problem persists, it is definitely an issue with your device.

Please let us know when you have some news.

Max

Manu EL

unread,
Sep 8, 2019, 9:43:12 AM9/8/19
to Osmand
It's stock Android OS. Thank you
Reply all
Reply to author
Forward
0 new messages