dvmarinoff / Flux

Indoor Cycling App for Structured Training
https://flux-web.vercel.app
GNU Affero General Public License v3.0
505 stars 86 forks source link

Add calories to FIT file #147

Closed twinchell8 closed 9 months ago

twinchell8 commented 1 year ago

Wondering if calories can be added to the output FIT file. I see weight, power, heart rate, time, all that jazz is already there, so I assume just need to do a simple calculation for calories. Anyways, love the app and thanks!

dvmarinoff commented 1 year ago

Thanks!

Calories can be calculated directly from Power. I can sure add them to the file. I'd have to change the code in a few places and do some testing.

dvmarinoff commented 9 months ago

Just added total calories to the .FIT file session message. Strava and Garmin Connect will be overwriting the value, they both use different calculations from one another. Apple Health was using the raw .FIT file and was not re-calculating kcal, so workouts synced to Apple Health were displayed with 0 kcal. So I decided to finally add the field and fix the issue for AH and others that do not re-calculate kcal.