tormoder / fit

A Go package for decoding and encoding Garmin FIT files
MIT License
243 stars 42 forks source link

Issue Parsing #41

Closed mornindew closed 2 years ago

mornindew commented 5 years ago

First of all, I want to thank you for this project. It is very well done and super useful. Thank you very much. I might even be able to break off a couple cycles if that helps you to keep maintaining it.

I am having an issue with a FIT file that I downloaded from garmin. Running your "Example_test.go" with my file when I parse the fit file I get...

parsing data message: missing data definition message for local message number 10 It was a fit downloaded directly from garmin. I don't fully understand your fit decoder yet to be able to debug it. Have you seen this before? I included the fit file if it helps. Broken.zip

tormoder commented 5 years ago

Hi. Thanks for the example.

Your file is parsed successfully by the official SDK tools, so the decoder is clearly missing something. It should parse a definition message for the Record message next.

It seems like the file contains "Developer Data Fields". Support for this is not implemented yet (see #21). That may be the issue.

I'll try to take a closer look at a later time.

mornindew commented 5 years ago

I appreciate it, I will try to diagnose on my end as well.

aurelian commented 4 years ago

Got the same error:

parsing data message: missing data definition message for local message number 15

my .fit file parses OK with the official tools (version 21.smth) and it contains Developer Data Fields (via Stryd I guess).

4215454323.zip

I tried to generate the code via fitgen from version 21 SDK, but that failed as well.

@mornindew what did you end up doing?

Thanks!

tormoder commented 4 years ago

I have not checked the spec in detail, but I think it's it likely that parsing fails since Data Developer Fields are not supported (#21).

Unfortunately I don't have the time to work on that now or any time in the near future...

alanbernstein commented 4 years ago

Just adding a data point: I'm seeing the same error message with a fit file from a Wahoo device, exported from Strava.

parsing data message: missing data definition message for local message number 2

purpl3F0x commented 3 years ago

It there a way to just skip reading those fields ?

tormoder commented 3 years ago

Yes, I'll add that soon, either via https://github.com/tormoder/fit/pull/59 or a separate change.

tormoder commented 2 years ago

Better late than never.

Decoding the files mentioned by @mornindew and @aurelian in this issue should now be possible to decode using the latest release (v0.13.0).