mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Moved airfields database to public/database folder
This commit is contained in:
parent
3055378b86
commit
e96cb2716d
@ -344,7 +344,7 @@ class DemoDataGenerator {
|
||||
airbases(req, res){
|
||||
var ret = {airbases: {
|
||||
["0"]: {
|
||||
callsign: "Neutral",
|
||||
callsign: "Nellis",
|
||||
latitude: 37.3,
|
||||
longitude: -115.8,
|
||||
coalition: "neutral"
|
||||
|
||||
@ -1,466 +1,466 @@
|
||||
{
|
||||
"airfields": {
|
||||
"Anapa-Vityazevo": {
|
||||
"ICAO": "URKA",
|
||||
"elevation": "141",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"22": {
|
||||
"magHeading": "214",
|
||||
"ILS": ""
|
||||
},
|
||||
"04": {
|
||||
"magHeading": "034",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "9000"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Batumi": {
|
||||
"ICAO": "UGSB",
|
||||
"elevation": "33",
|
||||
"TACAN": "16X",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"13": {
|
||||
"magHeading": "119",
|
||||
"ILS": ""
|
||||
},
|
||||
"31": {
|
||||
"magHeading": "299",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "7500"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Beslan": {
|
||||
"ICAO": "URMO",
|
||||
"elevation": "1722",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"10": {
|
||||
"magHeading": "086",
|
||||
"ILS": "110.50"
|
||||
},
|
||||
"28": {
|
||||
"magHeading": "266",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "9600"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Gelendzhik": {
|
||||
"ICAO": "URKG",
|
||||
"elevation": "72",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"19": {
|
||||
"magHeading": "212",
|
||||
"ILS": ""
|
||||
},
|
||||
"01": {
|
||||
"magHeading": "032",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "5400"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Gudauta": {
|
||||
"ICAO": "UG23",
|
||||
"elevation": "69",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"15": {
|
||||
"magHeading": "144",
|
||||
"ILS": ""
|
||||
},
|
||||
"33": {
|
||||
"magHeading": "324",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "7700"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Kobuleti": {
|
||||
"ICAO": "UG5X",
|
||||
"elevation": "69",
|
||||
"TACAN": "67X",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"25": {
|
||||
"magHeading": "243",
|
||||
"ILS": ""
|
||||
},
|
||||
"07": {
|
||||
"magHeading": "063",
|
||||
"ILS": "111.50"
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "7400"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Krasnodar-Center": {
|
||||
"ICAO": "URKL",
|
||||
"elevation": "98",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"27": {
|
||||
"magHeading": "259",
|
||||
"ILS": ""
|
||||
},
|
||||
"09": {
|
||||
"magHeading": "079",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "7700"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Krasnodar-Pashkovsky": {
|
||||
"ICAO": "URKK",
|
||||
"elevation": "112",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"23": {
|
||||
"magHeading": "219",
|
||||
"ILS": ""
|
||||
},
|
||||
"05": {
|
||||
"magHeading": "039",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "9600"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Krymsk": {
|
||||
"ICAO": "URKW",
|
||||
"elevation": "66",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"22": {
|
||||
"magHeading": "212",
|
||||
"ILS": ""
|
||||
},
|
||||
"04": {
|
||||
"magHeading": "032",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "8000"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Kutaisi": {
|
||||
"ICAO": "UGKO",
|
||||
"elevation": "148",
|
||||
"TACAN": "44X",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"25": {
|
||||
"magHeading": "247",
|
||||
"ILS": ""
|
||||
},
|
||||
"07": {
|
||||
"magHeading": "067'",
|
||||
"ILS": "109.75"
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "7700"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Maykop-Khanskaya": {
|
||||
"ICAO": "URKH",
|
||||
"elevation": "591",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"22": {
|
||||
"magHeading": "211",
|
||||
"ILS": ""
|
||||
},
|
||||
"04": {
|
||||
"magHeading": "031",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "10100"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Mineralnye Vody": {
|
||||
"ICAO": "URMM",
|
||||
"elevation": "1050",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"12": {
|
||||
"magHeading": "108",
|
||||
"ILS": "111.70"
|
||||
},
|
||||
"30": {
|
||||
"magHeading": "288",
|
||||
"ILS": "109.30"
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "12700"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Mozdok": {
|
||||
"ICAO": "XRMF",
|
||||
"elevation": "507",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"26": {
|
||||
"magHeading": "255",
|
||||
"ILS": ""
|
||||
},
|
||||
"08": {
|
||||
"magHeading": "075",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "9400"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Nalchik": {
|
||||
"ICAO": "URMN",
|
||||
"elevation": "1411",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"24": {
|
||||
"magHeading": "228",
|
||||
"ILS": "110.50"
|
||||
},
|
||||
"06": {
|
||||
"magHeading": "048'",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "7000"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Novorossiysk": {
|
||||
"ICAO": "URKN",
|
||||
"elevation": "131",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"22": {
|
||||
"magHeading": "214",
|
||||
"ILS": ""
|
||||
},
|
||||
"04": {
|
||||
"magHeading": "034",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "5400"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Senaki-Kolkhi": {
|
||||
"ICAO": "UGKS",
|
||||
"elevation": "43",
|
||||
"TACAN": "31X",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"27": {
|
||||
"magHeading": "268",
|
||||
"ILS": ""
|
||||
},
|
||||
"09": {
|
||||
"magHeading": "088'",
|
||||
"ILS": "108.90"
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "7400"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Sochi-Adler": {
|
||||
"ICAO": "URSS",
|
||||
"elevation": "98",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"27": {
|
||||
"magHeading": "235",
|
||||
"ILS": ""
|
||||
},
|
||||
"06": {
|
||||
"magHeading": "055",
|
||||
"ILS": "111.10"
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "9700"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Tbilisi-Lochini": {
|
||||
"ICAO": "UGTB",
|
||||
"elevation": "1574",
|
||||
"TACAN": "25X",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"13": {
|
||||
"magHeading": "121",
|
||||
"ILS": "110.30"
|
||||
},
|
||||
"31": {
|
||||
"magHeading": "301",
|
||||
"ILS": "108.90"
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "9300"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Soganlug": {
|
||||
"ICAO": "UG24",
|
||||
"elevation": "1500",
|
||||
"TACAN": "25X",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"14": {
|
||||
"magHeading": "125",
|
||||
"ILS": ""
|
||||
},
|
||||
"32": {
|
||||
"magHeading": "305",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "6500"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Sukhumi-Babushara": {
|
||||
"ICAO": "UGSS",
|
||||
"elevation": "43",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"12": {
|
||||
"magHeading": "109",
|
||||
"ILS": ""
|
||||
},
|
||||
"30": {
|
||||
"magHeading": "289",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "11400"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Vaziani": {
|
||||
"ICAO": "UG27",
|
||||
"elevation": "1524",
|
||||
"TACAN": "22X",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"13": {
|
||||
"magHeading": "129",
|
||||
"ILS": "108.75"
|
||||
},
|
||||
"31": {
|
||||
"magHeading": "309",
|
||||
"ILS": "108.75"
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "7700"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
"airfields": {
|
||||
"Anapa-Vityazevo": {
|
||||
"ICAO": "URKA",
|
||||
"elevation": "141",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"22": {
|
||||
"magHeading": "214",
|
||||
"ILS": ""
|
||||
},
|
||||
"04": {
|
||||
"magHeading": "034",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "9000"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Batumi": {
|
||||
"ICAO": "UGSB",
|
||||
"elevation": "33",
|
||||
"TACAN": "16X",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"13": {
|
||||
"magHeading": "119",
|
||||
"ILS": ""
|
||||
},
|
||||
"31": {
|
||||
"magHeading": "299",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "7500"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Beslan": {
|
||||
"ICAO": "URMO",
|
||||
"elevation": "1722",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"10": {
|
||||
"magHeading": "086",
|
||||
"ILS": "110.50"
|
||||
},
|
||||
"28": {
|
||||
"magHeading": "266",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "9600"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Gelendzhik": {
|
||||
"ICAO": "URKG",
|
||||
"elevation": "72",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"19": {
|
||||
"magHeading": "212",
|
||||
"ILS": ""
|
||||
},
|
||||
"01": {
|
||||
"magHeading": "032",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "5400"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Gudauta": {
|
||||
"ICAO": "UG23",
|
||||
"elevation": "69",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"15": {
|
||||
"magHeading": "144",
|
||||
"ILS": ""
|
||||
},
|
||||
"33": {
|
||||
"magHeading": "324",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "7700"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Kobuleti": {
|
||||
"ICAO": "UG5X",
|
||||
"elevation": "69",
|
||||
"TACAN": "67X",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"25": {
|
||||
"magHeading": "243",
|
||||
"ILS": ""
|
||||
},
|
||||
"07": {
|
||||
"magHeading": "063",
|
||||
"ILS": "111.50"
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "7400"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Krasnodar-Center": {
|
||||
"ICAO": "URKL",
|
||||
"elevation": "98",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"27": {
|
||||
"magHeading": "259",
|
||||
"ILS": ""
|
||||
},
|
||||
"09": {
|
||||
"magHeading": "079",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "7700"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Krasnodar-Pashkovsky": {
|
||||
"ICAO": "URKK",
|
||||
"elevation": "112",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"23": {
|
||||
"magHeading": "219",
|
||||
"ILS": ""
|
||||
},
|
||||
"05": {
|
||||
"magHeading": "039",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "9600"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Krymsk": {
|
||||
"ICAO": "URKW",
|
||||
"elevation": "66",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"22": {
|
||||
"magHeading": "212",
|
||||
"ILS": ""
|
||||
},
|
||||
"04": {
|
||||
"magHeading": "032",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "8000"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Kutaisi": {
|
||||
"ICAO": "UGKO",
|
||||
"elevation": "148",
|
||||
"TACAN": "44X",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"25": {
|
||||
"magHeading": "247",
|
||||
"ILS": ""
|
||||
},
|
||||
"07": {
|
||||
"magHeading": "067'",
|
||||
"ILS": "109.75"
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "7700"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Maykop-Khanskaya": {
|
||||
"ICAO": "URKH",
|
||||
"elevation": "591",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"22": {
|
||||
"magHeading": "211",
|
||||
"ILS": ""
|
||||
},
|
||||
"04": {
|
||||
"magHeading": "031",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "10100"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Mineralnye Vody": {
|
||||
"ICAO": "URMM",
|
||||
"elevation": "1050",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"12": {
|
||||
"magHeading": "108",
|
||||
"ILS": "111.70"
|
||||
},
|
||||
"30": {
|
||||
"magHeading": "288",
|
||||
"ILS": "109.30"
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "12700"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Mozdok": {
|
||||
"ICAO": "XRMF",
|
||||
"elevation": "507",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"26": {
|
||||
"magHeading": "255",
|
||||
"ILS": ""
|
||||
},
|
||||
"08": {
|
||||
"magHeading": "075",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "9400"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Nalchik": {
|
||||
"ICAO": "URMN",
|
||||
"elevation": "1411",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"24": {
|
||||
"magHeading": "228",
|
||||
"ILS": "110.50"
|
||||
},
|
||||
"06": {
|
||||
"magHeading": "048'",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "7000"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Novorossiysk": {
|
||||
"ICAO": "URKN",
|
||||
"elevation": "131",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"22": {
|
||||
"magHeading": "214",
|
||||
"ILS": ""
|
||||
},
|
||||
"04": {
|
||||
"magHeading": "034",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "5400"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Senaki-Kolkhi": {
|
||||
"ICAO": "UGKS",
|
||||
"elevation": "43",
|
||||
"TACAN": "31X",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"27": {
|
||||
"magHeading": "268",
|
||||
"ILS": ""
|
||||
},
|
||||
"09": {
|
||||
"magHeading": "088'",
|
||||
"ILS": "108.90"
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "7400"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Sochi-Adler": {
|
||||
"ICAO": "URSS",
|
||||
"elevation": "98",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"27": {
|
||||
"magHeading": "235",
|
||||
"ILS": ""
|
||||
},
|
||||
"06": {
|
||||
"magHeading": "055",
|
||||
"ILS": "111.10"
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "9700"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Tbilisi-Lochini": {
|
||||
"ICAO": "UGTB",
|
||||
"elevation": "1574",
|
||||
"TACAN": "25X",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"13": {
|
||||
"magHeading": "121",
|
||||
"ILS": "110.30"
|
||||
},
|
||||
"31": {
|
||||
"magHeading": "301",
|
||||
"ILS": "108.90"
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "9300"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Soganlug": {
|
||||
"ICAO": "UG24",
|
||||
"elevation": "1500",
|
||||
"TACAN": "25X",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"14": {
|
||||
"magHeading": "125",
|
||||
"ILS": ""
|
||||
},
|
||||
"32": {
|
||||
"magHeading": "305",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "6500"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Sukhumi-Babushara": {
|
||||
"ICAO": "UGSS",
|
||||
"elevation": "43",
|
||||
"TACAN": "",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"12": {
|
||||
"magHeading": "109",
|
||||
"ILS": ""
|
||||
},
|
||||
"30": {
|
||||
"magHeading": "289",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "11400"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Vaziani": {
|
||||
"ICAO": "UG27",
|
||||
"elevation": "1524",
|
||||
"TACAN": "22X",
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"13": {
|
||||
"magHeading": "129",
|
||||
"ILS": "108.75"
|
||||
},
|
||||
"31": {
|
||||
"magHeading": "309",
|
||||
"ILS": "108.75"
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "7700"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1074,10 +1074,6 @@ dl.ol-data-grid {
|
||||
row-gap: 4px;
|
||||
}
|
||||
|
||||
dl.ol-data-grid dd {
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
dl.ol-data-grid dt.icon {
|
||||
text-indent: 10px;
|
||||
}
|
||||
|
||||
@ -148,7 +148,7 @@
|
||||
}
|
||||
|
||||
#aircaft-loadout-list,
|
||||
#helicopter-loadout-list {
|
||||
#helicopter-loadout-list {
|
||||
align-content: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@ -156,7 +156,7 @@
|
||||
}
|
||||
|
||||
#aircraft-unit-image,
|
||||
#helicopter-unit-image {
|
||||
#helicopter-unit-image {
|
||||
filter: invert(100%);
|
||||
height: 100px;
|
||||
margin-bottom: 10px;
|
||||
@ -210,10 +210,10 @@
|
||||
}
|
||||
|
||||
.ol-context-menu .ol-slider-value {
|
||||
color: var(--accent-light-blue);
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: var(--accent-light-blue);
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.ol-context-menu .ol-slider-container {
|
||||
@ -449,36 +449,41 @@
|
||||
}
|
||||
|
||||
/* Airbase context menu */
|
||||
#airbase-contextmenu #airbase-runways {
|
||||
display:flex;
|
||||
flex-direction: column;
|
||||
row-gap:4px;
|
||||
#airbase-chart-data dd {
|
||||
width: 60%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#airbase-contextmenu #airbase-runways > .runway {
|
||||
border:1px solid #ccc;
|
||||
display:flex;
|
||||
#airbase-runways {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
row-gap: 4px;
|
||||
}
|
||||
|
||||
#airbase-runways>.runway {
|
||||
border: 1px solid #ccc;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
#airbase-contextmenu #airbase-runways > .runway abbr {
|
||||
cursor:help;
|
||||
#airbase-runways>.runway abbr {
|
||||
cursor: help;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#airbase-contextmenu #airbase-runways > .runway > .heading {
|
||||
#airbase-runways>.runway>.heading {
|
||||
align-items: center;
|
||||
column-gap: 4px;
|
||||
display:flex;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
#airbase-contextmenu #airbase-runways > .runway > .heading > abbr {
|
||||
font-weight: var( --font-weight-bolder );
|
||||
padding:4px;
|
||||
#airbase-runways>.runway>.heading>abbr {
|
||||
font-weight: var(--font-weight-bolder);
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
#airbase-contextmenu #airbase-runways > .runway > .heading:last-of-type {
|
||||
#airbase-runways>.runway>.heading:last-of-type {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
@ -15,68 +15,46 @@ const allowedTheatres = [
|
||||
"syria"
|
||||
];
|
||||
|
||||
|
||||
function getAirbasesData( theatreName ) {
|
||||
|
||||
if ( !isValidTheatre( theatreName ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return JSON.parse( fs.readFileSync( `src/airfields/${theatreName}.json` ) ).airfields
|
||||
|
||||
return JSON.parse( fs.readFileSync( `public/databases/airbases/${theatreName}.json` ) ).airfields
|
||||
}
|
||||
|
||||
|
||||
function isValidTheatre( theatre ) {
|
||||
|
||||
return ( allowedTheatres.indexOf( theatre ) > -1 )
|
||||
|
||||
}
|
||||
|
||||
|
||||
function sendInvalidTheatre( res ) {
|
||||
|
||||
res.status( 400 ).send( "Missing/invalid theatre name; must be one of:\n\t" + allowedTheatres.join( "\n\t" ) );
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************************************************/
|
||||
// Endpoints
|
||||
/**************************************************************************************************************/
|
||||
|
||||
|
||||
|
||||
app.get( "/", ( req, res ) => {
|
||||
|
||||
sendInvalidTheatre( res );
|
||||
|
||||
});
|
||||
|
||||
|
||||
app.get( "/:theatreName/:airbaseName", ( req, res ) => {
|
||||
|
||||
const airbases = getAirbasesData( req.params.theatreName );
|
||||
|
||||
if ( !airbases ) {
|
||||
sendInvalidTheatre( res );
|
||||
return;
|
||||
}
|
||||
|
||||
const airbaseName = req.params.airbaseName;
|
||||
|
||||
if ( !airbases.hasOwnProperty( airbaseName ) ) {
|
||||
res.status( 404 ).send( `Unknown airbase name "${airbaseName}". Available options are:\n\t` + Object.keys( airbases ).join( "\n\t" ) );
|
||||
} else {
|
||||
res.status( 200 ).json( airbases[ airbaseName ] );
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
app.get( "/:theatreName", ( req, res ) => {
|
||||
|
||||
const theatreName = req.params.theatreName.toLowerCase().replace( /\s*/g, "" );
|
||||
const airbases = getAirbasesData( theatreName );
|
||||
|
||||
@ -86,9 +64,6 @@ app.get( "/:theatreName", ( req, res ) => {
|
||||
}
|
||||
|
||||
res.status( 200 ).json( airbases );
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
module.exports = app;
|
||||
6
client/src/@types/unit.d.ts
vendored
6
client/src/@types/unit.d.ts
vendored
@ -9,7 +9,7 @@ interface ObjectIconOptions {
|
||||
showFuel: boolean,
|
||||
showAmmo: boolean,
|
||||
showSummary: boolean,
|
||||
showCallsign: boolean,
|
||||
showCallsign: boolean,
|
||||
rotateToHeading: boolean
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ interface Contact {
|
||||
}
|
||||
|
||||
interface Offset {
|
||||
x: number,
|
||||
y: number,
|
||||
x: number,
|
||||
y: number,
|
||||
z: number
|
||||
}
|
||||
@ -2,8 +2,7 @@ import { DivIcon } from 'leaflet';
|
||||
import { CustomMarker } from '../map/custommarker';
|
||||
import { SVGInjector } from '@tanem/svg-injector';
|
||||
|
||||
export interface AirbaseOptions
|
||||
{
|
||||
export interface AirbaseOptions {
|
||||
name: string,
|
||||
position: L.LatLng
|
||||
}
|
||||
@ -28,8 +27,7 @@ export interface AirbaseChartRunwayHeadingData {
|
||||
}
|
||||
}
|
||||
|
||||
export class Airbase extends CustomMarker
|
||||
{
|
||||
export class Airbase extends CustomMarker {
|
||||
#name: string = "";
|
||||
#chartData: AirbaseChartData = {
|
||||
elevation: "",
|
||||
@ -38,12 +36,11 @@ export class Airbase extends CustomMarker
|
||||
runways: []
|
||||
};
|
||||
#coalition: string = "";
|
||||
#hasChartDataBeenSet:boolean = false;
|
||||
#hasChartDataBeenSet: boolean = false;
|
||||
#properties: string[] = [];
|
||||
#parkings: string[] = [];
|
||||
|
||||
constructor(options: AirbaseOptions)
|
||||
{
|
||||
constructor(options: AirbaseOptions) {
|
||||
super(options.position, { riseOnHover: true });
|
||||
|
||||
this.#name = options.name;
|
||||
@ -54,12 +51,12 @@ export class Airbase extends CustomMarker
|
||||
}
|
||||
|
||||
createIcon() {
|
||||
var icon = new DivIcon({
|
||||
var icon = new DivIcon({
|
||||
className: 'leaflet-airbase-marker',
|
||||
iconSize: [40, 40],
|
||||
iconAnchor: [20, 20]
|
||||
}); // Set the marker, className must be set to avoid white square
|
||||
this.setIcon(icon);
|
||||
}); // Set the marker, className must be set to avoid white square
|
||||
this.setIcon(icon);
|
||||
|
||||
var el = document.createElement("div");
|
||||
el.classList.add("airbase-icon");
|
||||
@ -72,55 +69,45 @@ export class Airbase extends CustomMarker
|
||||
el.dataset.coalition = this.#coalition;
|
||||
}
|
||||
|
||||
setCoalition(coalition: string)
|
||||
{
|
||||
setCoalition(coalition: string) {
|
||||
this.#coalition = coalition;
|
||||
(<HTMLElement> this.getElement()?.querySelector(".airbase-icon")).dataset.coalition = this.#coalition;
|
||||
(<HTMLElement>this.getElement()?.querySelector(".airbase-icon")).dataset.coalition = this.#coalition;
|
||||
}
|
||||
|
||||
getChartData()
|
||||
{
|
||||
getChartData() {
|
||||
return this.#chartData;
|
||||
}
|
||||
|
||||
getCoalition()
|
||||
{
|
||||
getCoalition() {
|
||||
return this.#coalition;
|
||||
}
|
||||
|
||||
setName(name: string)
|
||||
{
|
||||
setName(name: string) {
|
||||
this.#name = name;
|
||||
}
|
||||
|
||||
getName()
|
||||
{
|
||||
getName() {
|
||||
return this.#name;
|
||||
}
|
||||
|
||||
setChartData( chartData:AirbaseChartData )
|
||||
{
|
||||
setChartData(chartData: AirbaseChartData) {
|
||||
this.#hasChartDataBeenSet = true;
|
||||
this.#chartData = chartData;
|
||||
this.#chartData = chartData;
|
||||
}
|
||||
|
||||
setProperties(properties: string[])
|
||||
{
|
||||
setProperties(properties: string[]) {
|
||||
this.#properties = properties;
|
||||
}
|
||||
|
||||
getProperties()
|
||||
{
|
||||
getProperties() {
|
||||
return this.#properties;
|
||||
}
|
||||
|
||||
setParkings(parkings: string[])
|
||||
{
|
||||
setParkings(parkings: string[]) {
|
||||
this.#parkings = parkings;
|
||||
}
|
||||
|
||||
getParkings()
|
||||
{
|
||||
getParkings() {
|
||||
return this.#parkings;
|
||||
}
|
||||
}
|
||||
@ -49,17 +49,18 @@ export class MissionHandler {
|
||||
updateAirbases(data: AirbasesData) {
|
||||
for (let idx in data.airbases) {
|
||||
var airbase = data.airbases[idx]
|
||||
if (this.#airbases[idx] === undefined && airbase.callsign != '') {
|
||||
this.#airbases[idx] = new Airbase({
|
||||
if (this.#airbases[airbase.callsign] === undefined && airbase.callsign != '') {
|
||||
this.#airbases[airbase.callsign] = new Airbase({
|
||||
position: new LatLng(airbase.latitude, airbase.longitude),
|
||||
name: airbase.callsign
|
||||
}).addTo(getMap());
|
||||
this.#airbases[idx].on('contextmenu', (e) => this.#onAirbaseClick(e));
|
||||
this.#airbases[airbase.callsign].on('contextmenu', (e) => this.#onAirbaseClick(e));
|
||||
this.#loadAirbaseChartData(airbase.callsign);
|
||||
}
|
||||
|
||||
if (this.#airbases[idx] != undefined && airbase.latitude && airbase.longitude && airbase.coalition) {
|
||||
this.#airbases[idx].setLatLng(new LatLng(airbase.latitude, airbase.longitude));
|
||||
this.#airbases[idx].setCoalition(airbase.coalition);
|
||||
if (this.#airbases[airbase.callsign] != undefined && airbase.latitude && airbase.longitude && airbase.coalition) {
|
||||
this.#airbases[airbase.callsign].setLatLng(new LatLng(airbase.latitude, airbase.longitude));
|
||||
this.#airbases[airbase.callsign].setCoalition(airbase.coalition);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -72,8 +73,6 @@ export class MissionHandler {
|
||||
this.#theatre = data.mission.theatre;
|
||||
getMap().setTheatre(this.#theatre);
|
||||
getInfoPopup().setText("Map set to " + this.#theatre);
|
||||
|
||||
this.#loadAirbaseChartData();
|
||||
}
|
||||
|
||||
/* Set the date and time data */
|
||||
@ -235,32 +234,23 @@ export class MissionHandler {
|
||||
getMap().showAirbaseContextMenu(e.originalEvent.x, e.originalEvent.y, e.latlng, e.sourceTarget);
|
||||
}
|
||||
|
||||
#loadAirbaseChartData() {
|
||||
#loadAirbaseChartData(callsign: string) {
|
||||
if ( !this.#theatre ) {
|
||||
return;
|
||||
}
|
||||
|
||||
fetch( '/api/airbases/' + this.#theatre , {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Accept': '*/*',
|
||||
'Content-Type': 'application/json'
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', `api/airbases/${this.#theatre.toLowerCase()}/${callsign}`, true);
|
||||
xhr.responseType = 'json';
|
||||
xhr.onload = () => {
|
||||
var status = xhr.status;
|
||||
if (status === 200) {
|
||||
const data = xhr.response;
|
||||
this.getAirbases()[callsign].setChartData(data);
|
||||
} else {
|
||||
console.error(`Error retrieving data for ${callsign} airbase`)
|
||||
}
|
||||
})
|
||||
.then( response => response.json() )
|
||||
.then( data => {
|
||||
|
||||
for ( const [ id, airbase ] of Object.entries( this.#airbases ) ) {
|
||||
|
||||
let airbaseName = airbase.getName();
|
||||
|
||||
if ( data.hasOwnProperty( airbaseName ) ) {
|
||||
airbase.setChartData( data[ airbaseName ] );
|
||||
} else {
|
||||
console.error( `Airbase "${airbaseName}" not found in chart data.` );
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
xhr.send();
|
||||
}
|
||||
}
|
||||
@ -4,7 +4,7 @@ import { UnitDatabase } from "./unitdatabase"
|
||||
|
||||
export class AircraftDatabase extends UnitDatabase {
|
||||
constructor() {
|
||||
super('databases/aircraftdatabase.json');
|
||||
super('databases/units/aircraftdatabase.json');
|
||||
}
|
||||
|
||||
getCategory() {
|
||||
|
||||
@ -4,7 +4,7 @@ import { UnitDatabase } from "./unitdatabase"
|
||||
|
||||
export class GroundUnitDatabase extends UnitDatabase {
|
||||
constructor() {
|
||||
super('databases/groundunitdatabase.json');
|
||||
super('databases/units/groundunitdatabase.json');
|
||||
}
|
||||
|
||||
getSpawnPointsByName(name: string) {
|
||||
|
||||
@ -4,7 +4,7 @@ import { UnitDatabase } from "./unitdatabase"
|
||||
|
||||
export class HelicopterDatabase extends UnitDatabase {
|
||||
constructor() {
|
||||
super('databases/helicopterdatabase.json');
|
||||
super('databases/units/helicopterdatabase.json');
|
||||
}
|
||||
|
||||
getSpawnPointsByName(name: string) {
|
||||
|
||||
@ -4,7 +4,7 @@ import { UnitDatabase } from "./unitdatabase"
|
||||
|
||||
export class NavyUnitDatabase extends UnitDatabase {
|
||||
constructor() {
|
||||
super('databases/navyunitdatabase.json');
|
||||
super('databases/units/navyunitdatabase.json');
|
||||
}
|
||||
|
||||
getSpawnPointsByName(name: string) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user