When using the simulator to playback a FIT file that contains empty position data, the value reported by Activity.getActivityInfo().elapsedDistance
is incorrect. In fact, the distance is roughly 24,600km larger than it should be. Based on this, I suspect that empty GNSS data within the FIT file are being treated at N0.0/E0.0 as it is roughly 12,300km to that point from my house (which then double for the return journey).
Expected result: empty GNSS entries in the FIT file should be ignored and not included in the elapsed distance
I don't know if bug has always been there or if it is limited to MacOS or if it's somehow related to this report from 4 years ago: https://forums.garmin.com/developer/connect-iq/i/bug-reports/bug-activity-info-elapseddistance-is-way-off-if-playback-a-fit-file-using-simulator-3-1-6
Some points to note:
- On an actual (physical) device, empty positions (due to lost GNSS fix) are ignored
- When exporting the affected activity from Garmin Connect (as a GPX or TCX) the data points are dropped (and do not appear in the export
- I know there are empty GNSS positions in the FIT file as I have converted it from FIT to CSV using the FIT SDK
My development setup is almost always the latest, but right now it is:
- Platform: MacOS Sonoma 14.5
- SDK: 7.1.1
- VSCode: 1.89.1
- MonkeyC extension: 1.0.11
NOTE: if required, I can provide a sample FIT file in which the GNSS position fix is lost, as generated by a Garmin device running the latest (non-BETA) software.