From 849337c55de5e6f038d1d0daafaafa882f3097c8 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Sat, 6 Jul 2019 23:15:33 +0200 Subject: [PATCH] fix locator calculation --- htdocs/map.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/map.js b/htdocs/map.js index f5f9a71..e268946 100644 --- a/htdocs/map.js +++ b/htdocs/map.js @@ -58,7 +58,7 @@ case 'locator': var loc = update.location.locator; var lat = (loc.charCodeAt(1) - 65 - 9) * 10 + Number(loc[3]); - var lon = (loc.charCodeAt(0) - 65 - 9) * 20 + Number(loc[2]); + var lon = (loc.charCodeAt(0) - 65 - 9) * 20 + Number(loc[2]) * 2; var rectangle; if (rectangles[update.callsign]) { rectangle = rectangles[update.callsign]; @@ -77,7 +77,7 @@ north: lat, south: lat + 1, west: lon, - east: lon + 1 + east: lon + 2 } }); break;