Under certain circumstances, ActivityInfo::distanceToDestination seems to have the same value as distanceToNextPoint, instead of reflecting the distance to the end of the course, as expected. Hopefully I am not misinterpreting what distanceToDestination is supposed to represent. I've always assumed that destination means "end of course", but maybe I misunderstood. If so, perhaps the documentation could be clarified?
A user of my AppBuilder 5 data field app reports that the distanceToDestination field (which is exposed in the app) seems to give the distance to the next turn in the course, instead of the end of the course. I also found this forum post from 12 months ago: https://forums.garmin.com/developer/connect-iq/f/discussion/7028/distancetodestination-inaccurate-value
"I've built a data field for fun and personal use to get more data on the screen of my Fenix 5x and I was trying to use the distanceToDestination in Activity->Info. I want to have the same data value as the native distance remaining field while following a course. In the simulator this shows the correct data set under the navigation information. However while testing on the Fenix 5x I've noticed that the data it gives is dependent on the Routing setting for the app. If the Routing setting is 'Use Map' the distanceToDestination is accurate but if the Routing setting is 'Follow Course' then it always shows the same distance as the distanceToNext field. I'm using a course built in Garmin Connect to test that has just a few course points to make sure there's differentiation between distanceToNext versus distanceToDestination. Shouldn't the distanceToDestination behave the same regardless of the App Routing option? Is there another way to get the same value as the native distance remaining while following a course?"
I tried this with my 935 and I get basically the same behaviour as described above -- I loaded a 14 km course, and both distanceToNextPoint and distanceToDestination return 0.40 km. I would've expected distanceToDestination to be about 14 km.
---
Environment: Fenix 5 Plus or FR935
Recreation Procedure:
1) Load a non-trivial course (with some turns) to device from Garmin Connect.
2) Add AppBuilder 5 data field to activity, with following configuration:
Formula: distancetonextpoint
3) Add AppBuilder 5 (B) data field to activity, with following configuration:
Formula: distancetodestination
4) (Fenix 5 Plus only) Set Routing Setting to "Follow Course" (this of course is the same as the 935 behaviour, since 935 doesn't support maps)
5) Start Run activity and use the course from 1)
6) Observe the values for distancetonext and distancetodestination.
Expected behaviour: distanceToDestination is the distance to the end of course, and distanceToNext is a shorter distance (either the distance to next turn, or the distance to some point that was generated by Garmin Connect)
Actual behaviour (based on user reports and forum post): distanceToDestination and distanceToNext are the same (which is a distance much shorter than the entire course)
7) If necessary, set Routing Setting to "Follow Map" and repeat 5) and 6)