Skip to content

Convert fit to gpx files fast and conveniently without leaving the terminal.

Notifications You must be signed in to change notification settings

JeromeSchmied/fit2gpx-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fit2gpx-rs: convert fit to gpx files efficiently, add elevation data if you'd like

Installation

  • have Rust
  • with cargo from crates.io: cargo install fit2gpx
  • with cargo from github: cargo install --locked --git "https://github.com/jeromeschmied/fit2gpx-rs"
  • with cargo and git from github:
git clone --depth 1 "https://github.com/jeromeschmied/fit2gpx-rs"
cd fit2gpx-rs
cargo install --locked --path .

Note

soon there might also be binary releases

Usage

binary

see fit2gpx --help

let's say you want to convert a_lovely_evening_walk.fit to a_lovely_evening_walk.gpx in that case, you'd do the following fit2gpx a_lovely_evening_walk.fit if you also want to add elevation data, as the .fit file didn't contain any, follow these steps

library

short:

fit2gpx::convert_file("walk.fit").unwrap();

see docs or examples for more detailed usage

Purpose

This is a simple Rust library and binary for converting .FIT files to .GPX files.

A significantly faster alternative to the great fit2gpx with the ability to add elevation data while converting

  • FIT is a GIS data file format used by Garmin GPS sport devices and Garmin software
  • GPX is an XML based format for GNSS tracks

Is it any good?

Yes.

Why another one

  • it's about 80 times as fast (single file, no elevation added)
  • it's way faster with multi-file execution too
  • it can add elevation data
  • Rust library
  • it's fun

How to add elevation data

  • first of all, have srtm data: .hgt files downloaded one great source is Sonny's collection, it's only for Europe though
  • then unzip everything, place all of the .hgt files to a single directory
  • set $ELEV_DATA_DIR to that very directory or pass --elev_data_dir ~/my_elevation_data_dir
  • make sure that elevation feature is enabled, it's the default
  • pass the --add_elevation | -a flag to fit2gpx

Why might this one not be the right choice

it doesn't support strava bulk-export stuff

  • unzipping .gz files. solution: in your activities directory run gzip -d *.gz
  • adding metadata to gpx files from the activities.csv file

Direct dependencies