909 lines
21 KiB
JavaScript
909 lines
21 KiB
JavaScript
//
|
|
// Utility functions
|
|
//
|
|
|
|
function Utils() {}
|
|
|
|
Utils.callsign_url = null;
|
|
|
|
// Set URL for linkifying callsigns
|
|
Utils.setCallsignUrl = function(url) {
|
|
this.callsign_url = url;
|
|
};
|
|
|
|
// Escape HTML code.
|
|
Utils.htmlEscape = function(input) {
|
|
return $('<div/>').text(input).html()
|
|
};
|
|
|
|
// Wrap given callsign or other ID into a clickable link.
|
|
Utils.linkify = function(id, url = null, content = null, tip = null) {
|
|
// If no specific content, use the ID itself
|
|
if (content == null) content = id;
|
|
|
|
// Compose tooltip
|
|
var tipText = tip? ' title="' + tip + '"' : '';
|
|
|
|
// Must have valid ID and lookup URL
|
|
if ((id == '') || (url == null) || (url == '')) {
|
|
return tipText? '<div' + tipText + '>' + content + '</div>' : content;
|
|
} else {
|
|
return '<a target="callsign_info"' + tipText + ' href="' +
|
|
url.replaceAll('{}', id) + '">' + content + '</a>';
|
|
}
|
|
};
|
|
|
|
// Create link to a callsign, with country tooltip, etc.
|
|
Utils.linkifyCallsign = function(callsign) {
|
|
// Strip callsign of modifiers
|
|
var id = callsign.replace(new RegExp('[-/].*$'), '');
|
|
// Add country name as a tooltip
|
|
return this.linkify(id, this.callsign_url, callsign, this.call2country(id));
|
|
};
|
|
|
|
// Create link to tune OWRX to the given frequency and modulation.
|
|
Utils.linkifyFreq = function(freq, mod) {
|
|
var text;
|
|
if (freq >= 30000000) {
|
|
text = '' + (freq / 1000000.0) + 'MHz';
|
|
} else if (freq >= 10000) {
|
|
text = '' + (freq / 1000.0) + 'kHz';
|
|
} else {
|
|
text = '' + freq + 'Hz';
|
|
}
|
|
|
|
return '<a target="openwebrx-rx" href="/#freq='
|
|
+ freq + ',mod=' + mod + '">' + text + '</a>';
|
|
};
|
|
|
|
// Linkify given content so that clicking them opens the map with
|
|
// the info bubble.
|
|
Utils.linkToMap = function(id, content = null, attrs = "") {
|
|
if (id) {
|
|
return '<a ' + attrs + ' href="map?callsign='
|
|
+ encodeURIComponent(id) + '" target="openwebrx-map">'
|
|
+ (content != null? content : id) + '</a>';
|
|
} else if (content != null) {
|
|
return '<div ' + attrs + '>' + content + '</div>';
|
|
} else {
|
|
return '';
|
|
}
|
|
};
|
|
|
|
// Compute distance, in kilometers, between two latlons.
|
|
Utils.distanceKm = function(p1, p2) {
|
|
// Convert from map objects to latlons
|
|
if ("lng" in p1) p1 = { lat: p1.lat(), lon: p1.lng() };
|
|
if ("lng" in p2) p2 = { lat: p2.lat(), lon: p2.lng() };
|
|
// Earth radius in km
|
|
var R = 6371.0;
|
|
// Convert degrees to radians
|
|
var rlat1 = p1.lat * (Math.PI/180);
|
|
var rlat2 = p2.lat * (Math.PI/180);
|
|
// Compute difference in radians
|
|
var difflat = rlat2 - rlat1;
|
|
var difflon = (p2.lon - p1.lon) * (Math.PI/180);
|
|
// Compute distance
|
|
d = 2 * R * Math.asin(Math.sqrt(
|
|
Math.sin(difflat/2) * Math.sin(difflat/2) +
|
|
Math.cos(rlat1) * Math.cos(rlat2) * Math.sin(difflon/2) * Math.sin(difflon/2)
|
|
));
|
|
return Math.round(d);
|
|
};
|
|
|
|
// Truncate string to a given number of characters, adding "..." to the end.
|
|
Utils.truncate = function(str, count) {
|
|
return str.length > count? str.slice(0, count) + '…' : str;
|
|
};
|
|
|
|
// Convert degrees to compass direction.
|
|
Utils.degToCompass = function(deg) {
|
|
dir = ['N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SE', 'SSE', 'S', 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW'];
|
|
return dir[Math.floor((deg/22.5) + 0.5) % 16];
|
|
};
|
|
|
|
// Convert given name to an information section title.
|
|
Utils.makeListTitle = function(name) {
|
|
return '<div style="border-bottom:2px solid;padding-top:1em;"><b>' + name + '</b></div>';
|
|
};
|
|
|
|
// Convert given name/value to an information section item.
|
|
Utils.makeListItem = function(name, value) {
|
|
return '<div style="display:flex;justify-content:space-between;border-bottom:1px dotted;white-space:nowrap;">'
|
|
+ '<span>' + name + ' </span>'
|
|
+ '<span>' + value + '</span>'
|
|
+ '</div>';
|
|
};
|
|
|
|
// Get opacity value in the 0..1 range based on the given age.
|
|
Utils.getOpacityScale = function(age) {
|
|
var scale = 1;
|
|
if (age >= retention_time / 2) {
|
|
scale = (retention_time - age) / (retention_time / 2);
|
|
}
|
|
return Math.max(0, Math.min(1, scale));
|
|
};
|
|
|
|
// Get country name from callsign.
|
|
Utils.call2country = function(callsign) {
|
|
for (var j=4 ; j>0 ; j--) {
|
|
var pfx = callsign.substring(0, j)
|
|
if (pfx in this.PFX2COUNTRY) return this.PFX2COUNTRY[pfx];
|
|
}
|
|
return '';
|
|
};
|
|
|
|
//
|
|
// Callsign prefix to country name conversion
|
|
//
|
|
Utils.PFX2COUNTRY = {
|
|
"0S" : "Principality of Seborga",
|
|
"1A" : "Sovereign Military Order of Malta",
|
|
"1B" : "Northern Cyprus or Blenheim Reef",
|
|
"1G" : "Geyser Reef",
|
|
"1L" : "Liberland",
|
|
"1M" : "Minerva Reefs",
|
|
"1S" : "Principality of Sealand",
|
|
"1Z" : "Kayin State",
|
|
"2" : "United Kingdom",
|
|
"3A" : "Monaco",
|
|
"3B" : "Mauritius",
|
|
"3C" : "Equatorial Guinea",
|
|
"3DA": "Swaziland",
|
|
"3DB": "Swaziland",
|
|
"3DC": "Swaziland",
|
|
"3DD": "Swaziland",
|
|
"3DE": "Swaziland",
|
|
"3DF": "Swaziland",
|
|
"3DG": "Swaziland",
|
|
"3DH": "Swaziland",
|
|
"3DI": "Swaziland",
|
|
"3DJ": "Swaziland",
|
|
"3DK": "Swaziland",
|
|
"3DL": "Swaziland",
|
|
"3DM": "Swaziland",
|
|
"3DN": "Fiji",
|
|
"3DO": "Fiji",
|
|
"3DP": "Fiji",
|
|
"3DQ": "Fiji",
|
|
"3DR": "Fiji",
|
|
"3DS": "Fiji",
|
|
"3DT": "Fiji",
|
|
"3DU": "Fiji",
|
|
"3DV": "Fiji",
|
|
"3DW": "Fiji",
|
|
"3DX": "Fiji",
|
|
"3DY": "Fiji",
|
|
"3DZ": "Fiji",
|
|
"3E" : "Panama",
|
|
"3F" : "Panama",
|
|
"3G" : "Chile",
|
|
"3H" : "People's Republic of China",
|
|
"3I" : "People's Republic of China",
|
|
"3J" : "People's Republic of China",
|
|
"3K" : "People's Republic of China",
|
|
"3L" : "People's Republic of China",
|
|
"3M" : "People's Republic of China",
|
|
"3N" : "People's Republic of China",
|
|
"3O" : "People's Republic of China",
|
|
"3P" : "People's Republic of China",
|
|
"3Q" : "People's Republic of China",
|
|
"3R" : "People's Republic of China",
|
|
"3S" : "People's Republic of China",
|
|
"3T" : "People's Republic of China",
|
|
"3U" : "People's Republic of China",
|
|
"3V" : "Tunisia",
|
|
"3W" : "Vietnam",
|
|
"3X" : "Guinea",
|
|
"3Y" : "Norway",
|
|
"3Z" : "Poland",
|
|
"4A" : "Mexico",
|
|
"4B" : "Mexico",
|
|
"4C" : "Mexico",
|
|
"4D" : "Philippines",
|
|
"4E" : "Philippines",
|
|
"4F" : "Philippines",
|
|
"4G" : "Philippines",
|
|
"4H" : "Philippines",
|
|
"4I" : "Philippines",
|
|
"4J" : "Azerbaijan",
|
|
"4K" : "Azerbaijan",
|
|
"4L" : "Georgia",
|
|
"4M" : "Venezuela",
|
|
"4O" : "Montenegro",
|
|
"4P" : "Sri Lanka",
|
|
"4Q" : "Sri Lanka",
|
|
"4R" : "Sri Lanka",
|
|
"4S" : "Sri Lanka",
|
|
"4T" : "Peru",
|
|
"4U" : "United Nations (non-geographical)",
|
|
"4V" : "Haiti",
|
|
"4W" : "East Timor",
|
|
"4X" : "Israel",
|
|
"4Y" : "International Civil Aviation Organization (non-geographical)",
|
|
"4Z" : "Israel",
|
|
"5A" : "Libya",
|
|
"5B" : "Cyprus",
|
|
"5C" : "Morocco",
|
|
"5D" : "Morocco",
|
|
"5E" : "Morocco",
|
|
"5F" : "Morocco",
|
|
"5G" : "Morocco",
|
|
"5H" : "Tanzania",
|
|
"5I" : "Tanzania",
|
|
"5J" : "Colombia",
|
|
"5K" : "Colombia",
|
|
"5L" : "Liberia",
|
|
"5M" : "Liberia",
|
|
"5N" : "Nigeria",
|
|
"5O" : "Nigeria",
|
|
"5P" : "Denmark",
|
|
"5Q" : "Denmark",
|
|
"5R" : "Madagascar",
|
|
"5S" : "Madagascar",
|
|
"5T" : "Mauritania",
|
|
"5U" : "Niger",
|
|
"5V" : "Togo",
|
|
"5W" : "Western Samoa",
|
|
"5X" : "Uganda",
|
|
"5Y" : "Kenya",
|
|
"5Z" : "Kenya",
|
|
"6A" : "Egypt",
|
|
"6B" : "Egypt",
|
|
"6C" : "Syria",
|
|
"6D" : "Mexico",
|
|
"6E" : "Mexico",
|
|
"6F" : "Mexico",
|
|
"6G" : "Mexico",
|
|
"6H" : "Mexico",
|
|
"6I" : "Mexico",
|
|
"6J" : "Mexico",
|
|
"6K" : "South Korea",
|
|
"6L" : "South Korea",
|
|
"6M" : "South Korea",
|
|
"6N" : "South Korea",
|
|
"6O" : "Somalia",
|
|
"6P" : "Pakistan",
|
|
"6Q" : "Pakistan",
|
|
"6R" : "Pakistan",
|
|
"6S" : "Pakistan",
|
|
"6T" : "Sudan",
|
|
"6U" : "Sudan",
|
|
"6V" : "Senegal",
|
|
"6W" : "Senegal",
|
|
"6X" : "Madagascar",
|
|
"6Y" : "Jamaica",
|
|
"6Z" : "Liberia",
|
|
"7A" : "Indonesia",
|
|
"7B" : "Indonesia",
|
|
"7C" : "Indonesia",
|
|
"7D" : "Indonesia",
|
|
"7E" : "Indonesia",
|
|
"7F" : "Indonesia",
|
|
"7G" : "Indonesia",
|
|
"7H" : "Indonesia",
|
|
"7I" : "Indonesia",
|
|
"7J" : "Japan",
|
|
"7K" : "Japan",
|
|
"7L" : "Japan",
|
|
"7M" : "Japan",
|
|
"7N" : "Japan",
|
|
"7O" : "Yemen",
|
|
"7P" : "Lesotho",
|
|
"7Q" : "Malawi",
|
|
"7R" : "Algeria",
|
|
"7S" : "Sweden",
|
|
"7T" : "Algeria",
|
|
"7U" : "Algeria",
|
|
"7V" : "Algeria",
|
|
"7W" : "Algeria",
|
|
"7X" : "Algeria",
|
|
"7Y" : "Algeria",
|
|
"7Z" : "Saudi Arabia",
|
|
"8A" : "Indonesia",
|
|
"8B" : "Indonesia",
|
|
"8C" : "Indonesia",
|
|
"8D" : "Indonesia",
|
|
"8E" : "Indonesia",
|
|
"8F" : "Indonesia",
|
|
"8G" : "Indonesia",
|
|
"8H" : "Indonesia",
|
|
"8I" : "Indonesia",
|
|
"8J" : "Japan",
|
|
"8K" : "Japan",
|
|
"8L" : "Japan",
|
|
"8M" : "Japan",
|
|
"8N" : "Japan",
|
|
"8O" : "Botswana",
|
|
"8P" : "Barbados",
|
|
"8Q" : "Maldives",
|
|
"8R" : "Guyana",
|
|
"8S" : "Sweden",
|
|
"8T" : "India",
|
|
"8U" : "India",
|
|
"8V" : "India",
|
|
"8W" : "India",
|
|
"8X" : "India",
|
|
"8Y" : "India",
|
|
"8Z" : "Saudi Arabia",
|
|
"9A" : "Croatia",
|
|
"9B" : "Iran",
|
|
"9C" : "Iran",
|
|
"9D" : "Iran",
|
|
"9E" : "Ethiopia",
|
|
"9F" : "Ethiopia",
|
|
"9G" : "Ghana",
|
|
"9H" : "Malta",
|
|
"9I" : "Zambia",
|
|
"9J" : "Zambia",
|
|
"9K" : "Kuwait",
|
|
"9L" : "Sierra Leone",
|
|
"9M0": "Spratly Islands",
|
|
"9M" : "Malaysia",
|
|
"9N" : "Nepal",
|
|
"9O" : "Democratic Republic of the Congo",
|
|
"9P" : "Democratic Republic of the Congo",
|
|
"9Q" : "Democratic Republic of the Congo",
|
|
"9R" : "Democratic Republic of the Congo",
|
|
"9S" : "Democratic Republic of the Congo",
|
|
"9T" : "Democratic Republic of the Congo",
|
|
"9U" : "Burundi",
|
|
"9V" : "Singapore",
|
|
"9W" : "Malaysia",
|
|
"9X" : "Rwanda",
|
|
"9Y" : "Trinidad and Tobago",
|
|
"9Z" : "Trinidad and Tobago",
|
|
"A2" : "Botswana",
|
|
"A3" : "Tonga",
|
|
"A4" : "Oman",
|
|
"A5" : "Bhutan",
|
|
"A6" : "United Arab Emirates",
|
|
"A7" : "Qatar",
|
|
"A8" : "Liberia",
|
|
"A9" : "Bahrain",
|
|
"AA" : "United States",
|
|
"AB" : "United States",
|
|
"AC" : "United States",
|
|
"AD" : "United States",
|
|
"AE" : "United States",
|
|
"AF" : "United States",
|
|
"AG" : "United States",
|
|
"AH" : "United States",
|
|
"AI" : "United States",
|
|
"AJ" : "United States",
|
|
"AK" : "United States",
|
|
"AL" : "United States",
|
|
"AM" : "Spain",
|
|
"AN" : "Spain",
|
|
"AO" : "Spain",
|
|
"AP" : "Pakistan",
|
|
"AQ" : "Pakistan",
|
|
"AR" : "Pakistan",
|
|
"AS" : "Pakistan",
|
|
"AT" : "India",
|
|
"AU" : "India",
|
|
"AV" : "India",
|
|
"AW" : "India",
|
|
"AX" : "Australia",
|
|
"AY" : "Argentina",
|
|
"AZ" : "Argentina",
|
|
"BM" : "Taiwan",
|
|
"BN" : "Taiwan",
|
|
"BO" : "Taiwan",
|
|
"BP" : "Taiwan",
|
|
"BQ" : "Taiwan",
|
|
"BU" : "Taiwan",
|
|
"BV9": "Spratly Islands",
|
|
"BV" : "Taiwan",
|
|
"BW" : "Taiwan",
|
|
"BX" : "Taiwan",
|
|
"B" : "People's Republic of China",
|
|
"C2" : "Nauru",
|
|
"C3" : "Andorra",
|
|
"C4" : "Cyprus",
|
|
"C5" : "The Gambia",
|
|
"C6" : "Bahamas",
|
|
"C7" : "World Meteorological Organization (non-geographical)",
|
|
"C8" : "Mozambique",
|
|
"C9" : "Mozambique",
|
|
"CA" : "Chile",
|
|
"CB" : "Chile",
|
|
"CC" : "Chile",
|
|
"CD" : "Chile",
|
|
"CE" : "Chile",
|
|
"CF" : "Canada",
|
|
"CG" : "Canada",
|
|
"CH" : "Canada",
|
|
"CI" : "Canada",
|
|
"CJ" : "Canada",
|
|
"CK" : "Canada",
|
|
"CL" : "Cuba",
|
|
"CM" : "Cuba",
|
|
"CN" : "Morocco",
|
|
"CO" : "Cuba",
|
|
"CP" : "Bolivia",
|
|
"CQ" : "Portugal",
|
|
"CR" : "Portugal",
|
|
"CS" : "Portugal",
|
|
"CT" : "Portugal",
|
|
"CU" : "Portugal",
|
|
"CV" : "Uruguay",
|
|
"CW" : "Uruguay",
|
|
"CX" : "Uruguay",
|
|
"CY" : "Canada",
|
|
"CZ" : "Canada",
|
|
"D0" : "Donetsk",
|
|
"D1" : "Donetsk",
|
|
"D2" : "Angola",
|
|
"D3" : "Angola",
|
|
"D4" : "Cape Verde",
|
|
"D5" : "Liberia",
|
|
"D6" : "Comoros",
|
|
"D7" : "South Korea",
|
|
"D8" : "South Korea",
|
|
"D9" : "South Korea",
|
|
"DA" : "Germany",
|
|
"DB" : "Germany",
|
|
"DC" : "Germany",
|
|
"DD" : "Germany",
|
|
"DE" : "Germany",
|
|
"DF" : "Germany",
|
|
"DG" : "Germany",
|
|
"DH" : "Germany",
|
|
"DI" : "Germany",
|
|
"DJ" : "Germany",
|
|
"DK" : "Germany",
|
|
"DL" : "Germany",
|
|
"DM" : "Germany",
|
|
"DN" : "Germany",
|
|
"DO" : "Germany",
|
|
"DP" : "Germany",
|
|
"DQ" : "Germany",
|
|
"DR" : "Germany",
|
|
"DS" : "South Korea",
|
|
"DT" : "South Korea",
|
|
"DU" : "Philippines",
|
|
"DV" : "Philippines",
|
|
"DW" : "Philippines",
|
|
"DX0": "Spratly Islands",
|
|
"DX" : "Philippines",
|
|
"DY" : "Philippines",
|
|
"DZ" : "Philippines",
|
|
"E2" : "Thailand",
|
|
"E3" : "Eritrea",
|
|
"E4" : "Palestine",
|
|
"E5" : "Cook Islands",
|
|
"E6" : "Niue",
|
|
"E7" : "Bosnia and Herzegovina",
|
|
"EA" : "Spain",
|
|
"EB" : "Spain",
|
|
"EC" : "Spain",
|
|
"ED" : "Spain",
|
|
"EE" : "Spain",
|
|
"EF" : "Spain",
|
|
"EG" : "Spain",
|
|
"EH" : "Spain",
|
|
"EI" : "Ireland",
|
|
"EJ" : "Ireland",
|
|
"EK" : "Armenia",
|
|
"EL" : "Liberia",
|
|
"EM" : "Ukraine",
|
|
"EN" : "Ukraine",
|
|
"EO" : "Ukraine",
|
|
"EP" : "Iran",
|
|
"EQ" : "Iran",
|
|
"ER" : "Moldova",
|
|
"ES" : "Estonia",
|
|
"ET" : "Ethiopia",
|
|
"EU" : "Belarus",
|
|
"EV" : "Belarus",
|
|
"EW" : "Belarus",
|
|
"EX" : "Kyrgyzstan",
|
|
"EY" : "Tajikistan",
|
|
"EZ" : "Turkmenistan",
|
|
"F" : "France",
|
|
"G" : "United Kingdom",
|
|
"H2" : "Cyprus",
|
|
"H3" : "Panama",
|
|
"H4" : "Solomon Islands",
|
|
"H5" : "Bophuthatswana",
|
|
"H6" : "Nicaragua",
|
|
"H7" : "Nicaragua",
|
|
"H8" : "Panama",
|
|
"H9" : "Panama",
|
|
"HA" : "Hungary",
|
|
"HB3Y": "Liechtenstein",
|
|
"HB0": "Liechtenstein",
|
|
"HBL": "Liechtenstein",
|
|
"HB" : "Switzerland",
|
|
"HC" : "Ecuador",
|
|
"HD" : "Ecuador",
|
|
"HE" : "Switzerland",
|
|
"HF" : "Poland",
|
|
"HG" : "Hungary",
|
|
"HH" : "Haiti",
|
|
"HI" : "Dominican Republic",
|
|
"HJ" : "Colombia",
|
|
"HK" : "Colombia",
|
|
"HL" : "South Korea",
|
|
"HM" : "North Korea",
|
|
"HN" : "Iraq",
|
|
"HO" : "Panama",
|
|
"HP" : "Panama",
|
|
"HQ" : "Honduras",
|
|
"HR" : "Honduras",
|
|
"HS" : "Thailand",
|
|
"HT" : "Nicaragua",
|
|
"HU" : "El Salvador",
|
|
"HV" : "Vatican City",
|
|
"HW" : "France",
|
|
"HX" : "France",
|
|
"HY" : "France",
|
|
"HZ" : "Saudi Arabia",
|
|
"I" : "Italy",
|
|
"J2" : "Djibouti",
|
|
"J3" : "Grenada",
|
|
"J4" : "Greece",
|
|
"J5" : "Guinea-Bissau",
|
|
"J6" : "Saint Lucia",
|
|
"J7" : "Dominica",
|
|
"J8" : "Saint Vincent and the Grenadines",
|
|
"JA" : "Japan",
|
|
"JB" : "Japan",
|
|
"JC" : "Japan",
|
|
"JD" : "Japan",
|
|
"JE" : "Japan",
|
|
"JF" : "Japan",
|
|
"JG" : "Japan",
|
|
"JH" : "Japan",
|
|
"JI" : "Japan",
|
|
"JJ" : "Japan",
|
|
"JK" : "Japan",
|
|
"JL" : "Japan",
|
|
"JM" : "Japan",
|
|
"JN" : "Japan",
|
|
"JO" : "Japan",
|
|
"JP" : "Japan",
|
|
"JQ" : "Japan",
|
|
"JR" : "Japan",
|
|
"JS" : "Japan",
|
|
"JT" : "Mongolia",
|
|
"JU" : "Mongolia",
|
|
"JV" : "Mongolia",
|
|
"JW" : "Norway",
|
|
"JX" : "Norway",
|
|
"JY" : "Jordan",
|
|
"JZ" : "Indonesia",
|
|
"K" : "United States",
|
|
"L2" : "Argentina",
|
|
"L3" : "Argentina",
|
|
"L4" : "Argentina",
|
|
"L5" : "Argentina",
|
|
"L6" : "Argentina",
|
|
"L7" : "Argentina",
|
|
"L8" : "Argentina",
|
|
"L9" : "Argentina",
|
|
"LA" : "Norway",
|
|
"LB" : "Norway",
|
|
"LC" : "Norway",
|
|
"LD" : "Norway",
|
|
"LE" : "Norway",
|
|
"LF" : "Norway",
|
|
"LG" : "Norway",
|
|
"LH" : "Norway",
|
|
"LI" : "Norway",
|
|
"LJ" : "Norway",
|
|
"LK" : "Norway",
|
|
"LL" : "Norway",
|
|
"LM" : "Norway",
|
|
"LN" : "Norway",
|
|
"LO" : "Argentina",
|
|
"LP" : "Argentina",
|
|
"LQ" : "Argentina",
|
|
"LR" : "Argentina",
|
|
"LS" : "Argentina",
|
|
"LT" : "Argentina",
|
|
"LU" : "Argentina",
|
|
"LV" : "Argentina",
|
|
"LW" : "Argentina",
|
|
"LX" : "Luxembourg",
|
|
"LY" : "Lithuania",
|
|
"LZ" : "Bulgaria",
|
|
"M" : "United Kingdom / overseas territories / dependencies",
|
|
"N" : "United States",
|
|
"O1" : "South Ossetia",
|
|
"OA" : "Peru",
|
|
"OB" : "Peru",
|
|
"OC" : "Peru",
|
|
"OD" : "Lebanon",
|
|
"OE" : "Austria",
|
|
"OF" : "Finland",
|
|
"OG" : "Finland",
|
|
"OH" : "Finland",
|
|
"OI" : "Finland",
|
|
"OJ" : "Finland",
|
|
"OK" : "Czech Republic",
|
|
"OL" : "Czech Republic",
|
|
"OM" : "Slovakia",
|
|
"ON" : "Belgium",
|
|
"OO" : "Belgium",
|
|
"OP" : "Belgium",
|
|
"OQ" : "Belgium",
|
|
"OR" : "Belgium",
|
|
"OS" : "Belgium",
|
|
"OT" : "Belgium",
|
|
"OU" : "Denmark",
|
|
"OV" : "Denmark",
|
|
"OW" : "Denmark",
|
|
"OX" : "Denmark",
|
|
"OY" : "Denmark",
|
|
"OZ" : "Denmark",
|
|
"P2" : "Papua New Guinea",
|
|
"P3" : "Cyprus",
|
|
"P4" : "Aruba",
|
|
"P5" : "North Korea",
|
|
"P6" : "North Korea",
|
|
"P7" : "North Korea",
|
|
"P8" : "North Korea",
|
|
"P9" : "North Korea",
|
|
"PA" : "Netherlands",
|
|
"PB" : "Netherlands",
|
|
"PC" : "Netherlands",
|
|
"PD" : "Netherlands",
|
|
"PE" : "Netherlands",
|
|
"PF" : "Netherlands",
|
|
"PG" : "Netherlands",
|
|
"PH" : "Netherlands",
|
|
"PI" : "Netherlands",
|
|
"PJ" : "Netherlands - former Netherlands Antilles",
|
|
"PK" : "Indonesia",
|
|
"PL" : "Indonesia",
|
|
"PM" : "Indonesia",
|
|
"PN" : "Indonesia",
|
|
"PO" : "Indonesia",
|
|
"PP" : "Brazil",
|
|
"PQ" : "Brazil",
|
|
"PR" : "Brazil",
|
|
"PS" : "Brazil",
|
|
"PT" : "Brazil",
|
|
"PU" : "Brazil",
|
|
"PV" : "Brazil",
|
|
"PW" : "Brazil",
|
|
"PX" : "Brazil",
|
|
"PY" : "Brazil",
|
|
"PZ" : "Suriname",
|
|
"RA6": "Chechnya",
|
|
"R" : "Russia",
|
|
"S0" : "Western Sahara",
|
|
"S2" : "Bangladesh",
|
|
"S3" : "Bangladesh",
|
|
"S5" : "Slovenia",
|
|
"S6" : "Singapore",
|
|
"S7" : "Seychelles",
|
|
"S8" : "South Africa",
|
|
"S9" : "São Tomé and Príncipe",
|
|
"SA" : "Sweden",
|
|
"SB" : "Sweden",
|
|
"SC" : "Sweden",
|
|
"SD" : "Sweden",
|
|
"SE" : "Sweden",
|
|
"SF" : "Sweden",
|
|
"SG" : "Sweden",
|
|
"SH" : "Sweden",
|
|
"SI" : "Sweden",
|
|
"SJ" : "Sweden",
|
|
"SK" : "Sweden",
|
|
"SL" : "Sweden",
|
|
"SM" : "Sweden",
|
|
"SN" : "Poland",
|
|
"SO" : "Poland",
|
|
"SP" : "Poland",
|
|
"SQ" : "Poland",
|
|
"SR" : "Poland",
|
|
"SSA": "Egypt",
|
|
"SSB": "Egypt",
|
|
"SSC": "Egypt",
|
|
"SSD": "Egypt",
|
|
"SSE": "Egypt",
|
|
"SSF": "Egypt",
|
|
"SSG": "Egypt",
|
|
"SSH": "Egypt",
|
|
"SSI": "Egypt",
|
|
"SSJ": "Egypt",
|
|
"SSK": "Egypt",
|
|
"SSL": "Egypt",
|
|
"SSM": "Egypt",
|
|
"SS" : "Sudan",
|
|
"ST" : "Sudan",
|
|
"SU" : "Egypt",
|
|
"SV" : "Greece",
|
|
"SW" : "Greece",
|
|
"SX" : "Greece",
|
|
"SY" : "Greece",
|
|
"SZ" : "Greece",
|
|
"T0" : "Principality of Seborga",
|
|
"T1" : "Transnistria",
|
|
"T2" : "Tuvalu",
|
|
"T3" : "Kiribati",
|
|
"T4" : "Cuba",
|
|
"T5" : "Somalia",
|
|
"T6" : "Afghanistan",
|
|
"T7" : "San Marino",
|
|
"T8" : "Palau",
|
|
"TA" : "Turkey",
|
|
"TB" : "Turkey",
|
|
"TC" : "Turkey",
|
|
"TD" : "Guatemala",
|
|
"TE" : "Costa Rica",
|
|
"TF" : "Iceland",
|
|
"TG" : "Guatemala",
|
|
"TH" : "France",
|
|
"TI" : "Costa Rica",
|
|
"TJ" : "Cameroon",
|
|
"TK" : "France",
|
|
"TL" : "Central African Republic",
|
|
"TM" : "France",
|
|
"TN" : "Congo",
|
|
"TO" : "France",
|
|
"TP" : "France",
|
|
"TQ" : "France",
|
|
"TR" : "Gabon",
|
|
"TS" : "Tunisia",
|
|
"TT" : "Chad",
|
|
"TU" : "Ivory Coast",
|
|
"TV" : "France",
|
|
"TW" : "France",
|
|
"TX" : "France",
|
|
"TY" : "Benin",
|
|
"TZ" : "Mali",
|
|
"UA" : "Russia",
|
|
"UB" : "Russia",
|
|
"UC" : "Russia",
|
|
"UD" : "Russia",
|
|
"UE" : "Russia",
|
|
"UF" : "Russia",
|
|
"UG" : "Russia",
|
|
"UH" : "Russia",
|
|
"UI" : "Russia",
|
|
"UJ" : "Uzbekistan",
|
|
"UK" : "Uzbekistan",
|
|
"UL" : "Uzbekistan",
|
|
"UM" : "Uzbekistan",
|
|
"UN" : "Kazakhstan",
|
|
"UO" : "Kazakhstan",
|
|
"UP" : "Kazakhstan",
|
|
"UQ" : "Kazakhstan",
|
|
"UR" : "Ukraine",
|
|
"US" : "Ukraine",
|
|
"UT" : "Ukraine",
|
|
"UU" : "Ukraine",
|
|
"UV" : "Ukraine",
|
|
"UW" : "Ukraine",
|
|
"UX" : "Ukraine",
|
|
"UY" : "Ukraine",
|
|
"UZ" : "Ukraine",
|
|
"V2" : "Antigua and Barbuda",
|
|
"V3" : "Belize",
|
|
"V4" : "Saint Kitts and Nevis",
|
|
"V5" : "Namibia",
|
|
"V6" : "Federated States of Micronesia",
|
|
"V7" : "Marshall Islands",
|
|
"V8" : "Brunei",
|
|
"VA" : "Canada",
|
|
"VB" : "Canada",
|
|
"VC" : "Canada",
|
|
"VD" : "Canada",
|
|
"VE" : "Canada",
|
|
"VF" : "Canada",
|
|
"VG" : "Canada",
|
|
"VH" : "Australia",
|
|
"VI" : "Australia",
|
|
"VJ" : "Australia",
|
|
"VK" : "Australia",
|
|
"VL" : "Australia",
|
|
"VM" : "Australia",
|
|
"VN" : "Australia",
|
|
"VO" : "Canada (Newfoundland)",
|
|
"VP" : "United Kingdom / overseas territories / dependencies",
|
|
"VQ" : "United Kingdom / overseas territories / dependencies",
|
|
"VR" : "Hong Kong",
|
|
"VS" : "United Kingdom",
|
|
"VT" : "India",
|
|
"VU" : "India",
|
|
"VV" : "India",
|
|
"VW" : "India",
|
|
"VX" : "Canada",
|
|
"VY" : "Canada",
|
|
"VZ" : "Australia",
|
|
"W" : "United States",
|
|
"XA" : "Mexico",
|
|
"XB" : "Mexico",
|
|
"XC" : "Mexico",
|
|
"XD" : "Mexico",
|
|
"XE" : "Mexico",
|
|
"XF" : "Mexico",
|
|
"XG" : "Mexico",
|
|
"XH" : "Mexico",
|
|
"XI" : "Mexico",
|
|
"XJ" : "Canada",
|
|
"XK" : "Canada",
|
|
"XL" : "Canada",
|
|
"XM" : "Canada",
|
|
"XN" : "Canada",
|
|
"XO" : "Canada",
|
|
"XP" : "Denmark",
|
|
"XQ" : "Chile",
|
|
"XR" : "Chile",
|
|
"XS" : "People's Republic of China",
|
|
"XT" : "Burkina Faso",
|
|
"XU" : "Cambodia",
|
|
"XV" : "Vietnam",
|
|
"XW" : "Laos",
|
|
"XX" : "Macao",
|
|
"XY" : "Burma",
|
|
"XZ" : "Burma",
|
|
"Y2" : "Germany",
|
|
"Y3" : "Germany",
|
|
"Y4" : "Germany",
|
|
"Y5" : "Germany",
|
|
"Y6" : "Germany",
|
|
"Y7" : "Germany",
|
|
"Y8" : "Germany",
|
|
"Y9" : "Germany",
|
|
"YA" : "Afghanistan",
|
|
"YB" : "Indonesia",
|
|
"YC" : "Indonesia",
|
|
"YD" : "Indonesia",
|
|
"YE" : "Indonesia",
|
|
"YF" : "Indonesia",
|
|
"YG" : "Indonesia",
|
|
"YH" : "Indonesia",
|
|
"YI" : "Iraq",
|
|
"YJ" : "Vanuatu",
|
|
"YK" : "Syria",
|
|
"YL" : "Latvia",
|
|
"YM" : "Turkey",
|
|
"YN" : "Nicaragua",
|
|
"YO" : "Romania",
|
|
"YP" : "Romania",
|
|
"YQ" : "Romania",
|
|
"YR" : "Romania",
|
|
"YS" : "El Salvador",
|
|
"YT" : "Serbia",
|
|
"YU" : "Serbia",
|
|
"YV" : "Venezuela",
|
|
"YW" : "Venezuela",
|
|
"YX" : "Venezuela",
|
|
"YY" : "Venezuela",
|
|
"Z2" : "Zimbabwe",
|
|
"Z3" : "Republic of Macedonia",
|
|
"Z6" : "Kosovo",
|
|
"Z8" : "South Sudan",
|
|
"ZA" : "Albania",
|
|
"ZB" : "United Kingdom / overseas territories / dependencies",
|
|
"ZC" : "United Kingdom / overseas territories / dependencies",
|
|
"ZD" : "United Kingdom / overseas territories / dependencies",
|
|
"ZE" : "United Kingdom / overseas territories / dependencies",
|
|
"ZF" : "United Kingdom / overseas territories / dependencies",
|
|
"ZG" : "United Kingdom / overseas territories / dependencies",
|
|
"ZH" : "United Kingdom / overseas territories / dependencies",
|
|
"ZI" : "United Kingdom / overseas territories / dependencies",
|
|
"ZJ" : "United Kingdom / overseas territories / dependencies",
|
|
"ZK" : "New Zealand",
|
|
"ZL" : "New Zealand",
|
|
"ZM" : "New Zealand",
|
|
"ZN" : "United Kingdom / overseas territories / dependencies",
|
|
"ZO" : "United Kingdom / overseas territories / dependencies",
|
|
"ZP" : "Paraguay",
|
|
"ZQ" : "United Kingdom / overseas territories / dependencies",
|
|
"ZR" : "South Africa",
|
|
"ZS" : "South Africa",
|
|
"ZT" : "South Africa",
|
|
"ZU" : "South Africa",
|
|
"ZV" : "Brazil",
|
|
"ZW" : "Brazil",
|
|
"ZX" : "Brazil",
|
|
"ZY" : "Brazil",
|
|
"ZZ" : "Brazil",
|
|
};
|