DistanceToDestination and OffCourseDistance Issues and WorkAround

If anyone uses "Off Course Distance", it is broken and unreliable at best. Thankfully, "Distance to Destination" (D2D) works in almost every corner case and scenario. Here is a great workaround...

If you go "off course", D2D remains static while your Activity Distance increases. You can watch for this and set your own OffCourse flag.

Once you notice D2D changing again, you are back on the Course. At this point, D2D should be decreasing again.

There are two other scenarios.... if it jumps to a larger number but then starts decreasing - that means you circled back to a prior course location but are going in the correct direction. Or if it starts increasing, you are on Course but going the wrong way. I calculate how far you've traveled when in the OffCourse state, by tracking the accumulated Activity Distance when OffCourse.

So until/unless Garmin fixes OffCourseDistance, this is the only way to reliably detect this condition.

There was one rare situation in which even D2D broke. I loaded a route, and selected do not navigate to Start. I had a 5 mile ride to get to the start. The Course was 80.2 miles. D2D is locked at 80.2 miles during my ride to the Start, which is expected (with OffCourse detected while you are off course headed to the start). Normally, once at the start, the Course is FOUND, and once you start on the actual Course, D2D starts to decrement as you proceed. Yesterday, as I started the Course, the Garmin EDGE almost immediately reported "Finished" and D2D dropped to zero. So it got confused and thought I was at the end of the ride. This has only happened once. Garmin can fix this logic flaw by not allowing it to mark the Course as Finished until you've reached the Start/Finish location after having ridden at least some distance of the Course.