mirror of
https://github.com/sstent/FitTrack_GarminSync.git
synced 2026-01-26 17:12:00 +00:00
33 lines
1.1 KiB
Markdown
33 lines
1.1 KiB
Markdown
# GPX File Support in GarminSync
|
|
|
|
GarminSync now supports processing GPX files with accurate distance calculation using the Haversine formula.
|
|
|
|
## Features
|
|
|
|
- Parses GPX 1.1 files with extended Garmin TrackPoint extensions
|
|
- Calculates total distance using Haversine formula
|
|
- Extracts elevation data including gain/loss
|
|
- Processes heart rate and cadence data
|
|
- Calculates activity duration
|
|
|
|
## Supported Metrics
|
|
|
|
| Metric | Description | Data Source |
|
|
|--------|-------------|-------------|
|
|
| Distance | Total activity distance | Calculated from GPS coordinates |
|
|
| Duration | Activity duration | Start/end timestamps |
|
|
| Elevation | Min, max, gain, loss | ele tags in track points |
|
|
| Heart Rate | Max and average | gpx:hr extension |
|
|
| Cadence | Average cadence | gpx:cad extension |
|
|
|
|
## Implementation Details
|
|
|
|
The GPX parser:
|
|
1. Uses XML parsing to extract track points
|
|
2. Calculates distance between points using Haversine formula
|
|
3. Processes elevation data to determine gain/loss
|
|
4. Handles time zone conversions for timestamps
|
|
5. Gracefully handles missing data points
|
|
|
|
For more details, see the [gpx_parser.py](garminsync/parsers/gpx_parser.py) file.
|