I’m trying to build a custom activity stream that displays a cadence:heartrate ratio for detecting “cadence lock” data on my heartrate strap. I’m very new to javascripting and my bit of googling and chatgpting and searching the forums here hasn’t gotten me success. So far I have something like the following but it doesn’t display what I want. I want it to display cadence per heartrate, such that values near 1.0 would indicate high likelyhood that my heartrate strap is demonstrating “cadence lock” and may not be accurate. I want it to show the ratio as a graph over the course of the activity so I can zoom in and see which parts of the activity have “cadence lock” and potentially disregard HR values during those sections of my runs. How would I script this?
{
for (let m of icu.fit.record) {
let cadence = data.setAt(m.timestamp.value, [m.cadence?.value]*2)
let heartrate = data.setAt(m.timestamp.value, m.heart_rate?.value)
let Result = cadence / heartrate
}
}