Commit Graph

11 Commits

Author SHA1 Message Date
type-two
07993c77ff feat: Solar System mode — 'Travel to' the planets (Wave 4)
New '◉ Solar System' mode: leaves the Earth OSINT globe and renders a
heliocentric orrery — Sun + 8 planets as spheres textured with real (CC BY 4.0,
self-hosted) imagery, at their TRUE current positions (Schlyter series, incl.
Uranus/Neptune), with orbits. A 'Travel to…' panel flies the camera to any body;
'Return to Earth' restores the full OSINT view (globe, all layers, clock, camera,
frustum, lighting — all saved/restored). Planets exaggerated + distances
compressed for a readable orrery; Saturn ring; camera headlight for even lighting;
far plane widened to 8e9 (default 5e8 would clip the whole system).

Textures harvested from Solar System Scope (CC BY 4.0), self-hosted in textures/
(WebGL taints cross-origin), credited in-app + README + textures/TEXTURES_CREDIT.md.

Components verified in-browser (ellipsoids render, positions correct, mode
enter/exit, UI, textures). Full-orrery screenshot pending a real GPU frame — the
headless preview can't complete async worker geometry (backgrounded tab clamps).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 10:19:21 +10:00
type-two
b3499381bf feat: celestial layer — zodiac ring + Sun/Moon/planets in true sky positions
New 'Sky: zodiac · planets' layer (Space, default off). All computed, no data:
- 12 zodiac signs labeled around the ecliptic ring
- Sun & Moon from Cesium's Simon1994 model, 5 naked-eye planets from Schlyter's
  low-precision series — correct directions, verified (Sun sits in the right
  sign for the date, planets hug the ecliptic)
- placed in the INERTIAL frame (CallbackProperty × ICRF→Fixed each frame) so the
  sky stays star-locked while the globe rotates; distances compressed to one
  display ring beyond GEO so they're visible when zoomed out

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 10:19:21 +10:00
jing
60ceb4a261 wave3.1: ADS-B OSINT layers (emergency squawks, rare-type hunter, shadow, radius focus)
All FREE via adsb.lol. New generic pieces:
- serve.py proxy/adsb/<path>: regex-allowlisted (SSRF-safe) adsb.lol v2 proxy
  with per-path 120s cache + upstream call-spacing (adsb.lol 429s on bursts;
  reservation slots space call *starts* without serializing network time),
  12s fail-fast timeout, stale-on-error
- js/layers/adsb-layer.js: generic {ac:[...]} billboard factory (parallel
  allSettled fetch, live/scrub/visibility gating, optional client-side filter)
- js/adsb-registry.js: emergency (sqk 7700/7600/7500, default-on, alerts red),
  rare-type hunter (filters the shared mil feed by ICAO type — 1 cached call,
  no per-type rate-limit), shadow (LADD+PIA, purple/pink)
- js/layers/radius.js: camera-driven 'all traffic within 250nm of view'
- verified live: all four render, worst-case simultaneous-enable ok, 0 errors

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 10:19:21 +10:00
monsterrobotparty
d06ebf07cb 🪐 portal: the orrery gets a door — 🪐 SOLARGOD button deep-links at GODSIGH's scrubbed moment
Reciprocal to SOLARGOD's Earth-card link into GODSIGH. A subtle HUD pill
(above the footer, styled to the mode-button family) opens the orrery in a
new tab. The href is rebuilt fresh at click time from viewer.clock.currentTime
via the shared `#t=@<unixMs>` convention, so scrubbing GODSIGH's clock carries
straight through to SOLARGOD's sim time.

- index.html: <a#solargod-link.portal-link> between #layers and footer
- css: .portal-link (matches .modes button; accent on hover)
- ui.js: wireSolargodLink(getMs) — rebuilds href on pointerdown+click
  (covers ⌘/middle-click new-tab); Cesium stays out of the DOM module
- main.js: wire it with a getMs closure over viewer.clock

Verified in-browser: button renders, zero console errors, all layers boot;
live click → href tracks the clock; scrub -3h → href exactly 3h behind now +
chip flips SCRUBBED + live layers pause; opening the link launches SOLARGOD
in SCRUBBED state at the passed epoch (its hash echoes the exact ms).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 09:45:48 +10:00
jing
941f5032e0 wave3: layer registry + generic GeoJSON factory (+ 4 new free layers)
- js/layers/geojson-layer.js: one factory expressing fetch/dedupe+revision/
  time-anchoring/cap/style/status — adding a GeoJSON feed is now data entry
- js/registry.js: quakes & fires refactored onto it (verified parity — same
  counts/colors/time-anchoring), plus 4 new REAL layers, all default-off:
  GDACS disasters (93), NWS severe weather US (13), Launch Library (30),
  NSW RFS bushfires (21)
- deleted js/layers/quakes.js + fires.js (now registry entries); removed dead
  CONFIG.quakes/fires blocks
- factory honors default-off (ds.show synced to enabled); zero console errors

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 00:26:13 +10:00
jing
0bbdb30719 feat: Military (ADS-B Exchange) layer — real unfiltered military aircraft
Wires John's paid ADS-B Exchange RapidAPI feed ($10/mo, ~10k req/month) into a
new layer showing the military traffic OpenSky/FR24 hide (C-17 "Reach" airlift,
tankers, the Area 51 "Janet" shuttle, etc.).

- serve.py: proxy/adsbx-mil injects the x-rapidapi-key/host headers SERVER-SIDE
  (key read from gitignored adsbxcredentials.json, never in the browser) and
  HARD-caches /v2/mil/ for 5 min — the quota guard: <=~288 upstream calls/day
  (~8.6k/month) no matter how many tabs poll. Stale-on-error; 503 if unconfigured.
- js/layers/military.js: BillboardCollection like the civilian layer but a
  distinct red; live-only (no history feed), 5-min poll matched to the cache.
  ADSBx altitude is FEET (→metres for Cesium). Emergency squawks (7500/7600/
  7700) highlight brighter+bigger and flip the HUD status to err. Click overlay
  shows type / tail / altitude / speed / squawk.
- config.js: adsbx block + militaryReal/militaryEmerg colours.

Verified in dev: proxy miss→hit (5-min cache, key not leaked), 412 military
aircraft render over CONUS, click RCH042 → C17 / 99-0062 / 34000ft / 424kt,
zero console errors. adsbxcredentials.json stays gitignored + server-side.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 23:07:40 +10:00
jing
403884e480 wave2: adversarial-review fixes (9 confirmed findings)
Ran a 7-reviewer × per-finding-verifier workflow over the Wave 2 code; 9 of 13
raw findings survived adversarial verification. Fixes:

- quakes.js: refresh now UPDATES revised quakes, not just dedupes — a signature
  (mag|place|depth|time) per id detects USGS revisions and rebuilds that entity,
  so a quake revised M4.4→M5.2 no longer stays visually understated (SPEC2 §2
  "update, don't duplicate").
- aircraft.js: (a) poll() drops its result if the clock scrubbed off-live mid-
  fetch, so late live data never paints over the replay view; (b) re-enabling the
  aircraft layer while scrubbed now restores the replayed frame instead of
  leaving it hidden; (c) transient (non-404) history errors schedule a bounded
  retry so a paused clock doesn't wedge on an error frame.
- satellites.js: ground track centers on the VIEWER clock (not wall-clock now)
  so it stays under a scrubbed satellite; and it hides when the Satellites layer
  is toggled off (no stray dashed line).
- main.js: malformed camera hash with blank tokens (#c=,,,,) is now rejected
  instead of applying a bogus (0,0,0) camera — falls back to the default view.
- serve.py: history t-parse catches OverflowError (t=inf/1e999 → 400, not a
  crashed handler); stale-on-error now also covers upstream 5xx, not just 429.

Verified: t=inf/-inf/1e999/nan → 400; malformed hash → default Gulf camera;
ground track 427 km from the scrubbed dot (was ~2 orbits off) and hidden on
layer-off; aircraft re-enable during replay restores 6062 billboards; zero
console errors.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 17:16:24 +10:00
jing
2e061b2cdf wave2 phase 5: polish pack (military, ground tracks, URL state, screenshots)
1. Military callsigns (aircraft.js): callsigns matching CONFIG.aircraft.
   militaryPrefixes tint red regardless of altitude band and bump larger. New
   "Military filter" HUD row (default off) shows only military aircraft when on;
   status "N military of M". Pick overlay shows Military/Civil class.
2. Satellite ground track (satellites.js): selecting a satellite draws its
   sub-satellite path (height 0, ±half orbit around now) as a dashed polyline in
   the sat's colour; deselect hides it; one track at a time. Recomputed on
   demand from the satrec (no upfront precompute of 97 tracks).
3. Shareable URL state (main.js + ui.js): camera / mode / layer toggles / clock
   offset serialize to location.hash (replaceState, 1 s cadence, only on change)
   and are restored on boot; malformed hashes ignored silently.
4. Screenshot endpoint (serve.py): dev-only POST snap?name= writes a base64 PNG
   body to docs/<name>.png (name sanitized to [a-z0-9-], can't escape docs/).
   Captured docs/screenshot-data.png + screenshot-photo.png (render() called
   synchronously before toDataURL — the preserveDrawingBuffer pitfall).

README rewritten for Wave 2: quakes/fires layer rows (marked REAL), replay,
shared cache, shareable links, ground tracks, military, screenshots, updated
architecture + roadmap.

Verified in browser: 11 military of 6062 + filter; ground track 180 pts on
select / hidden on deselect; URL round-trips camera+mode+layers+clock; both
screenshots written as valid 1280x720 PNGs; subpath audit clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 16:53:05 +10:00
jing
3ca9409f31 wave2 phase 2: wildfires layer (real NASA EONET)
New js/layers/fires.js — fetches EONET open wildfire events directly (ACAO:*),
refreshes every 15 min, rebuilt wholesale (no time dynamics — EONET events are
slow-moving). Uses the latest dated geometry per event; Point coords direct,
Polygon reduced to first-ring centroid. Flame-teardrop billboard (new
lib.flameGlyph, drawn in #ff7a1a with dark outline, shared canvas), aggressive
label translucency so dense California/Australia clusters stay legible, cap 500.
HUD row "Wildfires (NASA EONET)".

PITFALL handled: EONET mislabels Content-Type as application/rss+xml but the
body is JSON — we call res.json() and never gate on the header.

Verified in browser: 500 fires, all finite positions, glyphs render over
North America, zero console errors.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 16:05:28 +10:00
jing
dadc068271 wave2 phase 1: earthquakes layer (real USGS, time-anchored)
New js/layers/quakes.js — fetches the USGS all_day GeoJSON directly (ACAO:*,
no proxy), refreshes every 5 min regardless of scrub state. Quakes are
time-anchored via availability: in-window quakes appear as the slider crosses
their origin time, older-than-window quakes stay visible the whole window
(intervals clamped to [start, stop]). Magnitude ramps amber→red, size scales
with magnitude, quakes <1h old pulse (age-aware callback), labels only for
M>=4.5. Deduped by feature id across refreshes, capped at 400 (smallest mag
dropped first). HUD row "Earthquakes (USGS)" with count/max-mag status.

Also: serve.py now sends Cache-Control: no-store on all responses (was
proxy-only) so iterative js/css edits always take effect on reload — the
module graph was caching stale copies during dev.

Verified in browser: 223 quakes, 11 labeled, time-anchoring confirmed
(187 visible at -6h → 223 at now), zero console errors.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 16:01:59 +10:00
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