Complete
over 5 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
  • OK, thanks Jim, I've understand. The settings in the sim are only for testing the settings on the real device. The settings in the sim are only transfered to the app and the sim itself makes no actions regarding the settings. The app can request the settings and control the program flow and calculations of the values depending on this settings.

    In summary my DF runs on real device or sim and it doesn't handle the units.

    The difference only appears with sim "Playback File".

    The thoughts of a conversion error for the units in the sim can't get me out of my head. If the .fit is recorded in miles and the app handles the miles by multiplication with the factor 1.6 to km then there is no error viewable. But if the .fit is recorded in km and there is also (improperly) a multiplication with the factor 1.6 the distance is 60% off. Or the sim uses the earth radius in miles vs. km for calculating the distance increments between the position points or somewhat else in this direction.

    Soon I make a test recording my activity in miles and look at the results.

Comment
  • OK, thanks Jim, I've understand. The settings in the sim are only for testing the settings on the real device. The settings in the sim are only transfered to the app and the sim itself makes no actions regarding the settings. The app can request the settings and control the program flow and calculations of the values depending on this settings.

    In summary my DF runs on real device or sim and it doesn't handle the units.

    The difference only appears with sim "Playback File".

    The thoughts of a conversion error for the units in the sim can't get me out of my head. If the .fit is recorded in miles and the app handles the miles by multiplication with the factor 1.6 to km then there is no error viewable. But if the .fit is recorded in km and there is also (improperly) a multiplication with the factor 1.6 the distance is 60% off. Or the sim uses the earth radius in miles vs. km for calculating the distance increments between the position points or somewhat else in this direction.

    Soon I make a test recording my activity in miles and look at the results.

Children