Testing the positon.xyz network location server - confusing
Trying to ascertain the quality of network geolocation results sourced from the "positon.xyz" URL that Marvin shared on 6/15 . https://github.com/microg/GmsCore/issues/2237#issuecomment-2169261681
For both the devices I'm testing with, the microG utility is not showing any recent location requests from any of my geolocation apps with the exception of one maps app. Even though both SatStat and My Location report network location input with an estimated accuracy of 100m during the tests.
The "Request from Mozilla" switches are turned off in the microG utility and WiFi/Bluetooth scanning is enabled in ROM settings. One device is on A10 and the other on A14, different ROMs.
Is there some document somewhere that clearly explains the various forms of geolocation inputs to android, and how they interact with microG to get that data to the apps?
Depending on the device and ROM, SatStat lists:
- GPS provider
- "Passive" provider
- Network provider
- Fused provider
The only app of all of these that shows as having made a location requestion to microG is Sygic.
- SatStat
- My Location
- Magic Earth
- Organic Maps
- AmiGo (TomTom)
- Sygic
- Offi (transit scheduler)
So are the rest all bypassing fused location/network location and somehow getting the network location information elsewhere, or is this a display bug in the microG utility, or ?
Thanks
The Request from Mozilla switch also toggles the custom server. You will need to enable that to use positon.xyz. This toggle is a little confusing right now but I believe this will be made clearer in the future.
If this is turned off, your phone would likely be estimating a location using data it has passively collected, assuming you have Remember from GPS enabled in microG Location settings.
The Request from Mozilla switch also toggles the custom server. You will need to enable that to use positon.xyz.
Thanks. It was confusing to me because it was showing input from "network" (blue pin/circle) when no such source was actually enabled. (Mozilla switches OFF)
If this is turned off, your phone would likely be estimating a location using data it has passively collected, assuming you have Remember from GPS enabled in microG Location settings.
And this is probably the crux of it.
Because if the SatStat map display for network location source or My Location's "network" category are showing cached GPS--> RF emitter correlated location, instead of actually showing the network location's raw input, this makes it impossible to actually know how accurate or innaccurate the live network data source is.
With the old GmsCore architecture it was very easy to compare these network geolocation sources because at the bottom of the page for each UNLP backend it would display the estimated geocoordinates in the form of a street address generated by Nominatum.
With this system, I cannot distinguish between a local cached address (like we used to get from the DejaVu or LocalNLP UNLP backends) and one coming from an external network source. (like we used to get from the other traditional UNLP backends like Apple, Mozilla, GSM, WiFi, Baidu etc)
There IS a color code in the SatStat map for "passive" inputs. (Green color, but this only shows up in the map legend for 2 of the 3 devices I'm testing here, I assume it's ROM dependent) But neither of my 2 devices that have it show anything in the map with that color code.
Lastly, I still don't know where the Fused provider comes into the picture. I saw this show up in the SatStat legend for one of my devices in the past (probably the A14 device) but as of today it's nowhere to be seen on the legend or map on any of them.
I always thought that support for fused location was necessary in order for microG to provide location input to the OS, but none of my microG devices here have ever shown anything correlating to that color in the SatStat map.
Maybe I'll ping the SatStat dev and see if I can get more info from them about it.
Is there a way to view/dump my passively collected location data? I'd like to see what it contains.
Iirc the fused location provider is transparent isn't it? It takes data from NLP and GPS and fuses them together for a location? NLP gets a lock much faster obviously.
I'm targeting to finish import/export of local data for next release
With this system, I cannot distinguish between a local cached address (like we used to get from the DejaVu or LocalNLP UNLP backends) and one coming from an external network source. (like we used to get from the other traditional UNLP backends like Apple, Mozilla, GSM, WiFi, Baidu etc)
I see the issue. We might want to add some debug UI to microG in the future to help with this case. This can't be at SatStat, because both data in the end appears as "network" location (also, in contrast to the previous system, microG wouldn't even do "live" requests if local data seems to be accurate enough)
If you want some additional data (though not the amount you seem to be looking for), you can use this command to dump some internal state from a connected machine:
adb shell dumpsys activity service location
Lastly, I still don't know where the Fused provider comes into the picture. I saw this show up in the SatStat legend for one of my devices in the past (probably the A14 device) but as of today it's nowhere to be seen on the legend or map on any of them.
There's two ways to get Fused location on Android, one is through the Play Services API, which is implemented by microG, and one is as an additional location provider beside network. The latter is not yet supported by microG, but is what SatState uses. It's missing in microG partly because many non-Google custom Android OS currently ship with a (broken) implementation of it, that can cause conflicts. I'll have to investigate again in how far we can still provide this as well (as it would be good for FOSS apps if they could use it).
I see the issue. We might want to add some debug UI to microG in the future to help with this case. This can't be at SatStat, because both data in the end appears as "network" location (also, in contrast to the previous system, microG wouldn't even do "live" requests if local data seems to be accurate enough)
It would certainly help.
Even moreso if we (hopefully) get the ability to add more than one network location source, like we had with GmsCore 0.2.27 and prior.
Re: "local data being accurate enough" - I assume this is because it has seen the same RF environment before? Is GPS re-checked periodically to verify the environment is still the same as the cached one?
There's two ways to get Fused location on Android, one is through the Play Services API, which is implemented by microG, and one is as an additional location provider beside network. The latter is not yet supported by microG, but is what SatState uses.
Using the ADB command you suggested, seems to me that SatStat is actually using the Fused Location provider? See below.
SERVICE com.android.location.fused/.FusedLocationService c81aab8 pid=1526 user=0 Client: request: ProviderRequest[@0, WorkSource{10217 com.vonglasow.michael.satstat}] gps interval: 0 network interval: 0 last gps location:
Right now on my Pixel7 Pro running CalyxOS SatStat's legend page (which changes from device to device, I noticed) shows the following defined provider color codes - but I never see anything on the map other than red and blue:
GPS (red) Passive (orange) Network (blue) Fused (green) Stale (grey)