Metrics & Definitions
This document defines the metrics calculated and displayed by the application, including the specific time windows used for calculation.
Heart Rate (HR)
- Definition: The frequency of heart contractions.
- Unit: Beats Per Minute (bpm).
- Calculation:
- The displayed Heart Rate is not the instantaneous value from the sensor.
- It is a median of the last 5 beats.
- This filtering removes outliers (missed beats or artifacts) while remaining responsive to rapid rate changes.
Heart Rate Variability (RMSSD)
- Definition: Root Mean Square of Successive Differences between heartbeats.
- Unit: Milliseconds (ms).
- Calculation:
- Input: Raw RR intervals (ms) provided by the hardware sensor (e.g., Polar H10).
- Window: The application calculates rolling averages simultaneously for 1, 5, 15, and 60-minute windows.
- Filtering: None. All intervals, including premature beats (PVCs) and artifacts, are included.
Note: Because no filtering is applied, this metric represents "total rhythm variability" rather than just autonomic tone.
Baevsky Stress Index
- Definition: A geometric measure of heart rate variability derived from the histogram of RR intervals.
- Unit: Index units (arbitrary scale, typically 50-1000).
- Calculation:
- Window: Calculated over a 1-minute rolling window of RR intervals.
- Update Frequency: Updated every time a new QRS complex is detected by the internal Pan-Tompkins algorithm.
- Interpretation (Visualized Zones):
- 0 - 150 (Green): Normal State. Balanced autonomic regulation.
- 150 - 500 (Yellow): Moderate Stress. Increased sympathetic tone or exertion.
- 500+ (Red): High Stress. Significant strain on regulatory systems.
Beat Morphology Clustering
- Definition: The grouping of heartbeats into clusters based on their waveform shape.
- Calculation:
- Window: Analyzes ECG data from the last 60 seconds.
- Update Frequency: The clustering algorithm re-runs every 5 seconds.
Activity Recognition
- Definition: Automatic classification of physical activity based on device motion.
- Source: Android Activity Recognition API (utilizing phone sensors).
- States: Still, Walking, Running, Cycling, Driving.
- Usage:
- Real-time display on the dashboard.
- Automatic annotation in data streams to correlate heart rate changes with exertion.
RR Interval
- Definition: The time elapsed between two successive R-waves (heartbeats).
- Unit: Milliseconds (ms).
- Source: Directly reported by the BLE sensor.