feat(train): elevation from the barometer, its pressure kept raw (ADR 0030, D49)

11c: where a recording has GPS and the phone a barometer, the service
averages its readings over 5 s into the file's `b` lines and the
workout's new `pressure` series (tenths of a pascal). The page, Health
Connect's totals and the exported files take the fixes' altitudes from
it: the standard atmosphere's height at the pressure, levelled by the
median of GPS's altitudes less those; climbs count above 1 m. Workouts
recorded before keep GPS's altitudes; an older app skips the series.

Not tried on a phone yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-29 14:48:28 +01:00
commit 57cbd97fd1
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -1154,6 +1154,17 @@ Strava. What was found, 27 Oct:
XML parsed, the FIT by a reader written from the specification in the tests
(`test/support/fit_reader.dart`), not by Garmin's SDK. Not tried yet: an upload to
Strava, intervals.icu or Garmin Connect.
- Built: 11c. Where a recording has GPS and the phone a barometer, the service averages
its readings over 5 s (`PressureAverage.kt`, tested on the JVM) into the file's `b`
lines and the workout's `pressure` series (`dpa`, tenths of a pascal, some 2 KB an
hour sealed). The page, Health Connect's totals and the files out read the fixes'
altitudes from it (`withBarometer`): each fix's height by the standard atmosphere at
the pressure then (between two readings as it went), moved by the median of GPS's
altitudes less those, so that its changes are the barometer's and its level GPS's;
its climbs count above 1 m rather than GPS's 3 m (the barometer's noise, averaged,
a fraction of a metre). A workout recorded before keeps GPS's altitudes. Not tried
on a phone yet: weather fronts over a long ride (a change of 1 hPa an hour reads as
some 8 m), and pockets' gusts.
## Consequences