correct elevation for summit logs

This commit is contained in:
Christian Beutel
2025-08-20 13:34:55 +02:00
parent e3916e371a
commit 097ecd409d
6 changed files with 19 additions and 14 deletions

View File

@@ -90,9 +90,13 @@
return;
}
const gpxObject = GPX.parse(trailData);
const totals = gpxObject.features;
try {
await gpxObject.correctElevation();
} catch (e) {
console.warn("Unable to correct elevation: " + e);
}
const totals = gpxObject.features;
$data.duration = totals.duration / 1000;
$data.elevation_gain = totals.elevationGain;
$data.elevation_loss = totals.elevationLoss;

View File

@@ -58,7 +58,7 @@
};
}
trail = gpx2trail(log.expand.gpx_data!).trail;
trail = (await gpx2trail(log.expand.gpx_data!)).trail;
trail.id = log.id;
trail.expand!.gpx_data = log.expand.gpx_data;