Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

read a .fit file on Linux

How could I read Garmin's .fit file on Linux. I'd like to use it for some data analysis but the file is a binary file.

I have visited http://garmin.kiesewetter.nl/ but the website does not seem to work.

Thanks

like image 558
Wasteland Avatar asked Aug 07 '16 11:08

Wasteland


2 Answers

You can use GPSbabel to do this. It's a command-line tool, so you end up with something like:

gpsbabel -i garmin_fit -f {filename}.fit -o csv -F {output filename}.csv 

and you'll get a text file with all the lat/long coordinates. What's trickier is getting out other data, ie: if you want speed, time, or other information from the .fit file. You can easily get those into a .gpx, where they're in xml and human-readable, but I haven't yet found a single line solution for getting that data into a csv.

like image 131
John Bump Avatar answered Sep 29 '22 06:09

John Bump


The company that created ANT made an SDK package available here:

https://www.thisisant.com/resources/fit

When unzipping this, there is a java/FitCSVTool.jar file. Then:

java -jar java/FitCSVTool.jar -b input.fit output.csv

I tested with a couple of files and it seems to work really well. Then of course the format of the csv can be a little bit complex.

For example, latitude and longitude are stored in semicircles, so it should be multiplied by 180/(2^31) to give GPS coordinates.

like image 33
FlorianB Avatar answered Sep 29 '22 06:09

FlorianB