Repository navigation
Elevation Correction
Status: Current implemented behavior. Audience: Users and contributors. Implementation:
features/activity/elevation,features/manualentry/activity/routeimport,features/manualentry/activity/ActivityEntryViewModel.kt,core/geo,features/settings. Navigation: Settings, Activities, Elevation correction. Related: Feature map, Add elevation tiles, GPX/KML/KMZ/TCX route import, FIT files import, Offline maps support.
A barometric altimeter drifts with the weather, sweat, and age; a watch or phone without one reports noisy GPS altitude. Both inflate elevation gain. Elevation correction replaces the altitude of every point in an imported or recorded route with the height from a digital elevation model (DEM) tile stored on the phone, then recomputes the gain from that profile.
For where to get tiles and how to import them, see Add elevation tiles.
Correction runs when a file is imported: GPX, TCX, KML, KMZ, and FIT files from Settings, Data Importers and Activity Entry, and a folder of FIT files. All of these go through one importer, so they cannot differ.
It also runs when a GPS recording on the phone is finished. The route the review form shows, and the elevation gain saved with the activity, come from the tile. The figure shown while recording is still the phone's own barometer or GPS reading; see Recording of activity.
Activities already saved in Health Connect are never rewritten. Only new imports and new recordings are corrected.
A route is corrected only when every one of its points falls inside an imported tile and none of them lands on a void sample. If a single point is uncovered, the whole file keeps the altitudes it came with, and the import log says so. A profile half from the DEM and half from a drifting sensor would be worse than either.
When correction applies, the file's own ascent total is replaced too, since it came from the sensor that drifted. Distance, timing, heart rate, cadence, and speed are untouched. Elevation gain is computed from the corrected profile with the same smoothing filter a recording uses.
Tiles are SRTM-style .hgt files, one per one-degree cell, named by the cell's south-west corner:
| Grid | Samples | File size |
|---|---|---|
| 3 arc-second (about 90 m) | 1201 x 1201 | 2,884,802 bytes |
| 1 arc-second (about 30 m) | 3601 x 3601 | 25,934,402 bytes |
N45E007.hgt covers 45 to 46 N and 7 to 8 E. A .zip holding one .hgt can be imported as is. A file that is neither size is refused.
Altitude at a position is interpolated from the four nearest grid samples.
The app declares no internet permission. Tiles are obtained on a computer and imported with the system file picker, the same way offline map packs are.
Imported tiles stay on the device as app support data, not Health Connect records. Deleting a tile removes only that file; activities imported while it was present keep their corrected values. The toggle in Settings switches correction off without deleting tiles.
Generated from docs/features/elevation-correction.md. Edit it there; changes made here are overwritten.
This wiki mirrors the Markdown in Hale-MTU/OpenVitals on every push to main.
Features
- Features
- Achievements
- Activity And Training Plans
- Activity Metrics
- Apple Health Import
- Beverage Logging And Caffeine
- Bluetooth LE Sensors
- Body Energy
- Body Metrics
- CoMaps Navigation Context
- CSV Import
- Cycle Tracking
- Daily Readiness
- Elevation Correction
- Feature Map
- FIT Files Import
- Food Logging
- GPX/KML/KMZ/TCX Route Import
- Health Connect Metrics Dashboard
- Health Report Export
- Heart And Vitals
- Heart Rate Recovery
- Home Screen Widgets
- Hydration
- Manual Entry Of Metrics
- Medical Records
- Metric Detail Customization
- Mindfulness
- Non Health Connect Metrics Dashboard
- Nutrition
- Offline Maps Support
- Onboarding And Permissions
- Preloaded Beverage Nutrition Reference
- Privacy, Support, And Diagnostics
- Recording Of Activity
- Reminders
- Settings And Preferences
- Sleep Score And Recovery
- Sleep Tracking
- Statistics
- Sync With Another Phone
How-to
App
- App Guide
- FAQ
- Getting Started
- Health Connect
- Install
- Local And Connected Editions
- Permissions
- Privacy
- Screenshots
- Support
Reference
- Design Reference
- Reference
- Design Guidelines for Offline & Sync
- OpenVitals UI Notes
- Reference: Data Capture
- Reference: Data Display
- Reference: Health Connect Matchmaking
- Reference: Health Connect Onboarding
- Reference: Health Connect Permissions
- Reference: Health Connect UX
- Reference: Promoting Health Connect
Engineering
- Code Analysis
- Engineering
- Flutter ↔ Kotlin test-parity matrix
- apple-health-import
- Architecture
- body-cycle-recovery
- Design system conformance
- Development
- Feature Playbook
- Flutter -> Kotlin test parity: domain/data/core/contract/state/navigation/di/bootstrap/l10n/widget_test
- Flutter → Kotlin test-parity matrix: features section
- Flutter → Kotlin test-parity matrix: ui / goldens / integration / fixtures
- Flutter-to-Kotlin test-parity matrix — dashboard + devicesync
- manual-entry
- Translations
Proposals
- Proposals
- Activity Start Flow Analysis
- Activity Start Flow Simplification Proposals
- Caffeine Detail And Future Sleep Insights
- Cycle Tracking: Design and Status
- Medical Records Through Health Connect
- Medical Records: What Is Left
Releases
- OpenVitals 2.16.0
- OpenVitals 2.15.2
- OpenVitals 2.15.1
- OpenVitals 2.15.0
- OpenVitals 2.14.5
- OpenVitals 2.14.4
- OpenVitals 2.14.3
- OpenVitals 2.14.2
- OpenVitals 2.14.1
- OpenVitals 2.14.0
- OpenVitals 2.13.0
- OpenVitals 2.12.0
- OpenVitals 2.11.2
- OpenVitals 2.11.1
- OpenVitals 2.11.0
- OpenVitals 2.10.1
- OpenVitals 2.10.0
- OpenVitals 2.9.1
- OpenVitals 2.9.0
- OpenVitals 2.8.0
- OpenVitals 2.7.3
- OpenVitals 2.7.2
- OpenVitals 2.7.1
- OpenVitals 2.7.0
- OpenVitals 2.6.6
- OpenVitals 2.6.5
- OpenVitals 2.6.4
- OpenVitals 2.6.3
- OpenVitals 2.6.2
- OpenVitals 2.6.1
- OpenVitals 2.6.0
- OpenVitals 2.5.0
- OpenVitals 2.4.1
- OpenVitals 2.4.0
- OpenVitals 2.3.2
- OpenVitals 2.3.1
- OpenVitals 2.3.0
- OpenVitals 2.2.8
- OpenVitals 2.2.7
- OpenVitals 2.2.6
- OpenVitals 2.2.5
- OpenVitals 2.2.4
- OpenVitals 2.2.3
- OpenVitals 2.2.2
- OpenVitals 2.2.1
- OpenVitals 2.2.0
- OpenVitals 2.1.0
- OpenVitals 2.0.4
- OpenVitals 2.0.3
- OpenVitals 2.0.2
- OpenVitals 2.0.1
- OpenVitals 1.9.0
- OpenVitals 1.8.0
- OpenVitals 1.7.7
- OpenVitals 1.7.6
- OpenVitals 1.7.5
- OpenVitals 1.7.4
- OpenVitals 1.7.3
- OpenVitals 1.7.2
- OpenVitals 1.7.1
- OpenVitals 1.7.0
- OpenVitals 1.6.3
- OpenVitals 1.6.2
- OpenVitals 1.6.1
- OpenVitals 1.6.0
- OpenVitals 1.5.1
- OpenVitals 1.5.0
Project