Sprites for helicopters, ground vehicles, stations and vessel types; history to live without an empty map; model parts in Cesium

Aircraft icons are one size; helicopters turn a three-frame rotor while
airborne or moving; ADS-B ground vehicles share one amber sprite and
stations/obstacles one mast; vessels get hull sprites by type and one buoy.
Going live keeps contacts until the first live answer and replaces them by
id; fast playback holds before the loaded positions end and prefetches
ahead. Cesium models move their parts from the optional model part state.
This commit is contained in:
Sameh Khamis committed 2026-11-17 15:09:54 -08:00
1 parent 624c229bc2
commit 7186f720df
97 files changed
+6586 -343

No files matched your search

+74 -3
View File
@@ -312,12 +312,83 @@ test('a ground vehicle or station with no altitude stands on the ground; an airc
view(),
).meta;
assert.equal(reported.onGround, false);
// Before the model set loads nothing is grounded by its model.
const unloaded = records().receive(
// Before the model set loads, the feed's ground types already count: an
// airport vehicle is never drawn as an aircraft first.
const early = records();
const unloaded = early.receive(
observation({ id: 'v3', typeCode: 'ZVEH', ...noAltitude }),
view(),
).meta;
assert.equal(unloaded.onGround, false);
assert.equal(unloaded.onGround, true);
assert.equal(unloaded.typeCode, 'ZVEH');
const earlyPlane = early.receive(
observation({ id: 'p2', typeCode: 'A320', ...noAltitude }),
view(),
).meta;
assert.equal(earlyPlane.onGround, false);
assert.equal(earlyPlane.typeCode, null);
});
test('airport vehicles and ground stations take their class from the first fix', () => {
// Before the model set loads, and after.
for (const store of [records(), records(() => fleetSet)]) {
const klass = (fields) =>
store.receive(observation({ callsign: '', ...fields }), view()).meta
.klass;
assert.equal(klass({ id: 'v1', typeCode: 'ZVEH' }), 'vehicle');
assert.equal(
klass({ id: 'v2', typeCode: 'ZVEH', callsign: 'FIRE 2' }),
'vehicle',
);
assert.equal(klass({ id: 'v3', category: 'C1' }), 'vehicle');
assert.equal(klass({ id: 'v4', category: 'C2' }), 'vehicle');
assert.equal(klass({ id: 'm1', typeCode: 'GRND' }), 'station');
assert.equal(klass({ id: 'm2', category: 'C4' }), 'station');
// An aircraft's feed type still waits for the airframe lookup.
assert.equal(
klass({ id: 'p1', typeCode: 'A320', category: 'A7' }),
'helicopter',
);
}
});
test('a surface emitter category stands on the ground, before and after the model set loads', () => {
const noAltitude = { baroAltitudeM: null, ellipsoidAltitudeM: null };
for (const store of [records(), records(() => fleetSet)]) {
for (const [id, category] of [
['c1', 'C1'],
['c2', 'C2'],
['c3', 'C3'],
['c5', 'C5'],
['o16', 16],
['o20', 20],
]) {
const meta = store.receive(
observation({ id, category, callsign: '', ...noAltitude }),
view(),
).meta;
assert.equal(meta.onGround, true, `${id} stands on the ground`);
assert.equal(meta.altitude, 0, id);
}
// An aircraft category with no altitude keeps the airborne default.
const plane = store.receive(
observation({ id: 'a3', category: 'A3', ...noAltitude }),
view(),
).meta;
assert.equal(plane.onGround, false);
// A feed's aircraft type on a surface category does not make it an aircraft.
const odd = store.receive(
observation({
id: 'c9',
category: 'C1',
typeCode: 'A320',
...noAltitude,
}),
view(),
).meta;
assert.equal(odd.klass, 'vehicle');
assert.equal(odd.onGround, true);
}
});
test('a contact reported with no course faces the way its newer fixes went', () => {