Java Garmin/ANT FIT file reader

The ANT ‘Flexibile & Interoperatble Data Transfer’ (FIT) protocol

ANT devices and Garmin GPS units, like the Edge 810 I use, store all device information in .FIT files. This format is defined in the FIT SDK. It is a binary protocol, not human readable, designed for embedded devices (having limited resources).

Since I wanted to decode the activity files, containing the GPS track, I decided to write a file reader.

The Reader


The .FIT reader is delivered in a JAR file. The FitReader class is the entry point. Use the readFile() method does the job. It returns a FitRecordRepository instance, containing the FitRecords read. The FitRecordRepository instance and FitRecords can be used for querying. Refer to the source code, the FitReaderDemo, for some example code.


FitReader design


The code uses date4j for DateTime calculation.

Known issues

The Compressed TimeStamp is not supported yet