Skip to content
This repository has been archived by the owner. It is now read-only.
R package for decoding Garmin FIT files
R Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


version badge download badge

A pure R library for decoding Garmin FIT files. Written to circumvent the open-source incompatible FIT SDK, and hopefully serve as a reference for those interested in this (increasingly popular) file format.


The FIT format is documented extensively within the FIT SDK materials.

In building this package, I relied heavily on David Cooper's python-fitparse library. He did the grunt work, this is mostly just an R port of his code.

Development notes

In order to decode FIT file messages, the data contained in the "Profile.xlsx" (provided with the FIT SDK) is essential. This data is wrangled from the spreadsheet into various R objects and saved asR/sysdata.rda, to be used internally by this package. To update this file---e.g. to use a new profile---then execute the scripts as such:

$ cd fitdc/scripts
$ ./ && ./ && ./make_data_dir.R


There are a few holes in this implementation; some are in the interest of performance, others are due to my lack of interest. My motivation for putting this package together was to be able to get at the record messages of a FIT file. So if there's something missing, it's probably because I haven't found it to affect the actual records. Or it might be a record I'm not interested in. But here are some things I'm aware of:

  • I haven't made any effort to check the CRC during file reading, because that would slow things down considerably and I don't see a compelling reason for it.
  • Field components are currently ignored. I haven't encountered any files where components are used in a meaningful way.
  • Accumulated fields. Because, again, I haven't encountered any examples, and I haven't found any good documentation for them.

If you need any of these holes filling, submit a PR. ☺

You can’t perform that action at this time.