Thread Previous • Date Previous • Date Next • Thread Next |
On 15/07/16 10:41, Sam Bull wrote:
the main thing I would like to see is that if location services is asked for a location, and it hands out some cached junk, it should pull it's finger out and turn on the GPS chip and start finding a real location. It doesn't. It just merrily thinks that it has done a cracking job by handing out your position from the last time you looked at a maps application and goes back to sleep. You can refresh and refresh and refresh a location aware application and it will repeatedly hand out cached junk, and won't turn on the GPS. It is *only* moving dot mapping applications that subscribe to updates that cause it to think about waking up the GPS chip. Just expanding the accuracy radius isn't really that good, because applications will use the centre of the circle as the best guess to where you are. There should be more events that cause it to wake up and look at the sky, such as turning on the screen, connecting or disconnecting from wifi (if you connect to wifi, there is a reasonable chance you are at a destination where you might stop and expect the phone to know where it is) so that it doesn't hand out misleading junk to applications.On Thu, 2016-07-14 at 15:13 +0100, Alan Bell wrote:and the utterly broken location services https://bugs.launchpad.net/ubuntu/+source/location-service/+bug/15546 04 the only way to get a location is to use a moving dot map application and wait and wait for a fix, then you can go to your other location aware thing so it doesn't give out a spectacularly stale location.As far as I can see, the location services are not broken, just the API design. Apps such as the Weather app, typically ask for a location once, and the location service provides the best location it has at that moment in time. The first thing I'd like to see changed, is that the accuracy of the location should consider the time that has passed since that location recording. E.g. A GPS position might be 10m accuracy, but if it is 30s later, then that should give something like 100m accuracy. If it is hours or days old, then the accuracy becomes 10's of km.
The second thing I'd like to see, which I've suggested here before, if an app wants a location one time, such as the Weather app, there should be a second parameter which defines the minimum level of accuracy. E.g. for the Weather app I only need a roughly city-level position, so it could specify a minimum accuracy of 2km or so. If this level of accuracy (factoring time into it) is less than the minimum, then it should get a new location that meets the minimum requirements and return that. The app can then display a 'waiting for location' message while the location service is working.
that isn't in the API though https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/Using_geolocationyou can use getCurrentPosition (which is the one which everything uses and doesn't turn on the GPS), or you can use watchPosition() which is what moving dot map applications use which does turn on the GPS. getCurrentPosition does have an option to specify a max age and request high accuracy https://developer.mozilla.org/en-US/docs/Web/API/PositionOptions but I am not sure that we respect those options or just disregard them and hand out junk.
Thread Previous • Date Previous • Date Next • Thread Next |