From 17c8265ce8ad6606b83fe1241d4b978abbcc78c3 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Thu, 15 Jun 2017 22:41:32 +0100 Subject: [PATCH] Fix a few more things that were broken by the field renaming. --- public_html/script.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public_html/script.js b/public_html/script.js index 0dac429..a6d8c69 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -1052,9 +1052,9 @@ function refreshTableInfo() { tableplane.tr.cells[3].textContent = (tableplane.registration !== null ? tableplane.registration : ""); tableplane.tr.cells[4].textContent = (tableplane.icaotype !== null ? tableplane.icaotype : ""); tableplane.tr.cells[5].textContent = (tableplane.squawk !== null ? tableplane.squawk : ""); - tableplane.tr.cells[6].innerHTML = format_altitude_brief(tableplane.altitude, tableplane.vert_rate, DisplayUnits); - tableplane.tr.cells[7].textContent = format_speed_brief(tableplane.speed, DisplayUnits); - tableplane.tr.cells[8].textContent = format_vert_rate_brief(tableplane.vert_rate, DisplayUnits); + tableplane.tr.cells[6].innerHTML = format_altitude_brief(tableplane.altitude, tableplane.baro_rate, DisplayUnits); + tableplane.tr.cells[7].textContent = format_speed_brief(tableplane.gs, DisplayUnits); + tableplane.tr.cells[8].textContent = format_vert_rate_brief(tableplane.baro_rate, DisplayUnits); tableplane.tr.cells[9].textContent = format_distance_brief(tableplane.sitedist, DisplayUnits); tableplane.tr.cells[10].textContent = format_track_brief(tableplane.track); tableplane.tr.cells[11].textContent = tableplane.messages; @@ -1104,8 +1104,8 @@ function sortByRegistration() { sortBy('registration', compareAlpha, func function sortByAircraftType() { sortBy('icaotype', compareAlpha, function(x) { return x.icaotype; }); } function sortBySquawk() { sortBy('squawk', compareAlpha, function(x) { return x.squawk; }); } function sortByAltitude() { sortBy('altitude',compareNumeric, function(x) { return (x.altitude == "ground" ? -1e9 : x.altitude); }); } -function sortBySpeed() { sortBy('speed', compareNumeric, function(x) { return x.speed; }); } -function sortByVerticalRate() { sortBy('vert_rate', compareNumeric, function(x) { return x.vert_rate; }); } +function sortBySpeed() { sortBy('speed', compareNumeric, function(x) { return x.gs; }); } +function sortByVerticalRate() { sortBy('vert_rate', compareNumeric, function(x) { return x.baro_rate; }); } function sortByDistance() { sortBy('sitedist',compareNumeric, function(x) { return x.sitedist; }); } function sortByTrack() { sortBy('track', compareNumeric, function(x) { return x.track; }); } function sortByMsgs() { sortBy('msgs', compareNumeric, function(x) { return x.messages; }); }