The FIT File Merger is a tool designed to merge multiple FIT files recorded into a single file. This is particularly useful for athletes and fitness enthusiasts who use multiple devices to track their activities and want to consolidate their data.
FIT File Merger is intended to merge data recorded on multiple devices at the same time during the same activity into a single file. It is not intended to chain subsequent activities together.
This is useful when you have no connection from your powermeter, home trainer, or an app to your cycling computer. Using FIT File Merger, you can merge the separately recorded power data into the fit file recorded by your bike computer without losing any data. This includes calculations of average and max values for each lap as well as for the total session.
fitfilemerger.exe path\to\main.fit path\to\secondary.fit path\to\merged.fit - Create a .NET Solution
dotnet new sln
- Clone the Repository into your workspace
git clone https://github.com/joc59/fitfilemerger.git
- Add fitfilemerger to your solution
dotnet sln add fitfilemerger\fitfilemerger.csproj - Build fitfilemerger
dotnet build
- Publish fitfilemerger
dotnet publish
The files in examples can be used for testing and debugging purposes. The garmin- files are meant to be the main
files, while the elite- files contain power values and are meant to be the secondary files. As a result, the power
values from the elite- will be merged into the garmin- file.
-
Add the following to your
launch.json:"version": "0.2.0", "configurations": [{ "name": ".NET Core Launch (console)", "type": "coreclr", "request": "launch", "preLaunchTask": "build", "program": "${workspaceFolder}/fitfilemerger/bin/Debug/net8.0/fitfilemerger.dll", "args": [ "examples/garmin-2025-01-17.fit", "examples/elite-2025-01-17.fit", "examples/merged-2025-01-17.fit" ], "cwd": "${workspaceFolder}/fitfilemerger", "justMyCode": true, "stopAtEntry": false, "console": "internalConsole" }]
-
Add the following to your
tasks.json:"version": "2.0.0", "tasks": [ { "label": "build", "command": "dotnet", "type": "process", "args": [ "build", "${workspaceFolder}" ], "problemMatcher": "$msCompile" } ]
Pull requests are welcome!
Distributed under the Unlicense License. See LICENSE.txt for more information.
FIT File Merger requires the Garmin FIT File SDK, which is published by Garmin under a different license. Garmin FIT File SDK is not included in this repository but will be installed through your package manager upon build.