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

Hour long trip is not segmented properly #98

Open
shankari opened this issue Mar 1, 2016 · 0 comments
Open

Hour long trip is not segmented properly #98

shankari opened this issue Mar 1, 2016 · 0 comments

Comments

@shankari
Copy link
Contributor

shankari commented Mar 1, 2016

Trip to karate and back was treated as one trip although karate lesson is an hour long.

Seems to be related to #97 - the trip to karate is not detected as complete.

2016-03-01 01:09:02,973:DEBUG:------------------------------2016-02-29T16:09:51.401000-08:00------------------------------
2016-03-01 01:09:02,979:DEBUG:last5MinsDistances = [ 297.91792223  148.00903107   70.74334483   29.45781875   22.53231054
   21.60121787   21.32723947   21.72036211   20.93484013   21.51806829] with length 10
2016-03-01 01:09:02,983:DEBUG:last10PointsDistances = [ 148.00903107   70.74334483   29.45781875   22.53231054   21.60121787
   21.32723947   21.72036211   20.93484013   21.51806829    0.        ] with length 10, shape (10,)
2016-03-01 01:09:02,984:DEBUG:len(last10PointsDistances) = 10, len(last5MinsDistances) = 10
2016-03-01 01:09:02,984:DEBUG:last5MinsDistances.max() = 297.917922226, last10PointsDistance.max() = 148.009031074
2016-03-01 01:09:02,984:DEBUG:------------------------------2016-02-29T16:10:21.363000-08:00------------------------------
2016-03-01 01:09:02,990:DEBUG:last5MinsDistances = [ 148.25066524   81.19936214   38.68566061   41.56478288   42.52289453
   42.29461316   42.68804377   41.87371559   42.44075249   21.0572958 ] with length 10
2016-03-01 01:09:02,995:DEBUG:last10PointsDistances = [ 81.19936214  38.68566061  41.56478288  42.52289453  42.29461316
  42.68804377  41.87371559  42.44075249  21.0572958    0.        ] with length 10, shape (10,)
2016-03-01 01:09:02,995:DEBUG:len(last10PointsDistances) = 10, len(last5MinsDistances) = 10
2016-03-01 01:09:02,995:DEBUG:last5MinsDistances.max() = 148.25066524, last10PointsDistance.max() = 81.1993621395
2016-03-01 01:09:02,996:DEBUG:len(segmentation_points) == 0, early return

And the trip from karate is detected as a new trip with a new start.

2016-03-01 01:09:02,973:DEBUG:------------------------------2016-02-29T16:09:51.401000-08:00------------------------------
2016-03-01 01:09:02,979:DEBUG:last5MinsDistances = [ 297.91792223  148.00903107   70.74334483   29.45781875   22.53231054
   21.60121787   21.32723947   21.72036211   20.93484013   21.51806829] with length 10
2016-03-01 01:09:02,983:DEBUG:last10PointsDistances = [ 148.00903107   70.74334483   29.45781875   22.53231054   21.60121787
   21.32723947   21.72036211   20.93484013   21.51806829    0.        ] with length 10, shape (10,)
2016-03-01 01:09:02,984:DEBUG:len(last10PointsDistances) = 10, len(last5MinsDistances) = 10
2016-03-01 01:09:02,984:DEBUG:last5MinsDistances.max() = 297.917922226, last10PointsDistance.max() = 148.009031074

And we find its end

2016-03-01 02:08:59,936:INFO:Found trip end at 2016-02-29T17:03:53.396000-08:00

But the last place was at home

2016-03-01 02:08:59,949:DEBUG:last place doc = {u'enter_fmt_time': u'2016-02-29T08:47:50.
717000-08:00', u'user_id': UUID('e471711e-bd14-3dbe-80b6-9c7d92ecc296'), u'enter_local_dt
': datetime.datetime(2016, 2, 29, 8, 47, 50, 717000), u'ending_trip': ObjectId('56d4892c8
8f663446afb1396'), u'source': u'DwellSegmentationTimeFilter', u'location': {u'type': u'Po
int', u'coordinates': [-122.0859637, 37.3909514]}, u'enter_ts': 1456764470.717, u'_id': O
bjectId('56d4892c88f663446afb1397')}

So we say that all points from the last place are part of this trip. Normally, this would result in a straight line for part of the trip, but in this case, we actually did have points, so they were merged and we got the back and forth be part of the same trip.

It looks like the issue in which the phone stops collecting data at a point in which the server still doesn't see the trip is causing a bunch of issues.

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