mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Task 12b. src/layers/localAdsb/render/navara.js implements the Local ADS-B renderer interface of 12a on Navara: - markers: the shared aircraft renderer's glyph sets in magenta #ff4fd8 (class silhouette and scale, ×3 near / ×0.5 far, always on top), drawn under every sprite layer as Cesium draws the entities; each frame writes what Cesium's CallbackProperties gave (position, screen rotation, visibility) and the 2,000 km display distance; - the 978 MHz UAT ring: its own sprite set, a white ring atlas tinted #ffb3ef, Cesium's 24 px point plus its 1.5 px outline (27 px), the same distance scale and distance, pickable as its aircraft; - models (the Flights GLBs, magenta MIX tint), trail and head: the shared aircraft renderer's; the camera never follows a local aircraft. Registered by registerNavaraLayerRenderers (import()); the Navara catalog now offers flights, military and local ADS-B. - ?qaFeed=local-adsb:fixture: the local receivers' answer in the server's format (src/bench/w1Feeds syntheticLocalReceivers: 40 aircraft near JFK, 10 on 978 MHz UAT) through the layer's own decoder-feed session (sources.localAdsbFeeds, null by default: the layer makes its own). - qa-w1-layers --layer=local-adsb: a click selects a marker and shows its card with the receiver line, the camera does not follow, Escape leaves the selection (it never answered Escape), empty map releases it. qa-w1-layers local-adsb: Cesium 12/12, Navara 13/13, --compare parity (global pose: the 2.27 px camera offset only). qa-flights-engines --layer=local-adsb: 14/14 (fills exact; UAT rings side by side in docs/migration/phase3/localAdsb).
69 lines
3.2 KiB
JavaScript
69 lines
3.2 KiB
JavaScript
import { createDirectionsSource } from '../layers/directions/source.js';
|
|
import { createRecentImagerySource } from '../layers/recentImagery/source.js';
|
|
import { createOpenFreeMapSource } from '../sources/openFreeMap.js';
|
|
import {
|
|
createFlightSource,
|
|
createMilitarySource,
|
|
createVesselSource,
|
|
} from '../sources/live/standalone.js';
|
|
import { createCctvSource } from '../layers/cctv/source.js';
|
|
import { createRadioSource } from '../layers/radio/source.js';
|
|
import { createTransitSource } from '../layers/transit/source.js';
|
|
import { createTrafficSource } from '../layers/traffic/source.js';
|
|
import { createBikeshareSource } from '../layers/bikeshare/source.js';
|
|
import { createInstallationSource } from '../layers/installations/source.js';
|
|
import { createSatelliteSource } from '../layers/satellites/source.js';
|
|
import { createLaunchSource } from '../layers/launches/source.js';
|
|
import { createAlprTileSource } from '../layers/alpr/source.js';
|
|
import { createWeatherSource } from '../layers/weather/source.js';
|
|
import { createCycloneSource } from '../layers/cyclones/source.js';
|
|
import { createWindSource } from '../layers/wind/source.js';
|
|
import { createFirmsSource } from '../layers/firms/source.js';
|
|
import { createMapillarySource } from '../layers/streetLevel/providers/mapillary/source.js';
|
|
import { createReferenceSources } from '../sources/reference.js';
|
|
export { createReferenceSources as createStandaloneReferenceSources } from '../sources/reference.js';
|
|
|
|
/** Select standalone providers without starting their acquisition. */
|
|
export function createStandaloneLayerSources(overrides = {}) {
|
|
if (!overrides || typeof overrides !== 'object' || Array.isArray(overrides))
|
|
throw new TypeError('Source overrides must be an object');
|
|
const mapTiles = createOpenFreeMapSource();
|
|
const defaults = {
|
|
...createReferenceSources(),
|
|
directions: createDirectionsSource(),
|
|
'recent-imagery': createRecentImagerySource(),
|
|
flights: createFlightSource(),
|
|
military: createMilitarySource(),
|
|
vessels: createVesselSource({
|
|
apiUrl: import.meta.env?.VITE_AIS_LIVE_API_URL || '/api/vessels',
|
|
// Resolved against the document's address, which a panel host may
|
|
// serve from its own scheme.
|
|
origin: () => globalThis.document?.baseURI ?? 'http://localhost',
|
|
}),
|
|
cctv: createCctvSource(),
|
|
radio: createRadioSource(),
|
|
traffic: createTrafficSource({ mapTiles }),
|
|
transit: createTransitSource(),
|
|
bikeshare: createBikeshareSource(),
|
|
installations: createInstallationSource({ mapTiles }),
|
|
satellites: createSatelliteSource(),
|
|
launches: createLaunchSource(),
|
|
alpr: createAlprTileSource(),
|
|
firms: createFirmsSource(),
|
|
wind: createWindSource(),
|
|
weather: createWeatherSource(),
|
|
cyclones: createCycloneSource(),
|
|
mapillary: createMapillarySource({
|
|
token: import.meta.env?.MAPILLARY_CLIENT_TOKEN || '',
|
|
}),
|
|
// The local receivers' decoder-feed session: none here (the Local ADS-B
|
|
// layer makes its own); QA fixtures replace it (?qaFeed=local-adsb:fixture).
|
|
localAdsbFeeds: null,
|
|
};
|
|
for (const name of Object.keys(overrides)) {
|
|
if (!Object.hasOwn(defaults, name))
|
|
throw new TypeError(`Unknown source: ${name}`);
|
|
}
|
|
return { ...defaults, ...overrides };
|
|
}
|