Fitness, Fatigue, Form start values

Hi, love the site and work that is put in it. Thank you for that!

Got a question about Fitness, Fatigue and Form. I found the formulas on how to calculate them from all the previous workouts, but I can’t figure out on what the start values should be if I start calculating them for the very first time, or maybe it doesn’t matter if the period is long enough?

Background info: I’m doing a lot of home automation with a program called Home Assistant. Apart from controlling lights, airco, etc from Home Assistant, it also has dashboards. A dashboard shows you what the weather is today, if the garbage has to be taken out, etc. Now to training, for this I have a dashboard that shows my weight and a countdown to a big event I’m training for.

I would also like to show Fitness, Fatigue and Form in that dashboard, just for fun, because I know I can check them in Strava and in Intervals.icu, as well. So I’m writing a script to calculate the values based on Strava’s weighted_average_power, since the Strava API doesn’t include Fitness, Fatigue and Form as a counter I can query. But when using weigthed_average_power to calculate Fitness, Fatigue and Form, I need to have a starting value. So I’m wondering if I set the starting values at 0, I would at least need xx days of data before things start to match with the strava values.

I know Fitness, Fatigue and Form are calculated over 42 days, but that certainly doesn’t equal out having a start value of 0 or a real starting value.

Hope this all makes sense :slight_smile:

1 Like

These are in my notes:

CTLtoday = CTLyesterday + (TSStoday - CTLyesterday)(1/CTL time constant)
ATLtoday = ATLyesterday + (TSStoday - ATLyesterday)(1/ATL time constant)

TSBtoday = CTL yesterday - ATL yesterday (since you typically want to know how “fresh” you’ll be before today’s training ride or race, not after)

IIRC, the time constants are 42 and 7, respectively.

So, pick your values from yesterday or someday in the past and plot forward. Not sure why you want/need to have “a start value of 0 or a real starting value.”

Thank you, already have the formula’s and know about the 42 and 7 days. But was wondering if there should be a starting point. Say on Jan 1st I have all 0 values or on Jan 1st I have already for example values of 25 fitness, 40 fatigue, -15 form. That would make a difference then when looking at the values on April 13th.

You don’t need weighted avg power to calculate CTL,ATL and TSB. You need the TSS for every workout. To calculate TSS, you would need the power values, but then you will be doing every calculation over again.
With a starting value of 0, you will be more then close enough after 42 days. In theory, every workout ever done, contributes to the values but in practice, anything older then 42 days becomes neglible. Everyone needs to start somewhere, so it is common practice to start at zero and be patient for 42 days.
If you want a starting value, just take the values from Intervals (or some other software that has them) at a certain date.
I just saw your other post about the Intervals API: that is most certain the easiest way to achieve what you want. Just replicate the values from Intervals and there is no extra calculation needed in your project.

1 Like

Yeah just discovered it and that might even be easier :slight_smile: Thank you.

Btw… regarding the weighted average power, this is the strava weighted average power from the API. They already did the calculation for that activity and as far as I can see the only value that the Strava API gives me back that I can use to calculate TSS, since TSS is not reported in the API.

But that is all moot now, since I’d better use intervals.icu API

So I reread your original post in case I was missing something.

You want your Home Assistant to display a dashboard w/your Fitness, Fatigue, Form but it’s not included in the API.

You have the formulas. You already have values in Strava if you look at the Fitness and Freshness chart. Pick a day (yesterday) and use those values in your formula going forward for your local Home Assistant dashboard, recalculating each day w/the TSS of the day as an input.

You don’t need to calculate anything, as you can download the data through the API connection. I managed to get it working on Monday evening, so if you aren’t already using the API, I would suggest you give it a try. I’m using Excel to get my data, as it’s linked to my (mine and my athlete’s) annual training plan.

URL: https://intervals.icu/api/v1/athlete/{your athlete id}/wellness.csv

username: API_KEY
password: your API key that you need to generate in settings.

Data in the wellness file includes, daily values:
Fatigue (TSS)
Fitness (CTL)
Freshness (TSB)
HRV data
Weight
Rest HR
Subjective scores, eg. fatigue, stress, mood, injury, motivation
rampRate
ctlLoad
atlLoad (TSS)
Ride_eftp

3 Likes

As @Gerald mentioned above, you could use the intervals.icu API:

Yes, planned on doing that for myself.
Later on will see if I can still do it with Strava API, since I’d like to publish my “app” for the Home Assistant community so more people can use it. Or try convert them to Intervals.icu :wink:

Thank you both for your help

2 Likes