How to determine path from noisy X, Y data

后端 未结 10 1970
星月不相逢
星月不相逢 2021-02-08 21:54

I have an unsorted list of noisy X, Y points. They do, however, form a path through the world. I would like an algorithm to draw an approximation of this data using line segment

10条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-08 22:25

    If your points are close to each other, you can normal "straight" lines (orthogonal lines). Using the normal smoothing algorithms. You can see the world as being flat.

    If they are far apart, you need to compensate for the rounding of the earth, by using great circles to navigate from point to point. Otherwise your straight lines will make a longer way.

    It is your choice if a point is too far to create straight lines.

    Further you have to know if you need to "visit" each point, or just need to go near, and how near that near is.

    If you need to send the course(s) to a plane, ship or other traveller, you probably need to visit each point. If you get the GPS data from an object, you probably just want to plot a course on a screen, and remove the noise.


    After seeing your edits: If this is an object moving some traject you want to plot, you might want to smooth the direction and speed instead of the x/y values. (Making your measured values (x) have a fixed and increasing Y-interval makes smoothing a lot easier.)

提交回复
热议问题