Handle long refresh rates better, don't draw all tracks as dotted.
This commit is contained in:
parent
2ba56231a6
commit
6fbeae070c
|
@ -245,7 +245,7 @@ PlaneObject.prototype.updateData = function(receiver_timestamp, data) {
|
||||||
this.squawk = data.squawk;
|
this.squawk = data.squawk;
|
||||||
};
|
};
|
||||||
|
|
||||||
PlaneObject.prototype.updateTick = function(receiver_timestamp) {
|
PlaneObject.prototype.updateTick = function(receiver_timestamp, last_timestamp) {
|
||||||
// recompute seen and seen_pos
|
// recompute seen and seen_pos
|
||||||
this.seen = receiver_timestamp - this.last_message_time;
|
this.seen = receiver_timestamp - this.last_message_time;
|
||||||
this.seen_pos = (this.last_position_time === null ? null : receiver_timestamp - this.last_position_time);
|
this.seen_pos = (this.last_position_time === null ? null : receiver_timestamp - this.last_position_time);
|
||||||
|
@ -262,7 +262,7 @@ PlaneObject.prototype.updateTick = function(receiver_timestamp) {
|
||||||
} else {
|
} else {
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
if (this.position !== null) {
|
if (this.position !== null) {
|
||||||
if (this.updateTrack(5)) {
|
if (this.updateTrack(receiver_timestamp - last_timestamp + 5)) {
|
||||||
this.updateLines();
|
this.updateLines();
|
||||||
this.updateMarker(true);
|
this.updateMarker(true);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -29,7 +29,7 @@ var SitePosition = null;
|
||||||
|
|
||||||
var ReceiverClock = null;
|
var ReceiverClock = null;
|
||||||
|
|
||||||
var LastReceiverTimestamp = null;
|
var LastReceiverTimestamp = 0;
|
||||||
var StaleReceiverCount = 0;
|
var StaleReceiverCount = 0;
|
||||||
var FetchPending = null;
|
var FetchPending = null;
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ function fetchData() {
|
||||||
// update timestamps, visibility, history track for all planes - not only those updated
|
// update timestamps, visibility, history track for all planes - not only those updated
|
||||||
for (var i = 0; i < PlanesOrdered.length; ++i) {
|
for (var i = 0; i < PlanesOrdered.length; ++i) {
|
||||||
var plane = PlanesOrdered[i];
|
var plane = PlanesOrdered[i];
|
||||||
plane.updateTick(now);
|
plane.updateTick(now, LastReceiverTimestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
refreshTableInfo();
|
refreshTableInfo();
|
||||||
|
@ -277,6 +277,8 @@ function end_load_history() {
|
||||||
var plane = PlanesOrdered[i];
|
var plane = PlanesOrdered[i];
|
||||||
plane.updateTick(now);
|
plane.updateTick(now);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LastReceiverTimestamp = last;
|
||||||
}
|
}
|
||||||
|
|
||||||
PositionHistoryBuffer = null;
|
PositionHistoryBuffer = null;
|
||||||
|
|
Loading…
Reference in a new issue