Moved code from broken branch.

This commit is contained in:
PeekabooSteam 2023-08-13 15:34:59 +01:00
parent 14552913a3
commit 6da84dd7b0
12 changed files with 3351 additions and 2054 deletions

View File

@ -1075,7 +1075,7 @@ dl.ol-data-grid {
}
dl.ol-data-grid dd {
width: fit-content;
width: 60%;
}
dl.ol-data-grid dt.icon {

View File

@ -264,6 +264,9 @@
width: 16px;
}
/* Buttons */
#center-map::before {
content: url("/resources/theme/images/icons/arrows-to-eye-solid.svg");
}
@ -443,4 +446,41 @@
margin-top: 5px;
text-align: center;
width: 100%;
}
/* Airbase context menu */
#airbase-contextmenu #airbase-runways {
display:flex;
flex-direction: column;
row-gap:4px;
}
#airbase-contextmenu #airbase-runways > .runway {
border:1px solid #ccc;
display:flex;
flex-direction: row;
justify-content: space-between;
}
#airbase-contextmenu #airbase-runways > .runway abbr {
cursor:help;
text-decoration: none;
}
#airbase-contextmenu #airbase-runways > .runway > .heading {
align-items: center;
column-gap: 4px;
display:flex;
flex-direction: row;
}
#airbase-contextmenu #airbase-runways > .runway > .heading > abbr {
font-weight: var( --font-weight-bolder );
padding:4px;
}
#airbase-contextmenu #airbase-runways > .runway > .heading:last-of-type {
flex-direction: row-reverse;
}

View File

@ -77,7 +77,8 @@ app.get( "/:theatreName/:airbaseName", ( req, res ) => {
app.get( "/:theatreName", ( req, res ) => {
const airbases = getAirbasesData( req.params.theatreName );
const theatreName = req.params.theatreName.toLowerCase().replace( /\s*/g, "" );
const airbases = getAirbasesData( theatreName );
if ( !airbases ) {
sendInvalidTheatre( res );

View File

@ -1,361 +1,466 @@
{
"airfields": {
"airfields": {
"Anapa-Vityazevo": {
"ICAO": "URKA",
"Elevation": "141",
"elevation": "141",
"TACAN": "",
"Runways:": {
"04": {
"Mag Hdg": "034",
"Length": "9000",
"ILS": ""
},
"22": {
"Mag Hdg": "214",
"Length": "9000",
"ILS": ""
"runways": [
{
"headings": [
{
"22": {
"magHeading": "214",
"ILS": ""
},
"04": {
"magHeading": "034",
"ILS": ""
}
}
],
"length": "9000"
}
}
]
},
"Batumi": {
"ICAO": "UGSB",
"Elevation": "33",
"elevation": "33",
"TACAN": "16X",
"Runways": {
"13": {
"Mag Hdg": "119",
"Length": "7500",
"ILS": ""
},
"31": {
"Mag Hdg": "299",
"Length": "7500",
"ILS": ""
"runways": [
{
"headings": [
{
"13": {
"magHeading": "119",
"ILS": ""
},
"31": {
"magHeading": "299",
"ILS": ""
}
}
],
"length": "7500"
}
}
]
},
"Beslan": {
"ICAO": "URMO",
"Elevation": "1722",
"elevation": "1722",
"TACAN": "",
"Runways": {
"10": {
"Mag Hdg": "086",
"Length": "9600",
"ILS": "110.50"
},
"28": {
"Mag Hdg": "266",
"Length": "9600",
"ILS": ""
"runways": [
{
"headings": [
{
"10": {
"magHeading": "086",
"ILS": "110.50"
},
"28": {
"magHeading": "266",
"ILS": ""
}
}
],
"length": "9600"
}
}
]
},
"Gelendzhik": {
"ICAO": "URKG",
"Elevation": "72",
"elevation": "72",
"TACAN": "",
"Runways": {
"01": {
"Mag Hdg": "032",
"Length": "5400",
"ILS": ""
},
"19": {
"Mag Hdg": "212",
"Length": "5400",
"ILS": ""
"runways": [
{
"headings": [
{
"19": {
"magHeading": "212",
"ILS": ""
},
"01": {
"magHeading": "032",
"ILS": ""
}
}
],
"length": "5400"
}
}
]
},
"Gudauta": {
"ICAO": "UG23",
"Elevation": "69",
"elevation": "69",
"TACAN": "",
"Runways": {
"15": {
"Mag Hdg": "144",
"Length": "7700",
"ILS": ""
},
"33": {
"Mag Hdg": "324",
"Length": "7700",
"ILS": ""
"runways": [
{
"headings": [
{
"15": {
"magHeading": "144",
"ILS": ""
},
"33": {
"magHeading": "324",
"ILS": ""
}
}
],
"length": "7700"
}
}
]
},
"Kobuleti": {
"ICAO": "UG5X",
"Elevation": "69",
"elevation": "69",
"TACAN": "67X",
"Runways": {
"07": {
"Mag Hdg": "063",
"Length": "7400",
"ILS": "111.50"
},
"25": {
"Mag Hdg": "243",
"Length": "7400",
"ILS": ""
"runways": [
{
"headings": [
{
"25": {
"magHeading": "243",
"ILS": ""
},
"07": {
"magHeading": "063",
"ILS": "111.50"
}
}
],
"length": "7400"
}
}
]
},
"Krasnodar-Center": {
"ICAO": "URKL",
"Elevation": "98",
"elevation": "98",
"TACAN": "",
"Runways": {
"09": {
"Mag Hdg": "079",
"Length": "7700",
"ILS": ""
},
"27": {
"Mag Hdg": "259",
"Length": "7700",
"ILS": ""
"runways": [
{
"headings": [
{
"27": {
"magHeading": "259",
"ILS": ""
},
"09": {
"magHeading": "079",
"ILS": ""
}
}
],
"length": "7700"
}
}
]
},
"Krasnodar-Pashkovsky": {
"ICAO": "URKK",
"Elevation": "112",
"elevation": "112",
"TACAN": "",
"Runways": {
"05": {
"Mag Hdg": "039",
"Length": "9600",
"ILS": ""
},
"23": {
"Mag Hdg": "219",
"Length": "9600",
"ILS": ""
"runways": [
{
"headings": [
{
"23": {
"magHeading": "219",
"ILS": ""
},
"05": {
"magHeading": "039",
"ILS": ""
}
}
],
"length": "9600"
}
}
]
},
"Krymsk": {
"ICAO": "URKW",
"Elevation": "66",
"elevation": "66",
"TACAN": "",
"Runways": {
"04": {
"Mag Hdg": "032",
"Length": "8000",
"ILS": ""
},
"22": {
"Mag Hdg": "212",
"Length": "8000",
"ILS": ""
"runways": [
{
"headings": [
{
"22": {
"magHeading": "212",
"ILS": ""
},
"04": {
"magHeading": "032",
"ILS": ""
}
}
],
"length": "8000"
}
}
]
},
"Kutaisi": {
"ICAO": "UGKO",
"Elevation": "148",
"elevation": "148",
"TACAN": "44X",
"Runways": {
"07": {
"Mag Hdg": "067'",
"Length": "7700",
"ILS": "109.75"
},
"25": {
"Mag Hdg": "247",
"Length": "7700",
"ILS": ""
"runways": [
{
"headings": [
{
"25": {
"magHeading": "247",
"ILS": ""
},
"07": {
"magHeading": "067'",
"ILS": "109.75"
}
}
],
"length": "7700"
}
}
]
},
"Maykop-Khanskaya": {
"ICAO": "URKH",
"Elevation": "591",
"elevation": "591",
"TACAN": "",
"Runways": {
"04": {
"Mag Hdg": "031",
"Length": "10100",
"ILS": ""
},
"22": {
"Mag Hdg": "211",
"Length": "10100",
"ILS": ""
"runways": [
{
"headings": [
{
"22": {
"magHeading": "211",
"ILS": ""
},
"04": {
"magHeading": "031",
"ILS": ""
}
}
],
"length": "10100"
}
}
]
},
"Mineralnye Vody": {
"ICAO": "URMM",
"Elevation": "1050",
"elevation": "1050",
"TACAN": "",
"Runways": {
"12": {
"Mag Hdg": "108",
"Length": "12700",
"ILS": "111.70"
},
"30": {
"Mag Hdg": "288",
"Length": "12700",
"ILS": "109.30"
"runways": [
{
"headings": [
{
"12": {
"magHeading": "108",
"ILS": "111.70"
},
"30": {
"magHeading": "288",
"ILS": "109.30"
}
}
],
"length": "12700"
}
}
]
},
"Mozdok": {
"ICAO": "XRMF",
"Elevation": "507",
"elevation": "507",
"TACAN": "",
"Runways": {
"08": {
"Mag Hdg": "075",
"Length": "9400",
"ILS": ""
},
"26": {
"Mag Hdg": "255",
"Length": "9400",
"ILS": ""
"runways": [
{
"headings": [
{
"26": {
"magHeading": "255",
"ILS": ""
},
"08": {
"magHeading": "075",
"ILS": ""
}
}
],
"length": "9400"
}
}
]
},
"Nalchick": {
"Nalchik": {
"ICAO": "URMN",
"Elevation": "1411",
"elevation": "1411",
"TACAN": "",
"Runways": {
"06": {
"Mag Hdg": "048'",
"Length": "7000",
"ILS": ""
},
"24": {
"Mag Hdg": "228",
"Length": "7000",
"ILS": "110.50"
"runways": [
{
"headings": [
{
"24": {
"magHeading": "228",
"ILS": "110.50"
},
"06": {
"magHeading": "048'",
"ILS": ""
}
}
],
"length": "7000"
}
}
]
},
"Novorossiysk": {
"ICAO": "URKN",
"Elevation": "131",
"elevation": "131",
"TACAN": "",
"Runways": {
"04": {
"Mag Hdg": "034",
"Length": "5400",
"ILS": ""
},
"22": {
"Mag Hdg": "214",
"Length": "5400",
"ILS": ""
"runways": [
{
"headings": [
{
"22": {
"magHeading": "214",
"ILS": ""
},
"04": {
"magHeading": "034",
"ILS": ""
}
}
],
"length": "5400"
}
}
]
},
"Senaki-Kolkhi": {
"ICAO": "UGKS",
"Elevation": "43",
"elevation": "43",
"TACAN": "31X",
"Runways": {
"09": {
"Mag Hdg": "088'",
"Length": "7400",
"ILS": "108.90"
},
"27": {
"Mag Hdg": "268",
"Length": "7400",
"ILS": ""
"runways": [
{
"headings": [
{
"27": {
"magHeading": "268",
"ILS": ""
},
"09": {
"magHeading": "088'",
"ILS": "108.90"
}
}
],
"length": "7400"
}
}
]
},
"Sochi-Adler": {
"ICAO": "URSS",
"Elevation": "98",
"elevation": "98",
"TACAN": "",
"Runways": {
"06": {
"Mag Hdg": "055",
"Length": "9700",
"ILS": "111.10"
},
"27": {
"Mag Hdg": "235",
"Length": "9700",
"ILS": ""
"runways": [
{
"headings": [
{
"27": {
"magHeading": "235",
"ILS": ""
},
"06": {
"magHeading": "055",
"ILS": "111.10"
}
}
],
"length": "9700"
}
}
]
},
"Tbilisi-Lochini": {
"ICAO": "UGTB",
"Elevation": "1574",
"elevation": "1574",
"TACAN": "25X",
"Runways": {
"13": {
"Mag Hdg": "121",
"Length": "9300",
"ILS": "110.30"
},
"31": {
"Mag Hdg": "301",
"Length": "9300",
"ILS": "108.90"
"runways": [
{
"headings": [
{
"13": {
"magHeading": "121",
"ILS": "110.30"
},
"31": {
"magHeading": "301",
"ILS": "108.90"
}
}
],
"length": "9300"
}
}
]
},
"Soganlug": {
"ICAO": "UG24",
"Elevation": "1500",
"elevation": "1500",
"TACAN": "25X",
"Runways": {
"14": {
"Mag Hdg": "125",
"Length": "6500",
"ILS": ""
},
"32": {
"Mag Hdg": "305",
"Length": "6500",
"ILS": ""
"runways": [
{
"headings": [
{
"14": {
"magHeading": "125",
"ILS": ""
},
"32": {
"magHeading": "305",
"ILS": ""
}
}
],
"length": "6500"
}
}
]
},
"Sukhumi-Babushara": {
"ICAO": "UGSS",
"Elevation": "43",
"elevation": "43",
"TACAN": "",
"Runways": {
"12": {
"Mag Hdg": "109",
"Length": "11400",
"ILS": ""
},
"30": {
"Mag Hdg": "289",
"Length": "11400",
"ILS": ""
"runways": [
{
"headings": [
{
"12": {
"magHeading": "109",
"ILS": ""
},
"30": {
"magHeading": "289",
"ILS": ""
}
}
],
"length": "11400"
}
}
]
},
"Vaziani": {
"ICAO": "UG27",
"Elevation": "1524",
"elevation": "1524",
"TACAN": "22X",
"Runways": {
"13": {
"Mag Hdg": "129",
"Length": "7700",
"ILS": "108.75"
},
"31": {
"Mag Hdg": "309",
"Length": "7700",
"ILS": "108.75"
"runways": [
{
"headings": [
{
"13": {
"magHeading": "129",
"ILS": "108.75"
},
"31": {
"magHeading": "309",
"ILS": "108.75"
}
}
],
"length": "7700"
}
}
]
}
}
}
}

View File

@ -1,170 +1,466 @@
{
"airfields": {
"Andersen_AFB": {
"ICAO": "PGUA",
"Elevation": "606",
"TACAN": "54X",
"Runways:": {
"06L": {
"Mag Hdg": "066",
"Length": "10300",
"ILS": "109.30"
},
"24R": {
"Mag Hdg": "246",
"Length": "10300",
"ILS": "109.35"
},
"06R": {
"Mag Hdg": "066",
"Length": "10900",
"ILS": "110.10"
},
"24l": {
"Mag Hdg": "246",
"Length": "10900",
"ILS": "110.15"
}
}
},
"Antonio_B._Won_Pat_Int_Airport": {
"ICAO": "PGUM",
"Elevation": "255",
"TACAN": "105X",
"Runways:": {
"06L": {
"Mag Hdg": "066",
"Length": "10600",
"ILS": "110.30"
},
"24R": {
"Mag Hdg": "245",
"Length": "10600",
"ILS": ""
},
"06R": {
"Mag Hdg": "066",
"Length": "8600",
"ILS": "110.90"
},
"24L": {
"Mag Hdg": "245",
"Length": "8600",
"ILS": ""
}
}
},
"North_West_Field": {
"ICAO": "",
"Elevation": "522",
"TACAN": "",
"Runways:": {
"06": {
"Mag Hdg": "063",
"Length": "4500",
"ILS": ""
},
"24": {
"Mag Hdg": "243",
"Length": "4500",
"ILS": ""
}
}
},
"Olf_Orote_Field": {
"ICAO": "",
"Elevation": "94",
"TACAN": "",
"Runways:": {
"07": {
"Mag Hdg": "067",
"Length": "3500",
"ILS": ""
},
"25": {
"Mag Hdg": "247",
"Length": "3500",
"ILS": ""
}
}
},
"Pagan_Airstrip": {
"ICAO": "",
"Elevation": "49",
"TACAN": "",
"Runways:": {
"11": {
"Mag Hdg": "112",
"Length": "1800",
"ILS": ""
},
"29": {
"Mag Hdg": "292",
"Length": "1800",
"ILS": ""
}
}
},
"Rota_Int": {
"ICAO": "PGRO",
"Elevation": "569",
"TACAN": "",
"Runways:": {
"09": {
"Mag Hdg": "092",
"Length": "6600",
"ILS": ""
},
"27": {
"Mag Hdg": "272",
"Length": "6600",
"ILS": ""
}
}
},
"Saipan_Int": {
"ICAO": "PGSN",
"Elevation": "213",
"TACAN": "",
"Runways:": {
"06": {
"Mag Hdg": "068",
"Length": "6200",
"ILS": ""
},
"24": {
"Mag Hdg": "248",
"Length": "6200",
"ILS": ""
},
"07": {
"Mag Hdg": "068",
"Length": "10600",
"ILS": "109.90"
},
"25": {
"Mag Hdg": "248",
"Length": "10600",
"ILS": ""
}
}
},
"Tinian_Int": {
"ICAO": "PGWT",
"Elevation": "284",
"TACAN": "",
"Runways:": {
"08": {
"Mag Hdg": "079",
"Length": "8200",
"ILS": ""
},
"26": {
"Mag Hdg": "259",
"Length": "8200",
"ILS": ""
}
"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"
}
]
}
}
}
}

View File

@ -1,413 +1,558 @@
{
"airfields": {
"BeattyAirport": {
"Beatty": {
"ICAO": "KBTY",
"Elevation": "3173",
"elevation": "3173",
"TACAN": "94X",
"Runways:": {
"16": {
"Mag Hdg": "168",
"Length": "5500",
"ILS": ""
},
"34": {
"Mag Hdg": "348",
"Length": "5500",
"ILS": ""
"runways": [
{
"headings": [
{
"16": {
"magHeading": "168",
"ILS": ""
},
"34": {
"magHeading": "348",
"ILS": ""
}
}
],
"length": "5500"
}
}
]
},
"BoulderCityAirport": {
"Boulder City": {
"ICAO": "KBVU",
"Elevation": "2205",
"elevation": "2205",
"TACAN": "114X",
"Runways:": {
"09": {
"Mag Hdg": "087",
"Length": "4400",
"ILS": ""
"runways": [
{
"headings": [
{
"15": {
"magHeading": "153",
"ILS": ""
},
"33": {
"magHeading": "333",
"ILS": ""
}
}
],
"length": "3700"
},
"27": {
"Mag Hdg": "267",
"Length": "4400",
"ILS": ""
},
"15": {
"Mag Hdg": "153",
"Length": "3700",
"ILS": ""
},
"33": {
"Mag Hdg": "333",
"Length": "3700",
"ILS": ""
{
"headings": [
{
"27": {
"magHeading": "267",
"ILS": ""
},
"09": {
"magHeading": "087",
"ILS": ""
}
}
],
"length": "4400"
}
}
]
},
"Creech": {
"ICAO": "KINS",
"Elevation": "3126",
"elevation": "3126",
"TACAN": "87X",
"Runways:": {
"08": {
"Mag Hdg": "080",
"Length": "8700",
"ILS": "108.70"
"runways": [
{
"headings": [
{
"13": {
"magHeading": "134",
"ILS": ""
},
"31": {
"magHeading": "314",
"ILS": ""
}
}
],
"length": "4700"
},
"26": {
"Mag Hdg": "260",
"Length": "8700",
"ILS": ""
},
"13": {
"Mag Hdg": "134",
"Length": "4700",
"ILS": ""
},
"31": {
"Mag Hdg": "314",
"Length": "4700",
"ILS": ""
{
"headings": [
{
"26": {
"magHeading": "260",
"ILS": ""
},
"08": {
"magHeading": "080",
"ILS": "108.70"
}
}
],
"length": "8700"
}
}
]
},
"EchoBayAirport": {
"Echo Bay": {
"ICAO": "0L9",
"Elevation": "1549",
"elevation": "1549",
"TACAN": "",
"Runways:": {
"06": {
"Mag Hdg": "066",
"Length": "3300",
"ILS": ""
},
"24": {
"Mag Hdg": "246",
"Length": "3300",
"ILS": ""
"runways": [
{
"headings": [
{
"24": {
"magHeading": "246",
"ILS": ""
},
"06": {
"magHeading": "066",
"ILS": ""
}
}
],
"length": "3300"
}
}
]
},
"groom": {
"Groom Lake": {
"ICAO": "KXTA",
"Elevation": "4495",
"elevation": "4495",
"TACAN": "18X",
"Runways:": {
"14L": {
"Mag Hdg": "145",
"Length": "11700",
"ILS": ""
"runways": [
{
"headings": [
{
"14L": {
"magHeading": "145",
"ILS": ""
},
"32R": {
"magHeading": "325",
"ILS": "109.30"
}
}
],
"length": "11700"
},
"32R": {
"Mag Hdg": "325",
"Length": "11700",
"ILS": "109.30"
},
"14R (CLOSED)": {
"Mag Hdg": "145",
"Length": "17800",
"ILS": ""
},
"32L (CLOSED)": {
"Mag Hdg": "325",
"Length": "17800",
"ILS": ""
{
"headings": [
{
"14R (CLOSED)": {
"magHeading": "145",
"ILS": ""
},
"32L (CLOSED)": {
"magHeading": "325",
"ILS": ""
}
}
],
"length": "17800"
}
}
]
},
"HendersonExecutiveAirport": {
"Henderson Executive": {
"ICAO": "KHND",
"Elevation": "2493",
"elevation": "2493",
"TACAN": "",
"Runways:": {
"17L": {
"Mag Hdg": "168",
"Length": "4600",
"ILS": ""
"runways": [
{
"headings": [
{
"17L": {
"magHeading": "168",
"ILS": ""
},
"35R": {
"magHeading": "348",
"ILS": ""
}
}
],
"length": "4600"
},
"35R": {
"Mag Hdg": "348",
"Length": "4600",
"ILS": ""
},
"17R": {
"Mag Hdg": "168",
"Length": "6100",
"ILS": ""
},
"35L": {
"Mag Hdg": "348",
"Length": "6100",
"ILS": ""
{
"headings": [
{
"17R": {
"magHeading": "168",
"ILS": ""
},
"35L": {
"magHeading": "348",
"ILS": ""
}
}
],
"length": "6100"
}
}
]
},
"JeanAirport": {
"Jean": {
"ICAO": "",
"Elevation": "2825",
"elevation": "2825",
"TACAN": "",
"Runways:": {
"02L": {
"Mag Hdg": "020",
"Length": "4500",
"ILS": ""
"runways": [
{
"headings": [
{
"02L": {
"magHeading": "020",
"ILS": ""
},
"20R": {
"magHeading": "200",
"ILS": ""
}
}
],
"length": "4500"
},
"20R": {
"Mag Hdg": "200",
"Length": "4500",
"ILS": ""
},
"02R": {
"Mag Hdg": "020",
"Length": "3600",
"ILS": ""
},
"20L": {
"Mag Hdg": "200",
"Length": "3600",
"ILS": ""
{
"headings": [
{
"02R": {
"magHeading": "020",
"ILS": ""
},
"20L": {
"magHeading": "200",
"ILS": ""
}
}
],
"length": "3600"
}
}
]
},
"LasVegas": {
"McCarran International": {
"ICAO": "KLAS",
"Elevation": "2178",
"elevation": "2178",
"TACAN": "116X",
"Runways:": {
"01L": {
"Mag Hdg": "013",
"Length": "8000",
"ILS": ""
"runways": [
{
"headings": [
{
"01L": {
"magHeading": "013",
"ILS": ""
},
"19R": {
"magHeading": "193",
"ILS": ""
}
}
],
"length": "8000"
},
"19R": {
"Mag Hdg": "193",
"Length": "8000",
"ILS": ""
{
"headings": [
{
"01R": {
"magHeading": "013",
"ILS": ""
},
"19L": {
"magHeading": "193",
"ILS": ""
}
}
],
"length": "8000"
},
"01R": {
"Mag Hdg": "013",
"Length": "8000",
"ILS": ""
{
"headings": [
{
"07L": {
"magHeading": "078",
"ILS": ""
},
"25R": {
"magHeading": "258",
"ILS": "110.30"
}
}
],
"length": "10600"
},
"19L": {
"Mag Hdg": "193",
"Length": "8000",
"ILS": ""
},
"07L": {
"Mag Hdg": "078",
"Length": "10600",
"ILS": ""
},
"25R": {
"Mag Hdg": "258",
"Length": "10600",
"ILS": "110.30"
},
"07R": {
"Mag Hdg": "078",
"Length": "10100",
"ILS": ""
},
"25L": {
"Mag Hdg": "258",
"Length": "10100",
"ILS": ""
{
"headings": [
{
"07R": {
"magHeading": "078",
"ILS": ""
},
"25L": {
"magHeading": "258",
"ILS": ""
}
}
],
"length": "10100"
}
}
]
},
"LaughlinAirport": {
"Laughlin": {
"ICAO": "KIFP",
"Elevation": "673",
"elevation": "673",
"TACAN": "",
"Runways:": {
"16": {
"Mag Hdg": "164",
"Length": "7100",
"ILS": ""
},
"34": {
"Mag Hdg": "344",
"Length": "7100",
"ILS": ""
"runways": [
{
"headings": [
{
"16": {
"magHeading": "164",
"ILS": ""
},
"34": {
"magHeading": "344",
"ILS": ""
}
}
],
"length": "7100"
}
}
]
},
"LincolnCountyAirport": {
"Lincoln County": {
"ICAO": "",
"Elevation": "4816",
"elevation": "4816",
"TACAN": "",
"Runways:": {
"17": {
"Mag Hdg": "170",
"Length": "4500",
"ILS": ""
},
"35": {
"Mag Hdg": "350",
"Length": "4500",
"ILS": ""
"runways": [
{
"headings": [
{
"17": {
"magHeading": "170",
"ILS": ""
},
"35": {
"magHeading": "350",
"ILS": ""
}
}
],
"length": "4500"
}
}
]
},
"MesquiteAirport": {
"Mesquite": {
"ICAO": "67L",
"Elevation": "1859",
"elevation": "1859",
"TACAN": "",
"Runways:": {
"01": {
"Mag Hdg": "017",
"Length": "5000",
"ILS": ""
},
"19": {
"Mag Hdg": "197",
"Length": "5000",
"ILS": ""
"runways": [
{
"headings": [
{
"19": {
"magHeading": "197",
"ILS": ""
},
"01": {
"magHeading": "017",
"ILS": ""
}
}
],
"length": "5000"
}
}
]
},
"MinahAirport_3Q0": {
"Mina": {
"ICAO": "",
"Elevation": "4560",
"elevation": "4560",
"TACAN": "",
"Runways:": {
"13": {
"Mag Hdg": "140",
"Length": "4100",
"ILS": ""
},
"31": {
"Mag Hdg": "320",
"Length": "4100",
"ILS": ""
"runways": [
{
"headings": [
{
"13": {
"magHeading": "140",
"ILS": ""
},
"31": {
"magHeading": "320",
"ILS": ""
}
}
],
"length": "4100"
}
}
]
},
"nellis": {
"Nellis": {
"ICAO": "KLSV",
"Elevation": "1849",
"elevation": "1849",
"TACAN": "12X",
"Runways:": {
"03L": {
"Mag Hdg": "029",
"Length": "9800",
"ILS": ""
"runways": [
{
"headings": [
{
"03L": {
"magHeading": "029",
"ILS": ""
},
"21R": {
"magHeading": "209",
"ILS": ""
}
}
],
"length": "9800"
},
"21R": {
"Mag Hdg": "209",
"Length": "9800",
"ILS": ""
},
"03R": {
"Mag Hdg": "029",
"Length": "9800",
"ILS": ""
},
"21L": {
"Mag Hdg": "209",
"Length": "9800",
"ILS": "109.10"
{
"headings": [
{
"03R": {
"magHeading": "029",
"ILS": ""
},
"21L": {
"magHeading": "209",
"ILS": "109.10"
}
}
],
"length": "9800"
}
}
]
},
"NorthLasVegasAirport": {
"North Las Vegas": {
"ICAO": "KVGT",
"Elevation": "2228",
"elevation": "2228",
"TACAN": "",
"Runways:": {
"07": {
"Mag Hdg": "076",
"Length": "4900",
"ILS": ""
"runways": [
{
"headings": [
{
"25": {
"magHeading": "256",
"ILS": ""
},
"07": {
"magHeading": "076",
"ILS": ""
}
}
],
"length": "4900"
},
"25": {
"Mag Hdg": "256",
"Length": "4900",
"ILS": ""
{
"headings": [
{
"12L": {
"magHeading": "122",
"ILS": "110.70"
},
"30R": {
"magHeading": "302",
"ILS": "109.10"
}
}
],
"length": "3800"
},
"12L": {
"Mag Hdg": "122",
"Length": "3800",
"ILS": "110.70"
},
"30R": {
"Mag Hdg": "302",
"Length": "3800",
"ILS": "109.10"
},
"12R": {
"Mag Hdg": "122",
"Length": "4600",
"ILS": ""
},
"30L": {
"Mag Hdg": "302",
"Length": "4600",
"ILS": ""
{
"headings": [
{
"12R": {
"magHeading": "122",
"ILS": ""
},
"30L": {
"magHeading": "302",
"ILS": ""
}
}
],
"length": "4600"
}
}
]
},
"PahuteMesaAirstrip": {
"Pahute Mesa": {
"ICAO": "",
"Elevation": "5059",
"elevation": "5059",
"TACAN": "",
"Runways:": {
"18": {
"Mag Hdg": "182",
"Length": "5500",
"ILS": ""
},
"36": {
"Mag Hdg": "002",
"Length": "5500",
"ILS": ""
"runways": [
{
"headings": [
{
"18": {
"magHeading": "182",
"ILS": ""
},
"36": {
"magHeading": "002",
"ILS": ""
}
}
],
"length": "5500"
}
}
]
},
"TonopahAirport": {
"Tonopah": {
"ICAO": "KTPH",
"Elevation": "5390",
"elevation": "5390",
"TACAN": "119X",
"Runways:": {
"11": {
"Mag Hdg": "113",
"Length": "5600",
"ILS": ""
"runways": [
{
"headings": [
{
"11": {
"magHeading": "113",
"ILS": ""
},
"29": {
"magHeading": "293",
"ILS": ""
}
}
],
"length": "5600"
},
"29": {
"Mag Hdg": "293",
"Length": "5600",
"ILS": ""
},
"15": {
"Mag Hdg": "153",
"Length": "6800",
"ILS": ""
},
"33": {
"Mag Hdg": "333",
"Length": "6800",
"ILS": ""
{
"headings": [
{
"15": {
"magHeading": "153",
"ILS": ""
},
"33": {
"magHeading": "333",
"ILS": ""
}
}
],
"length": "6800"
}
}
]
},
"TonopathAFB": {
"Tonopah Test Range": {
"ICAO": "KTNX",
"Elevation": "5535",
"elevation": "5535",
"TACAN": "77X",
"Runways:": {
"14": {
"Mag Hdg": "145",
"Length": "11700",
"ILS": "108.30"
},
"32": {
"Mag Hdg": "325",
"Length": "11700",
"ILS": "111.70"
"runways": [
{
"headings": [
{
"14": {
"magHeading": "145",
"ILS": "108.30"
},
"32": {
"magHeading": "325",
"ILS": "111.70"
}
}
],
"length": "11700"
}
}
]
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,7 @@
import { getMap, getMissionHandler, getUnitsManager, setActiveCoalition } from "..";
import { BLUE_COMMANDER, GAME_MASTER, RED_COMMANDER } from "../constants/constants";
import { Airbase } from "../mission/airbase";
import { dataPointMap } from "../other/utils";
import { ContextMenu } from "./contextmenu";
export class AirbaseContextMenu extends ContextMenu {
@ -27,6 +28,74 @@ export class AirbaseContextMenu extends ContextMenu {
this.setCoalition(airbase.getCoalition());
this.enableLandButton(getUnitsManager().getSelectedUnitsTypes().length == 1 && ["Aircraft", "Helicopter"].includes(getUnitsManager().getSelectedUnitsTypes()[0]) && (getUnitsManager().getSelectedUnitsCoalition() === airbase.getCoalition() || airbase.getCoalition() === "neutral"))
this.enableSpawnButton(getMissionHandler().getCommandModeOptions().commandMode == GAME_MASTER || this.#airbase.getCoalition() == getMissionHandler().getCommandedCoalition());
dataPointMap( <HTMLElement>this.getContainer(), {
"coalition": airbase.getCoalition(),
"airbaseName": airbase.getName()
});
dataPointMap( <HTMLElement>this.getContainer(), this.#airbase.getChartData() );
const runwaysContainer = <HTMLElement>this.getContainer()?.querySelector( "#airbase-runways" );
runwaysContainer.innerHTML = "";
if ( runwaysContainer instanceof HTMLElement ) {
const runways = this.#airbase.getChartData().runways;
if ( runways.length === 0 ) {
runwaysContainer.innerText = "No data";
} else {
runways.forEach( runway => {
let runwayDiv = document.createElement( "div" );
runwayDiv.classList.add( "runway" );
runway.headings.forEach( headings => {
//*
for ( const [ heading, data ] of Object.entries( headings ) ) {
let headingDiv = document.createElement( "div" );
headingDiv.classList.add( "heading" );
let abbr = document.createElement( "abbr" );
abbr.title = `Mag heading: ${data.magHeading}`;
abbr.innerText = heading;
headingDiv.appendChild( abbr );
runwayDiv.appendChild( headingDiv );
if ( data.ILS ) {
let ilsDiv = document.createElement( "div" );
ilsDiv.classList.add( "ils" );
abbr = document.createElement( "abbr" );
abbr.title = data.ILS;
abbr.innerText = "ILS";
ilsDiv.appendChild( abbr );
headingDiv.appendChild( ilsDiv );
}
}
//*/
});
runwaysContainer.appendChild( runwayDiv );
});
}
}
this.clip();
}
setName(airbaseName: string) {

View File

@ -8,10 +8,37 @@ export interface AirbaseOptions
position: L.LatLng
}
export interface AirbaseChartData {
elevation: string,
ICAO: string,
TACAN: string,
runways: AirbaseChartRunwayData[]
}
export interface AirbaseChartRunwayData {
"headings": AirbaseChartRunwayHeadingData[],
"length": string
}
export interface AirbaseChartRunwayHeadingData {
[index: string]: {
"magHeading": string,
"ILS": string
}
}
export class Airbase extends CustomMarker
{
#name: string = "";
#chartData: AirbaseChartData = {
elevation: "",
ICAO: "",
TACAN: "",
runways: []
};
#coalition: string = "";
#hasChartDataBeenSet:boolean = false;
#properties: string[] = [];
#parkings: string[] = [];
@ -22,6 +49,10 @@ export class Airbase extends CustomMarker
this.#name = options.name;
}
chartDataHasBeenSet() {
return this.#hasChartDataBeenSet;
}
createIcon() {
var icon = new DivIcon({
className: 'leaflet-airbase-marker',
@ -47,6 +78,11 @@ export class Airbase extends CustomMarker
(<HTMLElement> this.getElement()?.querySelector(".airbase-icon")).dataset.coalition = this.#coalition;
}
getChartData()
{
return this.#chartData;
}
getCoalition()
{
return this.#coalition;
@ -62,6 +98,12 @@ export class Airbase extends CustomMarker
return this.#name;
}
setChartData( chartData:AirbaseChartData )
{
this.#hasChartDataBeenSet = true;
this.#chartData = chartData;
}
setProperties(properties: string[])
{
this.#properties = properties;
@ -81,4 +123,4 @@ export class Airbase extends CustomMarker
{
return this.#parkings;
}
}
}

View File

@ -1,6 +1,6 @@
import { LatLng } from "leaflet";
import { getInfoPopup, getMap } from "..";
import { Airbase } from "./airbase";
import { Airbase, AirbaseChartData } from "./airbase";
import { Bullseye } from "./bullseye";
import { BLUE_COMMANDER, GAME_MASTER, NONE, RED_COMMANDER } from "../constants/constants";
import { refreshAll, setCommandModeOptions } from "../server/server";
@ -66,11 +66,14 @@ export class MissionHandler {
updateMission(data: MissionData) {
if (data.mission) {
/* Set the mission theatre */
if (data.mission.theatre != this.#theatre) {
this.#theatre = data.mission.theatre;
getMap().setTheatre(this.#theatre);
getInfoPopup().setText("Map set to " + this.#theatre);
this.#loadAirbaseChartData();
}
/* Set the date and time data */
@ -231,4 +234,38 @@ export class MissionHandler {
#onAirbaseClick(e: any) {
getMap().showAirbaseContextMenu(e.originalEvent.x, e.originalEvent.y, e.latlng, e.sourceTarget);
}
#loadAirbaseChartData() {
if ( !this.#theatre ) {
return;
}
fetch( '/api/airbases/' + this.#theatre , {
method: 'GET',
headers: {
'Accept': '*/*',
'Content-Type': 'application/json'
}
})
.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.` );
}
}
});
}
}

View File

@ -211,12 +211,23 @@
<div id="airbase-contextmenu" class="ol-panel" oncontextmenu="return false;">
<h3 id="airbase-name"></h3>
<div id="airbase-properties"></div>
<hr />
<h4>Parking available:</h4>
<div id="airbase-parking"></div>
<dl id="airbase-chart-data" class="ol-data-grid">
<dt>ICAO</dt>
<dd data-point="ICAO"></dd>
<dt>Coalition</dt>
<dd data-point="coalition"></dd>
<dt>Elevation</dt>
<dd><span data-point="elevation"></span>ft</dd>
<dt>TACAN</dt>
<dd data-point="TACAN"></dd>
</dl>
<h4>Runways</h4>
<div id="airbase-runways">
</div>
<hr />
<button id="spawn-airbase-aircraft-button" data-coalition="blue" title="Spawn aircraft" data-on-click="contextMenuSpawnAirbase" class="deploy-unit-button">Spawn</button>
<button id="land-here-button" title="Land here" data-on-click="contextMenuLandAirbase" class="hide">Land here</button>