GODSIGH/js/config.js
jing 7356d62381 phase 1: globe core — viewer, dual basemaps, clock, HUD, layer contract
- CesiumJS viewer (token-free, baseLayer:false), Carto dark + EOX Sentinel-2
- clock spans now +/-6h CLAMPED; built-in timeline/animation = the space-time slider
- HUD: brand, LIVE/SCRUBBED chip, Data/Photo mode toggle, layer rows, credits
- lighting is mode-aware: OFF in Data (high-contrast asset map), ON in Photo
  (realistic day/night terminator) — refines SPEC 6.1's global-lighting note
- main.js defines the layer-factory contract + dynamic loader; layers land next
- serve.py now forwards OpenSky X-Rate-Limit-* headers for the aircraft status line

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 12:06:05 +10:00

94 lines
3.0 KiB
JavaScript

// GODSIGH configuration — every URL, interval, and tunable in one place.
// All feed paths are RELATIVE so the app works identically at "/" (dev) and
// "/godsigh/" (prod). Never introduce a leading-slash path.
export const CONFIG = {
// Same-origin proxy endpoints (serve.py in dev; nginx location blocks in prod).
proxy: {
opensky: 'proxy/opensky',
celestrak: 'proxy/celestrak',
},
basemaps: {
// Data Mode — dark high-contrast raster.
dark: {
url: 'https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png',
subdomains: ['a', 'b', 'c', 'd'],
credit: '© OpenStreetMap contributors © CARTO',
maximumLevel: 19,
},
// Photo Mode — Sentinel-2 cloudless mosaic (no key).
photo: {
url: 'https://tiles.maps.eox.at/wmts/1.0.0/s2cloudless-2023_3857/default/g/{z}/{y}/{x}.jpg',
credit: 'Sentinel-2 cloudless by EOX — modified Copernicus Sentinel data 2023',
maximumLevel: 14,
},
},
// Timeline spans now ± windowHours.
windowHours: 6,
// Live-only layers (aircraft, live AIS) pause when the clock is scrubbed
// further than this from wall-clock now.
liveThresholdSec: 600,
// Camera opens on the Persian Gulf theater.
camera: { lon: 53.0, lat: 25.5, height: 2_800_000 },
satellites: {
sampleStepSec: 60, // one SGP4 sample per minute across the window
cap: 120, // hard ceiling on tracked satellites
// Each source is one Celestrak query. `filter` = keep only names containing
// one of these tokens; `keepOnly` = keep only these exact names.
sources: [
{
q: 'GROUP=resource&FORMAT=tle',
filter: ['WORLDVIEW', 'LEGION', 'PLEIADES', 'CAPELLA', 'GAOFEN', 'SKYSAT',
'ICEYE', 'UMBRA', 'LANDSAT', 'SENTINEL-1', 'SENTINEL-2',
'GEOEYE', 'KOMPSAT', 'CARTOSAT', 'RESURS'],
},
{ q: 'GROUP=stations&FORMAT=tle', keepOnly: ['ISS (ZARYA)', 'CSS (TIANHE)'] },
{ q: 'NAME=GAOFEN&FORMAT=tle' },
{ q: 'NAME=COSMOS%202486&FORMAT=tle' },
{ q: 'NAME=COSMOS%202506&FORMAT=tle' },
],
},
aircraft: {
// null bbox = global (a global states/all call costs the same 4 credits as
// any large bbox). Or set {lamin, lomin, lamax, lomax}.
bbox: null,
pollMs: 90_000,
},
// Optional live AIS. Leave blank to use the demo fleet only (roadmap feature).
AISSTREAM_API_KEY: '',
colors: {
// satellites (by name token)
GAOFEN: '#ff4d4d',
COSMOS: '#ff9f40',
WORLDVIEW: '#4dd2ff',
LEGION: '#4dd2ff',
CAPELLA: '#9d7bff',
PLEIADES: '#7bff9d',
SENTINEL: '#ffd24d',
ISS: '#ffffff',
CSS: '#ffffff',
satDefault: '#66ffcc',
// aircraft (by altitude band)
aircraftLow: '#ffb347',
aircraftMid: '#ffe74d',
aircraftHigh: '#4dd2ff',
// ships
shipNormal: '#7bff9d',
shipToll: '#ffe74d',
shipDark: '#ff4d4d',
shipIdle: '#8a97a3',
// infra
chokepoint: '#ff003c',
pipeline: '#ffbf40',
facility: '#35e0ff',
event: '#ff4d4d',
},
};