No Activity.Info.distanceToDestination on Forerunner 245?

When I use Activity.Info.distanceToDestination on a Forerunner 245 (v7.80) I get the following run time error:

Error: Symbol Not Found Error

Details: Could not find symbol 'distanceToDestination'

This is the same in the simulator as well as on the actual watch.

This is the code:

distanceToGo = info.distanceToDestination != null ? info.distanceToDestination : 0.0;

So even if distanceToDestination was "null" the code should not crash.

However, I have loaded a fit file that contains a track with a destination, so this should work. The built-in data field shows the distance correctly.

Does the 245 not support this field? If yes, why, if I can get it as a standard built-in field?

  • When you look at distanceToDestination in the API doc in the SDK, under "Supported Devices", the fr245 isn't shown.

    So in CIQ, this value isn't available.  Use "has" to see if you can even null check it.

  • I must say Garmin takes some weird decision about which fields to make available and which not. distanceToDestination is available a built-in field, but not on the API. For totalDescent and totalAscent it is the other way round: available on the API, but not as a field you can choose in built-in data fields. Not sure this artificial crippling of capabilities attracts a lot of developers to develop software for Garmin.

  • Not sure this artificial crippling of capabilities attracts a lot of developers to develop software for Garmin.

    I agree 100%, but I can tell you what (I think) the rationale is for one of these decisions.

    As an aside, I do find a lot of Garmin design/implementation decisions very frustrating. One example is that adding strings to be used for app settings - in the Garmin Connect or Connect IQ *phone* app - wastes memory in the *watch* app (assuming the app loads at least 1 resource of any kind). I will never get over that one, since those strings are most likely not even referenced by the watch app, and there's lots of current-gen Garmin watches which still only have 32KB of memory for CIQ data fields.

    Another one is that building apps with a newer SDK often results in increased memory usage, even for old devices which literally gain nothing from the new SDK (but you need the new SDK to support newer devices/features). Which means if you update an app with support for a new device (or a new feature on a device which has more memory than old devices), you run the risk of breaking the app for old devices (even if the code pertaining to the old device has not changed at all). (I suppose a way around this would be to try to build your own app package with a mix of old device targets built with old SDK and new device targets built with new SDK, but this obviously isn't supported by Garmin)

    For totalDescent and totalAscent it is the other way round: available on the API, but not as a field you can choose in built-in data fields.

    These values are hidden for built-in data fields for any watch that doesn't have a barometric altimeter, because GPS elevation is inaccurate (both Garmin Connect and Strava will adjust your elevation when you upload your activity, if you don't have a baro). People have asked me to expose totalAscent as a CIQ data field, which I did, but then I get complaints about accuracy.

    distanceToDestination is available a built-in field, but not on the API.

    Yeah this one is a head-scratcher. You'd think they would provide this field for *any* watch that supports navigating courses, but they only provide it for "outdoor watches" (Fenix/D2/Descent/Marq), high-end multisport watches (935/945), and Edge devices.

    Seems like a conscious decision, since 735XT had the ability to follow courses back when this field was exposed in CIQ 2, but 735XT was left out (although it supports CIQ 2). Since then, "lower-end" devices like 245 and 645 have been released with the ability to follow courses (and of course the 745 -- 735XT's successor -- still has this ability), but none of them got distanceToDestination.

    I get that Garmin loves market segmentation, but surely customers don't buy watches based on CIQ features? CIQ "API level" is not even a marketing bullet point (although I see some users discussing it in comment sections.)

    Like nobody is gonna say "well the 245 has everything I need, including course navigation, but the 945 also has distanceToDestination as a Connect IQ value so I guess I'll buy the 945". TBH, roughly 0% of the runners I've trained care about CIQ (if they even know about it.) So I feel like this kind of decision hurts devs (and Garmin) more than it hurts users.

    Maybe there's some firmware design/implementation issue or internal politics that we're not privy to, who knows.

  • With totalAscent and descent, the reason you don't see them in a native data field is that the fr245 doesn't have a baro altimeter.  Using GPS, both ascent and descent can be odd.  It's the same for any device that doesn't have a baro - the Venu SQ for example, along with things like the fr23x,fr735, and probably the fr45 and fr55 (I've not checked those two).