How to get beat-to-beat measurements's BPM

Using HKHeartbeatSeriesQuery, I am able to get beat-to-beat timestamps. How to get the BPM for those timestamps?


I am able to see the BPM in apple health app.

Accepted Reply

The timestamps represent individual beats, so there isn't really a particular BPM associated with them. If you want the implied BPM by the delta from the previous beat, then you can simply use that timestamp difference to do the calculation yourself. More likely, you'd want to average over some duration or some number of beats to compute a value that changes more smoothly.
  • Are we able to access the individual beats live? Or can we only access them in a post-fact kind of way, to do analysis etc. I'd like to access the individual beats of the last 2-5 minutes in order to calculate RMSSD directly on the intervals. Is that doable?

Add a Comment

Replies

The timestamps represent individual beats, so there isn't really a particular BPM associated with them. If you want the implied BPM by the delta from the previous beat, then you can simply use that timestamp difference to do the calculation yourself. More likely, you'd want to average over some duration or some number of beats to compute a value that changes more smoothly.
  • Are we able to access the individual beats live? Or can we only access them in a post-fact kind of way, to do analysis etc. I'd like to access the individual beats of the last 2-5 minutes in order to calculate RMSSD directly on the intervals. Is that doable?

Add a Comment