feat(trail): record altitude in trail points

Each point keeps the GPS altitude in what was padding, so a point stays
16 bytes. The save format goes to version 2; version 1 files still load,
with the altitude unknown. GPX export writes <ele>.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-10-02 19:24:36 +02:00
co-authored by Claude Opus 5.5
parent 2589fe95ce
commit 0bbf2fa2b3
5 changed files with 43 additions and 21 deletions
+1 -1
View File
@@ -902,7 +902,7 @@ template <typename F>
static bool trailSummary(F& io, int& points, float& meters, uint32_t& secs) {
uint16_t cnt = 0;
uint32_t accum = 0;
if (!persist::readHeader(io, TrailStore::SAVE_MAGIC, TrailStore::SAVE_VERSION, cnt)) return false;
if (!persist::readHeader(io, TrailStore::SAVE_MAGIC, TrailStore::SAVE_VERSION, cnt, 1)) return false;
if (io.read((uint8_t*)&accum, sizeof(accum)) != (int)sizeof(accum)) return false;
points = 0; meters = 0; secs = accum / 1000;
TrailPoint prev, p;