How to merge two Garmin .fit files and upload to Strava on Ubuntu

First, install gpsbabel and (optionally) gpxviewer.

sudo apt install gpsbabel gpxviewer

Now, use gpsbabel to combine the two .fit files into a single .gpx file.

gpsbabel -i garmin_fit -f B3781326.FIT -f B3792523.FIT -o gpx -F merged.gpx

gpxviewer can be used to check the merged activity on a map.

gpxviewer merged.gpx

The merged activity file can now be uploaded to Strava using the “Upload activity” menu option.

The data in the merged file will be as if the watch was paused at the end of the first recording and restarted at the start of the second activity. Hence, the intervening time will be included in Strava’s elapsed time for the activity, but will be excluded from the moving time. To fully merge the two activities so that there is no discontinuity, the .gpx file can be edited in a text editor. Simply remove the closing </trk> tag of the first activity and the opening <trk> tag of the second activity, which will appear on successive lines, then save and upload to Strava.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s