diff --git a/docs/architecture.adoc b/docs/architecture.adoc index 40e25e2..408c206 100644 --- a/docs/architecture.adoc +++ b/docs/architecture.adoc @@ -233,6 +233,23 @@ assembling any HTML; the URL pattern excludes quote characters, so a matched URL can never break out of the `href="..."` attribute. Every other value is HTML-escaped before being handed to `Popup#setHTML`. +Track properties:: Every track feature (both formats) also carries +`distance_meters`, `elevation_gain_meters`, `duration_secs` and +`point_count`, computed once server-side by `Maptool::TrackStats` +(`lib/maptool/track_stats.rb`, shared by `Gpx`/`Fit` so neither +duplicates the haversine formula) rather than in the browser — cheap +either way, but it means a GPX and a FIT file end up with the same +properties shape, so the frontend doesn't need to know which format it +got. Distance sums the haversine distance between consecutive points; +elevation gain sums only the positive deltas (descents don't +subtract); duration is the gap between the first and last known +timestamp, skipping unknown ones in between — `nil` for any of these +where the source data doesn't have enough to compute it (e.g. a GPX +file with no `