mirfatif / MyLocation

Know your geo coordinates using on-device GPS and Network location providers
GNU Affero General Public License v3.0
62 stars 5 forks source link

RFE: passive location provider #7

Open Lee-Carre opened 2 years ago

Lee-Carre commented 2 years ago

Very handy app. I primarily use it (especially the Lock G[NS]S toggle feature) during various surveying (OSM, collecting data for the likes of MLS, …) and general tinkering.

To that end, I would find it useful to interrogate the passive location provider (as a separate UI section to GNSS, network, UnifiedNLP). Several apps I use regularly are (deliberately) configured to use the passive provider only. So, being able to easily query the same data they're using, would be helpful, especially for parameter-tuning.

Thanks for your attention.

gdt commented 2 years ago

In addition to passive GPS, it would be nice to add "last known location".

Lee-Carre commented 2 years ago

@gdt

In addition to passive GPS

I'm unsure what you mean by “passive GPS”. The passive location provider (and this RFE) isn't (only) about GPS (or GNSS; since there's been more GNSS constellations than NavStar's GPS for quite a while, now).

My understanding (which may be wrong, so please do cite sources which give correct info) is that the passive provider will supply the result of whatever other apps requested an active fix, except that via the passive provider an active fix won't be triggered. It's querying the cache without firing off a fresh request to the source. If the last fix was non-GNSS (e.g. via the network provider, from one of the radio networks) then that's what'll be supplied via a query to the passive provider.

it would be nice to add "last known location".

Given the above, to my understanding, this should be exactly what the passive provider returns.

Though, strictly, you're always provided last-known even when actively querying for location. All that varies is the interval between fixes (or, since (via passive) it's unknown (to software) when the next (active) fix might be acquired, then the time-elapsed since the last fix).

gdt commented 2 years ago

Sorry, I spoke too loosely. I meant GNSS: the location returned by the chip that listens to satellite signals. And yes, my Nexus 5 had GLONASS as well.

You may well be right about passive being location in general.

I think it's pretty likely you are correct about last known location. I have seen SatStat show it in grey, so I thought it was a different API, but same API, old data makes sense.

I'll follow up if I have anything concretely useful.