I'm doing a Python simulation of a vehicle, driving along a specified path. I generate dummy GPS readings, that fetch the current position of the vehicle, with some randomized error added. After a track is complete, I obtain a set of collected GPS points, that looks like this:
Assuming that we have no knowledge on how the physical path looks like (for performance reasons, we do not want to have anything to do with the map), and that we only know these points, I would like to detect the turns of this track. I want to do this, so that later, I can group these points by linear segments, and then construct a convex hull for each of them separately, like this:
One idea that I already had, is, given a set of data points, construct a piecewise linear approximation of these points, and then extract the coordinates of the resulting line. However, it is still somehow problematic, because I would have to look for the closest existing point from the dataset, which seems to be time-consuming. The best outcome for me would be to identify right away the specific point (or points) at which the turn occurs. Every track has a list of its recorded points, and I have to cut it into pieces somehow, but to do that, I need to know at which points it turns.
more exact convex hull problem definition Maybe this approach is wrong in general, maybe there is a much easier way, to find a convex hull without large empty areas for a group of points right away?
Additional information: The points are NOT an ordinary point cloud, they are stored as a list, which means that they are ORDERED.