Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

java fit to strava,no totaldistance and speed

Rank

Total Posts: 2

Joined 2019-11-27

PM

Hi:
i am a java developer of china . i hava some questions ask.
I upload fit file to starve or self loop. but No matter how I assemble the file,the distance and speed is 0,as below image.
My code is
sessionMesg.setTotalCalories(1010);
sessionMesg.setTotalDistance(2000F);
Then the calories is ok.


I tried two ways, one is fitsdk’s demo,other is my demo.but it did not work.
if you have time, would you help me to solve it? Thanks a lot.
-------------------------------
0km . 距离 here is 0

1:38:55 时间

0s/km 配速 here is 0
经过时间1:38:55      

File Attachments

Rank

Total Posts: 10

Joined 2018-10-12

PM

hehe - 04 December 2019 07:28 PM
Hi:
i am a java developer of china . i hava some questions ask.
I upload fit file to starve or self loop. but No matter how I assemble the file,the distance and speed is 0,as below image.
My code is
sessionMesg.setTotalCalories(1010);
sessionMesg.setTotalDistance(2000F);
Then the calories is ok.


I tried two ways, one is fitsdk’s demo,other is my demo.but it did not work.
if you have time, would you help me to solve it? Thanks a lot.
-------------------------------
0km . 距离 here is 0

1:38:55 时间

0s/km 配速 here is 0
经过时间1:38:55


Can you post one of the fit files you are creating?      
Rank

Total Posts: 2

Joined 2019-11-27

PM

Thanks for your reply. attachments is fit files.or you can give me a correct file file,i can learn it.      

File Attachments

Rank

Total Posts: 10

Joined 2018-10-12

PM

The fit files in the "1" directory decoded fine with the FitCSVTool and it looked like the values were all correctly decoded.

I noticed that you commented out the fileIdMesg.setTimeCreated() line in your code. Have you tried it with this line in place? The fileIdMesg is used to uniquely identify a FIT file, so maybe when you are uploading it to Strava the fieldIdMesg is matching a file already in their system which is causing problems.      
RankRankRankRank

Total Posts: 122

Joined 2010-10-25

PM

Test your file with the SDK tools first. Then on multiple other sites if you want it to be read. Strava is not the best place to test initially they do not pay any attention to all the data some times even when you have it correct. They like to recalculate the distance and time type stats based off the raw records. Test on some other sites first is my advice as most other sites will accept the data as you present it.