0

I have a set of (slightly noisy) GPS coordinates that I want to turn into a path. How do I go about this?

I find it similar to this question, except my points are ordered. Also, the path does not need to go through the points, but just follow their general direction.

It seems that Bezier curves might be the answer, but is there a way to use Bezier curves on hundreds of points?

Q&A:

How are your points ordered They are ordered by time and attached to a travelling car. There might be data that specify that the the car is travelling backwards, but I can remove that data by requiring that all points move in a "forward" direction. So then I should have just a list of points that all go forwards in space and don't intersect with themselves.

What if we connect all the lines with straight lines It won't look pretty. I'd like for the lines to be continuous and curvy.

What about using a spline between all the points This too will make too much noise. The path will be very "jumpy". It would be better if we didn't care about going through points, but just near them.

Community
  • 1
  • 1
theicfire
  • 2,719
  • 2
  • 26
  • 29

1 Answers1

0

It is a bit of heavy machinery, but you can model your GPS observations as points following a Gaussian process with Gaussian noise, where the main Gaussian process model specifies that the underlying unknown true x and y coordinates of two measurements close in time should be close, and the noise allows the observed x and y GPS measurement values to deviate a bit from the true x and y values predicted by the Gaussian process model. You can read the book "Gaussian Processes for Machine Learning" available online if you're interested. I think it's a really elegant, flexible and powerful solution, but it would take way too much space to explain it in enough detail here so you really do need to read about it from the book.

Once you've learned the most likely Gaussian process model solution, you can make predictions of x and y locations for any time point, and it will be a smooth curve, which you can then plot. It won't pass through the observed GPS locations exactly.

user2566092
  • 4,631
  • 15
  • 20
  • I feel like that might be more complicated then necessary? Machine learning is also about predicting the future, where I don't need such information. But I will look into it if I can't find a better answer. Thanks! – theicfire Oct 15 '14 at 20:37
  • @theicfire The Gaussian process model does predict locations in the future, but it is pretty bad at it because it extrapolates all the derivatives of the prediction and not just the prediction value itself. So e.g. if the x coordinate is increasing at the end, then the GP model will often predict that x will increase at an even faster rate in the future. Gaussian processes are more tailored for interpolation (not extrapolation) and fitting noisy data, which sounds like what you want. I admit it's a bit heavy machinery, but I bet it will do really well provided that GPS noise is Gaussian. – user2566092 Oct 17 '14 at 19:42