mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 21:32:18 +00:00
feat(apple-health): ingest RMSSD heart-rate variability from iOS 27
iOS and watchOS 27 add `HKQuantityTypeIdentifierHeartRateVariabilityRMSSD` (Apple's symbol `c:@HKQuantityTypeIdentifierHeartRateVariabilityRMSSD`, available from 27.0). The live batch and the export.zip import now store it as `HRV_RMSSD`, the type WHOOP, Oura and Polar already write, in milliseconds, mean-aggregated and flagged privacy-sensitive like SDNN. The accepted range is 1 to 300 ms. RMSSD ranks on its own `hrvRmssd` ladder in the SQL source collapse, so a day holding it from Apple Health and a strap resolves to one source instead of a name tiebreak. SDNN and RMSSD are different statistics and are kept apart once one account holds both. The HRV page charts each on its own, titled with its measure, instead of hiding RMSSD behind SDNN. The Coach's HRV section carries one timeline per measure under `byMeasure` (same section key, so every reader still finds it) rather than one daily series averaging the two; the budget pass condenses and sheds each measure's timeline like a glucose context.
This commit is contained in:
1 parent
2731c46399
commit
370270bbc1
14 files changed
+618
-58
No files matched your search
@@ -120,6 +120,14 @@ The HK quantity types that map to HealthLog metric types live in
|
||||
mapped set (for example workout routes) is counted as unsupported and
|
||||
not stored.
|
||||
|
||||
Heart-rate variability comes in two measures, and they stay two types.
|
||||
`HeartRateVariabilitySDNN` becomes `HEART_RATE_VARIABILITY`;
|
||||
`HeartRateVariabilityRMSSD`, which iOS and watchOS 27 added, becomes
|
||||
`HRV_RMSSD`, the same type WHOOP, Oura and Polar write. RMSSD readings
|
||||
up to 300 ms are accepted. When both arrive, the HRV page charts each on
|
||||
its own and the Coach reads them apart, because one is not a stand-in for
|
||||
the other.
|
||||
|
||||
### ECG archive safety, privacy, and idempotency
|
||||
|
||||
ECG support is source-agnostic: if HealthKit includes a valid
|
||||
@@ -284,6 +292,9 @@ Concrete consequences:
|
||||
source tag — the lowest rank — is reserved for legacy CSV/JSON
|
||||
imports that pre-date the Apple Health passthrough.
|
||||
|
||||
RMSSD HRV has its own ladder, **WHOOP ≻ OURA ≻ POLAR ≻ APPLE_HEALTH**,
|
||||
separate from the SDNN one.
|
||||
|
||||
Override per-user via Settings → Sources (`/settings/sources`).
|
||||
|
||||
## Failure modes
|
||||
|
||||
Reference in new issue
Block a user