Clear markers and don't color rows if the aircraft sees no positions for 60s,

even if they are still receiving other messages.

The marker/trail can be redisplayed by selecting the plane from the table.
This commit is contained in:
Oliver Jowett 2015-07-15 17:07:28 +01:00
parent 45d645a864
commit b4490c7b47
2 changed files with 11 additions and 10 deletions

View file

@ -326,14 +326,16 @@ PlaneObject.prototype.updateTick = function(receiver_timestamp, last_timestamp)
} }
} else { } else {
this.visible = true; 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))) { if (this.updateTrack(receiver_timestamp - last_timestamp + (this.position_from_mlat ? 30 : 5))) {
this.updateLines(); this.updateLines();
this.updateMarker(true); this.updateMarker(true);
} else { } else {
this.updateMarker(false); // didn't move this.updateMarker(false); // didn't move
} }
} } else {
this.clearMarker();
}
} }
}; };

View file

@ -634,10 +634,13 @@ function refreshTableInfo() {
TrackedAircraft++; TrackedAircraft++;
var classes = "plane_table_row"; var classes = "plane_table_row";
if (tableplane.position_from_mlat) if (tableplane.position !== null && tableplane.seen_pos < 60) {
classes += " mlat"; ++TrackedAircraftPositions;
else if (tableplane.position !== null) if (tableplane.position_from_mlat)
classes += " vPosition"; classes += " mlat";
else
classes += " vPosition";
}
if (tableplane.icao == SelectedPlane) if (tableplane.icao == SelectedPlane)
classes += " selected"; classes += " selected";
@ -651,10 +654,6 @@ function refreshTableInfo() {
tableplane.tr.cells[2].textContent = (tableplane.squawk !== null ? tableplane.squawk : ""); 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[3].textContent = format_altitude_brief(tableplane.altitude, tableplane.vert_rate);
tableplane.tr.cells[4].textContent = format_speed_brief(tableplane.speed); 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[5].textContent = format_distance_brief(tableplane.sitedist);
tableplane.tr.cells[6].textContent = format_track_brief(tableplane.track); tableplane.tr.cells[6].textContent = format_track_brief(tableplane.track);
tableplane.tr.cells[7].textContent = tableplane.messages; tableplane.tr.cells[7].textContent = tableplane.messages;