diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index fef892d9..3a644f29 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -694,10 +694,10 @@ class Logbook_model extends CI_Model { $sat_name = ''; if ($data['COL_SAT_NAME'] == 'AO-7') { if ($data['COL_BAND'] == '2m' && $data['COL_BAND_RX'] == '10m') { - $sat_name = '[A]_AO-7'; + $sat_name = 'AO-7[A]'; } if ($data['COL_BAND'] == '70cm' && $data['COL_BAND_RX'] == '2m') { - $sat_name = '[B]_AO-7'; + $sat_name = 'AO-7[B]'; } } else if ($data['COL_SAT_NAME'] == 'QO-100') { $sat_name = 'QO-100_NB'; diff --git a/application/views/gridmap/index.php b/application/views/gridmap/index.php index 74ebaefc..2b9e59ef 100644 --- a/application/views/gridmap/index.php +++ b/application/views/gridmap/index.php @@ -33,6 +33,12 @@ .cohidden { display:none; } +#latDeg, #lngDeg { + width: 170px; +} +#locator, #distance, #bearing { + width: 120px; +}
@@ -100,7 +106,7 @@
-
+
Latitude:
Longitude:
diff --git a/assets/js/leaflet/geocoding.js b/assets/js/leaflet/geocoding.js index a7efb8d7..0749c1b2 100644 --- a/assets/js/leaflet/geocoding.js +++ b/assets/js/leaflet/geocoding.js @@ -15,14 +15,20 @@ function ConvertDDToDMS(lat, lng) { if (lng > 180) { lng = lng - 360; } - - LatLng['latDeg'] = (lat < 0 ? "S" : "N") + " " + (0 | (lat < 0 ? (lat = -lat) : lat)) + "° " + (0 | (((lat += 1e-9) % 1) * 60)) + "' " + ((0 | (((lat * 60) % 1) * 6000)) / 100) + "\""; - LatLng['lngDeg'] = (lng < 0 ? "W" : "E") + " " + (0 | (lng < 0 ? (lng = -lng) : lng)) + "° " + (0 | (((lng += 1e-9) % 1) * 60)) + "' " + ((0 | (((lng * 60) % 1) * 6000)) / 100) + "\""; + LatLng['latDeg'] = (lat < 0 ? "S" : "N") + " " + pad((0 |(lat < 0 ? (lat = -lat) : lat)), 2) + "° " + pad(0 | (((lat += 1e-9) % 1) * 60),2) + "' " + ((0 | (((lat * 60) % 1) * 6000)) / 100) + "\""; + + LatLng['lngDeg'] = (lng < 0 ? "W" : "E") + " " + pad((0 | (lng < 0 ? (lng = -lng) : lng)), 3) + "° " + pad(0 | (((lng += 1e-9) % 1) * 60),2) + "' " + ((0 | (((lng * 60) % 1) * 6000)) / 100) + "\""; return LatLng; } +function pad(n, width, z) { + z = z || '0'; + n = n + ''; + return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n; +} + const latLngToLocator = (lat, lng) => { if (lng < -180) { lng = lng + 360;