Skip to content

Thresholds

FitRepo tracks your physiological thresholds historically so that TSS calculations and fitness analysis remain accurate as your fitness changes.

Metric keyDescriptionUnit
ftpFunctional Threshold Powerwatts
lthrLactate Threshold Heart Ratebpm
ColumnTypeDescription
idUUIDRow identifier
user_idUUIDOwner
metrictextftp or lthr
valuerealThreshold value
effective_fromdateDate from which this value applies
sourcetextauto or manual
notestextOptional free-text note
created_attimestamptzWhen the record was created

Each (user_id, metric, effective_from) combination is unique. You can have multiple FTP values over time, each with a different effective_from date.

When an activity is processed, FitRepo checks whether the 20-minute best effort exceeds 95% of your current FTP (a common FTP proxy). If so, a new threshold row is written automatically with source = 'auto'.

Auto-detection is conservative — it only writes a new entry if the detected value is meaningfully higher than the current FTP, preventing noise from atypical efforts.

You can set your FTP and LTHR manually in Settings → Thresholds. Manual entries always take precedence over auto-detected ones for the same effective_from date.

When computing TSS for a historical activity, FitRepo finds the FTP row where effective_from is the most recent date ≤ the activity’s started_at. This means:

  • Old activities use the FTP that was correct at the time.
  • Updating your FTP today doesn’t retroactively change historical TSS.
  • Your CTL/ATL history is stable.

Use the get_thresholds tool:

# All FTP history
get_thresholds(metric: "ftp")
# LTHR history for a period
get_thresholds(metric: "lthr", from: "2024-01-01", to: "2025-01-01")
# All thresholds, all time
get_thresholds()
[
{
"metric": "ftp",
"value": 265,
"effective_from": "2025-01-15",
"source": "auto",
"notes": null
},
{
"metric": "ftp",
"value": 258,
"effective_from": "2024-09-01",
"source": "manual",
"notes": "Post-summer ramp test"
}
]