mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Merge branch 'sameh/renderer-track' into sameh/renderer-seam
This commit is contained in:
commit
f65df05b62
4 files changed
+646
-262
No files matched your search
@@ -5750,7 +5750,7 @@ pins and share links already supply complete boxes.
|
|||||||
- Fleet model eligibility is distance-based with on-screen priority and hard caps (`MODEL_MAX`, `MODEL_MAX_ALL`) to avoid draw-call explosions. Each model owns its own `modelMatrix`; shared scratch matrices are forbidden because they caused stacking/flicker.
|
- Fleet model eligibility is distance-based with on-screen priority and hard caps (`MODEL_MAX`, `MODEL_MAX_ALL`) to avoid draw-call explosions. Each model owns its own `modelMatrix`; shared scratch matrices are forbidden because they caused stacking/flicker.
|
||||||
- Tracked aircraft use standalone model primitives driven from the already-settled dead-reckoned display position, while the tracked Cesium entity remains billboard-backed so `viewer.trackedEntity` always has a ready bounding sphere.
|
- Tracked aircraft use standalone model primitives driven from the already-settled dead-reckoned display position, while the tracked Cesium entity remains billboard-backed so `viewer.trackedEntity` always has a ready bounding sphere.
|
||||||
- Flights and military layers mirror the same tracking invariants: no warm-up freeze/jump, altitude-scaled framing, trail head glued to the displayed plane, no pull-out when switching targets, and no cross-layer orphan when switching between commercial and military tracks.
|
- Flights and military layers mirror the same tracking invariants: no warm-up freeze/jump, altitude-scaled framing, trail head glued to the displayed plane, no pull-out when switching targets, and no cross-layer orphan when switching between commercial and military tracks.
|
||||||
- Regression surface: `npm run test:track` drives the real app headless with synthetic aircraft feeds and asserts the tracking invariants without depending on live OpenSky/adsb data. Arrival-rotation checks observe the settle frame and then the first reveal frame, each within a 500 ms wall-clock budget that sits inside the one-second idle fallback, rather than assuming the 80 ms fleet cadence fits inside four rendered frames; an incorrect first orientation fails immediately. Only an inconclusive timeout is retried (once); a timeout keeps every angle it measured (the settle frame before a reveal timeout, and the late frame itself, which is read before the deadline check), so a measured wrong angle fails without retry. `src/data/trackedModelRegime.test.mjs` pins the tracked contact's threshold math, the enter/exit asymmetry, and the default-on / cockpit / TR-3B / deselect wiring in both layers.
|
- Regression surface: `npm run test:track` drives the real app headless with synthetic aircraft feeds and asserts the tracking invariants without depending on live OpenSky/adsb data. The harness reads what the app draws through its own seams: what the camera follows through `src/data/followed.js`, icons from the draw port's icon sets as the renderer holds them, and models by their `{set, id}` pick ids. Arrival-rotation checks read the drawn rows' course (the icon sets turn each icon along it on the GPU every frame, so there is no CPU rotation pass to repair a stale nose) and observe the settle frame and then the first reveal frame, each within a 500 ms wall-clock budget; an incorrect first orientation fails immediately. Only an inconclusive timeout is retried (once); a timeout keeps every angle it measured (the settle frame before a reveal timeout, and the late frame itself, which is read before the deadline check), so a measured wrong angle fails without retry. `src/data/trackedModelRegime.test.mjs` pins the tracked contact's threshold math, the enter/exit asymmetry, and the default-on / cockpit / TR-3B / deselect wiring in both layers.
|
||||||
|
|
||||||
### TR-3B conversion Easter egg (August 2026)
|
### TR-3B conversion Easter egg (August 2026)
|
||||||
|
|
||||||
|
|||||||
+251
-54
@@ -65,6 +65,27 @@ const LINE_CLIP = { x: 390, y: 200, width: 510, height: 380 };
|
|||||||
const canvasShot = () =>
|
const canvasShot = () =>
|
||||||
page.screenshot({ clip: LINE_CLIP, type: 'png', encoding: 'base64' });
|
page.screenshot({ clip: LINE_CLIP, type: 'png', encoding: 'base64' });
|
||||||
|
|
||||||
|
/**
|
||||||
|
* `canvasShot` once the globe has no imagery or terrain tiles left to load
|
||||||
|
* (bounded: a view that never settles is shot as it is, and the comparison
|
||||||
|
* then reports what it sees). `globe.tilesLoaded` covers the globe only: a
|
||||||
|
* 3D Tiles tileset on a keyed server can still be refining when it is true.
|
||||||
|
*/
|
||||||
|
async function settledCanvasShot() {
|
||||||
|
await page
|
||||||
|
.waitForFunction(
|
||||||
|
() => {
|
||||||
|
const scene = window.__godsEyeView.viewer.scene;
|
||||||
|
scene.requestRender();
|
||||||
|
return scene.globe.tilesLoaded;
|
||||||
|
},
|
||||||
|
{ timeout: 15_000, polling: 100 },
|
||||||
|
)
|
||||||
|
.catch(() => {});
|
||||||
|
await wait(200);
|
||||||
|
return canvasShot();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Amber pixels in one shot that are not amber in another of the same view:
|
* Amber pixels in one shot that are not amber in another of the same view:
|
||||||
* a mark's own pixels, apart from imagery and panels that both shots share.
|
* a mark's own pixels, apart from imagery and panels that both shots share.
|
||||||
@@ -505,12 +526,26 @@ try {
|
|||||||
await page.click(rowControl(lineId, 'swatch'));
|
await page.click(rowControl(lineId, 'swatch'));
|
||||||
await page.click(rowControl(lineId, 'color-amber'));
|
await page.click(rowControl(lineId, 'color-amber'));
|
||||||
await markReaches(lineId, { color: 'amber', alpha: 1 });
|
await markReaches(lineId, { color: 'amber', alpha: 1 });
|
||||||
|
// Only the Line is on the board for its shots. The area's fill pulses, and
|
||||||
|
// under it borderline roofs drift into and out of amber between two shots
|
||||||
|
// of an unchanged scene, on the old build as on this one.
|
||||||
|
const others = await page.evaluate((id) => {
|
||||||
|
const marks = window.__gevAnnotations.list();
|
||||||
|
const ids = marks.filter((m) => m.id !== id && !m.hidden).map((m) => m.id);
|
||||||
|
for (const other of ids) window.__gevAnnotations.setHidden(other, true);
|
||||||
|
return ids;
|
||||||
|
}, lineId);
|
||||||
|
for (const other of others)
|
||||||
|
await markReaches(other, { hidden: true, alpha: 0 });
|
||||||
await wait(800);
|
await wait(800);
|
||||||
const shown = await canvasShot();
|
// The fly-to above is still refining imagery near the camera at this
|
||||||
|
// point; a tile that sharpens between the two shots repaints roofs into
|
||||||
|
// and out of amber, so each shot waits for the globe to finish loading.
|
||||||
|
const shown = await settledCanvasShot();
|
||||||
await page.click(rowControl(lineId, 'toggle'));
|
await page.click(rowControl(lineId, 'toggle'));
|
||||||
await markReaches(lineId, { hidden: true, alpha: 0 });
|
await markReaches(lineId, { hidden: true, alpha: 0 });
|
||||||
await wait(800);
|
await wait(800);
|
||||||
const hiddenShot = await canvasShot();
|
const hiddenShot = await settledCanvasShot();
|
||||||
// Amber the shown line had and the hidden one lost; amber that appears
|
// Amber the shown line had and the hidden one lost; amber that appears
|
||||||
// only once it is hidden is noise, and must stay small beside it.
|
// only once it is hidden is noise, and must stay small beside it.
|
||||||
const gone = await amberOnlyIn(shown, hiddenShot);
|
const gone = await amberOnlyIn(shown, hiddenShot);
|
||||||
@@ -522,12 +557,24 @@ try {
|
|||||||
);
|
);
|
||||||
await page.click(rowControl(lineId, 'toggle'));
|
await page.click(rowControl(lineId, 'toggle'));
|
||||||
await wait(1200);
|
await wait(1200);
|
||||||
const back = await amberOnlyIn(await canvasShot(), hiddenShot);
|
const back = await amberOnlyIn(await settledCanvasShot(), hiddenShot);
|
||||||
check(
|
check(
|
||||||
'and paints again when shown',
|
'and paints again when shown',
|
||||||
back > gone * 0.5,
|
back > gone * 0.5,
|
||||||
`${back} of ${gone} line pixels back`,
|
`${back} of ${gone} line pixels back`,
|
||||||
);
|
);
|
||||||
|
await page.evaluate((ids) => {
|
||||||
|
for (const other of ids) window.__gevAnnotations.setHidden(other, false);
|
||||||
|
}, others);
|
||||||
|
const restored = [];
|
||||||
|
for (const other of others)
|
||||||
|
if (await markReaches(other, { hidden: false, alpha: 1 }))
|
||||||
|
restored.push(other);
|
||||||
|
check(
|
||||||
|
'the marks set aside for the Line shots are back on the board',
|
||||||
|
restored.length === others.length,
|
||||||
|
`${restored.length} of ${others.length} back`,
|
||||||
|
);
|
||||||
await shot('03-pins-and-shapes');
|
await shot('03-pins-and-shapes');
|
||||||
|
|
||||||
// ── Escape cancels the shape, a second Escape leaves draw mode ──────────
|
// ── Escape cancels the shape, a second Escape leaves draw mode ──────────
|
||||||
@@ -575,33 +622,88 @@ try {
|
|||||||
: 'no CCTV camera or bundled site could be reached — the ownership case cannot be proved',
|
: 'no CCTV camera or bundled site could be reached — the ownership case cannot be proved',
|
||||||
);
|
);
|
||||||
if (target) {
|
if (target) {
|
||||||
|
// The camera pose the target was found at: a selecting click flies the
|
||||||
|
// camera to what it picked, so the drawing click has to come back here
|
||||||
|
// and find the target again, or it would land on plain ground.
|
||||||
|
await page.evaluate(() => {
|
||||||
|
const camera = window.__godsEyeView.viewer.camera;
|
||||||
|
window.__qaTargetView = {
|
||||||
|
destination: camera.positionWC.clone(),
|
||||||
|
orientation: {
|
||||||
|
heading: camera.heading,
|
||||||
|
pitch: camera.pitch,
|
||||||
|
roll: camera.roll,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
});
|
||||||
|
await page.evaluate(clearSelection);
|
||||||
|
await page.evaluate(startSelectionCount);
|
||||||
await clickWorld(target.x, target.y, { settle: 900 });
|
await clickWorld(target.x, target.y, { settle: 900 });
|
||||||
const selectedNormally = await page.evaluate(() =>
|
const normal = await page.evaluate(readSelectionCount, target.key);
|
||||||
Boolean(window.__godsEyeView.viewer.selectedEntity),
|
|
||||||
);
|
|
||||||
check(
|
check(
|
||||||
`clicking a ${target.layer} selects it when nothing owns the pointer`,
|
`clicking a ${target.layer} selects it when nothing owns the pointer`,
|
||||||
selectedNormally,
|
// The CCTV branch looks for `CAM-` Cesium entities and reads the
|
||||||
|
// viewer's selection; neither build draws cameras that way any more, so
|
||||||
|
// it is not reached and the bundled data centre is the target.
|
||||||
|
normal.item > 0 || (target.layerId === 'cctv' && normal.entity),
|
||||||
|
`${normal.item} selection(s) of ${target.key}, ${normal.all} in all, entity ${normal.entity}`,
|
||||||
);
|
);
|
||||||
|
await page.evaluate(clearSelection);
|
||||||
await page.evaluate(() => {
|
await page.evaluate(() => {
|
||||||
window.__godsEyeView.viewer.selectedEntity = undefined;
|
const viewer = window.__godsEyeView.viewer;
|
||||||
|
viewer.camera.cancelFlight?.();
|
||||||
|
viewer.camera.setView(window.__qaTargetView);
|
||||||
|
viewer.scene.requestRender();
|
||||||
});
|
});
|
||||||
|
await wait(1500);
|
||||||
|
const again = await onScreen(
|
||||||
|
target.belongs,
|
||||||
|
target.contextPrefix,
|
||||||
|
target.key,
|
||||||
|
);
|
||||||
|
check(
|
||||||
|
`the ${target.layer} is picked again after the camera returns`,
|
||||||
|
Boolean(again),
|
||||||
|
again ? `at ${again.x},${again.y}` : 'not picked on screen any more',
|
||||||
|
);
|
||||||
|
if (again) {
|
||||||
await page.click('#draw-toggle');
|
await page.click('#draw-toggle');
|
||||||
await page.click('.pp-mode-btn[data-shape="area"]');
|
await page.click('.pp-mode-btn[data-shape="area"]');
|
||||||
await clickWorld(target.x, target.y, { settle: 900 });
|
// Draw mode's own panel must not have covered it: the drawing click has
|
||||||
|
// to land on the same item, not on plain ground.
|
||||||
|
const drawingSpot = await onScreen(
|
||||||
|
target.belongs,
|
||||||
|
target.contextPrefix,
|
||||||
|
target.key,
|
||||||
|
);
|
||||||
|
check(
|
||||||
|
`the ${target.layer} is still picked once draw mode is open`,
|
||||||
|
Boolean(drawingSpot),
|
||||||
|
drawingSpot
|
||||||
|
? `at ${drawingSpot.x},${drawingSpot.y}`
|
||||||
|
: 'not picked on screen in draw mode',
|
||||||
|
);
|
||||||
|
if (drawingSpot) {
|
||||||
|
await page.evaluate(startSelectionCount);
|
||||||
|
await clickWorld(drawingSpot.x, drawingSpot.y, { settle: 900 });
|
||||||
const whileDrawing = await drawState();
|
const whileDrawing = await drawState();
|
||||||
const selectedWhileDrawing = await page.evaluate(() =>
|
const drawingSelection = await page.evaluate(
|
||||||
Boolean(window.__godsEyeView.viewer.selectedEntity),
|
readSelectionCount,
|
||||||
|
target.key,
|
||||||
);
|
);
|
||||||
check(
|
check(
|
||||||
`clicking the same ${target.layer} while drawing adds a vertex and selects nothing`,
|
`clicking the same ${target.layer} while drawing adds a vertex and selects nothing`,
|
||||||
whileDrawing.vertices === 1 && selectedWhileDrawing === false,
|
whileDrawing.vertices === 1 &&
|
||||||
`vertices ${whileDrawing.vertices}, selected ${selectedWhileDrawing}`,
|
drawingSelection.all === 0 &&
|
||||||
|
!drawingSelection.entity,
|
||||||
|
`vertices ${whileDrawing.vertices}, ${drawingSelection.all} selection(s), entity ${drawingSelection.entity}`,
|
||||||
);
|
);
|
||||||
|
}
|
||||||
await page.keyboard.press('Escape');
|
await page.keyboard.press('Escape');
|
||||||
await page.keyboard.press('Escape');
|
await page.keyboard.press('Escape');
|
||||||
await wait(150);
|
await wait(150);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ── what a reload actually does ─────────────────────────────────────────
|
// ── what a reload actually does ─────────────────────────────────────────
|
||||||
const beforeReload = await page.evaluate(() =>
|
const beforeReload = await page.evaluate(() =>
|
||||||
@@ -877,22 +979,24 @@ async function findClickableTarget() {
|
|||||||
viewer.scene.requestRender();
|
viewer.scene.requestRender();
|
||||||
}, camera);
|
}, camera);
|
||||||
await wait(4000);
|
await wait(4000);
|
||||||
const spot = await onScreen(
|
const spot = await onScreen(cameraEntity);
|
||||||
(entity) => typeof entity.id === 'string' && entity.id.startsWith('CAM-'),
|
if (spot)
|
||||||
);
|
return {
|
||||||
if (spot) return { ...spot, layer: 'CCTV camera' };
|
...spot,
|
||||||
|
layer: 'CCTV camera',
|
||||||
|
layerId: 'cctv',
|
||||||
|
belongs: cameraEntity,
|
||||||
|
contextPrefix: null,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bundled infrastructure as the keyless fallback: a different guarded handler,
|
// Bundled infrastructure as the keyless fallback: a different guarded handler,
|
||||||
// the same shared claim, and always present without a key.
|
// the same shared claim, and always present without a key.
|
||||||
const site = await page
|
const site = await page
|
||||||
.evaluate(async () => {
|
.evaluate(async () => {
|
||||||
const viewer = window.__godsEyeView.viewer;
|
// The app registers each local feature's context as `<layer id>:<feature id>`,
|
||||||
// The app registers each local feature's context as `<layer id>:<feature id>`.
|
// with its coordinates, whether the layer draws Cesium entities or
|
||||||
const isDataCentre = (entity) =>
|
// through the draw port.
|
||||||
window.__godsEyeView.entityRecords
|
|
||||||
.read(entity)
|
|
||||||
?.contextId?.startsWith('local-datacenters:');
|
|
||||||
await window.__godsEyeView.dataManager.setEnabled(
|
await window.__godsEyeView.dataManager.setEnabled(
|
||||||
'local-datacenters',
|
'local-datacenters',
|
||||||
true,
|
true,
|
||||||
@@ -900,30 +1004,16 @@ async function findClickableTarget() {
|
|||||||
origin: 'user',
|
origin: 'user',
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
const centreOf = (entity) => {
|
|
||||||
const time = viewer.clock.currentTime;
|
|
||||||
const point = entity.position?.getValue?.(time);
|
|
||||||
if (point) return point;
|
|
||||||
const hierarchy = entity.polygon?.hierarchy?.getValue?.(time);
|
|
||||||
if (hierarchy?.positions?.length) return hierarchy.positions[0];
|
|
||||||
const line = entity.polyline?.positions?.getValue?.(time);
|
|
||||||
return line?.length ? line[0] : null;
|
|
||||||
};
|
|
||||||
for (let attempt = 0; attempt < 40; attempt += 1) {
|
for (let attempt = 0; attempt < 40; attempt += 1) {
|
||||||
for (let i = 0; i < viewer.dataSources.length; i += 1) {
|
const records = window.__gevContextStore?.entities?.values() ?? [];
|
||||||
for (const entity of viewer.dataSources.get(i).entities.values) {
|
for (const record of records) {
|
||||||
if (!isDataCentre(entity)) continue;
|
if (!String(record?.id).startsWith('local-datacenters:')) continue;
|
||||||
const point = centreOf(entity);
|
if (
|
||||||
if (!point) continue;
|
!Number.isFinite(record.latitude) ||
|
||||||
const carto = window.Cesium
|
!Number.isFinite(record.longitude)
|
||||||
? window.Cesium.Cartographic.fromCartesian(point)
|
)
|
||||||
: viewer.scene.globe.ellipsoid.cartesianToCartographic(point);
|
continue;
|
||||||
if (!carto) continue;
|
return { lon: record.longitude, lat: record.latitude };
|
||||||
return {
|
|
||||||
lon: (carto.longitude * 180) / Math.PI,
|
|
||||||
lat: (carto.latitude * 180) / Math.PI,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
await new Promise((resolve) => setTimeout(resolve, 500));
|
await new Promise((resolve) => setTimeout(resolve, 500));
|
||||||
}
|
}
|
||||||
@@ -945,23 +1035,97 @@ async function findClickableTarget() {
|
|||||||
viewer.scene.requestRender();
|
viewer.scene.requestRender();
|
||||||
}, site);
|
}, site);
|
||||||
await wait(4000);
|
await wait(4000);
|
||||||
const spot = await onScreen((entity) =>
|
const spot = await onScreen(dataCentre, 'local-datacenters:');
|
||||||
|
return spot
|
||||||
|
? {
|
||||||
|
...spot,
|
||||||
|
layer: 'data centre',
|
||||||
|
layerId: 'local-datacenters',
|
||||||
|
belongs: dataCentre,
|
||||||
|
contextPrefix: 'local-datacenters:',
|
||||||
|
}
|
||||||
|
: null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** A CCTV camera entity (runs in the page through `onScreen`). */
|
||||||
|
function cameraEntity(entity) {
|
||||||
|
return typeof entity.id === 'string' && entity.id.startsWith('CAM-');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A bundled data centre: a Cesium entity carrying its context, or a draw-port
|
||||||
|
* pick id `{ set, id }` from a set named `<layer id>:<n>:<part>` (runs in the
|
||||||
|
* page through `onScreen`).
|
||||||
|
*/
|
||||||
|
function dataCentre(entity) {
|
||||||
|
return (
|
||||||
window.__godsEyeView.entityRecords
|
window.__godsEyeView.entityRecords
|
||||||
.read(entity)
|
.read(entity)
|
||||||
?.contextId?.startsWith('local-datacenters:'),
|
?.contextId?.startsWith('local-datacenters:') ||
|
||||||
|
(typeof entity?.set === 'string' &&
|
||||||
|
entity.set.startsWith('local-datacenters:'))
|
||||||
);
|
);
|
||||||
return spot ? { ...spot, layer: 'data centre' } : null;
|
}
|
||||||
|
|
||||||
|
/** Clear both selection slots (runs in the page). */
|
||||||
|
function clearSelection() {
|
||||||
|
window.__godsEyeView.viewer.selectedEntity = undefined;
|
||||||
|
const store = window.__gevContextStore;
|
||||||
|
if (store) store.selectedEntityId = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Count click selections from now on (runs in the page). A layer selects
|
||||||
|
* through the shared context store, which announces each selection with
|
||||||
|
* `gev:entity-selected`; one drawn through the draw port has no Cesium entity
|
||||||
|
* to set as the viewer's selection. Counting the announcements rather than
|
||||||
|
* reading the slot keeps an earlier selection, or a tracking layer refilling
|
||||||
|
* the slot without announcing, from deciding the result.
|
||||||
|
*/
|
||||||
|
function startSelectionCount() {
|
||||||
|
const seen = [];
|
||||||
|
window.removeEventListener('gev:entity-selected', window.__qaOnSelected);
|
||||||
|
window.__qaSelections = seen;
|
||||||
|
window.__qaOnSelected = (event) => seen.push(event.detail ?? null);
|
||||||
|
window.addEventListener('gev:entity-selected', window.__qaOnSelected);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Selections since `startSelectionCount` (runs in the page): `all`, those of
|
||||||
|
* the item whose context id is `key`, and whether the viewer holds a selected
|
||||||
|
* Cesium entity.
|
||||||
|
* @param {string} key
|
||||||
|
* @returns {{ all: number, item: number, entity: boolean }}
|
||||||
|
*/
|
||||||
|
function readSelectionCount(key) {
|
||||||
|
const seen = window.__qaSelections || [];
|
||||||
|
return {
|
||||||
|
all: seen.length,
|
||||||
|
item: seen.filter((record) => record?.id === key).length,
|
||||||
|
entity: Boolean(window.__godsEyeView.viewer.selectedEntity),
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Canvas coordinates of the first entity matching `belongs` that is on screen
|
* Canvas coordinates of the first entity matching `belongs` that is on screen
|
||||||
* and clear of the side panels. Annotation marks and the draw tool's own
|
* and clear of the side panels. Annotation marks and the draw tool's own
|
||||||
* preview vertices are on screen too, so the predicate has to be specific.
|
* preview vertices are on screen too, so the predicate has to be specific.
|
||||||
|
* With `contextPrefix`, the context store's records under that prefix are
|
||||||
|
* candidates too (at their ground coordinates), for a layer drawn through the
|
||||||
|
* draw port, which has no entities to walk; `belongs` then also receives the
|
||||||
|
* draw-port pick id. Returns the spot and `key`, the picked item's context id
|
||||||
|
* (from the entity's record or the draw-port item's `meta`; without a prefix,
|
||||||
|
* the entity's own id); with `wantKey`, only that item counts.
|
||||||
*/
|
*/
|
||||||
async function onScreen(belongs, timeout = 20_000) {
|
async function onScreen(
|
||||||
|
belongs,
|
||||||
|
contextPrefix = null,
|
||||||
|
wantKey = null,
|
||||||
|
timeout = 20_000,
|
||||||
|
) {
|
||||||
return page
|
return page
|
||||||
.waitForFunction(
|
.waitForFunction(
|
||||||
(belongsSource) => {
|
(belongsSource, prefix, want) => {
|
||||||
// eslint-disable-next-line no-new-func
|
// eslint-disable-next-line no-new-func
|
||||||
const belongsTo = new Function(`return (${belongsSource})`)();
|
const belongsTo = new Function(`return (${belongsSource})`)();
|
||||||
const viewer = window.__godsEyeView.viewer;
|
const viewer = window.__godsEyeView.viewer;
|
||||||
@@ -972,13 +1136,36 @@ async function onScreen(belongs, timeout = 20_000) {
|
|||||||
if (source?.name === 'gev-draw-preview') continue;
|
if (source?.name === 'gev-draw-preview') continue;
|
||||||
collections.push(source.entities);
|
collections.push(source.entities);
|
||||||
}
|
}
|
||||||
|
const candidates = [];
|
||||||
for (const source of collections) {
|
for (const source of collections) {
|
||||||
for (const entity of source.values) {
|
for (const entity of source.values) {
|
||||||
if (!belongsTo(entity)) continue;
|
if (!belongsTo(entity)) continue;
|
||||||
const position = entity.position?.getValue?.(
|
const position = entity.position?.getValue?.(
|
||||||
viewer.clock.currentTime,
|
viewer.clock.currentTime,
|
||||||
);
|
);
|
||||||
if (!position) continue;
|
if (position) candidates.push(position);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (prefix) {
|
||||||
|
const ellipsoid = scene.globe.ellipsoid;
|
||||||
|
for (const record of window.__gevContextStore?.entities?.values() ??
|
||||||
|
[]) {
|
||||||
|
if (!String(record?.id).startsWith(prefix)) continue;
|
||||||
|
if (
|
||||||
|
!Number.isFinite(record.latitude) ||
|
||||||
|
!Number.isFinite(record.longitude)
|
||||||
|
)
|
||||||
|
continue;
|
||||||
|
candidates.push(
|
||||||
|
ellipsoid.cartographicToCartesian({
|
||||||
|
longitude: (record.longitude * Math.PI) / 180,
|
||||||
|
latitude: (record.latitude * Math.PI) / 180,
|
||||||
|
height: 0,
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (const position of candidates) {
|
||||||
const window2d = scene.cartesianToCanvasCoordinates(position);
|
const window2d = scene.cartesianToCanvasCoordinates(position);
|
||||||
if (!window2d) continue;
|
if (!window2d) continue;
|
||||||
const { x, y } = window2d;
|
const { x, y } = window2d;
|
||||||
@@ -988,13 +1175,23 @@ async function onScreen(belongs, timeout = 20_000) {
|
|||||||
// spot where the scene actually picks it proves the control case.
|
// spot where the scene actually picks it proves the control case.
|
||||||
const hit = scene.pick({ x: Math.round(x), y: Math.round(y) });
|
const hit = scene.pick({ x: Math.round(x), y: Math.round(y) });
|
||||||
if (!hit?.id || !belongsTo(hit.id)) continue;
|
if (!hit?.id || !belongsTo(hit.id)) continue;
|
||||||
return { x: Math.round(x), y: Math.round(y) };
|
// The picked item's context id: an entity's own record, or that of
|
||||||
}
|
// the object a draw-port item carries as its `meta`.
|
||||||
|
const pickId = hit.id;
|
||||||
|
const records = window.__godsEyeView.entityRecords;
|
||||||
|
const key =
|
||||||
|
records.read(pickId)?.contextId ||
|
||||||
|
records.read(pickId.meta)?.contextId ||
|
||||||
|
(prefix ? null : String(pickId.id));
|
||||||
|
if (!key || (want && key !== want)) continue;
|
||||||
|
return { x: Math.round(x), y: Math.round(y), key };
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
{ timeout, polling: 500 },
|
{ timeout, polling: 500 },
|
||||||
belongs.toString(),
|
belongs.toString(),
|
||||||
|
contextPrefix,
|
||||||
|
wantKey,
|
||||||
)
|
)
|
||||||
.then(
|
.then(
|
||||||
(handle) => handle.jsonValue(),
|
(handle) => handle.jsonValue(),
|
||||||
|
|||||||
@@ -8,13 +8,16 @@
|
|||||||
* 1. exact-viewport revisit (traffic module's full-road cache),
|
* 1. exact-viewport revisit (traffic module's full-road cache),
|
||||||
* 2. adjacent 0.4–2 km pan (new exact bbox with heavy spatial overlap),
|
* 2. adjacent 0.4–2 km pan (new exact bbox with heavy spatial overlap),
|
||||||
* 3. cold city (no traffic-module entry for that city),
|
* 3. cold city (no traffic-module entry for that city),
|
||||||
* 4. degraded upstream (synthetic delay on `/api/overpass` only).
|
* 4. degraded upstream (synthetic delay on the road requests: OpenFreeMap's
|
||||||
|
* host, which only traffic reads in this capture, or the Overpass proxy).
|
||||||
*
|
*
|
||||||
* The proxy's actual `X-Overpass-Cache` result is printed for every network
|
* Keyless roads come from OpenFreeMap vector tiles (`tiles.openfreemap.org`);
|
||||||
* pass, so HIT/DISK/MISS/STALE/INFLIGHT is evidence rather than inference.
|
* a build that still reads them through the Overpass proxy has its
|
||||||
* The degraded leg delays request release in Puppeteer; it exercises the same
|
* `X-Overpass-Cache` result printed for every network pass, so
|
||||||
* fetch-start→response boundary without adding a failure switch to the
|
* HIT/DISK/MISS/STALE/INFLIGHT is evidence rather than inference ("—" for
|
||||||
* application or proxy. Pass `--degraded-delay-ms 0` to skip that leg.
|
* tiles). The degraded leg delays the road requests' release in Puppeteer;
|
||||||
|
* it exercises the same fetch-start→response boundary without adding a
|
||||||
|
* failure switch to the application or proxy. Pass `--degraded-delay-ms 0` to skip that leg.
|
||||||
* TomTom status is intercepted as keyless so no live-flow key is required and
|
* TomTom status is intercepted as keyless so no live-flow key is required and
|
||||||
* the capture isolates the OSM road-to-visible-dot chain.
|
* the capture isolates the OSM road-to-visible-dot chain.
|
||||||
*
|
*
|
||||||
@@ -93,9 +96,42 @@ function debugUrl(rawUrl) {
|
|||||||
return url.toString();
|
return url.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Position the camera and explicitly raise the boundaries the layer observes. */
|
/**
|
||||||
|
* Let the camera report a move the way a user's does: traffic hears the
|
||||||
|
* camera port's `changed` at its own 5% threshold (layers/traffic/policy.js
|
||||||
|
* CAMERA_CHANGED_THRESHOLD), which the port measures on every scene tick
|
||||||
|
* (the first measurement after a listener subscribes only records its
|
||||||
|
* baseline pose). Waiting for two drawn frames after the move is the sync
|
||||||
|
* point that the port has measured it. Cesium's own moveEnd (500 ms after
|
||||||
|
* stillness) is left to Cesium, as in the app; traffic re-checks the view
|
||||||
|
* on it. Installed in the page as `window.__qaRenderAfterMove`; throws when
|
||||||
|
* the frames do not draw within 5 s.
|
||||||
|
*/
|
||||||
|
function installRenderAfterMove() {
|
||||||
|
window.__qaRenderAfterMove = (gev) => new Promise((resolve, reject) => {
|
||||||
|
const scene = gev.viewer.scene;
|
||||||
|
let frames = 0;
|
||||||
|
let remove = null;
|
||||||
|
const timer = setTimeout(() => {
|
||||||
|
remove();
|
||||||
|
reject(new Error(`the camera move rendered ${frames} frame(s) in 5 s`));
|
||||||
|
}, 5000);
|
||||||
|
remove = scene.postRender.addEventListener(() => {
|
||||||
|
if (++frames >= 2) {
|
||||||
|
clearTimeout(timer);
|
||||||
|
remove();
|
||||||
|
resolve(frames);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
scene.requestRender();
|
||||||
|
});
|
||||||
|
scene.requestRender();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Position the camera and render, so the layer hears the move as it would a user's. */
|
||||||
async function moveCamera(page, view) {
|
async function moveCamera(page, view) {
|
||||||
return page.evaluate((v) => {
|
return page.evaluate(async (v) => {
|
||||||
const gev = window.__godsEyeView;
|
const gev = window.__godsEyeView;
|
||||||
const module = gev.dataManager.layers.get('traffic').module;
|
const module = gev.dataManager.layers.get('traffic').module;
|
||||||
const beforeLastUpdate = module.getStats().lastUpdate;
|
const beforeLastUpdate = module.getStats().lastUpdate;
|
||||||
@@ -115,13 +151,7 @@ async function moveCamera(page, view) {
|
|||||||
roll: 0,
|
roll: 0,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
// setView normally propagates through Cesium's render loop. Raising these
|
await window.__qaRenderAfterMove(gev);
|
||||||
// explicitly makes the capture boundary deterministic across GPU speeds.
|
|
||||||
// Traffic hears the synthetic moveEnd through the camera port and loads at
|
|
||||||
// once; the port measures its own `changed` on the next rendered tick, so
|
|
||||||
// the synthetic camera.changed reaches only the layers still on Cesium.
|
|
||||||
gev.viewer.camera.changed.raiseEvent();
|
|
||||||
gev.viewer.camera.moveEnd.raiseEvent();
|
|
||||||
return { beforeLastUpdate, boundaryTime };
|
return { beforeLastUpdate, boundaryTime };
|
||||||
}, view);
|
}, view);
|
||||||
}
|
}
|
||||||
@@ -160,14 +190,29 @@ function readTrafficMeasures(page, boundaryTime) {
|
|||||||
})), boundaryTime);
|
})), boundaryTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Road requests the page sent, counted by the request interceptor: `sent` is
|
||||||
|
* every road request that reached the network, `delayed` those it held for
|
||||||
|
* the degraded leg. `requestRoads()` can be answered from decoded tiles
|
||||||
|
* already in memory, so a `fetch-to-response` measure alone does not prove
|
||||||
|
* the network was used.
|
||||||
|
*/
|
||||||
|
const roadRequests = { sent: 0, delayed: 0 };
|
||||||
|
|
||||||
/** Drive one measured state and return its raw User Timing measures. */
|
/** Drive one measured state and return its raw User Timing measures. */
|
||||||
async function captureState(page, name, view, setDelay) {
|
async function captureState(page, name, view, setDelay) {
|
||||||
setDelay(name === 'degraded-upstream' ? DEGRADED_DELAY_MS : 0);
|
setDelay(name === 'degraded-upstream' ? DEGRADED_DELAY_MS : 0);
|
||||||
|
const before = { ...roadRequests };
|
||||||
const { beforeLastUpdate, boundaryTime } = await moveCamera(page, view);
|
const { beforeLastUpdate, boundaryTime } = await moveCamera(page, view);
|
||||||
await waitForTrafficCapture(page, beforeLastUpdate, boundaryTime);
|
await waitForTrafficCapture(page, beforeLastUpdate, boundaryTime);
|
||||||
const measures = await readTrafficMeasures(page, boundaryTime);
|
const measures = await readTrafficMeasures(page, boundaryTime);
|
||||||
setDelay(0);
|
setDelay(0);
|
||||||
return { name, measures };
|
return {
|
||||||
|
name,
|
||||||
|
measures,
|
||||||
|
sent: roadRequests.sent - before.sent,
|
||||||
|
delayed: roadRequests.delayed - before.delayed,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Format a duration without hiding zero-duration measurements. */
|
/** Format a duration without hiding zero-duration measurements. */
|
||||||
@@ -319,13 +364,14 @@ async function main() {
|
|||||||
const page = await browser.newPage();
|
const page = await browser.newPage();
|
||||||
await page.setViewport({ width: 1440, height: 900 });
|
await page.setViewport({ width: 1440, height: 900 });
|
||||||
await page.evaluateOnNewDocument(() => localStorage.clear());
|
await page.evaluateOnNewDocument(() => localStorage.clear());
|
||||||
|
await page.evaluateOnNewDocument(installRenderAfterMove);
|
||||||
page.on('console', (message) => {
|
page.on('console', (message) => {
|
||||||
if (message.type() === 'error') consoleErrors.push(message.text());
|
if (message.type() === 'error') consoleErrors.push(message.text());
|
||||||
});
|
});
|
||||||
page.on('pageerror', (error) => consoleErrors.push(error.message));
|
page.on('pageerror', (error) => consoleErrors.push(error.message));
|
||||||
|
|
||||||
// Force keyless traffic and optionally hold Overpass requests to model a
|
// Force keyless traffic and optionally hold the road requests to model a
|
||||||
// degraded proxy/upstream. No server key or proxy debug endpoint is needed.
|
// degraded upstream. No server key or proxy debug endpoint is needed.
|
||||||
await page.setRequestInterception(true);
|
await page.setRequestInterception(true);
|
||||||
page.on('request', async (request) => {
|
page.on('request', async (request) => {
|
||||||
if (request.url().includes('/api/tomtom/status')) {
|
if (request.url().includes('/api/tomtom/status')) {
|
||||||
@@ -336,7 +382,11 @@ async function main() {
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (activeProxyDelayMs > 0 && request.url().includes('/api/overpass')) {
|
const roadRequest = request.url().includes('/api/overpass')
|
||||||
|
|| new URL(request.url()).hostname === 'tiles.openfreemap.org';
|
||||||
|
if (roadRequest) roadRequests.sent += 1;
|
||||||
|
if (activeProxyDelayMs > 0 && roadRequest) {
|
||||||
|
roadRequests.delayed += 1;
|
||||||
await sleep(activeProxyDelayMs);
|
await sleep(activeProxyDelayMs);
|
||||||
}
|
}
|
||||||
try { await request.continue(); } catch { /* page closed or already handled */ }
|
try { await request.continue(); } catch { /* page closed or already handled */ }
|
||||||
@@ -364,8 +414,9 @@ async function main() {
|
|||||||
orientation: { heading: 0, pitch: -Math.PI / 2, roll: 0 },
|
orientation: { heading: 0, pitch: -Math.PI / 2, roll: 0 },
|
||||||
});
|
});
|
||||||
await gev.dataManager.setEnabled('traffic', true);
|
await gev.dataManager.setEnabled('traffic', true);
|
||||||
gev.viewer.camera.changed.raiseEvent();
|
// Also records the baseline pose traffic's new `changed` listener
|
||||||
gev.viewer.camera.moveEnd.raiseEvent();
|
// measures the first measured move against.
|
||||||
|
await window.__qaRenderAfterMove(gev);
|
||||||
}, VIEWS.austin);
|
}, VIEWS.austin);
|
||||||
await sleep(500);
|
await sleep(500);
|
||||||
|
|
||||||
@@ -387,7 +438,7 @@ async function main() {
|
|||||||
|
|
||||||
// Clear the last-bounds gate without clearing the module's road cache, then
|
// Clear the last-bounds gate without clearing the module's road cache, then
|
||||||
// revisit the byte-identical camera pose for a true client-cache hit.
|
// revisit the byte-identical camera pose for a true client-cache hit.
|
||||||
await page.evaluate((view) => {
|
await page.evaluate(async (view) => {
|
||||||
const gev = window.__godsEyeView;
|
const gev = window.__godsEyeView;
|
||||||
const ellipsoid = gev.viewer.scene.globe.ellipsoid;
|
const ellipsoid = gev.viewer.scene.globe.ellipsoid;
|
||||||
const radians = Math.PI / 180;
|
const radians = Math.PI / 180;
|
||||||
@@ -399,8 +450,7 @@ async function main() {
|
|||||||
}),
|
}),
|
||||||
orientation: { heading: 0, pitch: -Math.PI / 2, roll: 0 },
|
orientation: { heading: 0, pitch: -Math.PI / 2, roll: 0 },
|
||||||
});
|
});
|
||||||
gev.viewer.camera.changed.raiseEvent();
|
await window.__qaRenderAfterMove(gev);
|
||||||
gev.viewer.camera.moveEnd.raiseEvent();
|
|
||||||
}, VIEWS.austin);
|
}, VIEWS.austin);
|
||||||
await sleep(500);
|
await sleep(500);
|
||||||
|
|
||||||
@@ -429,7 +479,7 @@ async function main() {
|
|||||||
}
|
}
|
||||||
for (const capture of captures.slice(1)) {
|
for (const capture of captures.slice(1)) {
|
||||||
if (!capture.measures.some((entry) => entry.detail?.segment === 'fetch-to-response')) {
|
if (!capture.measures.some((entry) => entry.detail?.segment === 'fetch-to-response')) {
|
||||||
throw new Error(`${capture.name} did not issue an Overpass request`);
|
throw new Error(`${capture.name} did not issue a road request`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (DEGRADED_DELAY_MS > 0) {
|
if (DEGRADED_DELAY_MS > 0) {
|
||||||
@@ -439,20 +489,35 @@ async function main() {
|
|||||||
&& entry.duration >= DEGRADED_DELAY_MS * 0.9
|
&& entry.duration >= DEGRADED_DELAY_MS * 0.9
|
||||||
));
|
));
|
||||||
if (!delayed) throw new Error('degraded-upstream leg did not observe the synthetic delay');
|
if (!delayed) throw new Error('degraded-upstream leg did not observe the synthetic delay');
|
||||||
|
// The delay has to come from held road requests, not from processing
|
||||||
|
// that happened to run long.
|
||||||
|
if (!degraded.delayed) throw new Error('degraded-upstream leg sent no road request to hold');
|
||||||
}
|
}
|
||||||
|
// A city the client has never seen has no tiles in memory: it must reach
|
||||||
|
// the network. The other legs may legitimately be answered from tiles
|
||||||
|
// already decoded, so their counts are reported, not asserted.
|
||||||
|
const cold = captures.find((capture) => capture.name === 'cold city (client)');
|
||||||
|
if (!cold?.sent) throw new Error('cold city leg sent no road request to the network');
|
||||||
|
|
||||||
const rows = captures.flatMap(rowsForCapture);
|
const rows = captures.flatMap(rowsForCapture);
|
||||||
if (!rows.length) throw new Error('no measured traffic renders were captured');
|
if (!rows.length) throw new Error('no measured traffic renders were captured');
|
||||||
console.log('\nCausal segments (one row per visible major/full pass)');
|
console.log('\nCausal segments (one row per visible major/full pass)');
|
||||||
console.table(rows);
|
console.table(rows);
|
||||||
|
console.log('\nRoad requests sent to the network per leg (held by the degraded leg)');
|
||||||
|
console.table(captures.map((capture) => ({
|
||||||
|
State: capture.name,
|
||||||
|
Sent: capture.sent,
|
||||||
|
Held: capture.delayed,
|
||||||
|
})));
|
||||||
console.log('\nNotes:');
|
console.log('\nNotes:');
|
||||||
console.log(' - Render→postRender is the first visible-frame boundary used by Phase 0.');
|
console.log(' - Render→postRender is the first visible-frame boundary used by Phase 0.');
|
||||||
console.log(' - Proxy cache is read from X-Overpass-Cache; “—” means the client cache avoided fetch.');
|
console.log(' - Proxy cache is read from X-Overpass-Cache; “—” means the client cache avoided fetch, or the roads came from OpenFreeMap tiles.');
|
||||||
console.log(' - response.json includes both body transfer and JSON decoding; the production path does not split them.');
|
console.log(' - Through the Overpass proxy, Fetch→response is the HTTP response and response.json is body transfer plus JSON decoding.');
|
||||||
console.log(' - Last change→fetch is approximately the 320 ms FETCH_DEBOUNCE for the first fetch by construction.');
|
console.log(' - From OpenFreeMap tiles, Fetch→response spans the tile requests, body reads, decoding and composition, and response.json only hands back the built object; a held leg can stack the delay over tiles fetched in turn.');
|
||||||
|
console.log(' - Last change→fetch is the 320 ms FETCH_DEBOUNCE for the first fetch by construction, plus timer and main-thread latency (larger under SwiftShader).');
|
||||||
console.log(' - Full-pass Last change→fetch also includes the intentionally sequential major pass.');
|
console.log(' - Full-pass Last change→fetch also includes the intentionally sequential major pass.');
|
||||||
console.log(' - Cesium moveEnd is a diagnostic raised ~500 ms after stillness, typically after fetch starts; fetch never waits for it.');
|
console.log(' - Cesium moveEnd is raised ~500 ms after stillness, typically after fetch starts; fetch never waits for it, and traffic only re-checks the view on it.');
|
||||||
console.log(' - Synthetic events bypass camera percentageChanged/inertia but use the same camera.changed schedule-time anchor as natural captures.');
|
console.log(' - Moves are setView plus rendered frames: the camera port measures traffic\'s own 5% changed threshold as for a user move (inertia is bypassed).');
|
||||||
console.log(' - The keyless capture zeroes Flow race and Heat lines work; live-keyed numbers will differ.');
|
console.log(' - The keyless capture zeroes Flow race and Heat lines work; live-keyed numbers will differ.');
|
||||||
console.log(' - Measurement caveat: timings include instrumentation overhead (observer effect) and browser clock-floor quantization.');
|
console.log(' - Measurement caveat: timings include instrumentation overhead (observer effect) and browser clock-floor quantization.');
|
||||||
console.log(' - Per-road clock observations inside road-parse-total/waypoint-materialization slightly overstate production work.');
|
console.log(' - Per-road clock observations inside road-parse-total/waypoint-materialization slightly overstate production work.');
|
||||||
|
|||||||
+299
-177
@@ -33,7 +33,8 @@
|
|||||||
* moves the camera — it stays in the follow band).
|
* moves the camera — it stays in the follow band).
|
||||||
* 3. NO CROSS-LAYER — tracking military then commercial (and vice versa)
|
* 3. NO CROSS-LAYER — tracking military then commercial (and vice versa)
|
||||||
* ORPHAN clears the FIRST layer (its getTrackedInfo()===null),
|
* ORPHAN clears the FIRST layer (its getTrackedInfo()===null),
|
||||||
* via the per-layer viewer.trackedEntityChanged listener.
|
* via each layer's follow-changed listener (the follow
|
||||||
|
* service, data/followed.js: onFollowChanged).
|
||||||
* 4. INIT CLEAN — app loads, all 12 layers present, no console errors,
|
* 4. INIT CLEAN — app loads, all 12 layers present, no console errors,
|
||||||
* [Detection] Initialized + [TrackedReadout] Initialized.
|
* [Detection] Initialized + [TrackedReadout] Initialized.
|
||||||
*
|
*
|
||||||
@@ -43,8 +44,8 @@
|
|||||||
* NO-OP (no deselect, no camera spike).
|
* NO-OP (no deselect, no camera spike).
|
||||||
* M3. AGE-OUT RELEASE — when the tracked plane's fixes stop arriving
|
* M3. AGE-OUT RELEASE — when the tracked plane's fixes stop arriving
|
||||||
* (3 missed polls via the shim), tracking clears and
|
* (3 missed polls via the shim), tracking clears and
|
||||||
* the camera is RELEASED IN PLACE: viewer.trackedEntity
|
* the camera is RELEASED IN PLACE: the camera follows
|
||||||
* undefined, NO jump (owner decision 2026-07-02 —
|
* nothing (data/followed.js), NO jump (owner decision 2026-07-02 —
|
||||||
* the old ~80 km overview flyTo is gone).
|
* the old ~80 km overview flyTo is gone).
|
||||||
*
|
*
|
||||||
* And the landing-ghost polish (2026-07-02): a LOW+SLOW (landed) plane that
|
* And the landing-ghost polish (2026-07-02): a LOW+SLOW (landed) plane that
|
||||||
@@ -73,11 +74,16 @@
|
|||||||
* the TRACKED grounded plane gets the standalone tracked model too (the
|
* the TRACKED grounded plane gets the standalone tracked model too (the
|
||||||
* owner's "tracked SWA143 at 0 kts showed a 2D billboard" case).
|
* owner's "tracked SWA143 at 0 kts showed a 2D billboard" case).
|
||||||
*
|
*
|
||||||
* And arrival-rotation freshness (2026-07-03 ground-polish): camera.moveEnd
|
* And arrival-rotation freshness (2026-07-03 ground-polish): the nose is right
|
||||||
* forces a full rotation pass on the next frame (fly-to settles the
|
* on the first settled frame after a camera move and on the first frame a
|
||||||
* pose-signature gate can eat), and a billboard flipping INTO view while the
|
* hidden contact is shown again. Both layers. (The CPU rotation passes that
|
||||||
* camera idles re-aims the same tick instead of wearing a stale nose for up
|
* once guaranteed it are gone: the icon sets turn every icon along its drawn
|
||||||
* to ROTATION_REFRESH_MS. Both layers.
|
* course on the GPU each frame, so the group reads the drawn rows.)
|
||||||
|
*
|
||||||
|
* The probes read what the app draws through its own seams: what the camera
|
||||||
|
* follows through the follow service (data/followed.js), icons from the draw
|
||||||
|
* port's icon sets as the renderer holds them, models by their `{set, id}`
|
||||||
|
* pick ids.
|
||||||
*
|
*
|
||||||
* Run: npm run test:track (assumes dev server already up on :4173)
|
* Run: npm run test:track (assumes dev server already up on :4173)
|
||||||
* node scripts/track-regression.mjs
|
* node scripts/track-regression.mjs
|
||||||
@@ -264,6 +270,98 @@ async function main() {
|
|||||||
try {
|
try {
|
||||||
const page = await browser.newPage();
|
const page = await browser.newPage();
|
||||||
await page.evaluateOnNewDocument((base) => { window.__gevQaSourceBase = base; }, SOURCE_BASE);
|
await page.evaluateOnNewDocument((base) => { window.__gevQaSourceBase = base; }, SOURCE_BASE);
|
||||||
|
// What the camera follows, read through the app's follow service
|
||||||
|
// (data/followed.js) rather than Cesium's `trackedEntity`: the follow
|
||||||
|
// camera runs through the renderer's camera port, whose Cesium adapter
|
||||||
|
// tracks a hidden helper entity, and the tracked aircraft is no longer an
|
||||||
|
// entity at all. `__qaFollowed()` is null until the app is up (and the
|
||||||
|
// module loaded), so every wait that reads it simply keeps polling.
|
||||||
|
await page.evaluateOnNewDocument(() => {
|
||||||
|
window.__qaFollowed = () => {
|
||||||
|
// A probe that cannot read the follow service must not read as
|
||||||
|
// "follows nothing".
|
||||||
|
if (window.__qaFollowedError) throw new Error(`followed.js: ${window.__qaFollowedError}`);
|
||||||
|
return window.__qaFollowedOf?.(window.__godsEyeView?.viewer) ?? null;
|
||||||
|
};
|
||||||
|
const timer = setInterval(() => {
|
||||||
|
if (!window.__godsEyeView?.viewer) return;
|
||||||
|
clearInterval(timer);
|
||||||
|
import(`${window.__gevQaSourceBase || '/src'}/data/followed.js`)
|
||||||
|
.then((module) => { window.__qaFollowedOf = module.followedOf; })
|
||||||
|
.catch((error) => { window.__qaFollowedError = String(error?.message || error); });
|
||||||
|
}, 100);
|
||||||
|
// A contact's id from a drawn model's pick id: the draw port's models
|
||||||
|
// carry `{set, id}`; older builds stamped the bare id.
|
||||||
|
window.__qaModelIcao = (model) => {
|
||||||
|
const id = model?.id;
|
||||||
|
if (id && typeof id === 'object') return id.id == null ? null : String(id.id);
|
||||||
|
return id == null ? null : String(id);
|
||||||
|
};
|
||||||
|
// A contact's FLEET icon as the renderer draws it, shaped like the
|
||||||
|
// billboard the probes below were written against: `show`, `scale`,
|
||||||
|
// `color` (the row's colour with its alpha column applied; focus and
|
||||||
|
// limb recession, which the shader also folds in, are not),
|
||||||
|
// `disableDepthTestDistance` and `position` (where the last frame drew
|
||||||
|
// it). The draw port's icon sets draw on the GPU (one IconSetPrimitive
|
||||||
|
// per set, rows keyed by item id; before the draw port, one a layer
|
||||||
|
// drew itself); a set off the GPU draws Cesium
|
||||||
|
// billboards whose pick id is `{set, id}`. The tracked icon's own set
|
||||||
|
// (`<layer>-tracked-icon:<n>`) is left out: the fleet icon is what these
|
||||||
|
// probes always read.
|
||||||
|
window.__qaFindIcon = (wanted) => {
|
||||||
|
const scene = window.__godsEyeView?.viewer?.scene;
|
||||||
|
if (!scene) return null;
|
||||||
|
const trackedSet = (setId) => typeof setId === 'string' && setId.includes('-tracked-icon:');
|
||||||
|
let found = null;
|
||||||
|
const walk = (coll) => {
|
||||||
|
const n = coll.length;
|
||||||
|
for (let i = 0; i < n; i++) {
|
||||||
|
let p;
|
||||||
|
try { p = coll.get(i); } catch { continue; }
|
||||||
|
if (!p) continue;
|
||||||
|
if (typeof p.length === 'number' && typeof p.get === 'function') { walk(p); continue; }
|
||||||
|
if (p.set && typeof p.set.row === 'function' && typeof p.set.has === 'function') {
|
||||||
|
if (!p.set.has(wanted)) continue;
|
||||||
|
// A primitive a layer drew itself (before the draw port) names
|
||||||
|
// no set.
|
||||||
|
const setId = typeof p._pickObject === 'function'
|
||||||
|
? p._pickObject(wanted, p.set, p)?.id?.set ?? null
|
||||||
|
: null;
|
||||||
|
if (trackedSet(setId)) continue;
|
||||||
|
const set = p.set;
|
||||||
|
const row = set.row(wanted);
|
||||||
|
const color = set.color(row);
|
||||||
|
color.alpha *= set.alpha(row);
|
||||||
|
// (A set without the column draws over depth by default.)
|
||||||
|
const depth = typeof set.depthTestDistance === 'function'
|
||||||
|
? set.depthTestDistance(row)
|
||||||
|
: Number.POSITIVE_INFINITY;
|
||||||
|
found = {
|
||||||
|
id: wanted,
|
||||||
|
setId,
|
||||||
|
show: set.shown(row),
|
||||||
|
scale: set.scale(row),
|
||||||
|
color,
|
||||||
|
disableDepthTestDistance: depth >= 1e30 ? Number.POSITIVE_INFINITY : depth,
|
||||||
|
position: set.position(row, p._tau),
|
||||||
|
// Degrees clockwise from north: the course the last frame
|
||||||
|
// turned the icon along (its rotation is derived from it on
|
||||||
|
// the GPU each frame).
|
||||||
|
course: set.course(row, p._tau),
|
||||||
|
// Whether the row turns along that course at all (ICON_ROTATES
|
||||||
|
// in data/iconSet.js); one that does not is drawn upright.
|
||||||
|
rotates: (set.flags(row) & 2) !== 0,
|
||||||
|
};
|
||||||
|
} else if (p.image !== undefined && p.alignedAxis !== undefined) {
|
||||||
|
const id = p.id && typeof p.id === 'object' ? p.id : { id: p.id };
|
||||||
|
if (id.id === wanted && !trackedSet(id.set)) found = p;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
walk(scene.primitives);
|
||||||
|
return found;
|
||||||
|
};
|
||||||
|
});
|
||||||
await page.setViewport({ width: 1280, height: 800 });
|
await page.setViewport({ width: 1280, height: 800 });
|
||||||
await page.setRequestInterception(true);
|
await page.setRequestInterception(true);
|
||||||
page.on('request', (request) => {
|
page.on('request', (request) => {
|
||||||
@@ -701,7 +799,7 @@ async function main() {
|
|||||||
const tracked = manager?.layers?.get('flights')?.module?.getTrackedInfo?.();
|
const tracked = manager?.layers?.get('flights')?.module?.getTrackedInfo?.();
|
||||||
return manager?.isEnabled?.('flights')
|
return manager?.isEnabled?.('flights')
|
||||||
&& tracked?.icao24 === 'aaa001'
|
&& tracked?.icao24 === 'aaa001'
|
||||||
&& window.__godsEyeView.entityRecords.read(window.__godsEyeView.viewer.trackedEntity)?.trackedId === 'flights:aaa001';
|
&& window.__qaFollowed()?.key === 'flights:aaa001';
|
||||||
},
|
},
|
||||||
{ timeout: 30000, polling: 100 },
|
{ timeout: 30000, polling: 100 },
|
||||||
);
|
);
|
||||||
@@ -712,7 +810,7 @@ async function main() {
|
|||||||
flightsEnabled: manager.isEnabled('flights'),
|
flightsEnabled: manager.isEnabled('flights'),
|
||||||
trackedId: flights.getTrackedInfo()?.icao24 || null,
|
trackedId: flights.getTrackedInfo()?.icao24 || null,
|
||||||
durableId: flights.getParams()?.selectedFlightsTrackingId || null,
|
durableId: flights.getParams()?.selectedFlightsTrackingId || null,
|
||||||
viewerTrackedId: window.__godsEyeView.entityRecords.read(window.__godsEyeView.viewer.trackedEntity)?.trackedId || null,
|
viewerTrackedId: window.__qaFollowed()?.key || null,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
record(
|
record(
|
||||||
@@ -742,7 +840,7 @@ async function main() {
|
|||||||
const tracked = manager?.layers?.get('flights')?.module?.getTrackedInfo?.();
|
const tracked = manager?.layers?.get('flights')?.module?.getTrackedInfo?.();
|
||||||
return manager?.isEnabled?.('flights')
|
return manager?.isEnabled?.('flights')
|
||||||
&& tracked?.icao24 === 'aaa001'
|
&& tracked?.icao24 === 'aaa001'
|
||||||
&& window.__godsEyeView.entityRecords.read(window.__godsEyeView.viewer.trackedEntity)?.trackedId === 'flights:aaa001';
|
&& window.__qaFollowed()?.key === 'flights:aaa001';
|
||||||
},
|
},
|
||||||
{ timeout: 30000, polling: 100 },
|
{ timeout: 30000, polling: 100 },
|
||||||
);
|
);
|
||||||
@@ -753,7 +851,7 @@ async function main() {
|
|||||||
flightsEnabled: manager.isEnabled('flights'),
|
flightsEnabled: manager.isEnabled('flights'),
|
||||||
trackedId: flights.getTrackedInfo()?.icao24 || null,
|
trackedId: flights.getTrackedInfo()?.icao24 || null,
|
||||||
durableId: flights.getParams()?.selectedFlightsTrackingId || null,
|
durableId: flights.getParams()?.selectedFlightsTrackingId || null,
|
||||||
viewerTrackedId: window.__godsEyeView.entityRecords.read(window.__godsEyeView.viewer.trackedEntity)?.trackedId || null,
|
viewerTrackedId: window.__qaFollowed()?.key || null,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
record(
|
record(
|
||||||
@@ -815,7 +913,7 @@ async function main() {
|
|||||||
const latchedShare = await evalPage(() => ({
|
const latchedShare = await evalPage(() => ({
|
||||||
tracked: window.__godsEyeView.dataManager.layers
|
tracked: window.__godsEyeView.dataManager.layers
|
||||||
.get('flights').module.getTrackedInfo()?.icao24 || null,
|
.get('flights').module.getTrackedInfo()?.icao24 || null,
|
||||||
viewerTrackedId: window.__godsEyeView.entityRecords.read(window.__godsEyeView.viewer.trackedEntity)?.trackedId || null,
|
viewerTrackedId: window.__qaFollowed()?.key || null,
|
||||||
}));
|
}));
|
||||||
record(
|
record(
|
||||||
'share-v2: the pending subject latches on when it arrives on a later poll',
|
'share-v2: the pending subject latches on when it arrives on a later poll',
|
||||||
@@ -1329,8 +1427,8 @@ async function main() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE: we do NOT manually reposition the camera. Tracking sets
|
// NOTE: we do NOT manually reposition the camera. Tracking follows the
|
||||||
// viewer.trackedEntity + a calibrated viewFrom, so the follow camera lands
|
// plane with a calibrated viewFrom, so the follow camera lands
|
||||||
// in the few-km band (altitude*1.1+2500, clamped 3–30 km) — far below the
|
// in the few-km band (altitude*1.1+2500, clamped 3–30 km) — far below the
|
||||||
// MODEL_ALT_CEIL_M = 800 km ceiling, so _modelRegimeActive() is true and the
|
// MODEL_ALT_CEIL_M = 800 km ceiling, so _modelRegimeActive() is true and the
|
||||||
// standalone tracked model renders. That's the exact path the invariants
|
// standalone tracked model renders. That's the exact path the invariants
|
||||||
@@ -1375,12 +1473,12 @@ async function main() {
|
|||||||
// report the neighbor's id even though the correct tracked model is up.
|
// report the neighbor's id even though the correct tracked model is up.
|
||||||
const trackedInfo = fl.getTrackedInfo();
|
const trackedInfo = fl.getTrackedInfo();
|
||||||
const exactPickModel = trackedInfo
|
const exactPickModel = trackedInfo
|
||||||
? pool.find((model) => String(model.id) === trackedInfo.icao24)
|
? pool.find((model) => window.__qaModelIcao(model) === trackedInfo.icao24)
|
||||||
: null;
|
: null;
|
||||||
if (exactPickModel) return exactPickModel;
|
if (exactPickModel) return exactPickModel;
|
||||||
const ent = window.__godsEyeView.viewer.trackedEntity;
|
const followed = window.__qaFollowed();
|
||||||
let tracked = null;
|
let tracked = null;
|
||||||
if (ent && typeof window.__godsEyeView.entityRecords.read(ent)?.displayPosition === 'function') tracked = window.__godsEyeView.entityRecords.read(ent)?.displayPosition();
|
if (typeof followed?.displayPosition === 'function') tracked = followed.displayPosition();
|
||||||
if (!tracked) return pool[0];
|
if (!tracked) return pool[0];
|
||||||
let best = null, bestD = Infinity;
|
let best = null, bestD = Infinity;
|
||||||
for (const m of pool) {
|
for (const m of pool) {
|
||||||
@@ -1398,7 +1496,7 @@ async function main() {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
// Track a synthetic commercial plane. Tracking sets viewer.trackedEntity +
|
// Track a synthetic commercial plane. Tracking follows it with a
|
||||||
// viewFrom, so the follow camera lands in the few-km band and the standalone
|
// viewFrom, so the follow camera lands in the few-km band and the standalone
|
||||||
// 3D model renders (model regime active below the 800 km ceiling).
|
// 3D model renders (model regime active below the 800 km ceiling).
|
||||||
const trackedIcao = SYNTH.flights[0].icao;
|
const trackedIcao = SYNTH.flights[0].icao;
|
||||||
@@ -1413,7 +1511,7 @@ async function main() {
|
|||||||
const ti = fl.getTrackedInfo();
|
const ti = fl.getTrackedInfo();
|
||||||
if (!ti || ti.icao24 !== icao) return false;
|
if (!ti || ti.icao24 !== icao) return false;
|
||||||
const found = window.__findTrackedModel ? window.__findTrackedModel() : null;
|
const found = window.__findTrackedModel ? window.__findTrackedModel() : null;
|
||||||
return !!(found && found.ready && found.show && String(found.id) === icao);
|
return !!(found && found.ready && found.show && window.__qaModelIcao(found) === icao);
|
||||||
}, { timeout: 60000, polling: 250 }, trackedIcao).then(() => true).catch(() => false);
|
}, { timeout: 60000, polling: 250 }, trackedIcao).then(() => true).catch(() => false);
|
||||||
record('3D: tracked commercial model becomes ready through the DISPLAY toggle', modelUp,
|
record('3D: tracked commercial model becomes ready through the DISPLAY toggle', modelUp,
|
||||||
modelUp ? `ready+shown id=${trackedIcao}` : 'tracked product model never became ready+shown');
|
modelUp ? `ready+shown id=${trackedIcao}` : 'tracked product model never became ready+shown');
|
||||||
@@ -1426,8 +1524,8 @@ async function main() {
|
|||||||
jitterResult = await sampleFrames(page, 30, (icao) => {
|
jitterResult = await sampleFrames(page, 30, (icao) => {
|
||||||
const dm = window.__godsEyeView.dataManager;
|
const dm = window.__godsEyeView.dataManager;
|
||||||
const fl = dm.layers.get('flights').module;
|
const fl = dm.layers.get('flights').module;
|
||||||
const ent = window.__godsEyeView.viewer.trackedEntity;
|
const followed = window.__qaFollowed();
|
||||||
const disp = ent && typeof window.__godsEyeView.entityRecords.read(ent)?.displayPosition === 'function' ? window.__godsEyeView.entityRecords.read(ent)?.displayPosition() : null;
|
const disp = typeof followed?.displayPosition === 'function' ? followed.displayPosition() : null;
|
||||||
const dets = fl.getDetectableObjects({ maxCount: 1000 });
|
const dets = fl.getDetectableObjects({ maxCount: 1000 });
|
||||||
const me = dets.find((d) => d.id === icao || d.id === (fl.getTrackedInfo() && fl.getTrackedInfo().callsign));
|
const me = dets.find((d) => d.id === icao || d.id === (fl.getTrackedInfo() && fl.getTrackedInfo().callsign));
|
||||||
if (!disp || !me || !me.position) return null;
|
if (!disp || !me || !me.position) return null;
|
||||||
@@ -1572,7 +1670,7 @@ async function main() {
|
|||||||
mil.trackById(hex);
|
mil.trackById(hex);
|
||||||
await new Promise((r) => requestAnimationFrame(() => requestAnimationFrame(r)));
|
await new Promise((r) => requestAnimationFrame(() => requestAnimationFrame(r)));
|
||||||
const milTrackedBefore = !!mil.getTrackedInfo();
|
const milTrackedBefore = !!mil.getTrackedInfo();
|
||||||
fl.trackById(icao); // tracking commercial flips viewer.trackedEntity → military listener fires
|
fl.trackById(icao); // tracking commercial changes what the camera follows → military listener fires
|
||||||
await new Promise((r) => requestAnimationFrame(() => requestAnimationFrame(r)));
|
await new Promise((r) => requestAnimationFrame(() => requestAnimationFrame(r)));
|
||||||
return {
|
return {
|
||||||
milTrackedBefore,
|
milTrackedBefore,
|
||||||
@@ -1627,16 +1725,22 @@ async function main() {
|
|||||||
const ti = fl.getTrackedInfo();
|
const ti = fl.getTrackedInfo();
|
||||||
if (!ti || ti.icao24 !== icao) return false;
|
if (!ti || ti.icao24 !== icao) return false;
|
||||||
const found = window.__findTrackedModel ? window.__findTrackedModel() : null;
|
const found = window.__findTrackedModel ? window.__findTrackedModel() : null;
|
||||||
return !!(found && found.ready && found.show && String(found.id) === icao);
|
return !!(found && found.ready && found.show && window.__qaModelIcao(found) === icao);
|
||||||
}, { timeout: 60000, polling: 250 }, h1Icao).then(() => true).catch(() => false);
|
}, { timeout: 60000, polling: 250 }, h1Icao).then(() => true).catch(() => false);
|
||||||
|
|
||||||
if (h1ModelUp) {
|
if (h1ModelUp) {
|
||||||
const modelPickId = await evalPage(() => {
|
const modelPickId = await evalPage(() => {
|
||||||
const m = window.__findTrackedModel();
|
const m = window.__findTrackedModel();
|
||||||
return m && m.id !== undefined && m.id !== null ? String(m.id) : null;
|
if (!m || m.id === undefined || m.id === null) return null;
|
||||||
|
// The draw port's pick id is `{set, id}`: the click resolver keys on
|
||||||
|
// both, so the set must be this layer's tracked model set.
|
||||||
|
if (typeof m.id === 'object') return { set: String(m.id.set), id: String(m.id.id) };
|
||||||
|
return { set: null, id: String(m.id) };
|
||||||
});
|
});
|
||||||
record('H1: tracked standalone model exposes its pick id', modelPickId === h1Icao,
|
record('H1: tracked standalone model exposes its pick id',
|
||||||
`model.id=${JSON.stringify(modelPickId)} (want "${h1Icao}")`);
|
modelPickId?.id === h1Icao
|
||||||
|
&& (modelPickId.set === null || modelPickId.set.startsWith('flights-tracked-model:')),
|
||||||
|
`model.id=${JSON.stringify(modelPickId)} (want id "${h1Icao}" in the flights tracked-model set)`);
|
||||||
} else if (!glbBackendCapable) {
|
} else if (!glbBackendCapable) {
|
||||||
skip('H1: tracked standalone model exposes its pick id',
|
skip('H1: tracked standalone model exposes its pick id',
|
||||||
`independent GLB control unavailable (${glbControlDetail})`);
|
`independent GLB control unavailable (${glbControlDetail})`);
|
||||||
@@ -1655,15 +1759,21 @@ async function main() {
|
|||||||
const fl = window.__godsEyeView.dataManager.layers.get('flights').module;
|
const fl = window.__godsEyeView.dataManager.layers.get('flights').module;
|
||||||
const ti = fl.getTrackedInfo();
|
const ti = fl.getTrackedInfo();
|
||||||
if (!ti) return null;
|
if (!ti) return null;
|
||||||
const ent = v.trackedEntity;
|
const followed = window.__qaFollowed();
|
||||||
const disp = ent && typeof window.__godsEyeView.entityRecords.read(ent)?.displayPosition === 'function' ? window.__godsEyeView.entityRecords.read(ent)?.displayPosition() : null;
|
const disp = typeof followed?.displayPosition === 'function' ? followed.displayPosition() : null;
|
||||||
const pos = disp || ti.position;
|
const pos = disp || ti.position;
|
||||||
if (!pos) return null;
|
if (!pos) return null;
|
||||||
const center = v.scene.cartesianToCanvasCoordinates(pos);
|
const center = v.scene.cartesianToCanvasCoordinates(pos);
|
||||||
if (!center) return null;
|
if (!center) return null;
|
||||||
|
// The tracked plane is drawn by the layer's own tracked icon and
|
||||||
|
// tracked model sets; a pick on either names `{set, id}`.
|
||||||
const isTrackedPick = (picked) => {
|
const isTrackedPick = (picked) => {
|
||||||
if (!picked) return null;
|
if (!picked) return null;
|
||||||
if (picked.id === ent) return 'entity';
|
const hit = picked.id && typeof picked.id === 'object' ? picked.id : null;
|
||||||
|
if (hit && String(hit.id) === ti.icao24 && typeof hit.set === 'string') {
|
||||||
|
if (hit.set.startsWith('flights-tracked-icon:')) return 'tracked-icon';
|
||||||
|
if (hit.set.startsWith('flights-tracked-model:')) return 'tracked-model';
|
||||||
|
}
|
||||||
const raw = typeof picked.id === 'string' ? picked.id : (picked.primitive && picked.primitive.id);
|
const raw = typeof picked.id === 'string' ? picked.id : (picked.primitive && picked.primitive.id);
|
||||||
return raw === ti.icao24 ? 'icao-pick' : null;
|
return raw === ti.icao24 ? 'icao-pick' : null;
|
||||||
};
|
};
|
||||||
@@ -1721,7 +1831,7 @@ async function main() {
|
|||||||
}, 45);
|
}, 45);
|
||||||
const h1StillTracking = await evalPage((icao) => {
|
const h1StillTracking = await evalPage((icao) => {
|
||||||
const ti = window.__godsEyeView.dataManager.layers.get('flights').module.getTrackedInfo();
|
const ti = window.__godsEyeView.dataManager.layers.get('flights').module.getTrackedInfo();
|
||||||
return !!(ti && ti.icao24 === icao) && !!window.__godsEyeView.viewer.trackedEntity;
|
return !!(ti && ti.icao24 === icao) && !!window.__qaFollowed();
|
||||||
}, h1Icao);
|
}, h1Icao);
|
||||||
record('H1: click on tracked plane keeps tracking (no deselect)', h1StillTracking,
|
record('H1: click on tracked plane keeps tracking (no deselect)', h1StillTracking,
|
||||||
`picked via ${h1ClickPoint.via}; still tracking=${h1StillTracking}`);
|
`picked via ${h1ClickPoint.via}; still tracking=${h1StillTracking}`);
|
||||||
@@ -1733,8 +1843,8 @@ async function main() {
|
|||||||
// ============================================================
|
// ============================================================
|
||||||
// REGRESSION M3 (rewritten 2026-07-02 — deliberate behavior change):
|
// REGRESSION M3 (rewritten 2026-07-02 — deliberate behavior change):
|
||||||
// when the TRACKED plane ages out (3 missed polls), tracking must clear
|
// when the TRACKED plane ages out (3 missed polls), tracking must clear
|
||||||
// and the camera must be RELEASED IN PLACE — viewer.trackedEntity
|
// and the camera must be RELEASED IN PLACE — following nothing
|
||||||
// undefined and NO jump (the old contract flew an ~80 km overview; the
|
// and NO jump (the old contract flew an ~80 km overview; the
|
||||||
// owner field-ruled that wrong: "it randomly zooms way up and loses my
|
// owner field-ruled that wrong: "it randomly zooms way up and loses my
|
||||||
// context"). The M3 ordering fix stays: tracking is cleared BEFORE the
|
// context"). The M3 ordering fix stays: tracking is cleared BEFORE the
|
||||||
// removal loop deletes the plane's state, so we never sit mid-follow
|
// removal loop deletes the plane's state, so we never sit mid-follow
|
||||||
@@ -1770,14 +1880,14 @@ async function main() {
|
|||||||
beforeTracking,
|
beforeTracking,
|
||||||
atAgeOut,
|
atAgeOut,
|
||||||
stillTrackedAfter: !!fl.getTrackedInfo(),
|
stillTrackedAfter: !!fl.getTrackedInfo(),
|
||||||
viewerStillTracking: !!v.trackedEntity,
|
viewerStillTracking: !!window.__qaFollowed(),
|
||||||
};
|
};
|
||||||
}, m3Icao);
|
}, m3Icao);
|
||||||
|
|
||||||
record('M3: tracking cleared after the tracked plane ages out (getTrackedInfo null)',
|
record('M3: tracking cleared after the tracked plane ages out (getTrackedInfo null)',
|
||||||
m3.beforeTracking && !m3.stillTrackedAfter,
|
m3.beforeTracking && !m3.stillTrackedAfter,
|
||||||
`before=${m3.beforeTracking} trackedAfter=${m3.stillTrackedAfter}`);
|
`before=${m3.beforeTracking} trackedAfter=${m3.stillTrackedAfter}`);
|
||||||
record('M3: camera released after age-out (viewer.trackedEntity undefined)',
|
record('M3: camera released after age-out (the camera follows nothing)',
|
||||||
!m3.viewerStillTracking,
|
!m3.viewerStillTracking,
|
||||||
`viewerTracked=${m3.viewerStillTracking}`);
|
`viewerTracked=${m3.viewerStillTracking}`);
|
||||||
|
|
||||||
@@ -1902,16 +2012,17 @@ async function main() {
|
|||||||
const v = window.__godsEyeView.viewer;
|
const v = window.__godsEyeView.viewer;
|
||||||
const fl = window.__godsEyeView.dataManager.layers.get('flights').module;
|
const fl = window.__godsEyeView.dataManager.layers.get('flights').module;
|
||||||
const labelText = () => {
|
const labelText = () => {
|
||||||
const ent = v.trackedEntity;
|
const ent = window.__qaFollowed();
|
||||||
if (!ent) return null;
|
if (!ent) return null;
|
||||||
// Post overlay-unification the tracked text lives in the host
|
// Post overlay-unification the tracked text lives in the host
|
||||||
// presentation model (entities are asserted native-label-free);
|
// presentation model (entities are asserted native-label-free);
|
||||||
// the native read stays as a fallback so this probe still fails
|
// the native read stays as a fallback so this probe still fails
|
||||||
// loudly if BOTH surfaces are ever absent.
|
// loudly if BOTH surfaces are ever absent.
|
||||||
const model = window.__godsEyeView.entityRecords.read(ent)?.labelModel;
|
const model = ent.labelModel;
|
||||||
if (model) return [model.title, ...(model.details || [])].filter(Boolean).join('\n');
|
if (model) return [model.title, ...(model.details || [])].filter(Boolean).join('\n');
|
||||||
if (!ent.label || !ent.label.text) return null;
|
const label = ent.entity?.label;
|
||||||
const t = ent.label.text;
|
if (!label || !label.text) return null;
|
||||||
|
const t = label.text;
|
||||||
return typeof t === 'string' ? t : (t.getValue ? String(t.getValue(v.clock.currentTime)) : null);
|
return typeof t === 'string' ? t : (t.getValue ? String(t.getValue(v.clock.currentTime)) : null);
|
||||||
};
|
};
|
||||||
// Track a cruise plane that IS in the feed (aaa003: 8700 m, 250 m/s —
|
// Track a cruise plane that IS in the feed (aaa003: 8700 m, 250 m/s —
|
||||||
@@ -1956,19 +2067,7 @@ async function main() {
|
|||||||
const fl = dm.layers.get('flights').module;
|
const fl = dm.layers.get('flights').module;
|
||||||
const mil = dm.layers.get('military').module;
|
const mil = dm.layers.get('military').module;
|
||||||
const findBB = (id) => {
|
const findBB = (id) => {
|
||||||
let found = null;
|
return window.__qaFindIcon(id);
|
||||||
const walk = (coll) => {
|
|
||||||
const n = coll.length;
|
|
||||||
for (let i = 0; i < n; i++) {
|
|
||||||
let p;
|
|
||||||
try { p = coll.get(i); } catch { continue; }
|
|
||||||
if (!p) continue;
|
|
||||||
if (typeof p.length === 'number' && typeof p.get === 'function') { walk(p); continue; }
|
|
||||||
if (p.image !== undefined && p.alignedAxis !== undefined && p.id === id) found = p;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
walk(v.scene.primitives);
|
|
||||||
return found;
|
|
||||||
};
|
};
|
||||||
const snap = (id) => {
|
const snap = (id) => {
|
||||||
const bb = findBB(id);
|
const bb = findBB(id);
|
||||||
@@ -2249,19 +2348,7 @@ async function main() {
|
|||||||
await fl.update(v);
|
await fl.update(v);
|
||||||
await mil.update(v);
|
await mil.update(v);
|
||||||
const findBB = (id) => {
|
const findBB = (id) => {
|
||||||
let found = null;
|
return window.__qaFindIcon(id);
|
||||||
const walk = (coll) => {
|
|
||||||
const n = coll.length;
|
|
||||||
for (let i = 0; i < n; i++) {
|
|
||||||
let p;
|
|
||||||
try { p = coll.get(i); } catch { continue; }
|
|
||||||
if (!p) continue;
|
|
||||||
if (typeof p.length === 'number' && typeof p.get === 'function') { walk(p); continue; }
|
|
||||||
if (p.image !== undefined && p.alignedAxis !== undefined && p.id === id) found = p;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
walk(v.scene.primitives);
|
|
||||||
return found;
|
|
||||||
};
|
};
|
||||||
const flBB = findBB('aaa077');
|
const flBB = findBB('aaa077');
|
||||||
const milBB = findBB('bbb177');
|
const milBB = findBB('bbb177');
|
||||||
@@ -2296,7 +2383,7 @@ async function main() {
|
|||||||
try { p = coll.get(i); } catch { continue; }
|
try { p = coll.get(i); } catch { continue; }
|
||||||
if (!p) continue;
|
if (!p) continue;
|
||||||
if (typeof p.length === 'number' && typeof p.get === 'function') { walk(p); continue; }
|
if (typeof p.length === 'number' && typeof p.get === 'function') { walk(p); continue; }
|
||||||
if (p.modelMatrix && typeof p.ready !== 'undefined' && p.id === id) found = p;
|
if (p.modelMatrix && typeof p.ready !== 'undefined' && window.__qaModelIcao(p) === id) found = p;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
walk(v.scene.primitives);
|
walk(v.scene.primitives);
|
||||||
@@ -2325,19 +2412,7 @@ async function main() {
|
|||||||
const g3dState = await evalPage(() => {
|
const g3dState = await evalPage(() => {
|
||||||
const v = window.__godsEyeView.viewer;
|
const v = window.__godsEyeView.viewer;
|
||||||
const findBB = (id) => {
|
const findBB = (id) => {
|
||||||
let found = null;
|
return window.__qaFindIcon(id);
|
||||||
const walk = (coll) => {
|
|
||||||
const n = coll.length;
|
|
||||||
for (let i = 0; i < n; i++) {
|
|
||||||
let p;
|
|
||||||
try { p = coll.get(i); } catch { continue; }
|
|
||||||
if (!p) continue;
|
|
||||||
if (typeof p.length === 'number' && typeof p.get === 'function') { walk(p); continue; }
|
|
||||||
if (p.image !== undefined && p.alignedAxis !== undefined && p.id === id) found = p;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
walk(v.scene.primitives);
|
|
||||||
return found;
|
|
||||||
};
|
};
|
||||||
const modelRadius = (id) => {
|
const modelRadius = (id) => {
|
||||||
const m = window.__g3dFindModel(id);
|
const m = window.__g3dFindModel(id);
|
||||||
@@ -2561,7 +2636,7 @@ async function main() {
|
|||||||
// dead-reckoned position rather than having been quietly repurposed.
|
// dead-reckoned position rather than having been quietly repurposed.
|
||||||
if (g3dTrackedUp) {
|
if (g3dTrackedUp) {
|
||||||
const trackedWeld = await evalPage(() => {
|
const trackedWeld = await evalPage(() => {
|
||||||
const ent = window.__godsEyeView.viewer.trackedEntity;
|
const ent = window.__qaFollowed();
|
||||||
const m = window.__g3dFindModel('aaa077');
|
const m = window.__g3dFindModel('aaa077');
|
||||||
if (!m) return { error: 'no tracked model' };
|
if (!m) return { error: 'no tracked model' };
|
||||||
const matrix = m.modelMatrix;
|
const matrix = m.modelMatrix;
|
||||||
@@ -2580,10 +2655,10 @@ async function main() {
|
|||||||
const at = (p) => (p ? Math.hypot(
|
const at = (p) => (p ? Math.hypot(
|
||||||
p.x - anchor.x, p.y - anchor.y, p.z - anchor.z,
|
p.x - anchor.x, p.y - anchor.y, p.z - anchor.z,
|
||||||
) : null);
|
) : null);
|
||||||
const visual = typeof window.__godsEyeView.entityRecords.read(ent)?.visualPosition === 'function' ? window.__godsEyeView.entityRecords.read(ent)?.visualPosition() : null;
|
const visual = typeof ent?.visualPosition === 'function' ? ent?.visualPosition() : null;
|
||||||
const display = typeof window.__godsEyeView.entityRecords.read(ent)?.displayPosition === 'function' ? window.__godsEyeView.entityRecords.read(ent)?.displayPosition() : null;
|
const display = typeof ent?.displayPosition === 'function' ? ent?.displayPosition() : null;
|
||||||
return {
|
return {
|
||||||
hasVisualAccessor: typeof window.__godsEyeView.entityRecords.read(ent)?.visualPosition === 'function',
|
hasVisualAccessor: typeof ent?.visualPosition === 'function',
|
||||||
visualDelta: at(visual),
|
visualDelta: at(visual),
|
||||||
displayDelta: at(display),
|
displayDelta: at(display),
|
||||||
};
|
};
|
||||||
@@ -2688,6 +2763,21 @@ async function main() {
|
|||||||
// CHANGE 4 (2026-07-03): arrival rotation freshness. Field test: "planes
|
// CHANGE 4 (2026-07-03): arrival rotation freshness. Field test: "planes
|
||||||
// look weird when you first come to them — rotations are weird". Two
|
// look weird when you first come to them — rotations are weird". Two
|
||||||
// repaired holes, both layers:
|
// repaired holes, both layers:
|
||||||
|
//
|
||||||
|
// SINCE THE GPU ICON SETS (2c4c66c71) there is no CPU rotation pass to
|
||||||
|
// tamper with or repair: each frame the shader turns every icon along the
|
||||||
|
// course its row's motion segment carries at that frame's time. The
|
||||||
|
// invariant — the nose is right on the first settled frame after a
|
||||||
|
// camera move and on the first frame a hidden contact is shown again —
|
||||||
|
// is now observed on the drawn rows: the on-screen nose the drawn course
|
||||||
|
// projects to, against the one the plane's feed course projects to, at
|
||||||
|
// the same position, on exactly those two frames (same 10° bound, same
|
||||||
|
// per-frame budgets). That the shader turns an icon to the screen angle
|
||||||
|
// its course projects to is the renderer's own contract, which the
|
||||||
|
// renderer conformance reference scenes draw (course-rotated arrows,
|
||||||
|
// top and tilted views); a CPU readback cannot see the GPU's rotation. The reveal hides and re-shows the row through the
|
||||||
|
// layer's own icon book, the only thing that hides a fleet icon.
|
||||||
|
// The two holes the passes repaired, for the record:
|
||||||
// (a) SETTLE PASS — camera.moveEnd forces a full rotation pass on the
|
// (a) SETTLE PASS — camera.moveEnd forces a full rotation pass on the
|
||||||
// next frame (the pose-signature gate can eat a fly-to's settle:
|
// next frame (the pose-signature gate can eat a fly-to's settle:
|
||||||
// the final easing frames land inside one 10 m/0.06° quantization
|
// the final easing frames land inside one 10 m/0.06° quantization
|
||||||
@@ -2696,39 +2786,25 @@ async function main() {
|
|||||||
// idles gets its rotation refreshed the same tick (it used to
|
// idles gets its rotation refreshed the same tick (it used to
|
||||||
// reappear wearing its stale/creation-north nose for up to 1 s).
|
// reappear wearing its stale/creation-north nose for up to 1 s).
|
||||||
// Staged deterministically: park the camera nadir over the synthetic
|
// Staged deterministically: park the camera nadir over the synthetic
|
||||||
// cluster, let rotations settle, TAMPER a billboard's rotation, then
|
// cluster, let it settle, then trigger each path with the camera idle.
|
||||||
// trigger each path with the camera idle. The fleet runs every 80 ms,
|
// Observe the first completed settle frame within 500 ms of forcing
|
||||||
// independently of rendered FPS. Observe the first completed settle frame
|
// moveEnd and the first reveal frame within 500 ms of that settle frame
|
||||||
// within 500 ms of forcing moveEnd and the first reveal frame within
|
// (the budgets once sat inside the 1 s idle rotation refresh; they are
|
||||||
// 500 ms of that settle frame: each budget sits inside the 1 s idle
|
// kept as they were).
|
||||||
// rotation refresh that could otherwise repair an incorrect first reveal,
|
|
||||||
// and a ~300 ms headless SwiftShader frame fits inside each of them.
|
|
||||||
// ============================================================
|
// ============================================================
|
||||||
console.log('\nChange 4 — arrival rotation: moveEnd settle pass + horizon-reveal pass');
|
console.log('\nChange 4 — arrival rotation: the drawn nose on the settle frame and the first reveal');
|
||||||
const arrival = await evalPage(async () => {
|
const arrival = await evalPage(async () => {
|
||||||
const v = window.__godsEyeView.viewer;
|
const v = window.__godsEyeView.viewer;
|
||||||
const dm = window.__godsEyeView.dataManager;
|
const dm = window.__godsEyeView.dataManager;
|
||||||
const { screenProjectedRotation } = await import(`${window.__gevQaSourceBase || '/src'}/data/iconOrientation.js`);
|
const { screenProjectedRotation } = await import(`${window.__gevQaSourceBase || '/src'}/data/iconOrientation.js`);
|
||||||
const { observeArrivalRotationWithRetry } = await import(`${window.__gevQaSourceBase || '/src'}/tooling/trackArrivalObservation.mjs`);
|
const { observeArrivalRotationWithRetry } = await import(`${window.__gevQaSourceBase || '/src'}/tooling/trackArrivalObservation.mjs`);
|
||||||
// 3D models OFF for this phase: a model-handed-off billboard is hidden
|
// 3D models OFF for this phase: a model-handed-off icon is hidden, and
|
||||||
// and skips rotation updates entirely — the probes need live billboards
|
// the probes need shown icons (this is also the app's default state the
|
||||||
// (this is also the app's default state the field report came from).
|
// field report came from).
|
||||||
dm.layers.get('flights').module.setParams({ models3d: false });
|
dm.layers.get('flights').module.setParams({ models3d: false });
|
||||||
dm.layers.get('military').module.setParams({ models3d: false });
|
dm.layers.get('military').module.setParams({ models3d: false });
|
||||||
const findBB = (id) => {
|
const findBB = (id) => {
|
||||||
let found = null;
|
return window.__qaFindIcon(id);
|
||||||
const walk = (coll) => {
|
|
||||||
const n = coll.length;
|
|
||||||
for (let i = 0; i < n; i++) {
|
|
||||||
let p;
|
|
||||||
try { p = coll.get(i); } catch { continue; }
|
|
||||||
if (!p) continue;
|
|
||||||
if (typeof p.length === 'number' && typeof p.get === 'function') { walk(p); continue; }
|
|
||||||
if (p.image !== undefined && p.alignedAxis !== undefined && p.id === id) found = p;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
walk(v.scene.primitives);
|
|
||||||
return found;
|
|
||||||
};
|
};
|
||||||
const nextFrames = (n) => new Promise((res) => {
|
const nextFrames = (n) => new Promise((res) => {
|
||||||
let count = 0;
|
let count = 0;
|
||||||
@@ -2752,8 +2828,8 @@ async function main() {
|
|||||||
});
|
});
|
||||||
// Park the camera straight above the flights cluster (lift a live
|
// Park the camera straight above the flights cluster (lift a live
|
||||||
// billboard's position radially — no Cesium global needed in-page) so
|
// billboard's position radially — no Cesium global needed in-page) so
|
||||||
// every probe plane projects on-screen, then let rotations settle at
|
// every probe plane projects on-screen, then let a few frames draw at
|
||||||
// the new pose (the setView pose change forces a pass on the next tick).
|
// the new pose.
|
||||||
// aaa002 — aaa001 was evicted for good by the M3 age-out phase.
|
// aaa002 — aaa001 was evicted for good by the M3 age-out phase.
|
||||||
const anchor = findBB('aaa002');
|
const anchor = findBB('aaa002');
|
||||||
if (!anchor) return { error: 'anchor aaa002 missing' };
|
if (!anchor) return { error: 'anchor aaa002 missing' };
|
||||||
@@ -2767,62 +2843,91 @@ async function main() {
|
|||||||
});
|
});
|
||||||
await nextFrames(3);
|
await nextFrames(3);
|
||||||
const angDiff = (a, b) => Math.abs(Math.atan2(Math.sin(a - b), Math.cos(a - b)));
|
const angDiff = (a, b) => Math.abs(Math.atan2(Math.sin(a - b), Math.cos(a - b)));
|
||||||
const probe = async (id, course) => {
|
const probe = async (layer, id, course) => {
|
||||||
const bb = findBB(id);
|
const bb = findBB(id);
|
||||||
if (!bb || !bb.show) return { error: `${id} missing/hidden` };
|
if (!bb || !bb.show) return { error: `${id} missing/hidden` };
|
||||||
const r0 = bb.rotation; // settled tamper origin; correctness uses a fresh projection below
|
if (!Number.isFinite(bb.course) && !Number.isFinite(bb.rotation)) {
|
||||||
|
return { error: `${id} has no drawn course or rotation` };
|
||||||
|
}
|
||||||
|
const setIconShown = layer.testing?._setIconForTest;
|
||||||
|
if (typeof setIconShown !== 'function') return { error: `${id}: the layer has no icon test seam` };
|
||||||
|
// The on-screen nose the drawn row shows now, against the feed's.
|
||||||
|
const drawnError = () => {
|
||||||
|
const now = findBB(id);
|
||||||
|
if (!now) return { shown: false, rotationError: NaN };
|
||||||
|
// A GPU row is turned along its drawn course, or drawn upright; a
|
||||||
|
// billboard carries its screen rotation itself.
|
||||||
|
const drawn = Number.isFinite(now.course)
|
||||||
|
? (now.rotates ? screenProjectedRotation(v.scene, now.position, now.course, null) : 0)
|
||||||
|
: now.rotation;
|
||||||
|
return {
|
||||||
|
shown: !!now.show,
|
||||||
|
rotationError: angDiff(drawn, screenProjectedRotation(v.scene, now.position, course, null)),
|
||||||
|
};
|
||||||
|
};
|
||||||
const hasModel = !!(window.__g3dFindModel && window.__g3dFindModel(id));
|
const hasModel = !!(window.__g3dFindModel && window.__g3dFindModel(id));
|
||||||
// A wall-clock timeout is inconclusive, not a wrong angle: the frame
|
// The settle/reveal budgets and the retry were written for the removed
|
||||||
// landed where the 1 s idle refresh could already have repaired it
|
// CPU passes (a frame late enough for the 1 s idle refresh to repair
|
||||||
// (seen once on headless SwiftShader: a 926 ms first frame). Such an
|
// it was inconclusive); they are kept unchanged as a guard. A
|
||||||
// observation gets one more attempt; one that measured a wrong angle —
|
// wall-clock timeout gets one more attempt; one that measured a wrong
|
||||||
// a wrong first reveal, or a wrong settle frame before a reveal
|
// angle — a wrong first reveal, or a wrong settle frame before a
|
||||||
// timeout — never does.
|
// reveal timeout — never does.
|
||||||
|
//
|
||||||
|
// The reveal: the row is hidden right after the settle frame, a frame
|
||||||
|
// must actually draw it hidden, and only then is it shown again, so
|
||||||
|
// the frame measured is the first one that draws it after a hidden
|
||||||
|
// frame.
|
||||||
|
let revealArmed = false;
|
||||||
|
let hiddenFrames = 0;
|
||||||
const observed = await observeArrivalRotationWithRetry({
|
const observed = await observeArrivalRotationWithRetry({
|
||||||
async prepare() {
|
async prepare() {
|
||||||
// Freshen both layers' rotation passes right before the probe, so
|
// One settled camera move and a frame before each attempt, as the
|
||||||
// the settle frame is measured against a pass that just ran rather
|
// passes once needed (the layers' moveEnd now runs their fleet
|
||||||
// than one left over from the previous probe — with the camera
|
// pass on the next frame).
|
||||||
// idle, a layer otherwise runs a pass only every
|
revealArmed = false;
|
||||||
// ROTATION_REFRESH_MS.
|
hiddenFrames = 0;
|
||||||
v.camera.moveEnd.raiseEvent();
|
v.camera.moveEnd.raiseEvent();
|
||||||
await nextFrames(1);
|
await nextFrames(1);
|
||||||
},
|
},
|
||||||
scene: v.scene,
|
scene: v.scene,
|
||||||
startMoveEnd() {
|
startMoveEnd() {
|
||||||
// Only moveEnd can repair the tampered angle at the idle pose.
|
|
||||||
bb.rotation = r0 + 1.5;
|
|
||||||
v.camera.moveEnd.raiseEvent();
|
v.camera.moveEnd.raiseEvent();
|
||||||
},
|
},
|
||||||
startReveal() {
|
startReveal() {
|
||||||
// Hide immediately after the confirmed settle frame. The next
|
// Hide immediately after the confirmed settle frame, through the
|
||||||
// eligible fleet tick must reveal AND re-aim in that same tick.
|
// layer's icon book (written to the draw set as this task ends).
|
||||||
bb.rotation = r0 + 1.5;
|
setIconShown(id, { shown: false });
|
||||||
bb.show = false;
|
revealArmed = true;
|
||||||
},
|
},
|
||||||
read() {
|
read() {
|
||||||
return {
|
const sample = drawnError();
|
||||||
shown: bb.show,
|
// A frame drew it hidden: show it again for the next one.
|
||||||
rotationError: angDiff(bb.rotation,
|
if (revealArmed && sample.shown === false) {
|
||||||
screenProjectedRotation(v.scene, bb.position, course, null)),
|
hiddenFrames += 1;
|
||||||
};
|
revealArmed = false;
|
||||||
|
setIconShown(id, { shown: true });
|
||||||
|
}
|
||||||
|
return sample;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
return { r0, ...observed, hasModel };
|
// A reveal is only one after a frame drew the row hidden.
|
||||||
|
if (!observed.error && hiddenFrames === 0) {
|
||||||
|
return { ...observed, error: 'no frame drew the row hidden before its reveal', hasModel };
|
||||||
|
}
|
||||||
|
return { ...observed, hiddenFrames, hasModel };
|
||||||
};
|
};
|
||||||
const flightCourse = window.__SYNTH.flights.find((f) => f.icao === 'aaa002')?.track ?? 0;
|
const flightCourse = window.__SYNTH.flights.find((f) => f.icao === 'aaa002')?.track ?? 0;
|
||||||
const militaryCourse = window.__SYNTH.military.find((m) => m.hex === 'bbb101')?.track ?? 0;
|
const militaryCourse = window.__SYNTH.military.find((m) => m.hex === 'bbb101')?.track ?? 0;
|
||||||
return {
|
return {
|
||||||
flights: await probe('aaa002', flightCourse),
|
flights: await probe(dm.layers.get('flights').module, 'aaa002', flightCourse),
|
||||||
military: await probe('bbb101', militaryCourse),
|
military: await probe(dm.layers.get('military').module, 'bbb101', militaryCourse),
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
const fmtArr = (a) => (!a ? `no result (${arrival?.error || 'phase error'})` : a.error ? `${a.error}; ${arrivalAngleViolated(a) ? 'angle violation (not retried); ' : ''}${Number.isFinite(a.dMoveEnd) ? `settle-err=${(a.dMoveEnd * 180 / Math.PI).toFixed(1)}° ` : ''}${Number.isFinite(a.dReveal) ? `reveal-err=${(a.dReveal * 180 / Math.PI).toFixed(1)}° ` : ''}elapsed=${Number(a.elapsedMs).toFixed(1)} ms attempts=${a.attempts}`
|
const fmtArr = (a) => (!a ? `no result (${arrival?.error || 'phase error'})` : a.error ? `${a.error}; ${arrivalAngleViolated(a) ? 'angle violation (not retried); ' : ''}${Number.isFinite(a.dMoveEnd) ? `settle-err=${(a.dMoveEnd * 180 / Math.PI).toFixed(1)}° ` : ''}${Number.isFinite(a.dReveal) ? `reveal-err=${(a.dReveal * 180 / Math.PI).toFixed(1)}° ` : ''}elapsed=${Number(a.elapsedMs).toFixed(1)} ms attempts=${a.attempts}`
|
||||||
: `settle-err=${(a.dMoveEnd * 180 / Math.PI).toFixed(1)}° reveal-err=${(a.dReveal * 180 / Math.PI).toFixed(1)}° shown=${a.shown} flipFrame=${a.flipFrame} settle=${a.moveEndMs.toFixed(1)} ms reveal=${a.revealMs.toFixed(1)} ms total=${a.elapsedMs.toFixed(1)} ms attempts=${a.attempts} hasModel=${a.hasModel}`);
|
: `settle-err=${(a.dMoveEnd * 180 / Math.PI).toFixed(1)}° reveal-err=${(a.dReveal * 180 / Math.PI).toFixed(1)}° shown=${a.shown} flipFrame=${a.flipFrame} settle=${a.moveEndMs.toFixed(1)} ms reveal=${a.revealMs.toFixed(1)} ms total=${a.elapsedMs.toFixed(1)} ms attempts=${a.attempts} hasModel=${a.hasModel}`);
|
||||||
const TAMPER_DEG = 1.5 * 180 / Math.PI; // ≈ 86° — an uncorrected nose stays this far off
|
record('arrival: the drawn nose is right on the settle frame and the first reveal, flights',
|
||||||
record(`arrival: moveEnd + first reveal both re-aim before idle refresh, flights (tamper was ${TAMPER_DEG.toFixed(0)}°)`,
|
|
||||||
arrivalRotationPassed(arrival.flights), fmtArr(arrival.flights));
|
arrivalRotationPassed(arrival.flights), fmtArr(arrival.flights));
|
||||||
record(`arrival: moveEnd + first reveal both re-aim before idle refresh, military (tamper was ${TAMPER_DEG.toFixed(0)}°)`,
|
record('arrival: the drawn nose is right on the settle frame and the first reveal, military',
|
||||||
arrivalRotationPassed(arrival.military), fmtArr(arrival.military));
|
arrivalRotationPassed(arrival.military), fmtArr(arrival.military));
|
||||||
|
|
||||||
// ============================================================
|
// ============================================================
|
||||||
@@ -2883,18 +2988,7 @@ async function main() {
|
|||||||
};
|
};
|
||||||
fl.setParams({ models3d: false }); // billboards own the visual (T7 gate open)
|
fl.setParams({ models3d: false }); // billboards own the visual (T7 gate open)
|
||||||
window.__dfFindBB = (id) => {
|
window.__dfFindBB = (id) => {
|
||||||
let found = null;
|
return window.__qaFindIcon(id);
|
||||||
const walk = (coll) => {
|
|
||||||
const n = coll.length;
|
|
||||||
for (let i = 0; i < n; i++) {
|
|
||||||
let p; try { p = coll.get(i); } catch { continue; }
|
|
||||||
if (!p) continue;
|
|
||||||
if (typeof p.length === 'number' && typeof p.get === 'function') { walk(p); continue; }
|
|
||||||
if (p.image !== undefined && p.alignedAxis !== undefined && p.id === id) found = p;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
walk(v.scene.primitives);
|
|
||||||
return found;
|
|
||||||
};
|
};
|
||||||
window.__dfCarto = (pos) => {
|
window.__dfCarto = (pos) => {
|
||||||
const c = Cesium.Cartographic.fromCartesian(pos, Cesium.Ellipsoid.WGS84);
|
const c = Cesium.Cartographic.fromCartesian(pos, Cesium.Ellipsoid.WGS84);
|
||||||
@@ -2980,7 +3074,7 @@ async function main() {
|
|||||||
if (!p) continue;
|
if (!p) continue;
|
||||||
if (typeof p.length === 'number' && typeof p.get === 'function') { walk(p); continue; }
|
if (typeof p.length === 'number' && typeof p.get === 'function') { walk(p); continue; }
|
||||||
if (p.activeAnimations !== undefined && p.minimumPixelSize !== undefined) {
|
if (p.activeAnimations !== undefined && p.minimumPixelSize !== undefined) {
|
||||||
if (icao !== undefined && p.id !== icao) continue;
|
if (icao !== undefined && window.__qaModelIcao(p) !== icao) continue;
|
||||||
if (p.show) {
|
if (p.show) {
|
||||||
shown += 1;
|
shown += 1;
|
||||||
if (p.ready === true) rendering += 1;
|
if (p.ready === true) rendering += 1;
|
||||||
@@ -3005,7 +3099,7 @@ async function main() {
|
|||||||
if (!p) continue;
|
if (!p) continue;
|
||||||
if (typeof p.length === 'number' && typeof p.get === 'function') { walk(p); continue; }
|
if (typeof p.length === 'number' && typeof p.get === 'function') { walk(p); continue; }
|
||||||
if (p.activeAnimations !== undefined && p.minimumPixelSize !== undefined
|
if (p.activeAnimations !== undefined && p.minimumPixelSize !== undefined
|
||||||
&& p.id === icao && p.modelMatrix) {
|
&& window.__qaModelIcao(p) === icao && p.modelMatrix) {
|
||||||
const m = p.modelMatrix;
|
const m = p.modelMatrix;
|
||||||
// Cesium's default is the IDENTITY matrix — translation (0,0,0),
|
// Cesium's default is the IDENTITY matrix — translation (0,0,0),
|
||||||
// the Earth's centre, which `Cartographic.fromCartesian` refuses.
|
// the Earth's centre, which `Cartographic.fromCartesian` refuses.
|
||||||
@@ -3405,7 +3499,7 @@ async function main() {
|
|||||||
// the sensor value the data APIs report, at whatever regime the camera
|
// the sensor value the data APIs report, at whatever regime the camera
|
||||||
// is currently in.
|
// is currently in.
|
||||||
const readTracked = () => {
|
const readTracked = () => {
|
||||||
const pos = v.trackedEntity?.position?.getValue(Cesium.JulianDate.now());
|
const pos = window.__qaFollowed()?.position?.();
|
||||||
if (!pos) return null;
|
if (!pos) return null;
|
||||||
const c = window.__dfCarto(pos);
|
const c = window.__dfCarto(pos);
|
||||||
const info = fl.getTrackedInfo();
|
const info = fl.getTrackedInfo();
|
||||||
@@ -3480,19 +3574,19 @@ async function main() {
|
|||||||
for (let i = 0; i < collection.length; i++) {
|
for (let i = 0; i < collection.length; i++) {
|
||||||
const item = collection.get(i);
|
const item = collection.get(i);
|
||||||
if (typeof item?.get === 'function' && typeof item.length === 'number') walk(item);
|
if (typeof item?.get === 'function' && typeof item.length === 'number') walk(item);
|
||||||
else if (item?.id === 'aaa097' && item.activeAnimations !== undefined
|
else if (window.__qaModelIcao(item) === 'aaa097' && item.activeAnimations !== undefined
|
||||||
&& item.minimumPixelSize !== undefined) found = item;
|
&& item.minimumPixelSize !== undefined) found = item;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
walk(v.scene.primitives);
|
walk(v.scene.primitives);
|
||||||
return found;
|
return found;
|
||||||
};
|
};
|
||||||
const trackedEntity = v.trackedEntity;
|
const trackedEntity = window.__qaFollowed();
|
||||||
const trackedModel = findOwnModel();
|
const trackedModel = findOwnModel();
|
||||||
const achievedOut = await window.__dfZoomAbove(window.__dfRegime.exit + 5000);
|
const achievedOut = await window.__dfZoomAbove(window.__dfRegime.exit + 5000);
|
||||||
const zoomedOut = await window.__dfObserveTrackedExit({
|
const zoomedOut = await window.__dfObserveTrackedExit({
|
||||||
scene: v.scene, trackedEntity, trackedModel, getTrackedModel: findOwnModel,
|
scene: v.scene, trackedEntity, trackedModel, getTrackedModel: findOwnModel,
|
||||||
getTrackedEntity: () => v.trackedEntity,
|
getTrackedEntity: () => window.__qaFollowed(),
|
||||||
getTrackedId: () => fl.getTrackedInfo()?.icao24,
|
getTrackedId: () => fl.getTrackedInfo()?.icao24,
|
||||||
getCameraHeight: window.__dfCamH, exitHeight: window.__dfRegime.exit,
|
getCameraHeight: window.__dfCamH, exitHeight: window.__dfRegime.exit,
|
||||||
read: readTracked,
|
read: readTracked,
|
||||||
@@ -3660,7 +3754,7 @@ async function main() {
|
|||||||
return { skipped: 'no tracked model rendered in this browser' };
|
return { skipped: 'no tracked model rendered in this browser' };
|
||||||
}
|
}
|
||||||
// While the model IS the visual the clamp must stand aside (T7).
|
// While the model IS the visual the clamp must stand aside (T7).
|
||||||
const entWith = v.trackedEntity?.position?.getValue(Cesium.JulianDate.now());
|
const entWith = window.__qaFollowed()?.position?.();
|
||||||
const withModelH = entWith ? window.__dfCarto(entWith).h : null;
|
const withModelH = entWith ? window.__dfCarto(entWith).h : null;
|
||||||
// Close the deterministic skin again for the rest of the group. The
|
// Close the deterministic skin again for the rest of the group. The
|
||||||
// model is up on a snap that is already cached, so it stays up until the
|
// model is up on a snap that is already cached, so it stays up until the
|
||||||
@@ -3675,7 +3769,7 @@ async function main() {
|
|||||||
// contact's primitive, and an unrelated model in the scene must not be
|
// contact's primitive, and an unrelated model in the scene must not be
|
||||||
// able to answer it either way.
|
// able to answer it either way.
|
||||||
const afterOut = window.__dfCountModels('aaa097');
|
const afterOut = window.__dfCountModels('aaa097');
|
||||||
const ent = v.trackedEntity?.position?.getValue(Cesium.JulianDate.now());
|
const ent = window.__qaFollowed()?.position?.();
|
||||||
const c = ent ? window.__dfCarto(ent) : null;
|
const c = ent ? window.__dfCarto(ent) : null;
|
||||||
// Plant a floor above wherever it now renders so "floored" is decisive.
|
// Plant a floor above wherever it now renders so "floored" is decisive.
|
||||||
// Mesh cells latch ONE-SHOT, so the earlier scenario's seed would win
|
// Mesh cells latch ONE-SHOT, so the earlier scenario's seed would win
|
||||||
@@ -3696,7 +3790,7 @@ async function main() {
|
|||||||
// from mistaking a cached same-frame position for a failed clamp.
|
// from mistaking a cached same-frame position for a failed clamp.
|
||||||
v.scene.requestRender();
|
v.scene.requestRender();
|
||||||
await window.__dfSettle(900);
|
await window.__dfSettle(900);
|
||||||
const ent2 = v.trackedEntity?.position?.getValue(Cesium.JulianDate.now());
|
const ent2 = window.__qaFollowed()?.position?.();
|
||||||
const c2 = ent2 ? window.__dfCarto(ent2) : null;
|
const c2 = ent2 ? window.__dfCarto(ent2) : null;
|
||||||
const out = {
|
const out = {
|
||||||
toggleOff,
|
toggleOff,
|
||||||
@@ -3788,7 +3882,7 @@ async function main() {
|
|||||||
let p; try { p = coll.get(i); } catch { continue; }
|
let p; try { p = coll.get(i); } catch { continue; }
|
||||||
if (!p) continue;
|
if (!p) continue;
|
||||||
if (typeof p.length === 'number' && typeof p.get === 'function') { walk(p); continue; }
|
if (typeof p.length === 'number' && typeof p.get === 'function') { walk(p); continue; }
|
||||||
if (p.activeAnimations !== undefined && p.minimumPixelSize !== undefined && p.id === id) found = p;
|
if (p.activeAnimations !== undefined && p.minimumPixelSize !== undefined && window.__qaModelIcao(p) === id) found = p;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
walk(v.scene.primitives);
|
walk(v.scene.primitives);
|
||||||
@@ -3804,19 +3898,30 @@ async function main() {
|
|||||||
fl.setParams({ models3d: false });
|
fl.setParams({ models3d: false });
|
||||||
return { skipped: 'no fleet model for aaa097 in this browser' };
|
return { skipped: 'no fleet model for aaa097 in this browser' };
|
||||||
}
|
}
|
||||||
|
// The layer decides who owns the visual from its OWN record of the
|
||||||
|
// model (data/modelRecord.js: `ready` from the draw set's ready event,
|
||||||
|
// `show` as it last sent it), not from the renderer's model object, so
|
||||||
|
// the shown-but-not-ready state is planted on that record. The record
|
||||||
|
// is the registered layer's own, reached through its test seam.
|
||||||
|
const fleetRecord = await fl.testing?._ensureFleetModelForTest?.('aaa097');
|
||||||
|
if (!fleetRecord || typeof fleetRecord !== 'object') {
|
||||||
|
fl.setParams({ models3d: false });
|
||||||
|
return { error: 'the flights layer has no model record for aaa097' };
|
||||||
|
}
|
||||||
// Accessors with SWALLOWING setters, not data properties: the fleet tick
|
// Accessors with SWALLOWING setters, not data properties: the fleet tick
|
||||||
// assigns `model.show = false` for a not-ready model, and assigning to a
|
// assigns `show = false` for a not-ready model, and assigning to a
|
||||||
// non-writable own property throws in strict mode — which lands inside
|
// non-writable own property throws in strict mode — which lands inside
|
||||||
// Cesium's render loop and stops rendering for the rest of the run.
|
// the render loop and stops rendering for the rest of the run.
|
||||||
const priorReady = Object.getOwnPropertyDescriptor(fleetModel, 'ready');
|
const priorReady = Object.getOwnPropertyDescriptor(fleetRecord, 'ready');
|
||||||
const priorShow = Object.getOwnPropertyDescriptor(fleetModel, 'show');
|
const priorShow = Object.getOwnPropertyDescriptor(fleetRecord, 'show');
|
||||||
let armed = false;
|
let armed = false;
|
||||||
let processedFrame = null;
|
let processedFrame = null;
|
||||||
let sample = null;
|
let sample = null;
|
||||||
|
let sampledRecord = null;
|
||||||
let removePostRender = null;
|
let removePostRender = null;
|
||||||
try {
|
try {
|
||||||
Object.defineProperty(fleetModel, 'ready', { get: () => false, set: () => {}, configurable: true });
|
Object.defineProperty(fleetRecord, 'ready', { get: () => false, set: () => {}, configurable: true });
|
||||||
Object.defineProperty(fleetModel, 'show', {
|
Object.defineProperty(fleetRecord, 'show', {
|
||||||
get: () => true,
|
get: () => true,
|
||||||
set: (value) => {
|
set: (value) => {
|
||||||
// Both the not-ready handoff and horizon cull clear show AFTER
|
// Both the not-ready handoff and horizon cull clear show AFTER
|
||||||
@@ -3830,7 +3935,10 @@ async function main() {
|
|||||||
});
|
});
|
||||||
const bb = window.__dfFindBB('aaa097');
|
const bb = window.__dfFindBB('aaa097');
|
||||||
if (!bb) return { error: 'aaa097 billboard missing' };
|
if (!bb) return { error: 'aaa097 billboard missing' };
|
||||||
bb.show = true; // the handoff would not have hidden it: the model is not ready
|
// (The icon is not forced shown here, as the old billboard fixture did:
|
||||||
|
// the renderer draws what the layer sends, so the handoff the record
|
||||||
|
// drives is the only thing that decides it.)
|
||||||
|
const sameIcon = (a, b) => !!a && !!b && (a === b || (a.setId === b.setId && a.id === b.id));
|
||||||
const d0 = window.__dfCarto(bb.position);
|
const d0 = window.__dfCarto(bb.position);
|
||||||
gf._clearMeshFloorCellsForTest();
|
gf._clearMeshFloorCellsForTest();
|
||||||
// Earlier display-floor scenarios deliberately leave this contact's
|
// Earlier display-floor scenarios deliberately leave this contact's
|
||||||
@@ -3853,13 +3961,18 @@ async function main() {
|
|||||||
sample = {
|
sample = {
|
||||||
fleetTickCompleted: true,
|
fleetTickCompleted: true,
|
||||||
fleetFrame: v.scene.frameState.frameNumber,
|
fleetFrame: v.scene.frameState.frameNumber,
|
||||||
fleetModelReady: fleetModel.ready,
|
fleetModelReady: fleetRecord.ready,
|
||||||
fleetModelShow: fleetModel.show,
|
fleetModelShow: fleetRecord.show,
|
||||||
fleetBillboardVisible: !!currentBb?.show,
|
fleetBillboardVisible: !!currentBb?.show,
|
||||||
fleetSeeded: seededFleet,
|
fleetSeeded: seededFleet,
|
||||||
fleetH: currentBb ? window.__dfCarto(currentBb.position).h : null,
|
fleetH: currentBb ? window.__dfCarto(currentBb.position).h : null,
|
||||||
};
|
};
|
||||||
if (currentBb !== bb || currentModel !== fleetModel || fleetModel.isDestroyed()
|
// (An older build's seam answers asynchronously: its answer is
|
||||||
|
// checked once the frame is done, below.)
|
||||||
|
const currentRecord = fl.testing._ensureFleetModelForTest('aaa097');
|
||||||
|
if (typeof currentRecord?.then === 'function') sampledRecord = currentRecord;
|
||||||
|
else if (currentRecord !== fleetRecord) sample.error = 'fleet loading fixture changed before its completed frame';
|
||||||
|
if (!sameIcon(currentBb, bb) || currentModel !== fleetModel || fleetModel.isDestroyed()
|
||||||
|| fl.getTrackedInfo()) sample.error = 'fleet loading fixture changed before its completed frame';
|
|| fl.getTrackedInfo()) sample.error = 'fleet loading fixture changed before its completed frame';
|
||||||
});
|
});
|
||||||
armed = true;
|
armed = true;
|
||||||
@@ -3870,14 +3983,17 @@ async function main() {
|
|||||||
await window.__dfSettle(50);
|
await window.__dfSettle(50);
|
||||||
} while (!sample && Date.now() < tickDeadline);
|
} while (!sample && Date.now() < tickDeadline);
|
||||||
if (!sample) return { error: 'fleet loading fixture did not complete an aircraft update within 5000 ms' };
|
if (!sample) return { error: 'fleet loading fixture did not complete an aircraft update within 5000 ms' };
|
||||||
|
if (sampledRecord && (await sampledRecord) !== fleetRecord) {
|
||||||
|
sample.error = 'fleet loading fixture changed before its completed frame';
|
||||||
|
}
|
||||||
Object.assign(out, sample);
|
Object.assign(out, sample);
|
||||||
} finally {
|
} finally {
|
||||||
armed = false;
|
armed = false;
|
||||||
removePostRender?.();
|
removePostRender?.();
|
||||||
if (priorReady) Object.defineProperty(fleetModel, 'ready', priorReady);
|
if (priorReady) Object.defineProperty(fleetRecord, 'ready', priorReady);
|
||||||
else delete fleetModel.ready;
|
else delete fleetRecord.ready;
|
||||||
if (priorShow) Object.defineProperty(fleetModel, 'show', priorShow);
|
if (priorShow) Object.defineProperty(fleetRecord, 'show', priorShow);
|
||||||
else delete fleetModel.show;
|
else delete fleetRecord.show;
|
||||||
fl.setParams({ models3d: false });
|
fl.setParams({ models3d: false });
|
||||||
}
|
}
|
||||||
await window.__dfSettle(400);
|
await window.__dfSettle(400);
|
||||||
@@ -3888,7 +4004,7 @@ async function main() {
|
|||||||
// it finishes. Sample within that window.
|
// it finishes. Sample within that window.
|
||||||
if (!fl.trackById('aaa097')) return { ...out, error: 'trackById(aaa097) failed' };
|
if (!fl.trackById('aaa097')) return { ...out, error: 'trackById(aaa097) failed' };
|
||||||
await window.__dfSettle(500);
|
await window.__dfSettle(500);
|
||||||
const entBefore = v.trackedEntity?.position?.getValue(Cesium.JulianDate.now());
|
const entBefore = window.__qaFollowed()?.position?.();
|
||||||
const cBefore = entBefore ? window.__dfCarto(entBefore) : null;
|
const cBefore = entBefore ? window.__dfCarto(entBefore) : null;
|
||||||
gf._clearMeshFloorCellsForTest();
|
gf._clearMeshFloorCellsForTest();
|
||||||
fl._clearDisplayFloorStateForTest();
|
fl._clearDisplayFloorStateForTest();
|
||||||
@@ -3910,7 +4026,7 @@ async function main() {
|
|||||||
// billboard-owned. The shared helper keys models by their pick id and
|
// billboard-owned. The shared helper keys models by their pick id and
|
||||||
// uses the production ownership pair (`show && ready`).
|
// uses the production ownership pair (`show && ready`).
|
||||||
out.renderingModelsDuringLoad = window.__dfCountModels('aaa097').rendering;
|
out.renderingModelsDuringLoad = window.__dfCountModels('aaa097').rendering;
|
||||||
const entLoad = v.trackedEntity?.position?.getValue(Cesium.JulianDate.now());
|
const entLoad = window.__qaFollowed()?.position?.();
|
||||||
out.trackedSeeded = seededTracked;
|
out.trackedSeeded = seededTracked;
|
||||||
out.trackedLoadH = entLoad ? window.__dfCarto(entLoad).h : null;
|
out.trackedLoadH = entLoad ? window.__dfCarto(entLoad).h : null;
|
||||||
fl.setParams({ models3d: false });
|
fl.setParams({ models3d: false });
|
||||||
@@ -4030,7 +4146,12 @@ async function main() {
|
|||||||
const taxiCarto = window.__dfCarto(taxiPos);
|
const taxiCarto = window.__dfCarto(taxiPos);
|
||||||
const baseMeshM = gfns?.cachedMeshFloor?.(baseCarto.lat, baseCarto.lon) ?? null;
|
const baseMeshM = gfns?.cachedMeshFloor?.(baseCarto.lat, baseCarto.lon) ?? null;
|
||||||
const taxiMeshM = gfns?.cachedMeshFloor?.(taxiCarto.lat, taxiCarto.lon) ?? null;
|
const taxiMeshM = gfns?.cachedMeshFloor?.(taxiCarto.lat, taxiCarto.lon) ?? null;
|
||||||
|
// The layer writes its icon changes to the draw set together once the
|
||||||
|
// current task's microtasks run (data/aircraftIconLayer.js), so the
|
||||||
|
// drawn row is read after that write, with no frame in between.
|
||||||
|
const iconWrites = () => Promise.resolve();
|
||||||
const heldOwns = ns._driveFleetModelHandoffForTest({ icao24: holdIcao, position: taxiPos, course: 90 });
|
const heldOwns = ns._driveFleetModelHandoffForTest({ icao24: holdIcao, position: taxiPos, course: 90 });
|
||||||
|
await iconWrites();
|
||||||
const heldH = window.__dfModelHeight(holdIcao);
|
const heldH = window.__dfModelHeight(holdIcao);
|
||||||
const heldBb = !!window.__dfFindBB(holdIcao)?.show;
|
const heldBb = !!window.__dfFindBB(holdIcao)?.show;
|
||||||
|
|
||||||
@@ -4038,6 +4159,7 @@ async function main() {
|
|||||||
// been. It is released rather than stretched, and the gate takes over.
|
// been. It is released rather than stretched, and the gate takes over.
|
||||||
const farPos = Cesium.Cartesian3.fromDegrees(base.lon + 0.004, base.lat, base.h);
|
const farPos = Cesium.Cartesian3.fromDegrees(base.lon + 0.004, base.lat, base.h);
|
||||||
const releasedOwns = ns._driveFleetModelHandoffForTest({ icao24: holdIcao, position: farPos, course: 90 });
|
const releasedOwns = ns._driveFleetModelHandoffForTest({ icao24: holdIcao, position: farPos, course: 90 });
|
||||||
|
await iconWrites();
|
||||||
const releasedBb = !!window.__dfFindBB(holdIcao)?.show;
|
const releasedBb = !!window.__dfFindBB(holdIcao)?.show;
|
||||||
|
|
||||||
fl.setParams({ models3d: false });
|
fl.setParams({ models3d: false });
|
||||||
|
|||||||
Reference in new issue
Block a user