1

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.

Kara
  • 6,115
  • 16
  • 50
  • 57
individual8
  • 429
  • 1
  • 5
  • 13

1 Answers1

0

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.

John
  • 15,990
  • 10
  • 70
  • 110
  • The set also includes accuracy for each point, I forgot to mention that. However if you're staying at a location the velocity between the points is likely to drop. The difficulty though is if accuracy also drops and puts you quickly a few meters/kilometers away (even though you're staying at the same place) it looks like you're suddenly moving again, which is not the case. I wonder if somebody wrote an algorithm for my case... – individual8 Feb 24 '11 at 23:08
  • So your use case implies regular updates (once a minute, say) rather than user-initiated updates ("I'll tell the service I'm here now")? – John Feb 24 '11 at 23:14
  • Google Latitude updates more or less every hour if you're staying at a place and more frequently when you're moving. The updating though depends on battery life and some other factors on the phone. – individual8 Feb 25 '11 at 10:54