From 14f14fe7b3747f8ce53b0362c7a4782f32514fb7 Mon Sep 17 00:00:00 2001 From: LAX18 Development Date: Sun, 16 Jan 2022 13:39:40 -0600 Subject: [PATCH 01/73] Prepare for UI2 Upgrade --- css/{style-dark.css => ui1-dark.css} | 4 ++-- css/{style-light.css => ui1-light.css} | 3 ++- css/ui2-light.css | 0 gmap.html | 2 +- js/script2.js | 4 ++-- 5 files changed, 7 insertions(+), 6 deletions(-) rename css/{style-dark.css => ui1-dark.css} (99%) rename css/{style-light.css => ui1-light.css} (99%) create mode 100644 css/ui2-light.css diff --git a/css/style-dark.css b/css/ui1-dark.css similarity index 99% rename from css/style-dark.css rename to css/ui1-dark.css index ef2f8a5..c7bcee1 100644 --- a/css/style-dark.css +++ b/css/ui1-dark.css @@ -84,7 +84,6 @@ body { #power_table { width: 100%; - } #power_table > tbody > tr:nth-child(1) > td:nth-child(1) > button { @@ -833,4 +832,5 @@ td#seen { } 100% { opacity: 0; - } \ No newline at end of file + } +} \ No newline at end of file diff --git a/css/style-light.css b/css/ui1-light.css similarity index 99% rename from css/style-light.css rename to css/ui1-light.css index b28b3a2..f15a7ce 100644 --- a/css/style-light.css +++ b/css/ui1-light.css @@ -778,4 +778,5 @@ td#seen { } 100% { opacity: 0; - } \ No newline at end of file + } +} \ No newline at end of file diff --git a/css/ui2-light.css b/css/ui2-light.css new file mode 100644 index 0000000..e69de29 diff --git a/gmap.html b/gmap.html index 2e78331..9570a39 100644 --- a/gmap.html +++ b/gmap.html @@ -4,7 +4,7 @@ - + diff --git a/js/script2.js b/js/script2.js index 540adfe..b020424 100644 --- a/js/script2.js +++ b/js/script2.js @@ -425,11 +425,11 @@ function changeColorMode() { document.getElementById("graphs_image").setAttribute("src", "images/dark/graphs.png") document.getElementById("settings_image").setAttribute("src", "images/dark/settings.png") document.getElementById("settings_logo").setAttribute("src", "images/dark/logo.png") - themeStylesheet.href = 'css/style-dark.css' + themeStylesheet.href = 'css/ui1-dark.css' // themeToggle.innerText = 'Switch to light mode' } else { // if it's dark -> go light - themeStylesheet.href = 'css/style-light.css' + themeStylesheet.href = 'css/ui1-light.css' document.getElementById("logo").setAttribute("src", "images/light/logo.png") document.getElementById("radar_image").setAttribute("src", "images/light/radar.png") document.getElementById("itinerary_image").setAttribute("src", "images/light/itinerary.png") -- 2.52.0 From eaed15c9c37e4e983c7d07f5db171d193528942e Mon Sep 17 00:00:00 2001 From: LAX18 Development Date: Sun, 16 Jan 2022 19:18:59 -0600 Subject: [PATCH 02/73] UI2.0 Preliminary Additions --- css/ui2-light.css | 873 +++++++++++++++++++++++++++++++++++++++++ gmap.html | 279 ++++++------- images/black.jpg | Bin 0 -> 32622 bytes js/OIP.jfif | Bin 0 -> 2735 bytes js/ol-layerswitcher.js | 694 ++++++++++++++++++++++++++++++++ js/script.js | 22 +- js/script2.js | 31 ++ ol/ol.css | 2 +- 8 files changed, 1756 insertions(+), 145 deletions(-) create mode 100644 images/black.jpg create mode 100644 js/OIP.jfif create mode 100644 js/ol-layerswitcher.js diff --git a/css/ui2-light.css b/css/ui2-light.css index e69de29..c2eae98 100644 --- a/css/ui2-light.css +++ b/css/ui2-light.css @@ -0,0 +1,873 @@ +html, +body { + margin: 0; + padding: 0; + background-color: #ffffff; + font-family: Tahoma, Sans-Serif; + font-size: 10pt; + height: 100%; +} + +#power_modal > .modal-content { + width: 50%; + height: 30%; + top: 25%; + left: 25%; + position: absolute; + text-align: center; + line-height: 45px; + font-size: 18px; +} + +#power_table { + width: 100%; +} + +#lock_button { + position: absolute; + z-index: 2; + left: 43%; + bottom: 33%; + z-index: 1; + line-height: 0%; + margin-bottom: -80px; +} + +#atc_title, #atc_location { + padding-left: 2px; +} + +#audioControl { + position: absolute; + right: 25px; + top: 30px; +} + +div.atc_state { + background-color: #ffffffa6; + height: 20px; + border: 1px solid black; + padding: 4px; + padding-left: 10px; + margin: 4px; + border-radius: 25px; + text-decoration: none; + +} + +div#nav_bar { + position: fixed; + top: 0px; + left: 10%; + width: 80%; + height: 40px; + padding: 5px; + border-bottom: 2px solid black; + border-left: 2px solid black; + border-right: 2px solid black; + border-radius: 5px; + z-index: 1; + background: rgba(255, 255, 255, 0.8); +} + +#planes_table { + cursor: pointer;} + + + +#planes_table > tr > td { + border-bottom: solid black .5px; + text-align: center; +} + +div#itinerary_body { + position: absolute; + top: 50px; + width: 100%; + height: 100%; +} + +img#aircraft_image { + max-width: 100%; + height: auto; +} + +div#map_container { + position: fixed; + top: 0px; + width: 100%; + height: 100%; +} + +.subtab_button { + width: 25%; +} + +div#graphs_body { + position: absolute; + top: 50px; + width: 100%; + height: 100%; +} + +div#graphs_body { + overflow: hidden; +} + +img.graphs { + width: 80%; + height: 70%; + position: relative; + top: 5%; + left: 10%; +} + +img.graphs_s { + width: 80%; + height: 40%; + position: relative; + left: 10%; + top: 30% +} + +#arrow_back_graphs { + position: absolute; + left: 10px; + top: 40%; +} + +#arrow_forward_graphs { + position: absolute; + right: 10px; + top: 40%; +} + +html::-webkit-scrollbar { + display: none; +} + +img#message_rate img#cpu_usage { + width: 50% +} + +div#subtab_buttons>button { + width: 100px; + margin-left: 20px; +} + +div#subtab_buttons { + display: none; + position: fixed; + bottom: 15px; + width: 100%; + padding: 5px; + z-index: 1; + background: transparent; +} + +div#map_canvas { + margin-right: 0px; + height: 100%; +} + +#sidebar_open_button { + position: absolute; + z-index: 2; + right: 0; + top: 40%; + height: 25%; + width: 25px; + background-color: white; + padding: 2px; + border-bottom-left-radius: 4px; + border-top-left-radius: 4px; + cursor: pointer; +} + +#expand_icon { + position: absolute; + top: 40%; + height: 10%; + right: 0px; +} + + +div#sidebar_container { + position: absolute; + right: 5px; + top: 60px; + width: 390px; + height: 85%; + z-index: 1; + border: 2px black solid; + border-radius: 8px; + display: none; + background-color: rgba(255,255,255,.9); + overflow: auto; + -ms-overflow-style: none; /* IE and Edge */ + scrollbar-width: none; /* Firefox */ +} + +div#sidebar_container::-webkit-scrollbar { + display: none; + } + +#nav_bar.divider { + width: 25px; +} + +.pointer { + cursor: pointer; +} + +.noselect { + -webkit-touch-callout: none; + /* iOS Safari */ + -webkit-user-select: none; + /* Safari */ + -khtml-user-select: none; + /* Konqueror HTML */ + -moz-user-select: none; + /* Old versions of Firefox */ + -ms-user-select: none; + /* Internet Explorer/Edge */ + user-select: none; + /* Non-prefixed version, currently + supported by Chrome, Edge, Opera and Firefox */ +} + +.space { + padding-right: 20px; + padding-top: 0px; + padding-bottom: 0px; + margin: auto; + width: fit-content; + display: inline-block; +} + +.space-nopad { + margin: auto; + width: fit-content; + display: inline-block; +} + +.center { + display: table-cell; + vertical-align: middle; +} + +#radar_aircraft_tab { + line-height: 17px; +} + +#img_button { + position: fixed; + right: 10%; + bottom: 70px; +} + +#aircraft_tab_background { + filter: brightness(50%); + width: 400px; + height: 225px; +} + +#aircraft_info_overlay { + position: absolute; + top: 175px; + color: white; + font-size: large; +} + +#aircraft_button { + position: fixed; + right: 14%; + bottom: 49px; +} + +#vol_down_button { + position: absolute; + top: 5px; + right: 220px; +} + +#vol_up_button { + position: absolute; + top: 5px; + right: 60px; +} + +#info_button { + position: absolute; + right: 10px; + bottom: 5px +} + +#power_button { + position: absolute; + right: 4px; + top: 5px +} + +#volume_text { + position: absolute; + right: 110px; + top: 17px; +} + +#info_icon { + position: absolute; + right: 10px; + bottom: 5px +} + +div#SpecialSquawkWarning { + position: absolute; + bottom: 25px; + right: 430px; + border: 2px solid red; + background-color: #FFFFA3; + opacity: 0.75; + filter: alpha(opacity=75); + padding: 5px; + text-align: center; +} + +div#update_error { + position: absolute; + bottom: 25px; + left: 25px; + border: 2px solid red; + background-color: #FFFFA3; + opacity: 0.75; + filter: alpha(opacity=75); + padding: 5px; + text-align: center; +} + +div#loader { + z-index: 99; + position: absolute; + left: 0; + top: 0; + bottom: 0; + right: 0; + background: #000; + opacity: 1; + filter: alpha(opacity=100); +} + +#spinny { + width: 128px; + height: 128px; + position: absolute; + top: 50%; + left: 50%; + margin: -64px 0 0 -64px; +} + +#loader_progress { + width: 250px; + height: 20px; + position: absolute; + top: 50%; + left: 50%; + margin: 128px 0 0 -125px; +} + +#tableinfo, +#sudo_buttons { + font-size: x-small; + font-family: monospace; +} + +#planestable { + height: 200px; +} + + +#tableinfo::-webkit-scrollbar { + display: none; + } + +#sidebar_close { + position: fixed; + right: 5px; + cursor: pointer; + z-index: inherit; +} + +.vPosition { + font-weight: bold; + background-color: #d5ffd5; +} + +.mlat { + font-weight: bold; + background-color: #d5d5ff; +} + +.squawk7500 { + font-weight: bold; + background-color: #ff5555; +} + +.squawk7600 { + font-weight: bold; + background-color: #00ffff; +} + +.squawk7700 { + font-weight: bold; + background-color: #ffff00; +} + +.selected { + background-color: #dddddd; +} + +.plane_table_row { + cursor: pointer; +} + +.hidden { + display: none; +} + +.infoblock_heading { + font-size: larger; +} + +.infoblock_heading a { + text-decoration: none; + color: blue; + font-size: x-small; +} + +.infoblock_body { + font-size: medium; +} + +#selected_icao { + font-size: x-small; +} + +#selected_registration { + font-size: x-small; +} + +#selected_icaotype { + font-size: x-small; +} + +.dim { + opacity: 0.3; + filter: alpha(opacity=30); + /* For IE8 and earlier */ +} + +.pointer { + cursor: pointer; +} + +td#icao { + font-size: medium; +} + +td#flag { + font-size: medium; +} + +td#flight { + font-size: medium; +} + +td#squawk { + font-size: medium; +} + +td#altitude { + font-size: medium; +} + +td#speed { + font-size: medium; +} + +td#distance { + font-size: medium; +} + +td#track { + font-size: medium; +} + +td#msgs { + font-size: medium; +} + +td#seen { + font-size: medium; +} + +#modal2_title { + font-size: 30px; + text-decoration: bold; + line-height: 40px; +} + +#aircraft_name_css { + font-size: 30px; + line-height: 25px; + white-space: nowrap; +} + +#modal3_title { + font-size: 30px; + text-decoration: bold; + line-height: 40px; +} + +.material-icons.md-18 { + font-size: 18px; +} + +.material-icons.md-24 { + font-size: 24px; +} + +.material-icons.md-36 { + font-size: 36px; +} + +.material-icons.md-48 { + font-size: 48px; +} + + +/* The Modal (background) */ + +.modal { + display: none; + /* Hidden by default */ + position: fixed; + /* Stay in place */ + z-index: 2; + /* Sit on top */ + left: 0; + top: 0; + width: 100%; + /* Full width */ + height: 100%; + /* Full height */ + overflow: auto; + /* Enable scroll if needed */ + background-color: rgb(0, 0, 0); + /* Fallback color */ + background-color: rgba(0, 0, 0, 0.4); + /* Black w/ opacity */ +} + + +/* Modal Content/Box */ + +.modal-content { + background-color: #fefefe; + margin: 2% auto; + /* 15% from the top and centered */ + padding: 20px; + border: 1px solid #888; + width: 90%; + height: 80% + /* Could be more or less, depending on screen size */ +} + + +/* The Close Button */ + +.close { + color: #aaa; + float: right; + font-size: 28px; + font-weight: bold; +} + +.close:hover, +.close:focus { + color: black; + text-decoration: none; + cursor: pointer; +} + +.logo { + display: block; + margin-left: auto; + margin-right: auto; + width: 80%; + margin-top: 10%; +} + +.settingslogo { + display: block; + margin-left: auto; + margin-right: auto; + width: 40%; + margin-top: 2%; +} + +.settingstext { + text-align: center; + margin-left: auto; + margin-right: auto; +} + +.home_table { + margin-left: auto; + margin-right: auto; + width: 60%; +} + +#home_page { + overflow: hidden; +} + +#settings_page { + overflow: hidden; +} + +#settingstext>table { + margin: auto; +} + +#external_mode_button { + position: relative; + left: 50%; + right: 50%; +} + +#settingstext>table>tbody>tr>td { + padding: 15px; +} + +#settingstext>table:nth-child(1)>tbody>tr:nth-child(3)>td { + position: relative; + top: 0; + left: -25%; +} + +#settingstext>table:nth-child(1)>tbody>tr:nth-child(3)>td { + position: relative; + top: 0; + left: -25%; +} + +#home_page>table>tbody>tr>td>img { + width: 100%; +} + +#arrivals { + margin: auto; + width: fit-content; + display: inline-table; + padding: 5px; +} + +#departures { + margin: auto; + width: fit-content; + display: inline-table; + padding: 5px; +} + +#sch-arrivals { + margin: auto; + width: fit-content; + display: inline-table; + padding: 5px; +} + +#sch-departures { + margin: auto; + width: fit-content; + display: inline-table; + padding: 5px; +} + +.airportBoard { + border: black solid 2px; +} + +#aircraft_image1 { + width: 100%; +} + +#aircraft_image2 { + width: 24.5%; + position: absolute; + left: 5%; + bottom: 12%; +} + +#aircraft_image3 { + width: 24.5%; + position: absolute; + left: 30.5%; + bottom: 12%; +} + +#aircraft_image4 { + width: 24.5%; + position: absolute; + left: 56%; + bottom: 12%; +} + +#metar_loading { + top: 4px; +} + +#itinerary_loading { + width: 100%; + position: fixed +} + +#flight_progress_circle { + position: absolute; + right: 25%; + top: 10%; +} + +#flight_progress_title { + position: absolute; + right: 5%; + top: 22%; + font-size: 18px; +} + +#flight_progress_elapsed_title { + font-size: 18px; + position: absolute; + top: 40%; + left: 68%; +} + +#flight_progress_remaining_title { + font-size: 18px; + position: absolute; + top: 53%; + left: 67%; +} + +#flight_progress_time_title { + font-size: 18px; + position: absolute; + top: 66%; + left: 67%; +} + +#flight_progress_elapsed_amount { + font-size: 20px; + font-weight: bold; + position: absolute; + top: 45%; + left: 64%; +} + +#flight_progress_remaining_amount { + font-size: 20px; + font-weight: bold; + position: absolute; + top: 58%; + left: 64%; +} + +#flight_progress_time_amount { + font-size: 20px; + font-weight: bold; + position: absolute; + top: 71%; + left: 64%; +} + +#aircraft_name_title { + font-size: 18px; + position: absolute; + top: 20%; + left: 66%; +} + +#aircraft_model_title { + font-size: 18px; + position: absolute; + top: 33%; + left: 66%; +} + +#aircraft_registration_title { + font-size: 18px; + position: absolute; + top: 46%; + left: 64%; +} + +#aircraft_name_addl { + font-size: 20px; + font-weight: bold; + position: absolute; + top: 25%; + left: 67%; +} + +#aircraft_model { + font-size: 20px; + font-weight: bold; + position: absolute; + top: 38%; + left: 69.5%; +} + +#aircraft_registration { + font-size: 20px; + font-weight: bold; + position: absolute; + top: 51%; + left: 69%; +} + +#external_connected { + width: 100%; + height: 100%; + background-color: black; + color: red; + text-align: center; + font-size: xx-large; + font-weight: bold; + +} + +#external_title { + animation: blinkingText 1s infinite; + position: absolute; + top: 55%; + left: 22%; +} + +#external_image { + animation: blinkingText 1s infinite; + position: absolute; + top: 30%; + left: 43%; +} + +@keyframes blinkingText { + + 0% { + opacity: 0; + } + 50% { + opacity: 1; + } + 100% { + opacity: 0; + } +} \ No newline at end of file diff --git a/gmap.html b/gmap.html index 9570a39..8287da2 100644 --- a/gmap.html +++ b/gmap.html @@ -4,7 +4,7 @@ - + @@ -14,7 +14,7 @@ - + @@ -189,18 +189,19 @@
@@ -265,6 +252,9 @@
- - -
- - - + +
- - + -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ICAO + + FlightSquawk + Altitude + Speed + Distance + TrackMsgsAge
+ + + + +
+
- + diff --git a/js/liveatc.js b/js/liveatc.js index ca9068e..d33fe12 100644 --- a/js/liveatc.js +++ b/js/liveatc.js @@ -93,13 +93,13 @@ function selectState(state) { document.getElementById("atc_selector").innerHTML = "" var node = document.createElement("div") node.setAttribute("id", "atc_" + state) - node.setAttribute("class", "atc_state noselect pointer") + node.setAttribute("class", "atc_header noselect pointer") node.setAttribute("onmousedown", "listStations()") node.innerHTML = "Go Back" document.getElementById("atc_selector").appendChild(node) var node = document.createElement("div") node.setAttribute("id", "atc_" + state) - node.setAttribute("class", "atc_state noselect") + node.setAttribute("class", "atc_header noselect") node.setAttribute("onmousedown", "selectState('" + state + "')") node.innerHTML = "" + state + "" document.getElementById("atc_selector").appendChild(node) @@ -136,18 +136,18 @@ function selectAirport(airport, state) { document.getElementById("atc_selector").innerHTML = "" var node = document.createElement("div") node.setAttribute("id", "atc_" + state) - node.setAttribute("class", "atc_state noselect pointer") + node.setAttribute("class", "atc_header1 noselect pointer") node.setAttribute("onmousedown", "selectState('" + state + "')") node.innerHTML = "Go Back" document.getElementById("atc_selector").appendChild(node) var node = document.createElement("div") node.setAttribute("id", "atc_" + state) - node.setAttribute("class", "atc_state noselect") + node.setAttribute("class", "atc_header1 noselect") node.innerHTML = "" + state + "" document.getElementById("atc_selector").appendChild(node) var node = document.createElement("div") node.setAttribute("id", "atc_" + airport) - node.setAttribute("class", "atc_state noselect") + node.setAttribute("class", "atc_header1 noselect") node.innerHTML = "" + airport + "" document.getElementById("atc_selector").appendChild(node) var node = document.createElement("hr") @@ -175,7 +175,7 @@ function selectAirport(airport, state) { }) } -//DEPRACATED - NOT USED - GENERATES FILE +//DEPRECATED - NOT USED - GENERATES FILE function startPulling() { var json = {} diff --git a/js/script2.js b/js/script2.js index ab83288..d93b18f 100644 --- a/js/script2.js +++ b/js/script2.js @@ -16,6 +16,9 @@ function openRadar() { document.getElementById("atc_container").style.display = "none" TAB = "RADAR" document.getElementById("sidebar_close").style.color = "rgba(0,0,0,.7)" + if (lastMETAR === 1) { + StaticFeatures.removeAt(0) + } } function openATC() { @@ -26,6 +29,9 @@ function openATC() { TAB = "ATC" listStations() document.getElementById("sidebar_close").style.color = "rgba(0,0,0,.7)" + if (lastMETAR === 1) { + StaticFeatures.removeAt(0) + } } function readBatteryLevel() { -- 2.52.0 From e117a91e335c835457ea2724fdd11b44db09c2e1 Mon Sep 17 00:00:00 2001 From: LAX18 Development Date: Mon, 17 Jan 2022 18:56:08 -0600 Subject: [PATCH 08/73] UI2.0 - LiveATC Slight Additions --- css/ui2-light.css | 27 +++++++++++++++-- gmap.html | 2 ++ js/avwx.js | 4 +-- js/config.js | 1 + js/liveatc.js | 75 +++++++++++++++++++++++++++++++++-------------- js/script.js | 2 +- js/script2.js | 9 +++++- 7 files changed, 92 insertions(+), 28 deletions(-) diff --git a/css/ui2-light.css b/css/ui2-light.css index 715a74a..e38f45d 100644 --- a/css/ui2-light.css +++ b/css/ui2-light.css @@ -791,12 +791,35 @@ div.atc_state { display: flex; align-items:center; justify-content:center; + overflow: hidden; } -.atc_state > b { - +#atc_ready_state { + position: absolute; + left: 5px; + top: 20px; + font-size: 50px; } +#atc_current_time { + position: absolute; + left: 11px; + top: 68px; +} + +#atc_location { + position: relative; + top: -25px; + left: 8px; +} + +#atc_title { + position: relative; + left: 25px; + top: -10px; +} + + div.atc_header { box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); padding: 5px; diff --git a/gmap.html b/gmap.html index 70c5f3b..ff68e31 100644 --- a/gmap.html +++ b/gmap.html @@ -611,6 +611,8 @@

+ + diff --git a/js/avwx.js b/js/avwx.js index 73ead0b..e979b55 100644 --- a/js/avwx.js +++ b/js/avwx.js @@ -13,10 +13,10 @@ function nearestStations(x, y) { radius: 7, snapToPixel: false, fill: new ol.style.Fill({ - color: 'black' + color: 'green' }), stroke: new ol.style.Stroke({ - color: 'white', + color: 'black', width: 2 }) }) diff --git a/js/config.js b/js/config.js index a221b5e..8797990 100644 --- a/js/config.js +++ b/js/config.js @@ -23,6 +23,7 @@ var ol3d var cesuim_active = false var internet_mode = 0 var lastMETAR = 0 +var liveATC = 0 var country_names = {} var xhr1 = new XMLHttpRequest(); diff --git a/js/liveatc.js b/js/liveatc.js index d33fe12..d706ba3 100644 --- a/js/liveatc.js +++ b/js/liveatc.js @@ -1,5 +1,16 @@ function playPLS(url, title) { + window.setInterval(function () { + if (document.getElementById("player").readyState === 3 || document.getElementById("player").readyState === 4) { + document.getElementById("atc_ready_state").style.color = "green" + } else { + document.getElementById("atc_ready_state").style.color = "red" + } + var time = document.getElementById("player").currentTime + document.getElementById("atc_current_time").innerHTML = HHMMSS(time) + }, 1000) document.getElementById("atc_spacer").style.display = "block" + document.getElementById("atc_ready_state").style.display = "block" + document.getElementById("atc_current_time").style.display = "block" document.getElementById("audioControl").style.display = "block" document.getElementById("atc_location").innerHTML = "" document.getElementById("atc_location").style.display = "block" @@ -10,6 +21,28 @@ function playPLS(url, title) { var city = world_airports[airport].city var state = world_airports[airport].state document.getElementById("atc_location").innerHTML = city + ", " + state + // MAP MARKER INFO + var markerStyle = new ol.style.Style({ + image: new ol.style.Circle({ + radius: 7, + snapToPixel: false, + fill: new ol.style.Fill({ + color: 'blue' + }), + stroke: new ol.style.Stroke({ + color: 'black', + width: 2 + }) + }) + }); + + var feature = new ol.Feature(new ol.geom.Point(ol.proj.fromLonLat([world_airports[airport].lon, world_airports[airport].lat]))); + feature.setStyle(markerStyle); + lastATC = StaticFeatures.push(feature) - 1 + if (lastATC === 1) { + StaticFeatures.removeAt(0) + } + // PLS INFO const proxyurl = "http://" + window.location.hostname + ":7000/"; var request = $.ajax({ url: 'json/liveatc.json', @@ -43,28 +76,7 @@ function playPause() { document.getElementById("audioControl_icon").innerHTML = "play_arrow" } } -/* -function playPLS(url, title) { - var xhr = new XMLHttpRequest(); - xhr.open("POST", "http://127.0.0.1:5000/cmd", true); - xhr.setRequestHeader('Content-Type', 'application/json'); - xhr.onreadystatechange = function() { - if (xhr.readyState === 4) { - var response = xhr.response - response = response.split('\n') - response = response[1] - response = response.substring(6, data.length) - document.getElementById("player").setAttribute("src", url) - document.getElementById("player").load() - document.getElementById("atc_title").innerHTML = title - document.getElementById("player").play() - } - } - xhr.send(JSON.stringify({ - command: "curl http://www.liveatc.net"+url - })); -} -*/ + function listStations() { document.getElementById("atc_selector").innerHTML = "" var request = $.ajax({ @@ -173,6 +185,7 @@ function selectAirport(airport, state) { node.innerHTML = "


" document.getElementById("atc_selector").appendChild(node) }) + } //DEPRECATED - NOT USED - GENERATES FILE @@ -238,4 +251,22 @@ function startPulling() { } } }) +} + +function HHMMSS(time) { + var sec_num = parseInt(time, 10); // don't forget the second param + var hours = Math.floor(sec_num / 3600); + var minutes = Math.floor((sec_num - (hours * 3600)) / 60); + var seconds = sec_num - (hours * 3600) - (minutes * 60); + + if (hours < 10) { + hours = "0" + hours; + } + if (minutes < 10) { + minutes = "0" + minutes; + } + if (seconds < 10) { + seconds = "0" + seconds; + } + return hours + ':' + minutes + ':' + seconds; } \ No newline at end of file diff --git a/js/script.js b/js/script.js index 0fee6e0..4dfe74e 100644 --- a/js/script.js +++ b/js/script.js @@ -502,7 +502,7 @@ function initialize_map() { var layerSwitcher = new LayerSwitcher({ reverse: false, groupSelectStyle: 'group', - activationMode: 'mouseover' + activationMode: 'click' }); OLMap.addControl(layerSwitcher); diff --git a/js/script2.js b/js/script2.js index d93b18f..e372019 100644 --- a/js/script2.js +++ b/js/script2.js @@ -7,6 +7,9 @@ function openMetar() { var center = ol.proj.toLonLat(OLMap.getView().getCenter(), OLMap.getView().getProjection()); nearestStations(center[1], center[0]) document.getElementById("sidebar_close").style.color = "rgba(0,0,0,.7)" + if (lastATC === 1) { + StaticFeatures.removeAt(0) + } } function openRadar() { @@ -19,6 +22,9 @@ function openRadar() { if (lastMETAR === 1) { StaticFeatures.removeAt(0) } + if (lastATC === 1) { + StaticFeatures.removeAt(0) + } } function openATC() { @@ -622,4 +628,5 @@ function toggleCesium() { cesuim_active = true document.getElementById("cesium").innerHTML = "map" } -} \ No newline at end of file +} + -- 2.52.0 From 54ca7f7ed91ebc70756971147b69da4280542a21 Mon Sep 17 00:00:00 2001 From: LAX18 Development Date: Fri, 21 Jan 2022 21:17:08 -0600 Subject: [PATCH 09/73] UI2.0 - Itinerary Tab Additions --- css/ui2-light.css | 122 ++++++++- data/aircraft1.json | 516 +----------------------------------- gmap.html | 56 ++-- js/config.js | 1 + js/schedules.js | 112 ++++++-- js/script2.js | 21 +- scripts/internet_data_pc.js | 2 +- scripts/package-lock.json | 10 + scripts/pc_debug.sh | 9 + 9 files changed, 272 insertions(+), 577 deletions(-) create mode 100644 scripts/pc_debug.sh diff --git a/css/ui2-light.css b/css/ui2-light.css index e38f45d..6f8f006 100644 --- a/css/ui2-light.css +++ b/css/ui2-light.css @@ -263,9 +263,20 @@ right: 10px; } +#arrivals { + +} + #itinerary_loading { position: fixed; - width: 100%; + width: 80%; + left: 10%; + top: 55px; +} + +#itinerary_states { + border-radius: 6px; + height: 20px; } #loader_progress { @@ -282,8 +293,8 @@ line-height: 0%; margin-bottom: -80px; position: absolute; - right: 2%; - top: 44%; + right: 6px; + top: 181px; z-index: 1; z-index: 2; } @@ -722,6 +733,26 @@ div#nav_bar { z-index: 1; } +div#itin_nav_bar { + background: rgba(255, 255, 255, 0.8); + border-radius: 5px; + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); + height: 40px; + left: 10%; + padding: 5px; + position: fixed; + top: 5px; + width: 80%; + z-index: 1; +} + +#itin_title { + position: absolute; + right: 10px; + top: -18px; + color: rgba(0, 0, 0, .7); +} + div#sidebar_container { background-color: rgba(255, 255, 255, .9); border-radius: 8px; @@ -784,8 +815,9 @@ div#update_error { div.atc_state { box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); padding: 5px; - margin: 5px; - width: 28%; + margin: 8px; + margin-left: 15px; + width: 24%; height: 50px; float: left; display: flex; @@ -794,6 +826,85 @@ div.atc_state { overflow: hidden; } +.itin_state { + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); + padding: 5px; + margin: 8px; + margin-left: 15px; + width: 24%; + height: 50px; + float: left; + display: flex; + align-items:center; + justify-content:center; + overflow: hidden; + cursor: pointer; +} + +.itin_header { + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); + padding: 5px; + margin-left: 10px; + margin: 5px; + width: 44%; + display: inline-block; + height: 50px; + text-align: center; + line-height: 50px; +} + +.itin_header1 { + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); + padding: 5px; + margin: 5px; + width: 28%; + display: inline-block; + height: 50px; + text-align: center; + line-height: 50px; +} + +#itin_airport_name { + font-size: 46px; + position: absolute; + top: 20px; + left: 5px; +} + +#itin_air_info { + position: absolute; + left: 90px; + top: 85px; +} + +#itin_arrivals { + position: absolute; + left: 10px; + bottom: 10px; +} + +#itin_back { + position: absolute; + left: 10px; + top: 85px; +} + +#itin_departures { + position: absolute; + right: 10px; + bottom: 10px; +} + +#itin_airport_city { + font-size: 18px; + position: absolute; + top: 55px; + left: 15px; + font-style: italic; + font-weight: 10; +} + + #atc_ready_state { position: absolute; left: 5px; @@ -823,6 +934,7 @@ div.atc_state { div.atc_header { box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); padding: 5px; + margin-left: 10px; margin: 5px; width: 44%; display: inline-block; diff --git a/data/aircraft1.json b/data/aircraft1.json index 31f474b..2522b74 100644 --- a/data/aircraft1.json +++ b/data/aircraft1.json @@ -1,515 +1 @@ -{ - "now": 1642445345684.315, - "messages": 0, - "aircraft": [{ - "hex": "06a1bf", - "flight": "QTR78U", - "lat": 45.847, - "lon": -72.131, - "altitude": 27550, - "track": 250, - "speed": 406, - "squawk": "2456", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "DOH", - "arr": "YUL", - "airline": "QTR" - }, { - "hex": "acacfb", - "flight": "CNS1025", - "lat": 43.26, - "lon": -70.749, - "altitude": 3150, - "track": 300, - "speed": 161, - "squawk": "3506", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "PSM", - "arr": "QQA", - "airline": "CNS" - }, { - "hex": "a05940", - "flight": "AAL2681", - "lat": 43.647, - "lon": -70.312, - "altitude": 0, - "track": 64, - "speed": 0, - "squawk": "1521", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "PWM", - "arr": "CLT", - "airline": "AAL" - }, { - "hex": "", - "flight": "PC12", - "lat": 43.648, - "lon": -70.308, - "altitude": 0, - "track": 188, - "speed": 0, - "squawk": "1234", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "", - "arr": "", - "airline": "" - }, { - "hex": "406f74", - "flight": "BAW7W", - "lat": 44.01, - "lon": -69.93, - "altitude": 39975, - "track": 228, - "speed": 418, - "squawk": "0716", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "LHR", - "arr": "IAD", - "airline": "BAW" - }, { - "hex": "c0582b", - "flight": "ACA7239", - "lat": 46.336, - "lon": -69.887, - "altitude": 36000, - "track": 238, - "speed": 420, - "squawk": "2477", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "IST", - "arr": "YUL", - "airline": "ACA" - }, { - "hex": "a2ca5f", - "flight": "UAL107", - "lat": 43.796, - "lon": -69.492, - "altitude": 39975, - "track": 197, - "speed": 403, - "squawk": "2463", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "MUC", - "arr": "IAD", - "airline": "UAL" - }, { - "hex": "a0f428", - "flight": "UAL988", - "lat": 43.9, - "lon": -68.95, - "altitude": 34000, - "track": 248, - "speed": 442, - "squawk": "2473", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "FRA", - "arr": "IAD", - "airline": "UAL" - }, { - "hex": "c053f6", - "flight": "ACA885", - "lat": 46.434, - "lon": -68.888, - "altitude": 36000, - "track": 250, - "speed": 410, - "squawk": "2466", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "GVA", - "arr": "YUL", - "airline": "ACA" - }, { - "hex": "a6b840", - "flight": "JIA5107", - "lat": 44.809, - "lon": -68.82, - "altitude": 0, - "track": 317, - "speed": 0, - "squawk": "3515", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "BGR", - "arr": "DCA", - "airline": "AAL" - }, { - "hex": "a9ab07", - "flight": "AAL292", - "lat": 45.147, - "lon": -67.998, - "altitude": 31000, - "track": 50, - "speed": 533, - "squawk": "2660", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "JFK", - "arr": "DEL", - "airline": "AAL" - }, { - "hex": "a8c4d8", - "flight": "UAL17", - "lat": 45.297, - "lon": -67.906, - "altitude": 39000, - "track": 249, - "speed": 391, - "squawk": "2471", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "LHR", - "arr": "EWR", - "airline": "UAL" - }, { - "hex": "06a2c4", - "flight": "QTR16J", - "lat": 46.455, - "lon": -67.522, - "altitude": 34000, - "track": 261, - "speed": 425, - "squawk": "2505", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "DOH", - "arr": "ORD", - "airline": "QTR" - }, { - "hex": "4cabd2", - "flight": "EIN11T", - "lat": 44.78, - "lon": -67.357, - "altitude": 36050, - "track": 241, - "speed": 380, - "squawk": "2465", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "DUB", - "arr": "IAD", - "airline": "EIN" - }, { - "hex": "4006c1", - "flight": "BAW25C", - "lat": 44.225, - "lon": -67.264, - "altitude": 39975, - "track": 224, - "speed": 401, - "squawk": "2467", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "LHR", - "arr": "MCO", - "airline": "BAW" - }, { - "hex": "4006c3", - "flight": "BAW60T", - "lat": 45.592, - "lon": -67.154, - "altitude": 40000, - "track": 238, - "speed": 403, - "squawk": "2475", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "LGW", - "arr": "TPA", - "airline": "BAW" - }, { - "hex": "aa86cc", - "flight": "AAL199", - "lat": 45.7, - "lon": -67.036, - "altitude": 34000, - "track": 234, - "speed": 412, - "squawk": "2504", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "MXP", - "arr": "JFK", - "airline": "AAL" - }, { - "hex": "06a2c6", - "flight": "QTR37G", - "lat": 43.236, - "lon": -66.745, - "altitude": 36000, - "track": 247, - "speed": 400, - "squawk": "2502", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "DOH", - "arr": "JFK", - "airline": "QTR" - }, { - "hex": "40655d", - "flight": "VIR91", - "lat": 45.167, - "lon": -66.603, - "altitude": 38000, - "track": 236, - "speed": 388, - "squawk": "2472", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "LHR", - "arr": "MCO", - "airline": "VIR" - }, { - "hex": "71c076", - "flight": "KAL288", - "lat": 44.365, - "lon": -66.292, - "altitude": 27800, - "track": 68, - "speed": 469, - "squawk": "3164", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "ORD", - "arr": "YHZ", - "airline": "KAL" - }, { - "hex": "3c6564", - "flight": "DLH418", - "lat": 45.649, - "lon": -66.092, - "altitude": 38000, - "track": 236, - "speed": 388, - "squawk": "2476", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "FRA", - "arr": "IAD", - "airline": "DLH" - }, { - "hex": "a658a1", - "flight": "GTI4701", - "lat": 46.341, - "lon": -66.069, - "altitude": 36000, - "track": 229, - "speed": 403, - "squawk": "2515", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "HHN", - "arr": "GSP", - "airline": "GTI" - }, { - "hex": "a8e4e9", - "flight": "UAL919", - "lat": 45.398, - "lon": -65.641, - "altitude": 38000, - "track": 240, - "speed": 379, - "squawk": "2503", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "LHR", - "arr": "IAD", - "airline": "UAL" - }, { - "hex": "aaaa92", - "flight": "AAL729", - "lat": 44.17, - "lon": -65.566, - "altitude": 34000, - "track": 240, - "speed": 398, - "squawk": "0761", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "LHR", - "arr": "PHL", - "airline": "AAL" - }, { - "hex": "", - "flight": "GA6C", - "lat": 46.648, - "lon": -65.537, - "altitude": 41000, - "track": 50, - "speed": 603, - "squawk": "3116", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "", - "arr": "", - "airline": "" - }, { - "hex": "01012b", - "flight": "MSR985", - "lat": 45.919, - "lon": -64.967, - "altitude": 36000, - "track": 237, - "speed": 378, - "squawk": "2513", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "CAI", - "arr": "JFK", - "airline": "MSR" - }, { - "hex": "4bb152", - "flight": "THY6363", - "lat": 44.627, - "lon": -64.868, - "altitude": 38000, - "track": 239, - "speed": 404, - "squawk": "2506", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "ISL", - "arr": "", - "airline": "THY" - }, { - "hex": "c2b535", - "flight": "CFC2525", - "lat": 45.992, - "lon": -64.462, - "altitude": 9175, - "track": 251, - "speed": 188, - "squawk": "7226", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "YYT", - "arr": "", - "airline": "CFC" - }, { - "hex": "39cf08", - "flight": "AFR334", - "lat": 45.825, - "lon": -63.659, - "altitude": 40000, - "track": 240, - "speed": 397, - "squawk": "2524", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "CDG", - "arr": "BOS", - "airline": "AFR" - }, { - "hex": "c07b05", - "flight": "", - "lat": 44.888, - "lon": -63.514, - "altitude": 0, - "track": 286, - "speed": 0, - "squawk": "0000", - "seen": 3, - "seen_pos": 3, - "rssi": 0, - "messages": 1, - "internet": true, - "dep": "YHZ", - "arr": "", - "airline": "ACA" - }] -} \ No newline at end of file +{"now":1642475094373.626,"messages":0,"aircraft":[{"hex":"c05f0c","flight":"JZA886","lat":45.453,"lon":-71.229,"altitude":33725,"track":80,"speed":490,"squawk":"1006","seen":5,"seen_pos":5,"rssi":0,"messages":1,"internet":true,"dep":"YUL","arr":"YDF","airline":"ACA"},{"hex":"c04850","flight":"JZA71","lat":45.627,"lon":-70.285,"altitude":24000,"track":278,"speed":324,"squawk":"3652","seen":5,"seen_pos":5,"rssi":0,"messages":1,"internet":true,"dep":"YHZ","arr":"YOW","airline":"ACA"},{"hex":"06a129","flight":"QTR63M","lat":46.198,"lon":-69.322,"altitude":35000,"track":49,"speed":553,"squawk":"4014","seen":5,"seen_pos":5,"rssi":0,"messages":1,"internet":true,"dep":"IAH","arr":"DOH","airline":"QTR"},{"hex":"43be92","flight":"AFL159","lat":44.165,"lon":-69.171,"altitude":39000,"track":40,"speed":573,"squawk":"6136","seen":5,"seen_pos":5,"rssi":0,"messages":1,"internet":true,"dep":"CUN","arr":"SVO","airline":"AFL"},{"hex":"c067e7","flight":"JZA7920","lat":45.563,"lon":-68.844,"altitude":30625,"track":83,"speed":487,"squawk":"0672","seen":5,"seen_pos":5,"rssi":0,"messages":1,"internet":true,"dep":"YUL","arr":"YFC","airline":"ACA"},{"hex":"ab3282","flight":"SCX8974","lat":44.818,"lon":-68.838,"altitude":0,"track":315,"speed":8,"squawk":"3462","seen":5,"seen_pos":5,"rssi":0,"messages":1,"internet":true,"dep":"BGR","arr":"SNN","airline":"SCX"},{"hex":"407992","flight":"BAW172","lat":44.589,"lon":-68.78,"altitude":37000,"track":44,"speed":559,"squawk":"1613","seen":5,"seen_pos":5,"rssi":0,"messages":1,"internet":true,"dep":"JFK","arr":"LHR","airline":"BAW"},{"hex":"aaf5b1","flight":"DAL16","lat":46.282,"lon":-68.477,"altitude":35000,"track":58,"speed":531,"squawk":"7434","seen":5,"seen_pos":5,"rssi":0,"messages":1,"internet":true,"dep":"DTW","arr":"LHR","airline":"DAL"},{"hex":"4006c4","flight":"BAW176A","lat":45.108,"lon":-68.069,"altitude":39000,"track":45,"speed":572,"squawk":"3041","seen":5,"seen_pos":5,"rssi":0,"messages":1,"internet":true,"dep":"JFK","arr":"LHR","airline":"BAW"},{"hex":"394a08","flight":"AFR011","lat":44.467,"lon":-67.926,"altitude":35000,"track":51,"speed":569,"squawk":"2616","seen":5,"seen_pos":5,"rssi":0,"messages":1,"internet":true,"dep":"JFK","arr":"CDG","airline":"AFR"},{"hex":"76cef6","flight":"SIA25","lat":45.457,"lon":-67.502,"altitude":37000,"track":52,"speed":567,"squawk":"3324","seen":5,"seen_pos":5,"rssi":0,"messages":1,"internet":true,"dep":"JFK","arr":"FRA","airline":"SIA"},{"hex":"7380c0","flight":"ELY026","lat":46.247,"lon":-67.12,"altitude":34975,"track":40,"speed":570,"squawk":"7160","seen":5,"seen_pos":5,"rssi":0,"messages":1,"internet":true,"dep":"EWR","arr":"TLV","airline":"ELY"},{"hex":"c05acc","flight":"JZA7998","lat":45.858,"lon":-66.964,"altitude":24200,"track":77,"speed":401,"squawk":"6524","seen":5,"seen_pos":5,"rssi":0,"messages":1,"internet":true,"dep":"YUL","arr":"YQM","airline":"ACA"},{"hex":"c0003e","flight":"CJT619","lat":45.076,"lon":-66.259,"altitude":34000,"track":274,"speed":414,"squawk":"3602","seen":5,"seen_pos":5,"rssi":0,"messages":1,"internet":true,"dep":"YHZ","arr":"YHM","airline":"CJT"},{"hex":"a9c508","flight":"AAL106","lat":46.254,"lon":-65.918,"altitude":37000,"track":54,"speed":572,"squawk":"1733","seen":5,"seen_pos":5,"rssi":0,"messages":1,"internet":true,"dep":"JFK","arr":"LHR","airline":"AAL"}]} \ No newline at end of file diff --git a/gmap.html b/gmap.html index ff68e31..b10a69b 100644 --- a/gmap.html +++ b/gmap.html @@ -91,29 +91,6 @@ - - +
+ + +

Airport Itinerary

+ + +
@@ -260,6 +248,26 @@ +
+
+
+ +