I think your initial idea is great. I would add / change two things:
1) I would choose the distance threshold in your algorithm: only when the current test point is at some minimum distance from your last "good" point, you should check it. Depending on the data source of your path (perhaps a magnetic tracker?), Stationarity may reflect poorly on your source data due to measurement noise. This can lead to relatively large changes in direction in a very small area, which essentially do not make sense.
2) When you find a sufficiently large change, do not add the current test point (as you said), but the previous one. Otherwise, you may end up distorting the path. Example (in 2D): a path consisting of (0,0) β (1,0) β (2,0) β (3,0) β (4,0) β (5,5) will end as (0, 0) β (5.5) using your methods, which I would not consider a good representation of the path. It would be better (0, 0) β (4.0) β (5.5).
source share