Skip to content
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

Spurious trip tracking on android sometimes lasts for hours #71

Open
shankari opened this issue Dec 2, 2015 · 2 comments
Open

Spurious trip tracking on android sometimes lasts for hours #71

shankari opened this issue Dec 2, 2015 · 2 comments

Comments

@shankari
Copy link
Contributor

shankari commented Dec 2, 2015

We have always had an issue with geofences on android, in which it will randomly generate spurious geofence exits. We have always ignored these in the past, because they will auto-resolve after around 10 minutes, as we get enough points to detect a trip end.

However, on Android 6.0 in Doze mode, we may not get points immediately, since wake locks are turned off, and the app is only allowed to run during certain maintenance windows. It is not clear if this is a power drain, since presumably, the sensing will also be turned off during the doze window, but it would be good to fix if possible.

    latitude    longitude   accuracy    fmt_time
0   37.395463   -122.098333     1313.0  2015-12-01T04:07:30-08:00
1   37.395463   -122.098333     1313.0  2015-12-01T04:07:30-08:00
2   37.391018   -122.086195     30.0    2015-12-01T04:07:56-08:00
3   37.391018   -122.086215     30.0    2015-12-01T04:08:26-08:00
4   37.390999   -122.086227     30.0    2015-12-01T04:08:56-08:00
5   37.390999   -122.086227     30.0    2015-12-01T04:09:55-08:00
6   37.390999   -122.086227     30.0    2015-12-01T04:13:57-08:00
7   37.391016   -122.086196     31.5    2015-12-01T04:19:28-08:00
8   37.395504   -122.096731     1376.0  2015-12-01T07:49:17-08:00
9   37.391010   -122.086230     40.5    2015-12-01T07:50:01-08:00
10  37.391010   -122.086230     40.5    2015-12-01T07:50:47-08:00
11  37.391010   -122.086230     40.5    2015-12-01T07:51:17-08:00
@shankari
Copy link
Contributor Author

shankari commented Dec 2, 2015

Since the change that is triggering the geofence exit is of low accuracy, it is a fairly simple fix to just ignore such changes.

As we can see from
https://github.com/shankari/data-collection-eval/blob/master/analysis_dec_2015/Investigate%20passive%20mode.ipynb
this will not work 100% of the time, but should help at least 50% of the time.

For the others, checking the distance may help, although that feels more dangerous since we may miss actual transitions.

@shankari
Copy link
Contributor Author

Change to ignore changes was checked in as c57ef9d.
However, that relied on an assumption that if the exit event was ignored and the geofence retained, then other exit events would be generated as the trip continued.

However, this assumption was incorrect. For a trip in which I left Stevenson, the first point was of low accuracy although it was a real trip. After that was ignored, subsequent points were outside the geofence but did not trigger anything, since there was no inside -> outside transition.

The change was reverted in 9fb93c6.

2:49pm: GeofenceExitIntentService: Geofence exited! triggering location accuracy = 897.0
2:49pm: Low accuracy point, Location[fused, 37.4041414, -122.083986 acc=897] ignoring
3:19pm: BuiltinUserCache: While searching for regex, got 0 results
3:19pm: BuiltinUserCache: While searching for all, got 0 results
3:19pm: BuiltinUserCache: There are no entries in the usercache. A sync must have just completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant