Here is a heuristic hack that might address the ordering problem for the data, if
- you have enough points
- the mean distance between points is small compared to the smallest radius of curvature expected of the path
- the mean distance between points is not large compared to the std. dev. of the noise
- the path is not self-crossing (you might get lucky, but no guarantees)
Proceed like this:
- Pick (hopefully by a meaningful rather than random means) a starting point, p1.
- Find all the points that lie within some clustering distance, r_c of p1. Choose r_c small compared to the expected turning radius, but large compared to the scatter.
- Call this cluster C1.
- Find point q1 the mean of positions in C1.
- Fit a line to the points in C1 and project to (or just beyond) the edge of the cluster, and find the nearest point in your original data. Label that point p2.
- Iterate steps 2-5 until you run out of data.
Now you have a new list of points q1..qn that are ordered.
Off the top of my head, very rough, and only works under pretty good conditions...
Self-crossing behavior can probably be improved by requiring in step (5) that the new projected line lie within some maximum angle of the previous one.