microg / UnifiedNlp

Alternative network location provider for Android, with plugin interface to easily integrate third-party location providers.
978 stars 210 forks source link

Long delays until position is acquired #101

Open Ra72xx opened 8 years ago

Ra72xx commented 8 years ago

I noticed that UnifiedNLP has really long delays until a changed location is being reported. E.g. a weather widget might stay for several hours (some times more than 12h) on the same location until it notices a change in location. Especially annoying is that Tasker (the automation app) profiles based on network location (without GPS) are extremely unreliable: Tasker cell contexts, i.e. profiles based on the ID of the current cell tower, work perfectly, the same profile with UnifiedNLP and location context has a delay of 15+ minutes to hours. And that even if the phone is definitely logged into cell towers which should trigger the context.

I also can have Mozilla stumbler running in parallel. As this programm shows the current location as computed by Mozilla NLS, I see that the correct position is available, but UnifiedNLP does not report it until much later.

I use a Samsung S7 with different custom MM-ROMs, and MicroG-UnifiedNLP with different backends (Mozilla and OpenCellID). It somehow seems as if UnifiedNLP is kind of dozing and not updating its position info. Maybe some power saving mechanism of Android MM is interfering with the continuous work of UnifiedNLP, but I have not yet found a solution.

n76 commented 8 years ago

This is more a backend issue than a UnifiedNLP issue so you may want to post the issue there.

Basically both those backends get triggered when Android detects a change in cell towers (Mozilla) or WiFi/WLAN APs (Mozilla and OCID). They only report the position at that point and then UnifiedNLP starts aging things. In my house, the cell/mobile tower I see is stable and the WLAN/WiFi APs are stable so the position ages out quite rapidly.

The phone only backends work on a little different logic and don't seem to have the issue you are noticing. Basically they trigger scans more often and they also report back the same location if the signals received have not changed.

Ra72xx commented 8 years ago

Thanks for the quick reply. However, I don't quite get the idea behind the "ageing", as you call it. If cell towers change, UnifiedNLP should be notified in any case, or?! If I stay stationary, it shouldt matter if the backend reports the same location again and again or stays quiet?

I noticed the behaviour both with on-phone databases of OCID and/or Mozilla and with the online-only Mozilla backend from FDroid.

climf commented 7 years ago

Tasker locations features are most useless as they require true gapps :(

What is your typical Time To First Fix?

What NTP server is used by your gps.conf

Ra72xx commented 7 years ago

Has nothing todo with the problem, but: I never had to mess around with GPS/NTP settings as fix is almost immediately. Is it a fact that Tasker location needs true Gapps? Apart from the problem stated in this bug report I had the impression that there are fundamental problems.

ale5000-git commented 7 years ago

@climf: If you setup microG correctly the apps cannot distinguish between GApps and microG.