Hi everyone,
I am integrating a rowing machine with Strava using FIT file uploads. During testing, I ran into two issues:
VirtualRow with map
- We would like to upload a virtual course,like Kinomap and Zwift does
- GPS coordinates are included in the FIT-File
- When uploading as “indoor/trainer” using the api, the map is no longer shown
- We use the strava-v3 api for uploads
-
return new Promise((resolve, reject) => {
api.uploads.post(
{
sport_type: "VirtualRow",
// @ts-expect-error typings say Buffer, runtime wants path
file: file, //file ref
name,
description,
trainer: userSetting ? "1" : "0", //if set to 1, the gps data will not be shown.
commute: "0",
data_type: "fit",
external_id: externalId // use your workoutID here
},
(err: any, payload: any) => {
if (err) return reject(err);
resolve(payload);
}
);
});Question: How should the upload be structured so that Strava recognizes it as a virtual activity and still shows the map?
Timestamps with GPS data
- Once GPS/track data is included, Strava always uses the timestamps from the GPS coordinates.
-
The actual timestamp provided in the FIT file is ignored.
-
Question: Is there a specific FIT field or recommended way to ensure Strava respects the intended timestamp instead of forcing GPS-based timestamps? Is this related to question 1 ?
One more hint, we do set the Sport-Information in the session-message:
sessionMesg.setSport(Sport.ROWING);
sessionMesg.setSubSport(SubSport.INDOOR_ROWING);
Has anyone successfully solved this for rowing (or similar virtual setups)? Example FIT snippets would be highly appreciated.