SauceLLC / sauce4zwift

Sauce for Zwift™
GNU General Public License v3.0
106 stars 26 forks source link

w/kg decimals, added 95% power field, added energy kcal field #71

Closed LarsenLP closed 1 year ago

LarsenLP commented 1 year ago

Thanks for a great tool!

I have added some fields, which others might find useful as well. Feel free to disregard and/or modify as it suits you...

Also; there seems to be a bug in the humanNumber function, which rounds all numbers before creating the cache-key 😉

Best, Lars Peter

mayfield commented 1 year ago

Hi @LarsenLP Thanks for the PR; especially the humanNumber regression. That was a dumb refactoring bug and luckily it won't get into a release build because of you! :smile:

I can't take the 95% field commits as many folks have considered this crossing the line for category sandbagging. But you can build a Mod that does include it without issue.

I'm leaning against excluding kcals as well, simply because the industry is in a state of confusion (rightly so) about anything [k]cal or [cC]alories. This is further complicated by the many apps that report estimated Calories (large) burned by a human being to have produced the energy of a particular activity (i.e. Strava and others).

Let me know if I'm missing an important use case for kcal units and I'l proceed with either merging or cherry-picking (you can update the PR if so included too).

LarsenLP commented 1 year ago

Hi @mayfield,

Good point regarding 95% power. I definitely see your point here 😅 I will just make a mod 👍

Regarding kcal I also see your point. I never thought about the difference in "kcal", "calories" and "Calories". As a Garmin-user through the past 20 years, I have just been used to the "kcal/Calories" number instead of kJ number, so it's just because I am lazy and don't want to do the conversion in my head 😅 I will also just make a mod for this 😉

Thanks for your input! Please just cherry-pick or copy the small bits you find relevant 👍

mayfield commented 1 year ago

Thanks @LarsenLP ! I fetched and cherry-picked those 2. Thanks again!

image