How to calculate Distance Per Stroke for SUP

I did a SUP activity with my Garmin Watch today.
GC shows me the Stroke Rate (spm) and the Distance Per Stroke (m).

The Fit File Contains

fractional_cadence(rpm) (which is always Zero)

In I can select Cadence (which is exactly the Stroke Rate)
I can also select Stride, which seems to be half the value of Distance Per Stroke as shown in GC.

I tried a bit to create a new Custom Stream, Distance Per Stroke = Stride / 2, and also to calculate Stride by myself, but both approaches failed.

Can someone give me a hint on how I can get my desired metric?

Here is code for a custom stream that calculates average distance per stroke over an approximately 60s window. I don’t know enough about SUP to tell if the numbers are good. If it is good please add a description and share it.

  let distance = icu.streams.distance
  let cadence = icu.streams.cadence
  let time = icu.streams.time
  let window = 60
  let totCadence = 0
  for (let i = 0; i < window; i++) totCadence += cadence[i]
  for (let i = window; i < data.length; i++) {
    let secs = time[i] - time[i - window]
    let m = distance[i] - distance[i - window]
    if (secs < window + 5) {
      let avgCadence = totCadence / window
      let strokes = (avgCadence / 60.0) * secs
      if (strokes) {
        let v = m / strokes
        if (v < 10) data[i] = v
    if (cadence[i]) totCadence += cadence[i]
    if (cadence[i - window]) totCadence -= cadence[i - window]

Thank you for your fast reply and for the code!

That looks very much like the results I am seeing in GC. I termed this new Metric DPS (Distance Per Stroke).

Is it possible to also use this in the interval fields? (I tried but failed again^^)
With this, I could easily compare the exact numbers of the Garmin Implementation.

Tx. There is already a custom interval field for DPS: