Pacing insight (as a field) and chart with calculated value

For the first one you could probably create a computed activity field with a script to do that. This would also work as a custom interval field. You can get the velocity_smooth stream and work with that:

{
  let velocity = streams.get("velocity_smooth").data
  
  function avgVelocity(start, end) {
    let tot = 0
    let c = 0
    for (let i = start; i < end; i++) {
      let v = velocity[i]
      if (v) {
        tot += v
        ++c
      }
    }
    return c ? tot / c : null
  }
  
  let mid = Math.floor((interval.start_index + interval.end_index) / 2)
  let first = avgVelocity(interval.start_index, mid)
  let second = avgVelocity(mid, interval.end_index)
  second ? first/second : null
}

Not yet but that is high up on the todo list. Also creating such streams from messages in the fit file.

1 Like