correct elevation for summit logs
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user