README.md

readfit

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.

References

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
$ ./Types_sheet.py && ./Messages_sheet.py && ./make_data_dir.R

TODO

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:

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



Try the fitdc package in your browser

Any scripts or data that you put into this service are public.

fitdc documentation built on May 2, 2019, 6:04 a.m.