File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -195,9 +195,11 @@ void bluetoothdevice::skinTemperature(double skinTemperature) { SkinTemperature.
195195void bluetoothdevice::heatStrainIndex (double heatStrainIndex) { HeatStrainIndex.setValue (heatStrainIndex); }
196196void bluetoothdevice::rrIntervalReceived (double rrInterval) {
197197 // RR-interval is in milliseconds
198- // Add to buffer for RMSSD calculation (keep max 120 samples, approximately 2 minutes of data)
198+ // Add to buffer for RMSSD calculation (keep max 30 samples for real-time HRV display)
199+ // Using 30 samples (~20-30 seconds of data) gives more responsive and accurate HRV
200+ // than using longer windows which can include heart rate transitions
199201 rrIntervals.append (rrInterval);
200- while (rrIntervals.size () > 120 ) {
202+ while (rrIntervals.size () > 30 ) {
201203 rrIntervals.removeFirst ();
202204 }
203205
You can’t perform that action at this time.
0 commit comments