Live broadcast data
When riding or spectating, Biketerra makes it easy to access the live data.
let ch = new BroadcastChannel('biketerra-ride');
ch.onmessage = e => console.log(e.data);Add the above lines to the browser console. It'll output JSON updates at 2Hz, which you could feed into a userscript or roll into custom visualizations.
{
"ego": {
"speed": 5.32,
"speedAvg": 6.03,
"power": null,
"powerAvg": 0,
"wkg": null,
"cadence": null,
"cadenceAvg": 0,
"heartRate": null,
"heartRateAvg": 0,
"distance": 94.3,
"distanceRemaining": 40193.8,
"climb": 0.3,
"climbRemaining": 417.7,
"elevation": 786.4,
"grade": 0.002,
"lat": 33.29641,
"lng": -110.458449,
"draftFactor": 1,
"lapCount": 0,
"power2": null,
"leftPedalPercent": null
},
"riders": [{ id, name, power, wkg, speed, cadence, heartRate, gap, lapCount }, ...],
"timestamp": 1776951073587
}To close the connection, you'd run:
ch.close();