From 3e4012e958a6e1a9a0082297f35b3924b2190a20 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 30 Jul 2018 17:51:18 -0500 Subject: [PATCH 01/21] SkyView extended mode-s changes * Add extended Mode-S info to infoblock * Move the infoblock to the sidebar * Resizable infoblock * Add hover tooltips for infoblock labels --- public_html/images/icon-information@2x.png | Bin 0 -> 1168 bytes public_html/images/toggle-height@2x.png | Bin 0 -> 780 bytes public_html/images/toggle-width@2x.png | Bin 0 -> 778 bytes public_html/index.html | 761 +++++++++++++-------- public_html/script.js | 205 ++++-- public_html/style.css | 164 +++-- 6 files changed, 723 insertions(+), 407 deletions(-) create mode 100644 public_html/images/icon-information@2x.png create mode 100644 public_html/images/toggle-height@2x.png create mode 100644 public_html/images/toggle-width@2x.png diff --git a/public_html/images/icon-information@2x.png b/public_html/images/icon-information@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..ec261ce3a285922f025a3d4fbb9f0d228ec2476b GIT binary patch literal 1168 zcmV;B1aJF^P)Nklp&G2~pAw75tO3Xv?B4BTCJPd*F(^ z(Yb0rMZ2nKY~V^|hH!lk|K|ZF7Rcpb93WKIyer)eKm^xe-&FzkIs8A9k;Em_R^w6| z&^JrZiRXU`5YIx_I(q&CKwOsnE#FD<@Lv`6r2kWl_-0P4#4xSds&5P@ND5rX^ zSCk1Fs{=}FSMD#Khr%;Z=0W*{xckq^n}`0~N#V9{Q+K+=dvFe&7=tbsx-Lp<`~yis zX9cPZ=+bJZ^k!qLU_ zJf@?m#XjRHYxDh3rsN^crh@mgiJ8{;3z3Ft^7l^B-VOA&$0$^4K@P|>l6)c;8mM|V z!?*aOiK&=-ES!B#QNZ)Z&1_--M~xX@4;H~tk=DKPuNo}s-06WfXp1wLwga+&xacwZ zIkoGVO-kJk6_wp9uT5nP#YftrP1?2#uY?}r3cPOCnIdL)fyuX5b{WP6@Ok$od$;3+i!jMR1uHrfkuhM-CSN3QBdxf95VTjS#Bwi1h4 zK@6QOy+?fFCjIq7j#y%F7t;lsK17r+vH3&dt0S22c5*0Lz_wgl87V8nI%4;zIkj78pw-*Rl96&*Sqq~}phuJ2u&_m3F8Ar_}VgMEgvxI@z zAxt})Mb>r)vA{#94oLZplg+|o@^53@nRT#SU&S6&5T##h8Xy(}#DKEN3F@Xftk}ne z3HfdlZQ9CYj#%u1#=4263af+NCTp_=W{Dw4KUl=EZeppz>R`8swrG>KgF-U&keDKl zbrVY!rk7D@;+f(S|LHTw^7|%1NR1q1isaI)a2nw5P z`9iPrHRZ@)${}QmEF8X(+&osRZ+6;)uA9kUb&wL3hZ^Nk(3Pl1U?Wt1QLbAiR zXAT=eP`umYm~jL<4+)xh98(U8&pRDhi3*Nrkj6ap1FNmT!XrKLUqt%ai{NDH5~eRq iWwJJdaAq4h()%C%+0u}Uh60iR0000 z0;GnTB@@MY`iWnVYTA#!O<@TeO9^`c_xk8LubTwqhKvDOytC#OQd5vx$seF(b zAhSr-2UAbB2mbv1_dm5^-nkcVK7N52Mk)=`3o-*_7O8q+>dE#1$bh#Wzx>W zk6*uF1`EjT2GD10YXKTE6=ss5Akw@d1z;kXn3dNRgwO2SAn*Dw!xP zajZEoF4p956~l&@!7$|z{vOihF||L0vqH)Xle&F7dXxHj)9F) zpZVSOqo0IyY?d+nW0V9YC(xKZ@8EVhFv&AAZee6&48F6j>j?n3i4tsyO6V$`OIjp zC)?gaNeB$E@PRMYCkSUm;M~CJ=HkS)Tx)YvLr{VsJAB}a7(p0{Jv4!lD?=Uk3;F&d z^>uZWM1C0fA_ijlol|T!1teo2!0AH1i*ny(zo5NkaqC8Ys3+TTqVd*basAhCM+9O0 z>{=7h5vyOaO17}#CKCuF)=CBYorMuMiGYb%{R*vQ(-pUpKonxFRIuNfj<}Ts{1Q}? zP5Bg>d$Ra`ZCXY-V(m(gglY62<_ zF%cU%s6N1H5r6|eDMuzAzkX0$Tyq@Zz-F=#1F;ZO_fr^ol_Cx*E(&q$h&8AV?Fq<% zOvJ4#RynV{HzI&QVZ4-b5SmmPSJ?}hU@V>sfKT_xAgQV;unLwOm zQvz{zAGy;Bq!TdgKzfA?8))qQA54Jr&uD{SqTaY2F$BN_mb|>2_a>2q&1=~hE3>mg zu;YyJGg|-a#nAD?DQmvJDgDTF4-}ch+ZgBgr?~MjsG8sZ0sK4?(&jSxW&i*H07*qo IM6N<$f+L4=Bme*a literal 0 HcmV?d00001 diff --git a/public_html/index.html b/public_html/index.html index 48bb634..577523c 100644 --- a/public_html/index.html +++ b/public_html/index.html @@ -2,13 +2,13 @@ - + - + @@ -22,7 +22,7 @@ - + PiAware Skyview @@ -63,182 +63,7 @@
- +
@@ -263,6 +88,14 @@
+
+ + +
Overlay Toggles
@@ -326,114 +159,476 @@
diff --git a/public_html/script.js b/public_html/script.js index 8d58106..fcf928a 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -203,11 +203,47 @@ function initialize() { } // Set up map/sidebar splitter - $("#sidebar_container").resizable({handles: {w: '#splitter'}}); + $("#sidebar_container").resizable({ + handles: { + w: '#splitter' + }, + minWidth: 350 + }); - // Set up aircraft information panel - $("#selected_infoblock").draggable({containment: "parent"}); + // Set up datablock splitter + $('#selected_infoblock').resizable({ + handles: { + s: '#splitter-infoblock' + }, + containment: "#sidebar_container", + minHeight: 50 + }); + // this is a little hacky, but the best, most consitent way of doing this. change the margin bottom of the table container to the height of the overlay + $('#selected_infoblock').on('resize', function() { + $('#sidebar_canvas').css('margin-bottom', $('#selected_infoblock').height() + 'px'); + }); + // look at the window resize to resize the pop-up infoblock so it doesn't float off the bottom or go off the top + $(window).on('resize', function() { + var topCalc = ($(window).height() - $('#selected_infoblock').height() - 60); + // check if the top will be less than zero, which will be overlapping/off the screen, and set the top correctly. + if (topCalc < 0) { + topCalc = 0; + $('#selected_infoblock').css('height', ($(window).height() - 60) +'px'); + } + $('#selected_infoblock').css('top', topCalc + 'px'); + }); + + // to make the infoblock responsive + $('#sidebar_container').on('resize', function() { + console.log('sidebar resize', $('#sidebar_canvas').width()); + if ($('#sidebar_container').width() < 500) { + $('#selected_infoblock').addClass('infoblock-container-small'); + } else { + $('#selected_infoblock').removeClass('infoblock-container-small'); + } + }); + // Set up event handlers for buttons $("#toggle_sidebar_button").click(toggleSidebarVisibility); $("#expand_sidebar_button").click(expandSidebar); @@ -331,21 +367,26 @@ function initialize() { } var CurrentHistoryFetch = null; -var PositionHistoryBuffer = [] +var PositionHistoryBuffer = []; var HistoryItemsReturned = 0; function start_load_history() { - if (PositionHistorySize > 0 && window.location.hash != '#nohistory') { - $("#loader_progress").attr('max',PositionHistorySize); - console.log("Starting to load history (" + PositionHistorySize + " items)"); - //Load history items in parallel - for (var i = 0; i < PositionHistorySize; i++) { - load_history_item(i); - } - } + if (PositionHistorySize > 0 && window.location.hash != '#nohistory') { + $("#loader_progress").attr('max',PositionHistorySize); + console.log("Starting to load history (" + PositionHistorySize + " items)"); + //Load history items in parallel + for (var i = 0; i < PositionHistorySize; i++) { + load_history_item(i); + } + } } function load_history_item(i) { + if (i >= PositionHistorySize) { + end_load_history(); + } + console.log("Loading history #" + i); + $("#loader_progress").attr('value',i); $.ajax({ url: 'data/history_' + i + '.json', timeout: 5000, @@ -353,20 +394,20 @@ function load_history_item(i) { dataType: 'json' }) .done(function(data) { - PositionHistoryBuffer.push(data); - HistoryItemsReturned++; - $("#loader_progress").attr('value',HistoryItemsReturned); - if (HistoryItemsReturned == PositionHistorySize) { - end_load_history(); - } + PositionHistoryBuffer.push(data); + HistoryItemsReturned++; + $("#loader_progress").attr('value',HistoryItemsReturned); + if (HistoryItemsReturned == PositionHistorySize) { + end_load_history(); + } }) .fail(function(jqxhr, status, error) { - //Doesn't matter if it failed, we'll just be missing a data point - HistoryItemsReturned++; - if (HistoryItemsReturned == PositionHistorySize) { - end_load_history(); - } + //Doesn't matter if it failed, we'll just be missing a data point + HistoryItemsReturned++; + if (HistoryItemsReturned == PositionHistorySize) { + end_load_history(); + } }); } @@ -587,9 +628,9 @@ function initialize_map() { if (FollowSelected) { // On manual navigation, disable follow var selected = Planes[SelectedPlane]; - if (typeof selected === 'undefined' || - (Math.abs(center[0] - selected.position[0]) > 0.0001 && - Math.abs(center[1] - selected.position[1]) > 0.0001)) { + if (typeof selected === 'undefined' || + (Math.abs(center[0] - selected.position[0]) > 0.0001 && + Math.abs(center[1] - selected.position[1]) > 0.0001)){ FollowSelected = false; refreshSelected(); refreshHighlighted(); @@ -856,7 +897,7 @@ function refreshSelected() { } else { $('#selected_callsign').text('n/a'); } - $('#selected_flightaware_link').html(getFlightAwareModeSLink(selected.icao, selected.flight, "FlightAware.com")); + $('#selected_flightaware_link').html(getFlightAwareModeSLink(selected.icao, selected.flight, "Visit Flight Page")); if (selected.registration !== null) { $('#selected_registration').text(selected.registration); @@ -879,7 +920,7 @@ function refreshSelected() { // emerg.className = 'hidden'; // } - $("#selected_altitude").text(format_altitude_long(selected.altitude, selected.vert_rate, DisplayUnits)); + $("#selected_altitude").text(format_altitude_long(selected.altitude, selected.vert_rate, DisplayUnits)); if (selected.squawk === null || selected.squawk === '0000') { $('#selected_squawk').text('n/a'); @@ -887,11 +928,14 @@ function refreshSelected() { $('#selected_squawk').text(selected.squawk); } - $('#selected_gs').text(format_speed_long(selected.gs, DisplayUnits)); - $('#selected_vertical_rate').text(format_vert_rate_long(selected.vert_rate, DisplayUnits)); + $('#selected_speed').text(format_speed_long(selected.gs, DisplayUnits)); + $('#selected_ias').text(format_speed_long(selected.ias, DisplayUnits)); + $('#selected_tas').text(format_speed_long(selected.tas, DisplayUnits)); + $('#selected_vertical_rate').text(format_vert_rate_long(selected.baro_rate, DisplayUnits)); + $('#selected_vertical_rate_geo').text(format_vert_rate_long(selected.geom_rate, DisplayUnits)); $('#selected_icao').text(selected.icao.toUpperCase()); $('#airframes_post_icao').attr('value',selected.icao); - $('#selected_track').text(format_track_long(selected.track)); + $('#selected_track').text(format_track_long(selected.track)); if (selected.seen <= 1) { $('#selected_seen').text('now'); @@ -917,8 +961,8 @@ function refreshSelected() { $('#selected_position').text(format_latlng(selected.position)); } else { $('#selected_position').text(format_latlng(selected.position)); - } - + } + $('#selected_follow').removeClass('hidden'); if (FollowSelected) { $('#selected_follow').css('font-weight', 'bold'); @@ -927,21 +971,22 @@ function refreshSelected() { $('#selected_follow').css('font-weight', 'normal'); } } - if (selected.getDataSource() === "adsb_icao") { - $('#selected_source').text("ADS-B"); - } else if (selected.getDataSource() === "tisb_trackfile" || selected.getDataSource() === "tisb_icao" || selected.getDataSource() === "tisb_other") { - $('#selected_source').text("TIS-B"); - } else if (selected.getDataSource() === "mlat") { - $('#selected_source').text("MLAT"); - } else { - $('#selected_source').text("Other"); - } + if (selected.getDataSource() === "adsb_icao") { + $('#selected_source').text("ADS-B"); + } else if (selected.getDataSource() === "tisb_trackfile" || selected.getDataSource() === "tisb_icao" || selected.getDataSource() === "tisb_other") { + $('#selected_source').text("TIS-B"); + } else if (selected.getDataSource() === "mlat") { + $('#selected_source').text("MLAT"); + } else { + $('#selected_source').text("Other"); + } + $('#selected_category').text(selected.category ? selected.category : "n/a"); $('#selected_sitedist').text(format_distance_long(selected.sitedist, DisplayUnits)); $('#selected_rssi').text(selected.rssi.toFixed(1) + ' dBFS'); $('#selected_message_count').text(selected.messages); - $('#selected_photo_link').html(getFlightAwarePhotoLink(selected.registration)); - - $('#selected_alt_geom').text(format_altitude_long(selected.alt_geom, selected.geom_rate, DisplayUnits)); + $('#selected_photo_link').html(getFlightAwarePhotoLink(selected.registration)); + + $('#selected_altitude_geom').text(format_altitude_long(selected.alt_geom, selected.geom_rate, DisplayUnits)); $('#selected_mag_heading').text(format_track_long(selected.mag_heading)); $('#selected_true_heading').text(format_track_long(selected.true_heading)); $('#selected_ias').text(format_speed_long(selected.ias, DisplayUnits)); @@ -957,9 +1002,9 @@ function refreshSelected() { $('#selected_roll').text(selected.roll.toFixed(1)); } if (selected.track_rate == null) { - $('#selected_track_rate').text('n/a'); + $('#selected_trackrate').text('n/a'); } else { - $('#selected_track_rate').text(selected.track_rate.toFixed(2)); + $('#selected_trackrate').text(selected.track_rate.toFixed(2)); } $('#selected_geom_rate').text(format_vert_rate_long(selected.geom_rate, DisplayUnits)); if (selected.nav_qnh == null) { @@ -986,7 +1031,8 @@ function refreshSelected() { } else { $('#selected_version').text('v' + selected.version); } -} + + } function refreshHighlighted() { // this is following nearly identical logic, etc, as the refreshSelected function, but doing less junk for the highlighted pane @@ -1004,6 +1050,48 @@ function refreshHighlighted() { $('#highlighted_infoblock').show(); + // Get info box position and size + var infoBox = $('#highlighted_infoblock'); + var infoBoxPosition = infoBox.position(); + if (typeof infoBoxOriginalPosition.top === 'undefined') { + infoBoxOriginalPosition.top = infoBoxPosition.top; + infoBoxOriginalPosition.left = infoBoxPosition.left; + } else { + infoBox.css("left", infoBoxOriginalPosition.left); + infoBox.css("top", infoBoxOriginalPosition.top); + infoBoxPosition = infoBox.position(); + } + var infoBoxExtent = getExtent(infoBoxPosition.left, infoBoxPosition.top, infoBox.outerWidth(), infoBox.outerHeight()); + + // Get map size + var mapCanvas = $('#map_canvas'); + var mapExtent = getExtent(0, 0, mapCanvas.width(), mapCanvas.height()); + + var marker = highlighted.marker; + var markerCoordinates = highlighted.marker.getGeometry().getCoordinates(); + var markerPosition = OLMap.getPixelFromCoordinate(markerCoordinates); + + // Check for overlap + //FIXME TODO: figure out this/remove this check + if (isPointInsideExtent(markerPosition[0], markerPosition[1], infoBoxExtent) || true) { + // Array of possible new positions for info box + var candidatePositions = []; + candidatePositions.push( { x: 40, y: 80 } ); + candidatePositions.push( { x: markerPosition[0] + 20, y: markerPosition[1] + 60 } ); + + // Find new position + for (var i = 0; i < candidatePositions.length; i++) { + var candidatePosition = candidatePositions[i]; + var candidateExtent = getExtent(candidatePosition.x, candidatePosition.y, infoBox.outerWidth(), infoBox.outerHeight()); + + if (!isPointInsideExtent(markerPosition[0], markerPosition[1], candidateExtent) && isPointInsideExtent(candidatePosition.x, candidatePosition.y, mapExtent)) { + // Found a new position that doesn't overlap marker - move box to that position + infoBox.css("left", candidatePosition.x); + infoBox.css("top", candidatePosition.y); + } + } + } + if (highlighted.flight !== null && highlighted.flight !== "") { $('#highlighted_callsign').text(highlighted.flight); } else { @@ -1223,6 +1311,8 @@ function selectPlaneByHex(hex,autofollow) { Planes[SelectedPlane].clearLines(); Planes[SelectedPlane].updateMarker(); $(Planes[SelectedPlane].tr).removeClass("selected"); + // scroll the infoblock back to the top for the next plane to be selected + $('.infoblock-container').scrollTop(0); } // If we are clicking the same plane, we are deselecting it. @@ -1424,9 +1514,11 @@ function setSelectedInfoBlockVisibility() { if (planeSelected && mapIsVisible) { $('#selected_infoblock').show(); + $('#sidebar_canvas').css('margin-bottom', $('#selected_infoblock').height() + 'px'); } else { $('#selected_infoblock').hide(); + $('#sidebar_canvas').css('margin-bottom', 0); } } @@ -1446,21 +1538,8 @@ function adjustSelectedInfoBlockPosition() { // Get marker position var marker = selectedPlane.marker; var markerCoordinates = selectedPlane.marker.getGeometry().getCoordinates(); - var markerPosition = OLMap.getPixelFromCoordinate(markerCoordinates); - - // Get info box position and size - var infoBox = $('#selected_infoblock'); - var infoBoxPosition = infoBox.position(); - if (typeof infoBoxOriginalPosition.top === 'undefined') { - infoBoxOriginalPosition.top = infoBoxPosition.top; - infoBoxOriginalPosition.left = infoBoxPosition.left; - } else { - infoBox.css("left", infoBoxOriginalPosition.left); - infoBox.css("top", infoBoxOriginalPosition.top); - infoBoxPosition = infoBox.position(); - } - var infoBoxExtent = getExtent(infoBoxPosition.left, infoBoxPosition.top, infoBox.outerWidth(), infoBox.outerHeight()); - + var markerPosition = OLMap.getPixelFromCoordinate(markerCoordinates); + // Get map size var mapCanvas = $('#map_canvas'); var mapExtent = getExtent(0, 0, mapCanvas.width(), mapCanvas.height()); diff --git a/public_html/style.css b/public_html/style.css index e1af4db..e8777fc 100644 --- a/public_html/style.css +++ b/public_html/style.css @@ -1,4 +1,5 @@ html, body { + -ms-overflow-style: -ms-autohiding-scrollbar; margin: 0; padding: 0; background-color: #ffffff; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 10pt; overflow: auto; height: 100%; } @@ -9,15 +10,28 @@ html, body { } #selected_infoblock { - position: absolute; - left: 40px; - top: 60px; - min-width: 394px; - padding: 10px; + position: absolute; + bottom: 0; + margin: 0; + border-top: 1px solid #ccc; background: #ffffff; - box-shadow: 4px 4px 10px #444444; - cursor: pointer; - z-index: 9999; + width: 100%; + height: 400px; +} +.infoblock-container { + overflow: scroll; + height: 100%; +} +#sidebar_canvas { + padding: 10px; + overflow: scroll; +} +#sidebar_container { + display: flex; + flex-direction: column; + width: 500px; + left: 0 !important; + height: 100%; } #map_container { @@ -85,15 +99,9 @@ html, body { background-size: cover; } -#sidebar_container { - display: flex; - width: 500px; - left: 0 !important; -} - #splitter { - cursor: col-resize; + cursor: ew-resize; display: block; position: absolute; top: 125px; @@ -106,7 +114,26 @@ html, body { background-position: 0px; background-color: transparent; border: none; - background-image: url("images/column-adjust.png"); + background-image: url("images/toggle-width@2x.png"); + background-size: cover; +} + +#splitter-infoblock { + cursor: ns-resize; + display: inline-block; + position: absolute ; + top: 0px; + right: 0; + /* float: right; */ + margin-left: auto; + width: 24px; + height: 25px; + background-size: 24px 25px; + background-repeat: no-repeat; + background-position: 0px; + background-color: transparent; + border: none; + background-image: url("images/toggle-height@2x.png"); background-size: cover; } @@ -134,11 +161,7 @@ html, body { left: 10px !important; } -#sidebar_canvas { - flex: 1 1 auto; - padding: 10px; - overflow: scroll; -} + div#SpecialSquawkWarning { position: absolute; bottom: 25px; right: 430px; border: 2px solid red; background-color: #FFFFA3; opacity: 0.75; filter:alpha(opacity=75); padding: 5px; @@ -257,22 +280,33 @@ select.error, textarea.error, input.error { padding-right: 20px; } -.infoHeading -{ +.infoHeading { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - line-height: 18px; + font-size: 12px; + font-weight: bold; + line-height: 16px; color: #002F5D; - color: rgb(0, 47, 93); } -.infoData -{ +.infoData { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - line-height: 18px; + font-size: 12px; + line-height: 16px; color: #000000; - color: rgb(0, 0, 0); +} + +.sectionTitle { + width: 100%; + text-transform: uppercase; + color: #fff; + background: #002F5D; + font-size: 14px; + /* padding: 5px 20px; */ + /* margin-left: -10px; */ +} + +.section-title-content { + padding: 5px 20px; } .legend @@ -301,8 +335,7 @@ select.error, textarea.error, input.error { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; - text-indent: 16px - color: #000000; + text-indent: 16px; color: rgb(0, 0, 0); } @@ -316,24 +349,6 @@ select.error, textarea.error, input.error { text-decoration: underline; } -.infoHeading -{ - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 12px; - line-height: 16px; - color: #666666; - color: rgb(102, 102, 102); -} - -.infoData -{ - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 12px; - line-height: 16px; - color: #000000; - color: rgb(0, 0, 0); -} - #header { width: 100%; height: 60px; @@ -471,12 +486,12 @@ select.error, textarea.error, input.error { .infoRowTitle { display: inline-block; - width: 50%; + /* width: 50%; */ } .infoRowContent { display: inline-block; - width: 40%; + /* width: 40%; */ } .infoRowFluid { @@ -487,6 +502,13 @@ select.error, textarea.error, input.error { padding-top: 10px; } +.infoRowLine { + width: 49%; + display: inline-block; + padding-top: 2px; + padding-bottom: 2px; +} + .removePadding { padding: 0; } @@ -517,7 +539,7 @@ select.error, textarea.error, input.error { .lightGreyBackground { background-color: #efefef; } - +/* .fourColumnSection1 { width: 20%; } @@ -532,7 +554,7 @@ select.error, textarea.error, input.error { .fourColumnSection4 { width: 20%; -} +} */ #dump1090_infoblock { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; @@ -655,6 +677,32 @@ select.error, textarea.error, input.error { outline: none; } +.bottom-container { + width: 100%; + margin-top: 8px; + padding: 40px 0px; + text-align: center; + background-color: #eee; +} +#selected_flightaware_link a { + background-color: #00a0e2; + color: white; + text-decoration: none; + padding: 10px; + border-radius: 4px; +} +.bottom-info-container { + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + color: #002F5D; + line-height: 18px; +} + +.infoblock-container-small .infoRowFluid { + display: block; +} + /* Retina 2x images */ @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { .settingsCloseBox { @@ -672,9 +720,6 @@ select.error, textarea.error, input.error { .ol-zoom-in { background-image: url("images/zoom-in@2x.png"); } - #splitter { - background-image: url("images/column-adjust@2x.png"); - } #toggle_sidebar_button.show_sidebar { background-image: url("images/table-icon@2x.png"); } @@ -703,9 +748,6 @@ select.error, textarea.error, input.error { .ol-zoom-in { background-image: url("images/zoom-in@3x.png"); } - #splitter { - background-image: url("images/column-adjust@3x.png"); - } #toggle_sidebar_button.show_sidebar { background-image: url("images/table-icon@3x.png"); } From 3298eb77b471a087993415636f25da6fc4b20f4d Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 31 Jul 2018 12:17:27 -0500 Subject: [PATCH 02/21] Add accuracy fields --- public_html/index.html | 10 +++++----- public_html/planeObject.js | 11 +++++++++-- public_html/script.js | 31 ++++++++++++++++++++++++++----- 3 files changed, 40 insertions(+), 12 deletions(-) diff --git a/public_html/index.html b/public_html/index.html index 577523c..c7899f0 100644 --- a/public_html/index.html +++ b/public_html/index.html @@ -575,7 +575,7 @@ Nac_p:
- n/a + n/a
@@ -583,7 +583,7 @@ Sil_type:
- n/a + n/a
@@ -591,7 +591,7 @@ Nac_v:
- n/a + n/a
@@ -599,7 +599,7 @@ Nic_baro:
- n/a + n/a
@@ -607,7 +607,7 @@ Sil:
- n/a + n/a
diff --git a/public_html/planeObject.js b/public_html/planeObject.js index db9c56c..554d7ac 100644 --- a/public_html/planeObject.js +++ b/public_html/planeObject.js @@ -28,7 +28,13 @@ function PlaneObject(icao) { this.nav_altitude = null; this.nav_heading = null; this.nav_modes = null; - this.nav_qnh = null; + this.nav_qnh = null; + + this.nac_p = null; + this.nac_v = null; + this.nic_baro = null; + this.sil_type = null; + this.sil = null; this.baro_rate = null; this.geom_rate = null; @@ -438,7 +444,8 @@ PlaneObject.prototype.updateData = function(receiver_timestamp, data) { var fields = ["alt_baro", "alt_geom", "gs", "ias", "tas", "track", "track_rate", "mag_heading", "true_heading", "mach", - "roll", "nav_altitude", "nav_heading", "nav_modes", + "roll", "nav_altitude", "nav_heading", "nav_modes", + "nac_p", "nac_v", "nic_baro", "sil_type", "sil", "nav_qnh", "baro_rate", "geom_rate", "squawk", "category", "version"]; diff --git a/public_html/script.js b/public_html/script.js index fcf928a..22f19f0 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -381,10 +381,6 @@ function start_load_history() { } function load_history_item(i) { - if (i >= PositionHistorySize) { - end_load_history(); - } - console.log("Loading history #" + i); $("#loader_progress").attr('value',i); @@ -1018,7 +1014,32 @@ function refreshSelected() { $('#selected_nav_modes').text("n/a"); } else { $('#selected_nav_modes').text(selected.nav_modes.join()); - } + } + if (selected.nic_baro == null) { + $('#selected_nic_baro').text("n/a"); + } else { + $('#selected_nic_baro').text(selected.nic_baro); + } + if (selected.nac_p == null) { + $('#selected_nac_p').text("n/a"); + } else { + $('#selected_nac_p').text(selected.nac_p); + } + if (selected.nac_v == null) { + $('#selected_nac_v').text("n/a"); + } else { + $('#selected_nac_v').text(selected.nac_v); + } + if (selected.sil == null) { + $('#selected_sil').text("n/a"); + } else { + $('#selected_sil').text(selected.sil); + } + if (selected.sil_type == null) { + $('#selected_sil_type').text("n/a"); + } else { + $('#selected_sil_type').text(selected.sil_type); + } if (selected.version == null) { $('#selected_version').text('none'); From 0983766a6cc92843226244dd5ea74c698dd709d1 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 31 Jul 2018 16:12:03 -0500 Subject: [PATCH 03/21] Add close button and airframes.org link --- public_html/index.html | 6 ++++++ public_html/script.js | 15 ++++++++++++++- public_html/style.css | 20 ++++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/public_html/index.html b/public_html/index.html index c7899f0..962fc6f 100644 --- a/public_html/index.html +++ b/public_html/index.html @@ -268,6 +268,7 @@ diff --git a/public_html/planeObject.js b/public_html/planeObject.js index 554d7ac..a07b09f 100644 --- a/public_html/planeObject.js +++ b/public_html/planeObject.js @@ -29,6 +29,7 @@ function PlaneObject(icao) { this.nav_heading = null; this.nav_modes = null; this.nav_qnh = null; + this.rc = null; this.nac_p = null; this.nac_v = null; @@ -446,7 +447,7 @@ PlaneObject.prototype.updateData = function(receiver_timestamp, data) { "track_rate", "mag_heading", "true_heading", "mach", "roll", "nav_altitude", "nav_heading", "nav_modes", "nac_p", "nac_v", "nic_baro", "sil_type", "sil", - "nav_qnh", "baro_rate", "geom_rate", + "nav_qnh", "baro_rate", "geom_rate", "rc", "squawk", "category", "version"]; for (var i = 0; i < fields.length; ++i) { diff --git a/public_html/script.js b/public_html/script.js index d447d6b..11faa90 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -249,7 +249,6 @@ function initialize() { // to make the infoblock responsive $('#sidebar_container').on('resize', function() { - console.log('sidebar resize', $('#sidebar_canvas').width()); if ($('#sidebar_container').width() < 500) { $('#selected_infoblock').addClass('infoblock-container-small'); } else { @@ -1037,16 +1036,15 @@ function refreshSelected() { $('#selected_nic_baro').text("not cross-checked"); } } - if (selected.nac_p == null) { - $('#selected_nac_p').text("n/a"); + + $('#selected_nac_p').text(format_nac_p(selected.nac_p)); + $('#selected_nac_v').text(format_nac_v(selected.nac_v)); + if (selected.rc == null) { + $('#selected_rc').text("n/a"); } else { - $('#selected_nac_p').text(selected.nac_p); - } - if (selected.nac_v == null) { - $('#selected_nac_v').text("n/a"); - } else { - $('#selected_nac_v').text(selected.nac_v); + $('#selected_rc').text(format_distance_long(selected.rc, DisplayUnits)); } + if (selected.sil == null || selected.sil_type == null) { $('#selected_sil').text("n/a"); } else { From 974e962a5502890dd471cd64baa4a1bac194fb96 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Thu, 2 Aug 2018 13:32:05 -0500 Subject: [PATCH 07/21] C should be subscript for RC. 0 = unknown --- public_html/index.html | 2 +- public_html/script.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/public_html/index.html b/public_html/index.html index 74b3deb..ea9eef5 100644 --- a/public_html/index.html +++ b/public_html/index.html @@ -605,7 +605,7 @@
- RC: + RC:
n/a diff --git a/public_html/script.js b/public_html/script.js index 11faa90..e0666aa 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -1041,6 +1041,8 @@ function refreshSelected() { $('#selected_nac_v').text(format_nac_v(selected.nac_v)); if (selected.rc == null) { $('#selected_rc').text("n/a"); + } else if (selected.rc == 0) { + $('#selected_rc').text("unknown"); } else { $('#selected_rc').text(format_distance_long(selected.rc, DisplayUnits)); } From 3ec6ec1a9dacc44ad92c02f306580109b75afe89 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 3 Aug 2018 15:03:19 -0500 Subject: [PATCH 08/21] Center info icon. Show highlight hover with select box --- public_html/index.html | 2 +- public_html/script.js | 5 ----- public_html/style.css | 7 +++++++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/public_html/index.html b/public_html/index.html index ea9eef5..14d4789 100644 --- a/public_html/index.html +++ b/public_html/index.html @@ -616,7 +616,7 @@
- Learn more about Mode S data type by hovering over each data label. +
Learn more about Mode S data type by hovering over each data label.
diff --git a/public_html/script.js b/public_html/script.js index e0666aa..18610c0 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -1360,7 +1360,6 @@ function sortBy(id,sc,se) { function selectPlaneByHex(hex,autofollow) { //console.log("select: " + hex); // If SelectedPlane has something in it, clear out the selected - removeHighlight(); if (SelectedAllPlanes) { deselectAllPlanes(); } @@ -1404,10 +1403,6 @@ function selectPlaneByHex(hex,autofollow) { } function highlightPlaneByHex(hex) { - // if we've selected a plane, don't show the highlighting box - if (SelectedPlane != null) { - return; - } if (hex != null) { HighlightedPlane = hex; diff --git a/public_html/style.css b/public_html/style.css index 6cdbe81..b798d7e 100644 --- a/public_html/style.css +++ b/public_html/style.css @@ -716,6 +716,13 @@ select.error, textarea.error, input.error { color: #002F5D; line-height: 18px; } +.bottom-info-container img { + vertical-align: middle; +} +.bottom-info-container .bottom-info-text { + vertical-align: middle; + display: inline; +} .selected_airframe { padding-top: 30px; } From 540e5f8e95843cab7a35c1ab9e3a31682b03b37e Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 3 Aug 2018 18:39:13 -0500 Subject: [PATCH 09/21] Just use ft/m for the Rc display --- public_html/formatter.js | 22 +++++++++++++++++++++- public_html/script.js | 2 +- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/public_html/formatter.js b/public_html/formatter.js index 014c4c5..2aca7df 100644 --- a/public_html/formatter.js +++ b/public_html/formatter.js @@ -12,7 +12,8 @@ var UnitLabels = { 'altitude': { metric: "m", imperial: "ft", nautical: "ft"}, 'speed': { metric: "km/h", imperial: "mph", nautical: "kt" }, 'distance': { metric: "km", imperial: "mi", nautical: "NM" }, - 'verticalRate': { metric: "m/s", imperial: "ft/min", nautical: "ft/min" } + 'verticalRate': { metric: "m/s", imperial: "ft/min", nautical: "ft/min" }, + 'distanceShort': {metric: "m", imperial: "ft", nautical: "m"} }; // formatting helpers @@ -156,6 +157,16 @@ function format_distance_long(dist, displayUnits, fixed) { return dist_text; } +function format_distace_short (dist, displayUnits) { + if (dist === null) { + return "n/a"; + } + + var dist_text = Math.round(convert_distance_short(dist, displayUnits)) + NBSP + get_unit_label("distanceShort", displayUnits); + + return dist_text; +} + // dist in meters function convert_distance(dist, displayUnits) { if (displayUnits === "metric") { @@ -167,6 +178,15 @@ function convert_distance(dist, displayUnits) { return (dist / 1852); // meters to nautical miles } +// dist in meters +// converts meters to feet or just returns meters +function convert_distance_short(dist, displayUnits) { + if (displayUnits === "imperial") { + return (dist * 3.28084); // meters to feet + } + return dist; // just meters +} + // rate in ft/min function format_vert_rate_brief(rate, displayUnits) { if (rate === null || rate === undefined) { diff --git a/public_html/script.js b/public_html/script.js index 18610c0..a2b6d91 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -1044,7 +1044,7 @@ function refreshSelected() { } else if (selected.rc == 0) { $('#selected_rc').text("unknown"); } else { - $('#selected_rc').text(format_distance_long(selected.rc, DisplayUnits)); + $('#selected_rc').text(format_distace_short(selected.rc, DisplayUnits)); } if (selected.sil == null || selected.sil_type == null) { From 71f2c99e964215d06561293a9c29842100604d9d Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 8 Aug 2018 11:37:26 -0500 Subject: [PATCH 10/21] Fix air/ground status. Tooltip/infoblock changes --- public_html/formatter.js | 11 +++++++++++ public_html/index.html | 20 ++++++++++---------- public_html/script.js | 2 ++ 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/public_html/formatter.js b/public_html/formatter.js index 2aca7df..191364b 100644 --- a/public_html/formatter.js +++ b/public_html/formatter.js @@ -92,6 +92,17 @@ function format_altitude_long(alt, vr, displayUnits) { } } +// alt ground/airborne +function format_onground (alt) { + if (alt === null) { + return "n/a"; + } else if (alt === "ground") { + return "on ground"; + } else { + return "airborne"; + } +} + // alt in feet function convert_altitude(alt, displayUnits) { if (displayUnits === "metric") { diff --git a/public_html/index.html b/public_html/index.html index 14d4789..9156d14 100644 --- a/public_html/index.html +++ b/public_html/index.html @@ -272,13 +272,13 @@
- n/a - n/a + n/a + n/a
-
Registration:
+
Registration:
n/a
@@ -325,7 +325,7 @@
- Air/Ground Status: + Air/Ground Status:
n/a @@ -477,7 +477,7 @@
- Nav Altitude: + Altitude:
n/a @@ -485,7 +485,7 @@
- Nav Modes: + Modes:
n/a @@ -493,7 +493,7 @@
- Nav Heading: + Heading:
n/a @@ -501,7 +501,7 @@
- Nav QNH: + QNH:
n/a @@ -549,7 +549,7 @@
- Category: + Category:
n/a @@ -557,7 +557,7 @@
- Last Seen: + Last Seen:
n/a diff --git a/public_html/script.js b/public_html/script.js index a2b6d91..7732ea5 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -930,6 +930,8 @@ function refreshSelected() { $("#selected_altitude").text(format_altitude_long(selected.altitude, selected.vert_rate, DisplayUnits)); + $('#selected_onground').text(format_onground(selected.altitude)); + if (selected.squawk === null || selected.squawk === '0000') { $('#selected_squawk').text('n/a'); } else { From 963cb1aefb3532e8eb9475de6dd4cf45c0dd8ea8 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 8 Aug 2018 16:41:34 -0500 Subject: [PATCH 11/21] Add back in photos link. Add more descriptions and remove squawks section --- public_html/index.html | 25 +++++++++++++------------ public_html/script.js | 2 +- public_html/style.css | 4 ++++ 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/public_html/index.html b/public_html/index.html index 9156d14..03ec253 100644 --- a/public_html/index.html +++ b/public_html/index.html @@ -289,7 +289,7 @@ Aircraft Type:
- +
@@ -299,14 +299,7 @@
-
-
- Squawk: -
-
- -
-
+
@@ -563,11 +556,19 @@ n/a
+
+
+ Squawk: +
+
+ +
+
- Accuracy + Accuracy
@@ -597,7 +598,7 @@
- NICBARO: + NICBARO:
n/a @@ -605,7 +606,7 @@
- RC: + RC:
n/a diff --git a/public_html/script.js b/public_html/script.js index 7732ea5..2e3c897 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -1819,7 +1819,7 @@ function getFlightAwareModeSLink(code, ident, linkText) { function getFlightAwarePhotoLink(registration) { if (registration !== null && registration !== "") { - return "See Aircraft Photos"; + return "See Photos"; } return ""; diff --git a/public_html/style.css b/public_html/style.css index b798d7e..3845cc7 100644 --- a/public_html/style.css +++ b/public_html/style.css @@ -440,6 +440,10 @@ select.error, textarea.error, input.error { text-align: center; } +.lightblue-link, .lightblue-link a { + color: #00A0E2; +} + .buttonHeader { margin-top: 15px; } From 65f44d99bf3e3426a20a28e5e3c593c0c53dd926 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 8 Aug 2018 16:42:14 -0500 Subject: [PATCH 12/21] Actually remove the squawks section --- public_html/index.html | 9 --------- 1 file changed, 9 deletions(-) diff --git a/public_html/index.html b/public_html/index.html index 03ec253..b5b1334 100644 --- a/public_html/index.html +++ b/public_html/index.html @@ -293,15 +293,6 @@
-
-
- Squawks -
-
-
- -
-
Location From 7bb2cfe01f286e7d1398c08bde0608681673ef6d Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 10 Aug 2018 10:34:40 -0500 Subject: [PATCH 13/21] Move FlightAware link to the top --- public_html/index.html | 2 +- public_html/style.css | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public_html/index.html b/public_html/index.html index b5b1334..90d120c 100644 --- a/public_html/index.html +++ b/public_html/index.html @@ -277,6 +277,7 @@
+
Registration:
n/a
@@ -612,7 +613,6 @@
-
airframes.org diff --git a/public_html/style.css b/public_html/style.css index 3845cc7..ce4fd6f 100644 --- a/public_html/style.css +++ b/public_html/style.css @@ -712,6 +712,9 @@ select.error, textarea.error, input.error { text-decoration: none; padding: 10px; border-radius: 4px; + float: right; + margin-right: 25px; + margin-top: 10px; } .bottom-info-container { padding-top: 10px; @@ -727,9 +730,6 @@ select.error, textarea.error, input.error { vertical-align: middle; display: inline; } -.selected_airframe { - padding-top: 30px; -} .selected_airframe a { color: #002F5D; } From 7d61b2aaabddc181d0a98aa0944ebacd1f1628e6 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 13 Aug 2018 16:41:30 -0500 Subject: [PATCH 14/21] Add Selected to nav alt/heading. Replace dragger with bar on top --- public_html/index.html | 4 ++-- public_html/style.css | 36 ++++++++++++++++++------------------ 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/public_html/index.html b/public_html/index.html index 90d120c..cf851b9 100644 --- a/public_html/index.html +++ b/public_html/index.html @@ -462,7 +462,7 @@
- Altitude: + Selected Altitude:
n/a @@ -478,7 +478,7 @@
- Heading: + Selected Heading:
n/a diff --git a/public_html/style.css b/public_html/style.css index ce4fd6f..2f18cc9 100644 --- a/public_html/style.css +++ b/public_html/style.css @@ -13,7 +13,6 @@ html, body { position: absolute; bottom: 0; margin: 0; - border-top: 1px solid #ccc; background: #ffffff; width: 100%; height: 400px; @@ -119,27 +118,28 @@ html, body { } #splitter-infoblock { - cursor: ns-resize; - display: inline-block; - position: absolute ; - top: 0px; - right: 0; - /* float: right; */ + cursor: ns-resize; + display: inline-block; + position: absolute ; + top: 0px; + right: 0; margin-left: auto; - width: 24px; - height: 25px; - background-size: 24px 25px; - background-repeat: no-repeat; - background-position: 0px; - background-color: transparent; - border: none; - background-image: url("images/toggle-height@2x.png"); - background-size: cover; + width: 24px; + height: 4px; + background-size: 24px 25px; + background-repeat: no-repeat; + background-position: 0px; + border: none; + width: 100%; + border-bottom: #234c75; + background-color: #65819e; + border-bottom-width: 1px; + border-bottom-style: solid; } #close-button { display: inline-block; position: absolute; - top: 5px; + top: 18px; color: #00A0E2; right: 30px; margin-left: auto; @@ -477,7 +477,7 @@ select.error, textarea.error, input.error { height: 36px; border-bottom: 1px solid #00A0E2; padding-left: 18px; - padding-top: 14px; + padding-top: 18px; } .highlightedInfo { From e0bb6e11e751d48479288d2212c8aba9b85c9cb2 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 15 Aug 2018 11:21:35 -0500 Subject: [PATCH 15/21] Add registration and source to hover box --- public_html/index.html | 10 +++++++++- public_html/script.js | 15 +++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/public_html/index.html b/public_html/index.html index cf851b9..e392bec 100644 --- a/public_html/index.html +++ b/public_html/index.html @@ -19,7 +19,7 @@ - + @@ -83,6 +83,14 @@
Speed:
n/a
+
+
Registration:
+
n/a
+
+
+
Source:
+
n/a
+
diff --git a/public_html/script.js b/public_html/script.js index 2e3c897..c2b4edd 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -1165,6 +1165,21 @@ function refreshHighlighted() { $('#higlighted_icaotype').text(""); } + if (highlighted.getDataSource() === "adsb_icao") { + $('#highlighted_source').text("ADS-B"); + } else if (highlighted.getDataSource() === "tisb_trackfile" || highlighted.getDataSource() === "tisb_icao" || highlighted.getDataSource() === "tisb_other") { + $('#highlighted_source').text("TIS-B"); + } else if (highlighted.getDataSource() === "mlat") { + $('#highlighted_source').text("MLAT"); + } else { + $('#highlighted_source').text("Other"); + } + + if (highlighted.registration !== null) { + $('#highlighted_registration').text(highlighted.registration); + } else { + $('#highlighted_registration').text(""); + } $('#highlighted_speed').text(format_speed_long(highlighted.speed, DisplayUnits)); From 43fedd9c6d6dbcd2cd852eea954fc678ea8d6447 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 15 Aug 2018 11:50:14 -0500 Subject: [PATCH 16/21] Move registration on hover box. Default to n/a --- public_html/index.html | 8 ++++---- public_html/script.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/public_html/index.html b/public_html/index.html index e392bec..e884137 100644 --- a/public_html/index.html +++ b/public_html/index.html @@ -71,6 +71,10 @@ n/a
+
+
Registration:
+
n/a
+
Aircraft Type:
n/a
@@ -83,10 +87,6 @@
Speed:
n/a
-
-
Registration:
-
n/a
-
Source:
n/a
diff --git a/public_html/script.js b/public_html/script.js index c2b4edd..4d15c38 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -1162,7 +1162,7 @@ function refreshHighlighted() { if (highlighted.icaotype !== null) { $('#higlighted_icaotype').text(highlighted.icaotype); } else { - $('#higlighted_icaotype').text(""); + $('#higlighted_icaotype').text("n/a"); } if (highlighted.getDataSource() === "adsb_icao") { From 4fbb336fa31077c971211949df1398b090fb3e2e Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 15 Aug 2018 15:41:47 -0500 Subject: [PATCH 17/21] Show n/a for aircraft type on info pane --- public_html/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public_html/script.js b/public_html/script.js index 4d15c38..28c041a 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -916,7 +916,7 @@ function refreshSelected() { if (selected.icaotype !== null) { $('#selected_icaotype').text(selected.icaotype); } else { - $('#selected_icaotype').text(""); + $('#selected_icaotype').text("n/a"); } // Not using this logic for the redesigned info panel at the time, but leaving it in if/when adding it back From bf05a94f3e57a14cfa5e60790f3e00af008b30ba Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 15 Aug 2018 16:54:43 -0500 Subject: [PATCH 18/21] Show n/a for not known registration --- public_html/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public_html/script.js b/public_html/script.js index 28c041a..78c36eb 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -910,7 +910,7 @@ function refreshSelected() { if (selected.registration !== null) { $('#selected_registration').text(selected.registration); } else { - $('#selected_registration').text(""); + $('#selected_registration').text("n/a"); } if (selected.icaotype !== null) { @@ -1178,7 +1178,7 @@ function refreshHighlighted() { if (highlighted.registration !== null) { $('#highlighted_registration').text(highlighted.registration); } else { - $('#highlighted_registration').text(""); + $('#highlighted_registration').text("n/a"); } $('#highlighted_speed').text(format_speed_long(highlighted.speed, DisplayUnits)); From 8985b5ab862deda40d166f779319224b94807a1b Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 17 Aug 2018 10:28:42 -0500 Subject: [PATCH 19/21] Version planeObject also --- public_html/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public_html/index.html b/public_html/index.html index e884137..bb791d8 100644 --- a/public_html/index.html +++ b/public_html/index.html @@ -18,7 +18,7 @@ - + From 8eeb29ec32806173f1da633fa6e6d6a23cd106fa Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 17 Aug 2018 11:31:12 -0500 Subject: [PATCH 20/21] Fix typo. Clean up CSS and spacing --- public_html/formatter.js | 4 ++-- public_html/planeObject.js | 16 ++++++++-------- public_html/script.js | 2 +- public_html/style.css | 21 --------------------- 4 files changed, 11 insertions(+), 32 deletions(-) diff --git a/public_html/formatter.js b/public_html/formatter.js index 191364b..957ff84 100644 --- a/public_html/formatter.js +++ b/public_html/formatter.js @@ -168,7 +168,7 @@ function format_distance_long(dist, displayUnits, fixed) { return dist_text; } -function format_distace_short (dist, displayUnits) { +function format_distance_short (dist, displayUnits) { if (dist === null) { return "n/a"; } @@ -193,7 +193,7 @@ function convert_distance(dist, displayUnits) { // converts meters to feet or just returns meters function convert_distance_short(dist, displayUnits) { if (displayUnits === "imperial") { - return (dist * 3.28084); // meters to feet + return (dist / 0.3048); // meters to feet } return dist; // just meters } diff --git a/public_html/planeObject.js b/public_html/planeObject.js index a07b09f..0c801ba 100644 --- a/public_html/planeObject.js +++ b/public_html/planeObject.js @@ -5,8 +5,8 @@ function PlaneObject(icao) { this.icao = icao; this.icaorange = findICAORange(icao); this.flight = null; - this.squawk = null; - this.selected = false; + this.squawk = null; + this.selected = false; this.category = null; // Basic location information @@ -29,13 +29,13 @@ function PlaneObject(icao) { this.nav_heading = null; this.nav_modes = null; this.nav_qnh = null; - this.rc = null; + this.rc = null; - this.nac_p = null; - this.nac_v = null; - this.nic_baro = null; - this.sil_type = null; - this.sil = null; + this.nac_p = null; + this.nac_v = null; + this.nic_baro = null; + this.sil_type = null; + this.sil = null; this.baro_rate = null; this.geom_rate = null; diff --git a/public_html/script.js b/public_html/script.js index 78c36eb..ae98b09 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -1046,7 +1046,7 @@ function refreshSelected() { } else if (selected.rc == 0) { $('#selected_rc').text("unknown"); } else { - $('#selected_rc').text(format_distace_short(selected.rc, DisplayUnits)); + $('#selected_rc').text(format_distance_short(selected.rc, DisplayUnits)); } if (selected.sil == null || selected.sil_type == null) { diff --git a/public_html/style.css b/public_html/style.css index 2f18cc9..e62ecf6 100644 --- a/public_html/style.css +++ b/public_html/style.css @@ -319,8 +319,6 @@ select.error, textarea.error, input.error { color: #fff; background: #002F5D; font-size: 14px; - /* padding: 5px 20px; */ - /* margin-left: -10px; */ } .section-title-content { @@ -508,12 +506,10 @@ select.error, textarea.error, input.error { .infoRowTitle { display: inline-block; - /* width: 50%; */ } .infoRowContent { display: inline-block; - /* width: 40%; */ } .infoRowFluid { @@ -561,22 +557,6 @@ select.error, textarea.error, input.error { .lightGreyBackground { background-color: #efefef; } -/* -.fourColumnSection1 { - width: 20%; -} - -.fourColumnSection2 { - width: 20%; -} - -.fourColumnSection3 { - width: 20%; -} - -.fourColumnSection4 { - width: 20%; -} */ #dump1090_infoblock { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; @@ -613,7 +593,6 @@ select.error, textarea.error, input.error { } .legendTitle { - /*margin-left: auto;*/ line-height: 19px; display: inline-block; padding-right: 20px; From e31bee19092485dd39403e04d3658da5c123091e Mon Sep 17 00:00:00 2001 From: James Wilson Date: Fri, 17 Aug 2018 11:33:35 -0500 Subject: [PATCH 21/21] More spacing --- public_html/planeObject.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public_html/planeObject.js b/public_html/planeObject.js index 0c801ba..437fc0c 100644 --- a/public_html/planeObject.js +++ b/public_html/planeObject.js @@ -28,7 +28,7 @@ function PlaneObject(icao) { this.nav_altitude = null; this.nav_heading = null; this.nav_modes = null; - this.nav_qnh = null; + this.nav_qnh = null; this.rc = null; this.nac_p = null;