diff --git a/freedata_gui/src/components/grid/grid_active_heard_stations.vue b/freedata_gui/src/components/grid/grid_active_heard_stations.vue index 02e202e4..f163da68 100644 --- a/freedata_gui/src/components/grid/grid_active_heard_stations.vue +++ b/freedata_gui/src/components/grid/grid_active_heard_stations.vue @@ -32,7 +32,17 @@ function getDateTime(timestampRaw) { function getMaidenheadDistance(dxGrid) { try { - return parseInt(distance(settings.remote.STATION.mygrid, dxGrid)); + const distanceKm = parseInt(distance(settings.remote.STATION.mygrid, dxGrid)); + + if (settings.remote.GUI.distance_unit === "mi") { + return Math.round(distanceKm * 0.621371) + } + + if (settings.remote.GUI.distance_unit === "nm") { + return Math.round(distanceKm * 0.539957) + } + + return distanceKm; } catch (e) { // } @@ -202,7 +212,7 @@ function transmitPing(callsign) { {{ item.gridsquare }} - {{ getMaidenheadDistance(item.gridsquare) }} km + {{ getMaidenheadDistance(item.gridsquare) }} {{settings.remote.GUI.distance_unit}} + + +
+ + {{ $t('settings.gui.distanceunit') }} + + + +