Finding trips in a set of waypoints

269 Views Asked by At

From a set of waypoints, each with lat/lon and timestamp, how do you find out the start and end point of a trip vs. staying at a place over time?

I'm playing with Google Latitude data, unfortunately it only provides a stack of locations, no meta data. I tried to calculate the average velocity between waypoints, but because of the nature of Latitude sometimes location data gets slightly inaccurate and it looks like I stopped somewhere even though I was still on a trip to somewhere.

1

There are 1 best solutions below

3
On

I guess staying at a place over time is just a matter of degree, isn't it?

Given a bunch of lat/long pairs with timestamps, you can do the following:

  • Figure out the first and last points
  • Figure out what order the points were visited in
  • Figure out the difference between successive waypoints

But if this is all you have, this is all you have. Some questions you don't know the answer to:

  • Are any waypoints missing?
  • Are the waypoints entered by the system/user at consistent times?
  • Are the first/last points the user's primary residence?
  • Are the waypoints accurate? (Did the user make a transcription error somewhere?)

If you have a set of waypoints that may be several trips, I suppose you can take some time cutoff to bin your trips (a gap of a few weeks probably means separate trips).

Otherwise, the earliest and latest points are probably your best bets.