-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geofence algorithm: Dog Park vs PDC #1775
Comments
I know we agreed to filter out data points with accuracy range > 30 but I also expected that the 30-sec debounce algorithm (ie. previous behaviour), which is a fallback plan 'B', would be unchanged. I think the accuracy filter is filtering out data points before they reach plan 'B', so there has been an change (intentional or otherwise). |
Inaccurate data points are filtered out first thing. They are not considered at all. This was very much intentional. The request in #1713 was for inaccurate data to be "thrown out." The example case that was raised to show why we should filter inaccurate data points had Miranda in a metal building for several minutes while her phone was reporting that she was hundreds of meters away. If we accepted an equally inaccurate data point 30 seconds later then the problem would not be fixed. As I see it, the accuracy threshold and debouncing are completely orthogonal concepts. The data's accuracy doesn't improve with age 😄 |
I guess I misunderstood/mis-interpreted your description of the changes. Fair enough. Good that it's been clarified now. The error case observed in this ticket is going to be interesting ... in terms of how we're going to solve it. Time to ponder. |
I have had a deeper look at this case, and I am not sure that there is anything that we can, or should, do about this case. Here are a few facts:
I reran some of my calculations on the accuracy values in the database this morning. 87% of the data in the Based on eyeballing the data, it looks like inaccurate values are most likely to be clumped together. This makes sense since there is usually some external interference that would cause accuracy to be low. What can we do? Not much, really. I think the algorithm itself is sound. There is only so much we can do with bad data and I am satisfied with the result in this case. It wasn't a perfect result, but it was a reasonable result given the quality of the data we had to work with. One thing we can do is tweak the accuracy threshold. It is currently at 30m, and I think we can go as high as 50m without causing too many problems. Keep in mind that raising the threshold also raises the likelihood that we will see this same problem from the other direction. In other words, instead of an inaccurate result because we ignored inaccurate data, we could get an inaccurate result because we didn't ignore inaccurate data. I would be very hesitant to raise the threshold above 50m for that reason. However, raising the threshold to 50m might not have mitigated this particular instance. There are a couple of data points around 22:40 with 48m accuracy that were more than 30s apart, so it might have exited the dog park, albeit late. That may not have been enough to properly enter the PDC bot, though. Eyeballing the data, it looks like it may have entered the PDC bot a few seconds earlier than it actually did. I think the thing to do in this case is to chalk it up to a regrettable but unavoidable poor result due to circumstances beyond our control. The algorithm isn't magic, and you can't get a good result from bad data. |
FYI I bumped the accuracy threshold on |
Not sure where to put this. Maybe it might result in a front-end ticket later. Anyway, here's the iOS documentation page for accuracy levels that we can configure iOS to return. https://developer.apple.com/documentation/corelocation/cllocationaccuracy?language=objc We're currently using There is another level
|
Been reading the internets and forums on ios gps accuracy. According to some people, it's been deteriorating around, or since, iOS 11. And then there are all sorts of work-arounds to 'fix it' back up. The anecdotes are all over the place. I'm sure there are a lot of false alarms, but there's probably some truth in there too. The problem is wading through them all. |
Oh, boy. This sounds like a rabbit hole we could spend quite some time going down. |
Yeah, that was my second last thought. My last thought was ... Even if client-side GPS accuracy is deteriorating and there are special 'fixes' available, it's not feasible for us to 'fix' every user's phone so ... we'll have to do our best at the server-side and handle high accuracy uncertainties as best we can. meta: It would be nice to be able to say to a user: 'Hey, your GPS accuracy sucks. Can you sort it out instead of sending us inaccurate data?' (Which is what prompted the suggestion of rn-chat#2720) |
I think we may have to figure out something like that. The one GPS app (other than maps) that I use a lot is Fitbit, and they have had significant problems with GPS accuracy over the last couple of years. I commented on the upstream ticket to that effect. |
@thescurry has indicated that he's happy with an accuracy threshold of 90m. I've spun out a ticket (#1799) so we remember to configure Production eventually. Since things seem to be satisfactory for now, I'm going to consider this feedback iteration as done, and closing this ticket. Until we hit the next geofence anomaly. |
Description
Quoting @thescurry:
https://hippware.slack.com/archives/C2V6L53TQ/p1534893214000100
Data
These are the relevant pieces of data.
Interpretation
(DA = 'debounce algorithm')
Fine so far. Then:
At the time of the user report, around 23:13:00, the user had left the bot but because the 90+ data points were all discarded, the DA thought the user was still in the bot perimeter.
The location of the user indicated in the screenshot (ie. 'blue') is correct. The DA is incorrect.
FWIW, the most recent data point as of 23:13:00 had an accuracy range of 65 and an
is_moving
of false.Discussion
There's a number of ways to tweak the DA to correct for this. I'll leave that for another time, or for others to give their opinions.
The text was updated successfully, but these errors were encountered: