Skip to content

Commit

Permalink
update trip segmentation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JGreenlee committed Jan 30, 2025
1 parent 62ad589 commit 6243b40
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ def testSegmentationPointsDwellSegmentationTimeFilter(self):
dstfsm = dstf.DwellSegmentationTimeFilter(time_threshold = 5 * 60, # 5 mins
point_threshold = 10,
distance_threshold = 100) # 100 m
segmentation_points = dstfsm.segment_into_trips(ts, tq)
loc_df = ts.get_data_df("background/filtered_location", tq)
segmentation_points = dstfsm.segment_into_trips(ts, tq, loc_df)
for (start, end) in segmentation_points:
logging.debug("trip is from %s (%f) -> %s (%f)" % (start.fmt_time, start.ts, end.fmt_time, end.ts))
self.assertIsNotNone(segmentation_points)
Expand All @@ -88,7 +89,8 @@ def testSegmentationPointsDwellSegmentationDistFilter(self):
dstdsm = dsdf.DwellSegmentationDistFilter(time_threshold = 10 * 60, # 5 mins
point_threshold = 10,
distance_threshold = 100) # 100 m
segmentation_points = dstdsm.segment_into_trips(ts, tq)
loc_df = ts.get_data_df("background/filtered_location", tq)
segmentation_points = dstdsm.segment_into_trips(ts, tq, loc_df)
for (start, end) in segmentation_points:
logging.debug("trip is from %s (%f) -> %s (%f)" % (start.fmt_time, start.ts, end.fmt_time, end.ts))
self.assertIsNotNone(segmentation_points)
Expand Down

0 comments on commit 6243b40

Please sign in to comment.