diff --git a/public_html/planeObject.js b/public_html/planeObject.js index 797c5af..318d469 100644 --- a/public_html/planeObject.js +++ b/public_html/planeObject.js @@ -326,14 +326,16 @@ PlaneObject.prototype.updateTick = function(receiver_timestamp, last_timestamp) } } else { this.visible = true; - if (this.position !== null) { + if (this.position !== null && (this.selected || this.seen_pos < 60)) { if (this.updateTrack(receiver_timestamp - last_timestamp + (this.position_from_mlat ? 30 : 5))) { this.updateLines(); this.updateMarker(true); } else { this.updateMarker(false); // didn't move } - } + } else { + this.clearMarker(); + } } }; diff --git a/public_html/script.js b/public_html/script.js index b399bc7..3c99fb6 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -634,10 +634,13 @@ function refreshTableInfo() { TrackedAircraft++; var classes = "plane_table_row"; - if (tableplane.position_from_mlat) - classes += " mlat"; - else if (tableplane.position !== null) - classes += " vPosition"; + if (tableplane.position !== null && tableplane.seen_pos < 60) { + ++TrackedAircraftPositions; + if (tableplane.position_from_mlat) + classes += " mlat"; + else + classes += " vPosition"; + } if (tableplane.icao == SelectedPlane) classes += " selected"; @@ -651,10 +654,6 @@ function refreshTableInfo() { tableplane.tr.cells[2].textContent = (tableplane.squawk !== null ? tableplane.squawk : ""); tableplane.tr.cells[3].textContent = format_altitude_brief(tableplane.altitude, tableplane.vert_rate); tableplane.tr.cells[4].textContent = format_speed_brief(tableplane.speed); - - if (tableplane.position !== null) - ++TrackedAircraftPositions; - tableplane.tr.cells[5].textContent = format_distance_brief(tableplane.sitedist); tableplane.tr.cells[6].textContent = format_track_brief(tableplane.track); tableplane.tr.cells[7].textContent = tableplane.messages;