Skip to main content

Hi everyone, I’m reaching out for help regarding an issue we’re facing when syncing activities to Strava using FIT files.

Our app is currently using Strava’s public API (https://developers.strava.com/docs/reference/#api-Uploads-createUpload) to upload user activities in the FIT file format (https://developer.garmin.com/fit/overview/). The upload works fine — GPS tracks and total distance are correctly recorded on Strava. However, we’ve noticed that some of the statistics displayed on Strava differ significantly from those calculated by our own app.

We suspect this may be due to differences in how these metrics are calculated or interpreted between our app and Strava. To avoid confusing users, we would like to specify these statistics ourselves when uploading the activity, rather than relying on Strava to calculate them automatically.

The statistics we’d like to control include:

  • Total elapsed time
  • Average speed
  • Maximum speed
  • Maximum power
  • Average power
  • Total elevation gain
  • Total elevation loss
  • Calories burned
  • Average cadence
  • Maximum cadence

According to the documentation (https://developers.strava.com/docs/uploads/), it seems possible to include these values in the session message of the FIT file. However, after multiple attempts, it doesn’t seem to have any effect.

We're using the fit library from GitHub for FIT file encoding. Has anyone encountered similar issues before? How did you solve it?

Any advice or sample code would be greatly appreciated!

Thanks in advance!

Other stats than distance and elevation gain (when using a barometric sensor) Strava will compute by itself. Not even the largest companies like Garmin can force their (mostly better) calculations on Strava so unfortunately you have to bear with the differences.


Thank you very much for your helpful reply. That's really too bad. We've encountered many users asking about the differences in these metrics, wondering which source is actually accurate. I've noticed that the FIT file format does define how certain statistics should be calculated and transmitted. I'm curious to know how Strava approaches this, and whether there might be room in the future to provide more flexibility or extensibility for developers like us.


Reply