fix(vessels): the ship the Cockpit rides is no object in view again

In-view scanning skipped a vessel whose chevron was hidden and not drawn
as its model, which covered the ship the bridge camera rides. It now
skipped only vessels past the horizon, so the ridden ship was reported,
at the camera's own position. It is skipped again unless its model draws
it.
This commit is contained in:
Sameh Khamis committed 2026-11-14 01:46:41 -08:00
1 parent 4a781f0480
commit d2e161372c
2 files changed
+15

No files matched your search

+7
View File
@@ -2181,6 +2181,13 @@ test('detection objects name the vessel card their callout gives way to', () =>
'vessel:unkeyed:NO MMSI:37.80000:-122.40000',
'the same identity the vessel card is published under',
);
// The ship the bridge camera rides is no object in view.
aisLiveVesselsLayer.setCockpitSubject('200');
const ids = aisLiveVesselsLayer
.getDetectableObjects()
.map((object) => object.id);
assert.deepEqual(ids, ['NO MMSI']);
aisLiveVesselsLayer.setCockpitSubject(null);
} finally {
_setVesselStateForTest({ enabled: false });
}
+8
View File
@@ -656,6 +656,14 @@ export function createQueries({
const visual = components.rendering.getVisual(record);
// Horizon visibility: a vessel drawn as its model still counts.
if (!visual.visible) continue;
// The ship the bridge camera rides, its icon hidden, is no object in
// view (drawn as its model, it still counts).
if (
state.cockpitSubjectId &&
record.id === state.cockpitSubjectId &&
!visual.modelOwnsVisual
)
continue;
const position = visual.position;
if (!position) continue;
result.push({