-
• #2
Hi - initially we had an 'open' HRM algorithm which did detect individual beats and sent an event for each beat, but it didn't deal very well with physical movement of the watch and eventually (early 2023) I caved in and used the binary-only algorithm provided by the sensor manufacturer which does a better job. That algorithm appears to use a frequency-based method which means you can't just ask it when a heart beat is.
So I'm afraid now, you only have two choices:
- Make a special build with the relevant lines changed to enable the open HRM monitor
- Make your own HRM beat detection using the raw values you get
- Make a special build with the relevant lines changed to enable the open HRM monitor
-
• #3
Understood, thanks. I'll try to use my own HRM beat detection using raw data then (as soon as I got the time) and will share it here for feedback then if you guys wanna.
You can calculate the RMSSD using the differences in ms between heartbeats like this:
This is one of many ways to calculate the stress level. The event Bangle.HRM only gives the current heart beat calculated, however, the event doesn't get fired at exactly the time when a heartbeat was recognized.
I know there is a
.raw
property that provides raw data by the sensor, which you could use to manually replicate the algorithm that measures when individual heart beats occurred, however I believe this procedure is kind of reinventing the wheel.I'm pretty sure the data about the individual time differences between heart beats already exists somewhere because otherwise the algorithm couldn't calculate the heart beat.
So, how do I get the differences between individual heart beats? Thanks.