In the last posting I mentioned that I made the routes in MoNav more persistent:
As a consequence, I’ve just written some code that detects whether the vehicle is still “on track”. The route only gets recalculated in case the vehicle left it for more than x meters. This makes the route much more persistent and will cause far less headache than the previous approach.
Since the GPS position is always a bit inaccurate, it will almost never be exactly on the computed route. Instead, it will aberrate a bit from it. What you want to achieve is to detect whether the current position still is either near the route, e.g. left or right of it, no more than x meters away and still in direction to the planned target, or in the opposite direction.



