Code Monkey home page Code Monkey logo

fitdc's Introduction

fitdc

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.

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:

  • 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. โ˜บ

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.