Sports Lib API - v23.12.1
    Preparing search index...

    Class RRHeartRateFilter

    Stateful, causal heart-rate estimate from raw R–R intervals, using a 40-interval consistency history, missed-beat protection and two-stage smoothing. This estimates HR, not HRV or recording quality. Instances represent one continuous recording; call reset after a disconnect or use filterRRHeartRate for timed data.

    Index
    • Process an interval in milliseconds and return integer bpm, or null until initialized. Positive finite intervals are rounded to integer milliseconds before filtering. Positive out-of-range intervals enter history and advance the hold timer, but hold the previous output; 250–2,000 ms are accepted inclusively. Nonpositive/nonfinite values and values that cannot round to a positive safe integer reset the filter and return null. The unavailable output is null, never a numeric 0 or 255 sentinel.

      Parameters

      • intervalMs: number

      Returns number | null