It would be helpful to be able to get an estimate of what TSS for the day would be required to get “into the green” on the Fitness graph (Form -10 to -30). This would give you very fine grain control over your workout schedule to get the precise results you want.
I do understand that Form isn’t an exact science and people don’t fall directly on these boundaries, etc. But I think in general I think having this level of control would let you more precisely plan your workouts to fit whatever particular Fitness curve seems to work best for you.
Forgive my brute-force method, but here’s a Python script example which takes the intervals.icu TSS history to calculate what TSS you need for different target Form values:
def detectTodayTSS(tss_history, form):
tss_history_copy = tss_history.copy()
for i in range(4096):
tss_history_copy[0] = tss_history_copy[0] + 1
fitness_new = pd.DataFrame(reversed(tss_history_copy)).ewm(com=42).mean()
fatigue_new = pd.DataFrame(reversed(tss_history_copy)).ewm(com=7).mean()
fitness_new = fitness_new.iloc[:, 0].tolist()[::-1]
fatigue_new = fatigue_new.iloc[:, 0].tolist()[::-1]
form_new = fitness_new[0] - fatigue_new[0]
if form_new < form:
return i
metrics = {
"Maintain": icu_ctl[1] - icu_atl[1],
"Blue: 5": 5 + sys.float_info.epsilon,
"Grey: -5": -5 + sys.float_info.epsilon,
"Green: -10": -10,
"Green: -11": -11,
"Green: -12": -12,
"Green: -20": -20,
"Red: -30": -30,
}
todayDate = datetime.datetime.now().date()
todayTSS = 0
# create data frame with all metrics
dataFrame = pd.DataFrame(
{
name: [
todayTSS or detectTodayTSS(tss_history, value),
detectTodayTSS([todayTSS] + tss_history, value),
detectTodayTSS([todayTSS, 0] + tss_history, value),
] for name, value in metrics.items()
},
index=[
str(todayDate + datetime.timedelta(days=0)),
str(todayDate + datetime.timedelta(days=1)),
str(todayDate + datetime.timedelta(days=2))
],
)
print(dataFrame)
When you run this, you get results like this:
Maintain Blue: 5 Grey: -5 Green: -10 Green: -11 Green: -12 Green: -20 Red: -30
2024-08-27 51 0 66 115 125 135 213 312
2024-08-28 95 12 110 159 169 179 257 356
2024-08-29 132 49 147 196 206 216 295 393
From that little chart, it’s pretty easy to pick out an appropriate workout, especially if you’re using TrainerRoad or Zwift or anything which gives precise TSS workout values.