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
sourcetextdevice, manual, or test
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 a Wahoo activity is processed, FitRepo reads the thresholdPower field from the FIT file. If a value is present and differs from the most recent recorded FTP, a new threshold row is written automatically with source = 'device'.

manual and test — reserved for future use

Section titled “manual and test — reserved for future use”

These source values are defined in the schema for future manual and test-based threshold entry. No write endpoint currently exists; all threshold rows are currently created automatically from device FIT data.

TSS is parsed directly from the FIT file as recorded by your device. FitRepo stores this value as-is and uses it for CTL/ATL calculations. The user_thresholds history is retained for context but is not currently used to recalculate historical TSS values.

Use the get_thresholds tool:

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