Page 1 of 1
GPX vs. FIT, Recorded vs. Converted
Posted: Wed May 31, 2023 6:30 pm
by Matt16598
This is a split-off from "Hiking with 67i, 66sr & 66i." I too wish that that thread would get back to comparing the accuracy/consistency of the three units on actual hikes. However, the comparison of GPX and FIT files, and GPX recorded in the unit vs. converted from FIT, has been interesting. So here goes. Hopefully the other thread can get back to the original subject and we can continue this discussion here.
GPX files produced from FIT files in BaseCamp and Connect look significantly different from GPX produced in the unit at the time of recording. However, my initial analysis suggests that GPX files exported from FIT files
by the unit itself may be identical
in format to those recorded directly.
Here is a GPX exported by the 66sr from a FIT file recorded weeks earlier. I went to Recorded Activities, opened the activity, and then used the "Save as Track" command. (The 66sr was set to only record FIT, so I know that the resulting GPX was converted from FIT.) The only difference that I see, relative to a GPX recorded directly, is that the <metadata><time> field shows the time of conversion, not the time of recording. The decimal precision and overall structure look the same to me. I'm not saying that this is
equal to a GPX produced at the time of recording, but it
looks the same and hasn't been tampered with by any software outside the GPS receiver.
(Wrapping is different due to a different text editor; the original file has no line breaks.)
GPX Exported by 66sr from FIT.jpg
GPSMAP 67 Track - Original.png
Some of us will still want to record GPX directly in the unit. Others might be satisfied with producing GPX in this manner, after the fact (especially if they forgot to turn on GPX recording to begin with). Again, the resulting data hasn't been tampered with by anything outside the unit. It would be interesting to record a GPX in the unit and compare it with one exported from the FIT of the same track. I think I'll have to try this...

Re: GPX vs. FIT, Recorded vs. Converted
Posted: Wed May 31, 2023 8:02 pm
by JungleJim
I think the discussion is a bit semantic. What is considered equal? The exact same contents of the file? Or the same information?
GPX and FIT are just two different ways of storing the same information (a bit simplified but valid for this comparison): track points. GPX is text based (easy for humans!) and FIT is binary.
Interestingly enough the same information (trackpoints in this case) is stored in a different format: GPX stores it as decimal degrees (ie. latitude 52.0888871513) while FIT stores it as so called semicircles which is a number between -2,147,483,648 and 2,147,483,647 identifying a point on a circle. Both are just different ways of representing the same info.
Now as to precision, both ways of storing the trackpoints provide more precision than the capabilites of the device. The GPX decimal degrees are stored with 10 decimals (at least on my GPSMAP 67), which is an accuracy of 0.00111 mm (at the equator). While with FIT, the precision is less but still beyond device capabilities with around 11.1mm per semicircle (at the equator).
Which is then the original? IMO it doesn't matter since the precision of both data formats are way beyond the capabilities of the device. But based on the default configuration of the 67 I think the unit records natively to the FIT format and converts to GPX when the option to save both FIT and GPX is enabled. It would make sense that when saving an activity as track, the resulting GPX is going through the same conversion (at least I would build it that way as developer).
So IMO, GPX and FIT coming directly from the device can be considered equal as for trackpoint precision for all practical purposes.
For third party software, it depends on what processing is done in the tool. If for example the tool does some track smoothing or elevation correction, it is of course not equal to the original data file. But if it just does a simple conversion of trackpoints from from FIT to GPX I see no reason to disregard the converted data.
Re: GPX vs. FIT, Recorded vs. Converted
Posted: Thu Jun 01, 2023 2:35 am
by Matt16598
JungleJim wrote: Wed May 31, 2023 8:02 pm
So IMO, GPX and FIT coming directly from the device can be considered equal as for trackpoint precision for all practical purposes.
For third party software, it depends on what processing is done in the tool. If for example the tool does some track smoothing or elevation correction, it is of course not equal to the original data file. But if it just does a simple conversion of trackpoints from from FIT to GPX I see no reason to disregard the converted data.
I agree. The main issue for some people seems to be that they want to see the original data, but they can't directly read or use a FIT file. They also (apparently) don't trust whatever BaseCamp or other utilities do when converting FIT to GPX.
Just now, I made a comparison between an original recorded GPX and a GPX converted from FIT by the unit. I set the 67i to record FIT and GPX and recorded a track. This placed a GPX version of the activity in the GPX/Archive folder. Then I used the "Save as Track" command on the 67i to convert the FIT file to GPX, which it saved in the GPX folder. I then copied them to my computer and used the Compare function in BBEdit to see what was different:
GPX Original-Converted Comparison 1.png
GPX Original-Converted Comparison 2.png
Track_2023-05-31 18.14.42_Original and Converted.zip
The coordinates and time stamps are
exactly the same in both files. However, the elevations are slightly different, and there are some inconsequential differences in the metadata. This might suggest that the elevation is being sourced differently for the original GPX file than for the FIT, or that there is some kind of math error in the conversion. The calculated ascent and descent in the metadata are also different between the two.
This seems to prove that at least the trackpoints (lat/lon) and timestamps will be identical in an internally converted GPX to those from a GPX recorded directly. The differences in elevation remain unexplained.
Re: GPX vs. FIT, Recorded vs. Converted
Posted: Thu Jun 01, 2023 8:07 pm
by JungleJim
Interesting that the elevation values are different. Apparently in a FIT file the elevation (or altitude as it's called in the FIT format) is stored in steps of 0.2m. But the values in the GPX converted from FIT are not multiples of 0.2m. The Max and Min Elevation in the Track Stats are however. When looking at FIT and GPX files of some of my recorded activities I also see this difference.
Re: GPX vs. FIT, Recorded vs. Converted
Posted: Fri Jun 02, 2023 3:05 pm
by jlg2
Matt16598 wrote: Thu Jun 01, 2023 2:35 am
Just now, I made a comparison between an original recorded GPX and a GPX converted from FIT by the unit. I set the 67i to record FIT and GPX and recorded a track. This placed a GPX version of the activity in the GPX/Archive folder. Then I used the "Save as Track" command on the 67i to convert the FIT file to GPX, which it saved in the GPX folder. I then copied them to my computer and used the Compare function in BBEdit to see what was different:
A software mistake is my first guess about the elevation discrepancy in the posted comparisons. It's easy to see how it would go undiscovered since it was always less than 10cm. If it were a coding error, I could not tell from your description, Matt16598, if it is in the device firmware, in Basecamp or possibly something else not mentioned. I don't know what the "Save as Track" function does in the 67i. Why do you think that command did the translation instead of just archiving a .fit file?
Re: GPX vs. FIT, Recorded vs. Converted
Posted: Fri Jun 02, 2023 9:11 pm
by Matt16598
jlg2 wrote: Fri Jun 02, 2023 3:05 pm
If it were a coding error, I could not tell from your description, Matt16598, if it is in the device firmware, in Basecamp or possibly something else not mentioned.
Whatever is causing the discrepancy is in the device firmware, since the original recorded GPX file and the GPX file converted from FIT were both produced in the device. The contents of the GPX files were not altered by any other software after copying them to my computer, which I did using Android File Transfer. I did rename the files for clarity, but did not open them with anything other than a text editor (for comparison only).
jlg2 wrote: Fri Jun 02, 2023 3:05 pm
I don't know what the "Save as Track" function does in the 67i. Why do you think that command did the translation instead of just archiving a .fit file?
The original recorded activity is saved as a FIT file in the Activities directory. "Save as Track" saves the selected activity as a new GPX file in the GPX directory. The original recorded GPX is saved in the GPX/Archive directory. I confirmed all of this by experimentation. If you rename a FIT file in the Activities directory, using a computer, the new name shows up in the Recorded Activities page. See the following excerpts from the 67i owner's manual, pages 25 and 52:
Screen Shot 2023-06-02 at 1.42.11 PM.png
Screen Shot 2023-06-02 at 1.43.16 PM.png
Screenshots showing the folder contents:
Screen Shot 2023-06-02 at 1.54.38 PM.png
Screen Shot 2023-06-02 at 1.54.11 PM.png