mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
Aircraft drawn as far behind real time as their feed is late, along one curve their trail follows
Civil and military aircraft were drawn a fixed 30 s (15 s) behind real time while anonymous feed reports arrive about 90 s old every 30 s, so every contact dead reckoned about a minute past its newest report and snapped when the next one landed (several km on a turn), and the tracked trail, recorded from those drawn positions and patched as reports arrived, kinked. - The display delay (data/displayDelay.js) is the 90th percentile of the newest 256 report lags plus 5 s, between the layer's floor (30 s, 15 s) and five minutes, slewed at most 0.2 s/s up and 0.05 s/s down. Icons, the renderer's live motion clock, labels, HUD, detection, the tracked camera and the trail read the one delay; following the world clock draws with none and deliveries leave it alone. - Between two reports an aircraft flies a biarc (data/fixCurve.js) that passes through both and leaves each along its track, sent as contract arc segments; the trail is the reports joined along the same curve, so the icon sits on it. Nothing drawn between reports is kept. - A report a coasting contact missed is eased onto from where it would have been that frame (at least 3 s, at most 30% over its speed, within 20 s); over 5 km it jumps. Past its newest report a contact coasts straight on: a turn rate averaged over earlier reports outlived the turn. - Forward synthetic fixes no longer block real reports older than them, and a history keeps 24 fixes. - A feed simulation (testSupport/aircraftFeedSim.mjs) checks both layers against a 90 s late feed, a fallback switch, repeated reports, outages and the world clock.
This commit is contained in:
1 parent
c57eb74506
commit
5f98f8bdf3
40 files changed
+2606
-1238
No files matched your search
@@ -369,11 +369,19 @@ test('while the display is between reports, the trail stops at the report behind
|
||||
const icon = Cesium.Cartesian3.fromDegrees(-100 + 0.075, 40, 10_000);
|
||||
const h = trailHarness({ fixes, nowMs, head: icon });
|
||||
h.tracking._startTrail('00a001');
|
||||
// Reports at 0, 10 and 20 s are behind the icon (display time 25 s).
|
||||
assert.equal(h.drawn().length, 3);
|
||||
// Reports at 0, 10 and 20 s are behind the icon (display time 25 s): the
|
||||
// body runs through them along their curve and ends at the third.
|
||||
const body = h.drawn();
|
||||
for (const report of fixes.slice(0, 3))
|
||||
assert.ok(
|
||||
body.some((p) => Cesium.Cartesian3.distance(p, report.position) < 0.01),
|
||||
);
|
||||
assert.ok(Cesium.Cartesian3.distance(body.at(-1), fixes[2].position) < 0.01);
|
||||
// The head runs on from it to the icon.
|
||||
const head = h.head();
|
||||
assert.equal(head.length, 2);
|
||||
assert.ok(head.length >= 2);
|
||||
assert.ok(Cesium.Cartesian3.distance(head[0], fixes[2].position) < 0.01);
|
||||
assert.ok(Cesium.Cartesian3.distance(head.at(-1), icon) < 0.01);
|
||||
});
|
||||
|
||||
test('the hold-or-coast decision is made once per report: a floor that resolves mid-coast does not snap the icon back', () => {
|
||||
|
||||
Reference in new issue
Block a user