mile_splits
Compute per-mile or quarter-mile running-only pace, heart rate, elevation gain/loss, and time by gait, with Garmin laps alongside for cross-check.
Instructions
Per mile (or unit="quarter"): running-only pace, HR, DEM gain/loss
and time by gait, with Garmin's own laps beside it for cross-check.
Args:
run: run_id, activity_id or Garmin file id. Empty means the latest run.
unit: "mile" (default) or "quarter".
BOUNDARIES from the device odometer, interpolated exactly at each mile
(the windowed-best rule), never from 30 s bins; across a standing stretch
the LAST instant at that distance. The final unit is a PARTIAL with its
real length. A unit crossing a recording gap over 20 s is FLAGGED
(`contains_gap` / `boundary_in_gap`), not refused.
RUNNING-ONLY PACE: rwd_run splits intersected with the unit, stopped time
removed. A walk break inside a mile is excluded from pace and counted in
`time_walking_s`. `hr_running` (PRIMARY) is time-weighted over the same
running overlap; `hr_all_gaits` covers the whole unit. Both RAW, no lag.
Gain/loss from the smoothed DEM profile, in m and ft; with no DEM they are
null and `elevation_reason` says why. `garmin_laps` are Garmin's laps AS
RECORDED -- only distance-triggered ones are miles, and their pace
includes walking -- and are never substituted for ours.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run | No | ||
| unit | No | mile |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |