DaveDavenport / gpx-viewer

GPX Viewer is a simple tool to visualize tracks and waypoints stored in a gpx file.
GNU General Public License v2.0
14 stars 6 forks source link

Parse correctly fit files #25

Open albfan opened 3 years ago

albfan commented 3 years ago

Using FitSdk

https://developer.garmin.com/fit/download/

I was able to parse recent fit files

java -jar FitCsvTool.jar -b input.fit output.csv

bug gpx-viewer do not parse the file (do not find records and do not create track)

Will use this java impl to find what changed. Is the current implementation working with any fit file @DaveDavenport ? I ask to support different versions, or check if this sdk support both formats. I can upload one example of recent fit file

DaveDavenport commented 3 years ago

hmm I use it for fit files from my garmin. That seems to be working well enough for me. I would need to check what garmin changed.

DaveDavenport commented 3 years ago

I just checked a fit file from my (brand new < 2week old) new Garmin Edge and that showed the correct track and info.

albfan commented 3 years ago

Ok. Will find what is happening on my (wahoo elemnt) and let's see from a PR when is ready

DaveDavenport commented 3 years ago

@albfan I don't know if it is possible without doxing yourself, but if you send me a fit file, I don't mind giving it a look.

albfan commented 3 years ago

It turns out to be some kind of corruption. gpsbabel was able to filter the problem.

Original file: Cangas_de_Onis_Lagos_Covadonga_Cangas_de_Onis.zip

gpsbabel -i garmin_fit -f Cangas_de_Onis_Lagos_Covadonga_Cangas_de_Onis.fit -o gpx -F out.gpx

out.zip

Captura de pantalla de 2021-09-27 08-06-44

So probably the fit reader can be tweaked to be more robust, but for now there's a workaround (using gpsbabel)