Updating set_location ()
Hello!
Now that I have geocloue functional, I was noticing that set_location () may not take into a account a few things, and was wondering if you would be up for me trying to refactor it: https://gitlab.freedesktop.org/geoclue/geoclue/-/blob/master/src/gclue-locator.c#L86
The primary thing is if the current location is very accurate, nothing else has the ability to update it. For example, if I get a GPS lock but then lose it (e.g. I walk into a building), or I get a WiFi accuracy of 10
(which I did get), it makes it harder for any other location to update it.
I was thinking of two options:
- Introduce the STALE_LOCATION_AGE here: https://gitlab.freedesktop.org/geoclue/geoclue/-/blob/master/src/gclue-locator.c#L123 of something like 60 seconds? That way we know the location is stale and something else can update it, and/or
- Have something where the location knows what source it came from (Wifi, 3G, etc.), and if that same source gives a less accurate reading, we force an update to the location.
I am sort of leaning to something closer to 1, as that looks less invasive with the code. But before I did anything, I wanted to makee sure I wasn't missing anything silly.
Thank you!