Complete
over 4 years ago

WERETECH-8574

Bug: Activity.Info.elapsedDistance is way off if playback a .fit file using simulator 3.1.6

Activity.Info.elapsedDistance is way off not only due to lat/lon = [0.0, 0.0]

https://forums.garmin.com/developer/connect-iq/i/bug-reports/initial-values-lat-lon-0-0-if-replaying-a-fit-in-simulator

but rather it seems there are more bugs in the sim.

info.elapsedDistance should be the sum of the distances between the recorded position points lat/lon. So I've calculated the sum of this distance increments and compared it to the value of info.elapsedDistance. I've only used a fast and easy formula to calculate the distances between 2 position points without any smoothing or interpolation. Thus my calculated elapsed distance may differ somewhat to info.elapsedDistance.

By replaying a .fit I get the following values
My sum of distance increments = 125.82m
Activity.info.elapsedDistance = 194.69m
This is a difference of >54% which is well way off.

In the .tcx file of the .fit for the same lat/lon there is stored the value
<DistanceMeters>123.29000091552734</DistanceMeters>

If I don't use the "Playback File" option but instead use the option "Simulate Data" I get this values
My sum of distance increments = 124.67m
Activity.info.elapsedDistance = 129.09m
This is a difference 3.5% that seems to be reasonable to me.

Since "Simulate Data" generates random values the distances are different to the "Playback File" values.

Parents
  • Now I've switched the units to miles and made a short run activity. But as you've already mentioned it hasn't any effect to info.elapsedDistance.

    Garmin Connect shows my total run distance = 2.67 km .

    I've replayed the entire .fit in the sim using System.println(info.elapsedDistance) . At the end of the .fit the sim stops with info.elapsedDistance = 3769.1 m . This is again 39% off.

    But the running time from GC coincides very well with info.elapsedTime.

    You've said: "... my distances are correct with the fit files I've tested. (some past 5k's etc)"

    Please tell me how did you've checked that your info.elapsedDistance is correct? Have you replayed your entire 5K .fit and compared it to info.elapsedDistance = 5000 m at the end?

Comment
  • Now I've switched the units to miles and made a short run activity. But as you've already mentioned it hasn't any effect to info.elapsedDistance.

    Garmin Connect shows my total run distance = 2.67 km .

    I've replayed the entire .fit in the sim using System.println(info.elapsedDistance) . At the end of the .fit the sim stops with info.elapsedDistance = 3769.1 m . This is again 39% off.

    But the running time from GC coincides very well with info.elapsedTime.

    You've said: "... my distances are correct with the fit files I've tested. (some past 5k's etc)"

    Please tell me how did you've checked that your info.elapsedDistance is correct? Have you replayed your entire 5K .fit and compared it to info.elapsedDistance = 5000 m at the end?

Children