Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Fit File for Virtual Ride

Rank

Total Posts: 11

Joined 2019-08-07

PM

I am trying to create fit file for the stationary bike simulated with video tour with valid gpx data.
fit file is created successfully and when I upload and test on strava it is done very much ok.
But it is uploaded as real tour. Which is not correct in my case.

When I try to upload the same file manually from the strava upload page. then I get the option
Sports => Virtual Ride

The same option is not available, when I create and upload fit file programmatically.

Any suggestion is highly welcome.      
Rank

Total Posts: 15

Joined 2020-02-05

PM

I am not sure of the exact logic that Strava uses, but in the session message try setting the sport type to cycling and the sub-sport type to virtual activity. Depending on the programming language you are using, those will be defined in the FIT SDK as part of an enum or a list of typedefs.      
Rank

Total Posts: 11

Joined 2019-08-07

PM

I m using C# .Net . Here is the snippet from my code.

FileIdMesg fileIdMesg = new FileIdMesg();
fileIdMesg.SetType(Dynastream.Fit.File.Activity);
fileIdMesg.SetManufacturer(Manufacturer.Dynastream);

But I dont find how I set the Sport Type to 'Cycling' and Sub-Sport Type 'Virtual Activity'

Can you give me hint for that.
     
Rank

Total Posts: 15

Joined 2020-02-05

PM

Sport and Sub Sport are fields on the Session message. At a minimum, you should also provide values for Start Time, Total Elapsed Time, Total Timer Time, and Timestamp.

SessionMesg sessionMesg = new SessionMesg();
sessionMesg.SetTimestamp(timestamp);
sessionMesg.SetStartTime(startTime);
sessionMesg.SetTotalElapsedTime(totalElapsedTime);
sessionMesg.SetTotalTimerTime(totalTimerTime);
sessionMesg.SetSport(Sport.Cycling);
sessionMesg.SetSubSport(SubSport.VirtualActivity);
     
RankRankRankRank

Total Posts: 370

Joined 2012-06-27

PM

Note: You cannot use Manufacturer.Dynastream. You must use your assigned ID or the development 255 id.      

Signature

Ian Haigh

Rank

Total Posts: 11

Joined 2019-08-07

PM

haighi - 17 August 2020 01:52 PM
Note: You cannot use Manufacturer.Dynastream. You must use your assigned ID or the development 255 id.


Thanks, I have corrected that.
Can you please tell me, how we can get our own manufacturer id.
We have tried but find no clear way to get our own manufacturer id.
     
Rank

Total Posts: 11

Joined 2019-08-07

PM

Ben P. - 17 August 2020 09:31 AM
Sport and Sub Sport are fields on the Session message. At a minimum, you should also provide values for Start Time, Total Elapsed Time, Total Timer Time, and Timestamp.

SessionMesg sessionMesg = new SessionMesg();
sessionMesg.SetTimestamp(timestamp);
sessionMesg.SetStartTime(startTime);
sessionMesg.SetTotalElapsedTime(totalElapsedTime);
sessionMesg.SetTotalTimerTime(totalTimerTime);
sessionMesg.SetSport(Sport.Cycling);
sessionMesg.SetSubSport(SubSport.VirtualActivity);


Thanks, I have done that but now when I publish the fit file on strava ... it shows me the graph for speed, power and cadence, but map matching to the gpx track point is not shown.      
Rank

Total Posts: 11

Joined 2019-08-07

PM

SajjadAhmad - 18 August 2020 01:12 AM
Ben P. - 17 August 2020 09:31 AM
Sport and Sub Sport are fields on the Session message. At a minimum, you should also provide values for Start Time, Total Elapsed Time, Total Timer Time, and Timestamp.

SessionMesg sessionMesg = new SessionMesg();
sessionMesg.SetTimestamp(timestamp);
sessionMesg.SetStartTime(startTime);
sessionMesg.SetTotalElapsedTime(totalElapsedTime);
sessionMesg.SetTotalTimerTime(totalTimerTime);
sessionMesg.SetSport(Sport.Cycling);
sessionMesg.SetSubSport(SubSport.VirtualActivity);


Thanks, I have done that but now when I publish the fit file on strava ... it shows me the graph for speed, power and cadence, but map matching to the gpx track point is not shown.


This also done ... Thanks for the Help.      
RankRankRankRank

Total Posts: 370

Joined 2012-06-27

PM

SajjadAhmad - 18 August 2020 01:09 AM
haighi - 17 August 2020 01:52 PM
Note: You cannot use Manufacturer.Dynastream. You must use your assigned ID or the development 255 id.


Thanks, I have corrected that.
Can you please tell me, how we can get our own manufacturer id.
We have tried but find no clear way to get our own manufacturer id.


See https://www.thisisant.com/developer/resources/tech-faq/how-can-my-company-be-assigned-a-manufacturer-id/ to request an ID.      

Signature

Ian Haigh

Rank

Total Posts: 11

Joined 2019-08-07

PM

haighi - 18 August 2020 08:36 AM
SajjadAhmad - 18 August 2020 01:09 AM
haighi - 17 August 2020 01:52 PM
Note: You cannot use Manufacturer.Dynastream. You must use your assigned ID or the development 255 id.


Thanks, I have corrected that.
Can you please tell me, how we can get our own manufacturer id.
We have tried but find no clear way to get our own manufacturer id.


See https://www.thisisant.com/developer/resources/tech-faq/how-can-my-company-be-assigned-a-manufacturer-id/ to request an ID.


Ah ok...
do you mean that if we get membership and ask for the manufacturer id then the fit sdk will be recompiled because of the NEW enum in the manufacturer id list.      
RankRankRankRank

Total Posts: 370

Joined 2012-06-27

PM

As an annual member you can request the ID. It will continue to be allocated even if your membership lapses.

You will be given the ID you can start to use shortly after the application, but the addition to the FIT SDK enum will not happen until the next scheduled FIT release. Once the new SDK version is available you can update your code to use the enumeration from the SDK.      

Signature

Ian Haigh