feat(vessels, transit, rail): draw fleet models under the 3D toggle

Vessels, Transit and Rail turn nearby icons into fleet models at the
aircraft layers' distances. A vessel is drawn at its AIS length and beam
(static dimensions now reach vessel rows), standing at the sea surface; a
transit vehicle or train stands on its road or rail, raised by its type's
elevation, and is painted in its mode or category colour where the model
marks it.
This commit is contained in:
Sameh Khamis committed 2026-11-13 07:16:25 -08:00
1 parent fcc44d0eaf
commit 7b93045895
18 files changed
+984 -15

No files matched your search

+10
View File
@@ -25,6 +25,9 @@ export function normalizeVessel(row) {
imo: String(row.imo || ''),
type: String(row.type || ''),
destination: String(row.destination || ''),
// Hull length and beam (metres), null when unreported.
length: positiveNumber(row.length),
beam: positiveNumber(row.beam),
speed: finiteNumber(row.speed),
course: finiteNumber(row.course),
heading: finiteNumber(row.heading),
@@ -46,6 +49,11 @@ function stampFix(record, receivedAtMs, feedLatestEpoch) {
record.fixFeedEpoch = feedLatestEpoch;
}
function positiveNumber(value) {
const number = finiteNumber(value);
return number !== null && number > 0 ? number : null;
}
function finiteNumber(value) {
if (value === null || value === undefined || value === '') return null;
const number = Number(value);
@@ -147,6 +155,8 @@ export class VesselRecords {
record.imo = next.imo;
record.type = next.type;
record.destination = next.destination;
record.length = next.length;
record.beam = next.beam;
record.speed = next.speed;
record.course = next.course;
record.heading = next.heading;