fix(analytics): show highest elevation gain in meters

Signed-off-by: Marcus Fihlon <marcus@fihlon.swiss>
This commit is contained in:
Marcus Fihlon 2026-04-30 12:59:26 +02:00
parent c84377b05a
commit 4df5af63e0
Signed by: McPringle
GPG key ID: C6B7F469EE363E1F
2 changed files with 9 additions and 0 deletions

View file

@ -317,6 +317,9 @@
}
return `${minutes}:${seconds.toString().padStart(2, '0')}`;
} else if (unit === 'meters') {
if (type === 'HIGHEST_ELEVATION_GAIN') {
return `${Math.round(value)} m`;
}
return `${(value / 1000).toFixed(2)} km`;
} else if (unit === 'mps') {
return `${(value * 3.6).toFixed(2)} km/h`;