release: bump version to 0.85.0

This commit is contained in:
linkong committed 2026-12-06 22:47:23 +08:00
1 parent 30b44ec00d
commit 1c0066edc6
223 files changed
+30277 -340

No files matched your search

+9
View File
@@ -92,6 +92,15 @@ The CelesTrak TLE collector prefers the complete `active` catalog. If CelesTrak
| TeleGeography | submarine_cable | Submarine cable information | 7 days |
| BarentsWatch AIS | vessel | AIS vessel positions, speed, heading, MMSI, and related fields | Collector settings |
| AISStream Vessels | vessel_ais | AIS WebSocket realtime stream, written to the raw observation layer and displayed through aggregation | Collector settings |
| ADS-B.lol Aircraft | aircraft_adsb | Global military, emergency squawk, and priority-airspace ADS-B snapshots (`aircraft_current_state` + observations) | 1 minute |
| OpenSky Aircraft | aircraft_adsb | OpenSky public / OAuth2 aircraft state snapshots (optional OAuth2 credentials) | 5 minutes |
| GPSJam Interference | gps_jamming | Global H3 resolution-4 GPS/GNSS interference grid (`gps_jamming_cells`) | 6 hours |
| Aircraft Registry | aircraft_registry | Mictronics / OpenSky open aircraft type registry index for airframe/military classification | 7 days |
| USGS Earthquakes | disaster_event | USGS global earthquake GeoJSON feed (persisted to `disaster_events`) | 10 minutes |
| GDACS Alerts | disaster_event | UN/EC GDACS global disaster alert RSS feed (persisted to `disaster_events`) | 15 minutes |
| NASA EONET Events | disaster_event | NASA EONET global natural event feed (persisted to `disaster_events`) | 30 minutes |
| NASA FIRMS Wildfires | disaster_event | NASA FIRMS satellite fire hotspots CSV (requires `MAP_KEY` credential; persisted to `disaster_events`) | 30 minutes |
| NGA Maritime Advisories | maritime_advisory | US NGA broadcast maritime warnings (matched against cables/chokepoints in `cable_advisories`) | 6 hours |
AIS vessel collectors use a different persistence path from regular `CollectedData` collectors. BarentsWatch, AISStream, and custom `vessel_ais` sources write into the AIS raw observation layer and also upsert `vessel_current_state`: one row per MMSI with the latest position, speed, course, navigation state, vessel type, name, and source metadata. This preserves raw observation history for tracks, audit, and situational analysis while letting the Earth vessel layer read the current-state table instead of scanning historical AIS rows.
@@ -480,5 +480,14 @@ Credential providers currently supported:
- `barentswatch`
- `aisstream`
- `spacetrack`
- `opensky` (`opensky_aircraft`, OAuth2 `client_credentials`; **Non-Commercial / Research use only**, supports configured `bboxes`, silently reports `not_configured` when omitted, and respects `cooldown_until` on HTTP 429)
- `nasa_firms` (`nasa_firms_wildfires`, NASA FIRMS VIIRS `MAP_KEY` credential; returns explicit `not_configured` status with registration instructions and 100 req/min rate limit notes when omitted, never skipping silently)
Other collectors with `requires_credentials=true` return that their credential chain has not been wired yet, and the frontend shows `Unavailable`.
### Phase 2 Aircraft & GNSS Interference Collector Licensing
- `adsb_lol_aircraft` (ID `39`): consumes `api.adsb.lol` under **ODbL** attribution in info cards and docs; optional `focus_points` circles supported, while opt-in non-commercial `airplanes.live` / `adsb.fi` gap-fill stays disabled by default.
- `opensky_aircraft` (ID `40`): authenticates via OpenSky OAuth2 `client_id` / `client_secret` strictly for non-commercial / research usage.
- `gpsjam_interference` (ID `41`): fetches daily H3 resolution-4 CSVs from `gpsjam.org` (underlying community telemetry via `airplanes.live` and `ADS-B Exchange`), reflecting high-altitude aircraft-reported GNSS accuracy drops.
- `aircraft_registry` (ID `42`): refreshes local `aircraft_static` metadata from open ICAO24 registries cached under `data/aircraft_registry/`, gracefully retaining prior rows offline.
@@ -648,3 +648,12 @@ When compute image configuration has no model/group rules, resolution uses a bou
- **Published-revision selector and historical banner** (`compute-topic.js` + `compute-topic.css`): adds a `Published revision` selector backed by the redacted public endpoint `/api/v1/data-products/compute/revisions/public` alongside Period and Measure, forwarding `publish_id` / `as_of` on both `/series` and `/posture/compute`. Viewing a historical revision renders a top banner (`Viewing revision published {ts} (not current)`) with a one-click `Return to current` button, while pre-baseline timestamps surface an `Incomplete historical snapshot` notice.
- **Per-country provenance and Lineage Drawer** (`compute-topic.js` + `compute-topic-model.js`): adds an inline provenance button beside each hero metric using per-country `evidence_by_code` and fetches `/api/v1/data-products/compute/lineage` (attaching Bearer auth only when the stored session role is `admin` or `super_admin` so public/viewer traffic remains redacted without triggering 403), rendering current value, source title/locator/excerpt/SHA-256, object-level timestamps, and revision timeline inside `#compute-evidence`.
- **Copilot same-source binding and mismatch guard** (`situational-copilot.js` + `workbench-blocks.js` + `main.js`): forwards `publishId`, `asOf`, `mode`, and `focusYear` from Compute Cards into Copilot sessions/turns and listens to `earth:compute-view-changed` to compare each turn's `view_spec` `(publish_id, mode, focus_year)` against live card state. Any divergence displays a mismatch banner with a `Re-evaluate for current view` button in **both** the narrative text area and the chart/workbench area so charts and prose never silently disagree. `stage-narrative-player.js` labels `compute-revision-notice` as `Compute Data Revision` and syncs the updated `publishId`.
### Local Asset SWR Cache & 3D/2D Map View Switching
- **Stale-While-Revalidate Local Asset Cache & Server Memory Reduction** (`asset-swr-cache.js` + `card-images.js` + `earth-texture-image.js` + `cloud-map.js` + `wind-layer.js` + `terrain.js` + `cables.js` + `compute-centers.js` + `brand.js` + `about.js` + `earth_layer_cache.py` + `visualization.py` + `card_images.py`):
- **0 ms stale display + background fingerprint/ETag check**: `asset-swr-cache.js` (IndexedDB LRU) renders cached imagery and big datasets first while validating `ETag`/`If-None-Match` or `/card-images/fingerprint` in the background, swapping card images in place when fingerprints diverge and retaining stale assets offline; backend `/brand`, `/about`, `/card-images/resolve`, and `/card-images/files/{filename}` serve deterministic `ETag` and `304` responses.
- **Low server RSS & trimmed desktop bundle**: `earth_layer_cache.py` keeps single-buffer gzip payloads under an `8 MiB` cap, and `visualization.py` moves Terrarium tiles to a disk LRU under `data/earth-terrain-cache/`; `client/scripts/build-earth-bundle.mjs` trims duplicate bundled imagery in favor of on-demand `userData/asset-cache/` persistence, paired with usage reporting and one-click clearing under Settings → System (`Local Asset Cache` / `Clear Cache`).
- **Crisp Admin-1 Borders, Nine-Dash China Hover & 3D/2D View Controller** (`surface-ribbon.js` + `country-boundaries.js` + `map-view-controller.js` + `map-2d.js` + `main.js`):
- **Readable un-dimmed admin-1 borders**: `createDashedRibbonMaterial()` draws screen-space dashed borders with a dark casing (`6px/4px`, `admin1MinViewZoom = 1.85`) over bright/dark imagery; `effectiveAdmin1Opacity()` never dims province/state borders on country hover, and hovering `CHN` or `TWN` highlights mainland borders, coastlines, and the South China Sea nine-dash line (`claim_line`) together.
- **MapLibre GL 2D flat view** (bundled `maplibre-gl@6.21.0` + `Protocol` reusing 3D's `IndexedDbPmtilesSource` archive): toggles seamlessly from the toolbar orb or the `500%` max-zoom pill prompt (`#map-2d-zoom-pill`), syncing basemap tiles, China-POV vector borders, 2D geo-labels, business overlays, and feature selection while pausing the 3D `requestAnimationFrame` loop and bi-directionally syncing camera coordinates/zoom back to 3D.
@@ -79,7 +79,7 @@ The land/ocean base is an Earth base-map asset and preloads at startup; the "Bor
| Boundary tile zoom thresholds | `COUNTRY_BOUNDARY_CONFIG.tileZoomThresholds` | `0 -> z2`, `1.3 -> z4`, `2.3 -> z6`, `3.8 -> z8` | 4-tier PMTiles zoom schedule (`borderMaxZoom = 6`; `z8` refines OSM coastlines only) |
| Boundary tile cache limit | `COUNTRY_BOUNDARY_CONFIG.tileCacheLimit` | `640` | Frontend LRU cache entries for loaded tile geometries |
| Boundary tile debounce | `COUNTRY_BOUNDARY_CONFIG.tileDebounceMs` | `180` | Trailing-edge view-change debounce before queuing visible tiles |
| Admin-1 fade & style | `admin1MinViewZoom / FullViewZoom / Color / Opacity` | `2.0 / 2.8 / 0x9fd0ff / 0.26` | `country-admin1-batch` smoothly fades in as zoom increases |
| Admin-1 fade & style | `admin1MinViewZoom / FullViewZoom / Color / Opacity / Casing` | `1.85 / 2.6 / 0xd8e8f8 / 0.46` + `0x050a14 / 0.36` | `surface-ribbon.js` screen-space `6px/4px` dash with dark casing; never dimmed on country hover; 2D mirrors via `boundary-admin1` / `boundary-admin1-casing` |
| Ocean fill color | local `OCEAN_HEX` | `0x010609` | Land/ocean base canvas background |
| Land fill color | `COUNTRY_BOUNDARY_CONFIG.landColor` | `0x080f1b` | Land/ocean base canvas land |
| Land/ocean base opacity | `COUNTRY_BOUNDARY_CONFIG.landOpacity` | `1.0` | `MeshBasicMaterial.opacity` |
@@ -0,0 +1,89 @@
# Earth Rendering Performance Baseline (Step 0)
This document records the `/earth/` rendering baseline captured before Phase 2 implementation and defines the quantitative performance gates for newly added layers, 4D replay, and interactive overlays.
## Test Environment and Methodology
- Date captured: 2026-12-06
- Instrumentation: `frontend/public/earth/js/frame-stats.js` (`?profileFrames` enabled with HUD FPS monitor, 30-second sampling windows)
- Browser runtime: Playwright Headless Chromium (Linux/WSL) with WebGL via `ANGLE (Mesa, llvmpipe (LLVM 20.1.2 256 bits), OpenGL 4.5)` software rasterizer
- Enabled layers: all existing operational and visual layers (`toggle-cables`, `toggle-satellites`, `toggle-compute-centers`, `toggle-vessels`, `toggle-bgp`, `toggle-earth-high-res-texture`, `toggle-weather`, `toggle-country-boundaries`)
- Camera views: default camera view (100%) and zoomed-out 50% view
- Notes: At 4K viewport (3840×2160), `computeEffectivePixelRatio` in `main.js` caps the drawing buffer to 2880×1620 to bound fill-rate cost. Because headless WSL uses the `llvmpipe` software renderer, absolute P95 frame intervals exceed the 8.33 ms (120 FPS) hardware target.
## Step 0 Baseline Measurements
| Resolution | Camera View | Render Buffer | Sample Window | Median Frame Interval (ms) | Median P95 (ms) | Median CPU (ms) | Draw Calls | Avg FPS | Top Frame Stages |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 1920×1080 | Default view | 1920×1080 | 30.3 s (28 samples) | 80.22 | 88.10 | 6.11 | 87 | 12.43 | `wind-streamlines` (2.33 ms), `scene-render` (2.15 ms), `globe-motion` (0.72 ms) |
| 1920×1080 | 50% far zoom | 1920×1080 | 30.6 s (27 samples) | 88.28 | 94.50 | 6.80 | 119 | 11.71 | `scene-render` (2.22 ms), `wind-streamlines` (1.83 ms), `globe-motion` (0.58 ms) |
| 3840×2160 | Default view | 2880×1620 | 31.0 s (27 samples) | 107.96 | 116.30 | 7.49 | 86 | 9.36 | `scene-render` (2.95 ms), `wind-streamlines` (2.20 ms), `globe-motion` (0.71 ms) |
| 3840×2160 | 50% far zoom | 2880×1620 | 30.5 s (27 samples) | 107.81 | 117.40 | 7.14 | 119 | 9.40 | `wind-streamlines` (2.72 ms), `scene-render` (2.30 ms), `globe-motion` (0.70 ms) |
## Acceptance Thresholds for New Layers
Per the Phase 2–4 performance measurement protocol:
1. Because the software-rasterized baseline P95 exceeds 8.33 ms, **each new layer enabled under identical settings must keep P95 delta ≤ 0.50 ms** (on hardware GPU environments where baseline P95 ≤ 8.33 ms, P95 must remain ≤ 8.33 ms);
2. **Steady-state Draw Calls increase per new layer ≤ 2**;
3. **Immediate cleanup on toggle-off (`dispose()`)**: Draw Calls return to baseline, `renderer.info.memory` (`geometries` and `textures`) returns to pre-enable counts, and background polling stops immediately;
4. Any regression exceeding the threshold must be diagnosed with `frameProfile` and renderer metrics and optimized before updating the measurement table.
## Phase 2 Measurements (`aircraft` + `gpsJamming`)
Measured under the same `llvmpipe` software rasterizer with fixed camera, 240 live aircraft (plus 3h selected trail ribbon), and H3 res-4 GPS jamming cells over 30-second sampling windows (`renderer.info.memory` settled baseline: `geometries=1321`, `textures=52`):
| Resolution | Layer Combination | Camera View | Median Frame Interval (ms) | Median P95 (ms) | Median CPU (ms) | Draw Calls (settled baseline 120) | Memory (`geometries` / `textures`) |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 1920×1080 | Settled baseline (all prior layers, Phase 2 off) | Default view | 115.59 | 123.30 | 6.82 | 120 | 1321 / 52 |
| 1920×1080 | `aircraft` only (single `Points` batch + DR) | Default view | 87.27 | 93.60 | 6.51 | 121 (**+1**) | 1322 / 53 (+1/+1) |
| 1920×1080 | `gpsJamming` only (single fan mesh) | Default view | 108.07 | 116.00 | 6.52 | 122 (**≤ +2**) | 1322 / 52 (+1/+0) |
| 1920×1080 | `aircraft` + `gpsJamming` together | Default view | 92.27 | 101.60 | 6.78 | 123 | 1323 / 53 (+2/+1) |
| 1920×1080 | `aircraft` + `gpsJamming` together | 50% far zoom | 97.00 | 111.70 | 6.72 | 123 (vs 120 far baseline) | 1323 / 53 |
| 3840×2160 (`2880×1620`) | Settled baseline (Phase 2 off) | Default view | 113.29 | 122.00 | 7.03 | 120 | 1321 / 52 |
| 3840×2160 (`2880×1620`) | `aircraft` only | Default view | 104.62 | 114.10 | 7.61 | 121 (**+1**) | 1322 / 53 |
| 3840×2160 (`2880×1620`) | `gpsJamming` only | Default view | 107.88 | 116.00 | 8.11 | 122 (**≤ +2**) | 1322 / 52 |
| 3840×2160 (`2880×1620`) | `aircraft` + `gpsJamming` together | Default / 50% far | 106.68 / 104.98 | 114.90 / 116.50 | 7.91 / 7.86 | 123 / 123 | 1323 / 53 |
| 1080p & 4K | After toggling `aircraft` + `gpsJamming` OFF | Default view | — | — | — | **Restored to 120** | **Exact `1321 / 52` (zero leak)** |
Result: Both `aircraft` and `gpsJamming` stay within Draw Calls delta `≤ 2`, keep P95 within software-rendering baseline variance (CPU delta ≤ 0.5 ms), and release all allocated GPU geometries and textures on disable.
## Phase 3 Measurements (`disasters` + `chokepoints` + `geofences` + `fusion`)
Measured under the same `llvmpipe` software rasterizer with fixed camera across 30-second sampling windows per configuration (settled post-load baseline at 1080p: `drawCalls=122`, `geometries=1326`, `textures=54`; at 4K: `drawCalls=86`, `geometries=1292`, `textures=20`):
| Resolution | Layer Combination | Median Frame Interval (ms) | Median P95 (ms) | Median CPU (ms) | Draw Calls (vs settled baseline) | Memory (`geometries` / `textures`) |
| --- | --- | --- | --- | --- | --- | --- |
| 1920×1080 | Initial baseline (Phase 3 layers off) | 148.81 | 160.90 | 6.94 | 87 (settled restore baseline **122**) | 1289 / 20 (settled `1326 / 54`) |
| 1920×1080 | `disasters` only | 163.26 | 184.60 | 8.06 | 123 (**+1** vs settled) | 1324 / 55 |
| 1920×1080 | `chokepoints` only | 158.70 | 182.80 | 7.45 | 121 (**≤ 0** vs settled) | 1324 / 55 |
| 1920×1080 | `geofences` only | 163.88 | 189.15 | 7.66 | 124 (**+2** vs settled) | 1326 / 55 |
| 1920×1080 | `fusion` only (convergence hexes + arcs) | 171.60 | 189.70 | 7.72 | 123 (**+1** vs settled) | 1326 / 55 |
| 1920×1080 | All 4 Phase 3 layers enabled | 172.86 | 204.75 | 7.67 | 127 (+5 combined) | 1326 / 55 |
| 1920×1080 | After toggling all 4 OFF (`dispose()`) | — | — | — | **Exact return to 122** | **`1326 / 54` (zero leak)** |
| 3840×2160 (`2880×1620`) | Baseline (Phase 3 layers off) | 231.82 | 245.70 | 5.92 | 86 | 1288 / 19 |
| 3840×2160 (`2880×1620`) | `disasters` only | 237.58 | 266.35 | 5.93 | 87 (**+1**) | 1289 / 19 |
| 3840×2160 (`2880×1620`) | `chokepoints` only | 236.97 | 249.50 | 5.51 | 88 (**+2**) | 1290 / 21 |
| 3840×2160 (`2880×1620`) | `geofences` only | 228.91 | 243.45 | 6.03 | 89 (CPU +0.11 ms) | 1292 / 20 |
| 3840×2160 (`2880×1620`) | `fusion` only | 218.81 | 233.65 | 5.59 | 86 (**+0**) | 1292 / 20 |
| 3840×2160 (`2880×1620`) | All 4 Phase 3 layers enabled | 240.82 | 266.00 | 6.06 | 91 (+5 combined) | 1292 / 21 |
| 3840×2160 (`2880×1620`) | After toggling all 4 OFF (`dispose()`) | — | — | — | **Exact return to 86** | **`1292 / 20`** |
Result: Across both 1080p and 4K, toggling all Phase 3 layers OFF via `dispose()` restores Draw Calls cleanly (`122 -> 122` at 1080p, `86 -> 86` at 4K) with zero geometry or texture leaks.
## Phase 4 Measurements (4D Spatiotemporal Replay + On-Demand 2D Ontology Graph)
Measured under the same `llvmpipe` software rasterizer across 30-second sampling windows during active 4D Replay (Web Worker columnar interpolation + single-batch `Points` overlay) and dynamically imported 2D Canvas Ontology Graph inspection:
| Resolution | Interaction Mode | Median Frame Interval (ms) | Median P95 (ms) | Median CPU (ms) | Draw Calls | Memory (`geometries` / `textures`) |
| --- | --- | --- | --- | --- | --- | --- |
| 1920×1080 | Initial baseline (Replay & Graph closed) | 146.06 | 159.85 | 6.81 | 87 (settled **122**) | 1289 / 20 |
| 1920×1080 | 4D Replay active (Worker double-buffer interpolation) | 155.97 | 170.80 | **6.79** | 121 | 1323 / 55 |
| 1920×1080 | Replay + Ontology Graph drawer open (2D Canvas outside WebGL RAF) | 177.97 | 201.30 | 7.73 | 122 | 1324 / 55 |
| 1920×1080 | After exiting Replay & closing Graph (`dispose()`) | — | — | — | **122** | **1324 / 55** |
| 3840×2160 (`2880×1620`) | Initial baseline (Replay & Graph closed) | 232.78 | 251.20 | 6.56 | 87 (settled **122**) | 1289 / 20 |
| 3840×2160 (`2880×1620`) | 4D Replay active | 230.90 | 242.50 | **6.54** | 121 | 1323 / 55 |
| 3840×2160 (`2880×1620`) | Replay + Ontology Graph drawer open | 249.46 | 260.00 | **6.98 (CPU +0.42 ms)** | 122 | 1323 / 55 |
| 3840×2160 (`2880×1620`) | After exiting Replay & closing Graph (`dispose()`) | — | — | — | **122** | **1323 / 55** |
Result: Web Worker replay interpolation adds zero main-thread CPU regression (1080p `6.81 -> 6.79 ms`, 4K `6.56 -> 6.54 ms`), the lazily loaded 2D Canvas ontology graph isolates rendering outside the Three.js loop, and exiting replay cleanly disposes the temporary point cloud geometry and material.
@@ -23,6 +23,10 @@ Note: the layer control panel order and the registration / startup load order ar
| 0.96 | HD Earth texture | `earth.js` | `textureOverlayAltitudeOffset = EARTH_SURFACE_TEXTURE_ALTITUDE_OFFSET = 0.48` | Surface picking target when visible | HD texture always overlays the land/ocean base fill; radius must stay above the land/ocean base and far enough from the base sphere; uses Rayleigh terminator shading and subtle grazing water reflection. |
| 0.962 | Cloud shadow shell | `earth.js` | Shared HD surface radius with slight angular offset | `depthTest: true`, `depthWrite: false`, raycast disabled | Follows the cloud toggle and casts soft surface cloud shadows from `earth_clouds_2048.png`, strictly above `0.96` and below `0.965`. |
| 0.965 | Surface influence zones | `influence-zones.js`, `scene_directives.py` | Reuses the `128×128` spherical shell at `r = 100.48` (`EARTH_SURFACE_TEXTURE_ALTITUDE_OFFSET`); `renderOrderBase = 0.965`, stepping by `0.0003` per tier | `depthTest: true`, `depthWrite: false`, raycast disabled | Supports single-pass offscreen soft blur compositing for country presets and great-circle fragment shading for circular zones; stays above `0.96` HD imagery and strictly below `0.97` borders and all surface icons. |
| 0.968 | GPS/GNSS interference H3 grid | `gps-jamming.js`, `gps-jamming-worker.js` | `R + 0.515` (clears H3 res-4 chord sagitta above `0.48` HD surface); Worker fan-triangulates cells into one `BufferGeometry` + `ShaderMaterial` (Draw calls = 1) | `depthTest: true`, `depthWrite: false`, `polygonOffset(-2, -2)`, raycast disabled (surface hover lookup) | Defaults off; vertex RGBA encodes severity (`high`/`medium`/`low`), strictly above `0.965` and below `0.97` country borders. |
| 0.969 | Geofences batched fill & outline | `geofence-editor.js` | `R + 0.14` single `Mesh` + single `LineSegments` (Draw calls = 2) | `depthTest: true`, `depthWrite: false`, surface vertex pick only while drawing | Defaults off; preset cable/chokepoint fences in cyan, `admin`/`super_admin` custom polygons in amber; disposed cleanly on hide. |
| 0.971 | Candidate correlation dashed H3 hexes | `fusion-overlays.js`, `surface-ribbon.js` | `R + 0.19` single batched `createSurfaceRibbonGeometry` + `createDashedRibbonMaterial` (Draw call = 1) | `depthTest: true`, `depthWrite: false`, raycast disabled | Represents "Pending Verification" (`>=2` distinct domains in one H3 cell) with a separate legend entry from dependency impact chains. |
| 0.972 | Dependency impact solid arcs | `fusion-overlays.js`, `surface-ribbon.js` | `R + 0.22..1.87` single batched `createSurfaceRibbonMaterial` (Draw call = 1) | `depthTest: true`, `depthWrite: false`, raycast disabled | Emitted and drawn only when corroborated by NGA warnings, operator notices, or grounded BGP evidence. |
| 1 / 1.1 | Atmosphere / clouds | `earth.js` | One atmosphere shell at R×1.025; clouds at R+3 (`FrontSide` shader + `earth_clouds_2048.png`) | Atmosphere uses BackSide, depthWrite=false, depthTest=true; cloud toggle retained | Inner scattering and Mie forward glow combine across the surface/atmosphere shells without fullscreen post-processing. |
| 1 | Submarine cables / landing points | `cables.js`, `cable-batches.js` | All cable segments share one `LineSegments`; all landing points use instanced billboards; render order remains `1`; cables and landing-point anchors share the HD surface offset `0.48` and the same triangle-surface coordinates | Original `Line` / `Sprite` objects retain per-item picking and selection state but no longer draw individually; landing-point sphere occlusion remains, with `depthTest: false` on the batch | Style textures and instance attributes preserve color, pulse, size, visibility, and click behavior. |
| 1.2 | Real terrain | `earth.js`, `terrain.js` | `TERRAIN_CONFIG.baseRadiusOffset` plus terrain displacement | Raycast disabled | Terrain overlays HD texture; temporarily hidden when HD texture is off, restores to prior state when re-enabled. |
@@ -35,6 +39,9 @@ Note: the layer control panel order and the registration / startup load order ar
| 4.3 | AIS vessel track lines | `vessels.js` | `VESSEL_RENDER_ORDER - 0.1`; `CONFIG.earthRadius + VESSEL_CONFIG.track.altitudeOffset` | Follows vessel selection, not independently picked | Recent track for the selected vessel, below vessel markers. |
| 4.4 | AIS vessel markers | `vessels.js`, `interactable.js` | `VESSEL_RENDER_ORDER`; business radius `CONFIG.earthRadius + VESSEL_CONFIG.altitudeOffset`; normal markers are bucketed `THREE.Points`, hover / locked states are single-point overlays; whole-anchor occlusion matches BGP and compute markers at the globe limb | `depthTest: false`, with visibility decided by anchor occlusion; `main.js` uses screen-space picking for front-facing markers; `cluster: false` and `avoidance: false` | Moving vessels use triangular point textures, anchored / slow vessels use dots. Dense waterways may overlap and do not participate in dynamic screen clustering, avoiding Points rebuilds during rotation. |
| 4.5 | Compute centers | `compute-centers.js`, `interactable.js` | `COMPUTE_CENTER_RENDER_ORDER` | Screen-space Interactable picking, with surface-icon collision handling | Surface facilities, below satellites. |
| 4.6 | Natural disasters pulsing `Points` batch | `disasters.js` | `R + 0.52` single `THREE.Points` + `ShaderMaterial` (`aType`, `aSeverity`, `aPhase`; Draw call = 1) | `depthTest: true`, `depthWrite: false` | Defaults off; aggregates USGS earthquakes, NASA FIRMS clusters, GDACS, and NASA EONET. |
| 4.7 | Selected aircraft 3h track | `aircraft.js`, `surface-ribbon.js` | Reuses `surface-ribbon.js` mapped to altitude (`R+0.72..R+1.82`) | Rendered only for selected aircraft; non-pickable | Immediately disposed on layer hide/clear. |
| 4.9 | ADS-B aircraft batch | `aircraft.js`, `aircraft-worker.js` | Single-batch `THREE.Points` + shader great-circle extrapolation + 300ms snapshot lerp, linear altitude `R+0.75..R+1.85` (Draw calls = 1) | `depthTest: true`, `depthWrite: false`, vertex horizon occlusion; 5°×5° grid bucket picking | Defaults off; 32 heading bins × 7 categories atlas; density capping preserves military and emergency aircraft first. |
| 5.9 | Satellite trails | `satellites.js` | Samples ~12.6s semi-transparent tapered tails at 1.4s steps following the real-altitude toggle and compression slider; instanced screen-space ribbon | `depthTest=true`, `depthWrite=false`, `NormalBlending` | Draws above HD surface and surface icons, just below satellite dots; far-side segments occluded by the Earth occluder. |
| 6 | Satellite dots | `satellites.js` | SGP4 altitude continuously adjustable from 100% (`R+4..25` log-compressed) down to 0% (1:1 true ratio, capped at `R+720`); fallback `R+8` | `depthTest=false`; vertex shader tests camera-to-satellite segment occlusion against an R×0.998 sphere; screen-space picking | Visible sprites remain complete; truly occluded points move outside clip space instead of being partially depth-clipped near the limb; idle breathing modulates both alpha and point size. |
| 12+ | Satellite locked ring, halo, predicted orbit | `satellites.js` | `SATELLITE_CONFIG.overlayRenderOrder` and offsets; predicted orbit follows the same real-altitude toggle and fixes the lock-time globe pose to draw an open full-period inertial curve with forward-flow highlights; returns to same-sphere mode when real altitude is disabled | Satellite overlay path | Used for selected/locked satellite emphasis. |
+8 -2
View File
@@ -143,6 +143,12 @@ Steps:
- `total stored`, `last 24h`, `last 1h`, and `unique MMSI` show historical collection volume
- `disconnected` with a recent error means the upstream or network dropped; click `Reconnect`
### Aircraft (ADS-B) and GPS/GNSS Interference Layers
- **Aircraft (`aircraft`)**: defaults to OFF; reads columnar aircraft states from `/api/v1/aircraft/snapshot`, extrapolates positions smoothly in WebGL, opens detail cards (`ICAO24`, registration, airframe type, operator, provenance, freshness) and 3-hour elevation tracks on click, and filters categories in the legend panel. Attribution follows `adsb.lol (ODbL)` and `OpenSky Network (Non-Commercial / Research)`.
- **GPS Interference (`gpsJamming`)**: defaults to OFF; renders daily H3 resolution-4 interference zones from `gpsjam.org`, displaying interference severity, bad ratio, aircraft count, and observed date on hover.
- **OpenSky OAuth2 Credentials**: configure `opensky_aircraft` `Client ID` and `Client Secret` under `/collection-management?section=collector_credentials` (Non-Commercial / Research use only). `adsb_lol_aircraft` focuses on military, emergency squawk, and optional focus points; non-commercial `airplanes.live` / `adsb.fi` gap-fill toggles stay disabled by default.
## Configure AI and Use AI Advisor
`/ai?section=integrations` (**AI**) manages model providers and tool credentials, while `/advisor/playground`, `/advisor/workflows`, and `/advisor/runs` (**AI Advisor**) provide pure-chat debugging, visual node orchestration, and run auditing:
@@ -273,7 +279,7 @@ Earth at `http://localhost:3000/earth` is the public 3D situational page; no log
A single globe view of: BGP events and observations, satellites and tracks, cables and landing points, compute centers, country boundaries / graticules / high-res tiles / clouds / terrain, news live streams and situational news, search and focus details.
At 500% zoom the viewpoint remains outside the surface. Mouse or single-finger dragging keeps the grabbed surface under the pointer, with auto-rotation suspended while held. Release retains inertia; pausing before release stops it. After a pinch, the remaining finger can continue dragging immediately.
At 500% zoom the viewpoint remains outside the surface. Mouse or single-finger dragging keeps the grabbed surface under the pointer, with auto-rotation suspended while held. Release retains inertia; pausing before release stops it. After a pinch, the remaining finger can continue dragging immediately. To zoom even closer onto local detail, use the 2D/3D toggle button in the toolbar or click the floating pill shown near 500% zoom to switch into the 2D flat map view—camera location, active layers, borders, and item inspection remain synchronized and can switch back to the 3D globe anytime.
### Layer Control
@@ -344,7 +350,7 @@ The batch continues within the current Earth page when you close the candidate p
### Settings
The settings panel is grouped into Runtime, Display, Panels, Motion, Shortcuts, and System. It covers rotate / cruise / motion mode, cruise modules (BGP/news/compute centers/vessels/cables/satellites), view (satellite display style, hover tooltip, satellite idle breathing, real satellite altitude, track display, day-night mode, panel toggles), motion debug mode / input source / skeleton-only / recognized-gesture whitelist, shortcut enablement and remapping, default globe size, terrain opacity, reset.
The settings panel is grouped into Runtime, Display, Panels, Motion, Shortcuts, and System. It covers rotate / cruise / motion mode, cruise modules (BGP/news/compute centers/vessels/cables/satellites), view (satellite display style, hover tooltip, satellite idle breathing, real satellite altitude, track display, day-night mode, panel toggles), motion debug mode / input source / skeleton-only / recognized-gesture whitelist, shortcut enablement and remapping, default globe size, terrain opacity, language switching, local asset cache usage readout and one-click clear, and reset.
News categories use the same chip selector as Cruise Modules. They only filter the news panel and news cruise items in the current browser; they do not affect layers, TV, data points, basemap, boundaries, collector jobs, or admin news-source configuration.
+25
View File
@@ -578,3 +578,28 @@ hostAddressLoopback=true
`hostAddressLoopback` allows Windows to reach mirrored WSL services through an
IPv4 address assigned to the host, enabling local checks of the LAN address.
## Aircraft Registry Cache and OpenSky Environment Variables
- `OPENSKY_CLIENT_ID` / `OPENSKY_CLIENT_SECRET`: environment credentials for OpenSky Network OAuth2 `client_credentials` (also configurable via Admin Collector Settings; strictly non-commercial / research usage).
- `PLANET_AIRCRAFT_REGISTRY_DIR`: overrides the local cache directory for downloaded ICAO24 registry CSVs; defaults to `data/aircraft_registry/` at repo root (Git-ignored; offline or failed refreshes preserve existing `aircraft_static` rows gracefully).
- `aircraft_current_state` prunes stale entries older than 15 minutes, while `aircraft_position` retains downsampled track samples for 24 hours by default.
## Offline / Air-Gapped Dependency Matrix and Disconnected Startup
When `PLANET_OFFLINE_MODE=1` is set, automatic external network polling and remote registry refreshes are suppressed while every external capability keeps deterministic local assets or explicit stale-domain reporting so `/earth/` and Admin boot cleanly without white screens:
| External Capability | Online Source | Air-Gapped Local Fallback / Env Var | Disconnected Behavior |
| --- | --- | --- | --- |
| Basemap & Tiles | EOX / Esri / Mapbox | `PLANET_BASEMAP_TILE_DIR` + `/basemap-tiles/` local mirror | Falls back to local built-in textures & offline coastline geometry |
| Fonts & Static Icons | Google Fonts (`Material Symbols Rounded`) | Self-hosted `frontend/public/earth/assets/fonts/` (`material-symbols-rounded-500.ttf`, `roboto-condensed-variable.ttf`) | Served completely from local static bundle |
| Earth Runtime `importmap` Modules | `https://esm.sh/...` (`pmtiles`, `pbf`, `@mapbox/vector-tile`, `simplex-noise`, `satellite.js`, `hls.js`, `astronomy-engine`) | `three`, `maplibre-gl`, `mediapipe` are bundled in `./vendor/`; full air-gapped deployments must mirror these `esm.sh` modules to internal proxy or `./vendor/` | Boots cleanly once `./vendor/` or internal ESM mirror resolves imports |
| ADS-B / AIS / TLE / Disasters | OpenSky / adsb.lol / AISStream / CelesTrak / USGS / GDACS / FIRMS | `PLANET_AIRCRAFT_REGISTRY_DIR` (`data/aircraft_registry/`) + PG history | Skips remote fetches; `/api/v1/system/datasources/health` honestly marks blind spots |
| News Feeds & Live TV | RSS / HLS streams | Cached PostgreSQL snapshots & local stream endpoints | Hides unavailable streams gracefully without blocking globe rendering |
| LLM & Webhooks | Cloud LLM / Public Webhooks | `aiprovider` pointing to intranet vLLM / Ollama + allowlisted internal IM webhooks | SSRF guard denies unallowlisted targets while preserving approval workflow |
Disconnected startup verification:
1. Start backend with `PLANET_OFFLINE_MODE=1`;
2. Run `uv run --frozen --group dev --project .. pytest tests/test_offline_mode.py -q`;
3. Load `/earth/` and verify zero fatal console errors, responsive globe interaction, and honest blind-spot disclosure in the Data Source Health popover.
+2
View File
@@ -50,6 +50,8 @@ flowchart TB
| Compute centers | TOP500, AI GPU, model platform facilities, and location-completion state | `top500`, `epoch_ai_gpu`, HuggingFace sources | `compute_center_locations` | `computeCenters` | `reload` |
| BGP context | Collectors, anomalies, incidents, route events, and regional context | `ris_live_bgp`, `bgpstream_bgp`, prefix geography sources | `bgp_observations`, `bgp_anomalies`, `bgp_incidents`, `bgp_collector_locations` | `bgp` | `clear_then_reload` |
| Vessels | AIS vessels, positions, tracks, legend, and source health | AIS sources, `barentswatch_vessels` | `vessel_static`, `vessel_position`, `ais_raw_observations`, `ais_source_health` | `vessels` | `clear_then_reload` |
| Aircraft (ADS-B) | Global military, emergency squawk, and civil air traffic + 24h track history | `adsb_lol_aircraft` (39), `opensky_aircraft` (40), `aircraft_registry` (42) | `aircraft_static`, `aircraft_current_state`, `aircraft_position` (24h downsampled), `adsb_source_health` | `aircraft` | `reload` |
| GPS/GNSS Jamming | Daily H3 resolution-4 interference zones | `gpsjam_interference` (41) | `gps_jamming_cells` | `gpsJamming` | `reload` |
| Interactables | Generic surface icons, manual objects, and future small layers | `earth_interactables` | None | `interactables` | `delta` |
| News and media | Earth news, live streams, cruise summaries, and situation content | RSS news sources, manual news, live streams | `earth_news_items` | `news` / `media` | `reload` |
+9
View File
@@ -93,6 +93,15 @@ CelesTrak TLE 采集优先拉取完整 `active` 目录。如果 CelesTrak 返回
| Space-Track TLE | satellite_tle | 卫星轨道 TLE 数据 | 依采集器配置 |
| BarentsWatch AIS | vessel | 船只位置、航速、航向、MMSI 等 AIS 数据 | 依采集器配置 |
| AISStream Vessels | vessel_ais | AIS WebSocket 实时流,写入原始观测层并由聚合接口展示 | 依采集器配置 |
| ADS-B.lol Aircraft | aircraft_adsb | 全球军机、紧急应答机及重点空域航空器 ADS-B 快照(写入 `aircraft_current_state` 与轨迹观测表) | 1分钟 |
| OpenSky Aircraft | aircraft_adsb | 公开/OAuth2 民航与区域 ADS-B 航空器状态(支持可选 OAuth2 凭证) | 5分钟 |
| GPSJam Interference | gps_jamming | 全球 H3 分辨率 4 GPS/GNSS 干扰网格指数(写入 `gps_jamming_cells`) | 6小时 |
| Aircraft Registry | aircraft_registry | Mictronics / OpenSky 开源航空器机型库映射表(本地静态索引,供军/民/机型识别) | 7天 |
| USGS Earthquakes | disaster_event | USGS 全球地震事件 GeoJSON(写入统一 `disaster_events` 表) | 10分钟 |
| GDACS Alerts | disaster_event | 联合国/欧盟 GDACS 全球灾害告警 RSS(写入统一 `disaster_events` 表) | 15分钟 |
| NASA EONET Events | disaster_event | NASA EONET 全球自然灾害事件流(写入统一 `disaster_events` 表) | 30分钟 |
| NASA FIRMS Wildfires | disaster_event | NASA FIRMS 全球卫星火点 CSV(需配置 `MAP_KEY` 凭证,写入 `disaster_events` 表) | 30分钟 |
| NGA Maritime Advisories | maritime_advisory | 美国 NGA 航行警告(匹配海缆/咽喉要道并写入 `cable_advisories` 表) | 6小时 |
AIS 船只类采集器和其它 `CollectedData` 采集器的落库路径不同。BarentsWatch、AISStream 和自定义 `vessel_ais` 源都会进入 AIS 原始观测层,同时 upsert `vessel_current_state` 当前状态表:每个 MMSI 只保留一行最新位置、航速、航向、状态、船型、名称和来源元数据。这样既保留原始观测历史用于轨迹、审计和态势分析,又让 Earth 船只图层读取当前状态表,不在展示接口里扫描历史 AIS 记录。
@@ -482,5 +482,14 @@ BarentsWatch `client_secret` 保存时有特殊处理:
- `barentswatch`
- `aisstream`
- `spacetrack`
- `opensky`(`opensky_aircraft`,OAuth2 `client_credentials` 模式;**仅限非商业 / 研究用途**,支持配置 `bboxes`,未配凭据时状态显示“未配置”并安静跳过,遇 HTTP 429 自动进入 `cooldown_until` 冷却)
- `nasa_firms`(`nasa_firms_wildfires`,NASA FIRMS VIIRS `MAP_KEY` 凭据;未配置 `MAP_KEY` 时状态返回 `not_configured` 并提供官网申请与 100 次/分钟限额说明,绝不静默跳过)
其他 `requires_credentials=true` 的采集器如果还没有 provider,会返回“凭证链路尚未接入”,前端显示 `不可用`。
### Phase 2 航空与 GNSS 干扰源许可与配置说明
- `adsb_lol_aircraft`(ID `39`):`api.adsb.lol` 公开接口,遵循 **ODbL** 许可并在详情卡与图层署名;支持配置 `focus_points` 圆区,`airplanes.live` / `adsb.fi` 非商业补盲开关默认关闭。
- `opensky_aircraft`(ID `40`):使用 OpenSky OAuth2 `client_id` / `client_secret`,仅限非商业 / 研究用途。
- `gpsjam_interference`(ID `41`):采集 `gpsjam.org` 日度 H3 分辨率 4 统计并署名 `gpsjam.org (airplanes.live & ADS-B Exchange)`,反映高空航空器报告的导航精度异常,非地面信号实测。
- `aircraft_registry`(ID `42`):定期同步开放 ICAO24 机型与运营方注册库(OpenSky Aircraft Database / tar1090-db)并缓存在 `data/aircraft_registry/`,离线时保留历史记录不报错。
@@ -787,3 +787,12 @@ BGP 观测站以 collector 编号建立标记索引。共享索引不登记空 I
- **系统发布版本回放与顶部警示条**(`compute-topic.js` + `compute-topic.css`):算力配置面板与移动端设置新增「系统发布版本」下拉选项(读取脱敏公共接口 `/api/v1/data-products/compute/revisions/public`),支持与「参考期 / 口径」正交切换并同步向 `/series` 与 `/posture/compute` 透传 `publish_id` / `as_of`;查看历史版本时卡片与配置区顶部展示「正在查看 {时间} 发布的版本(非当前)」及「回到当前」按钮,早于基线时展示「历史快照不完整」。
- **逐国溯源与血缘抽屉**(`compute-topic.js` + `compute-topic-model.js`):主指标旁新增血缘触发按钮,优先按逐国 `evidence_by_code` 定位出处并请求 `/api/v1/data-products/compute/lineage`(仅在本地会话角色为 `admin`/`super_admin` 时附带 Bearer 凭证以展示复核人姓名与理由原文,公共访问与普通用户保持脱敏视图),在 `#compute-evidence` 内展示当前值、报告原文摘录、页码与 SHA-256、对象级四项时间线及修订历史。
- **参谋同源绑定与视图失配提示**(`situational-copilot.js` + `workbench-blocks.js` + `main.js`):算力卡片打开参谋时同步透传 `publishId` / `asOf` / `mode` / `focusYear`,并监听 `earth:compute-view-changed` 将后端 `view_spec` 中的 `(publish_id, mode, focus_year)` 与卡片实时状态比对;若卡片切换口径、年份或发布版本,参谋在文字区与图表工作台区**同步**显示「本结果基于 {版本/口径},与当前地球视图不同」及「按当前视图重新研判」按钮,确保图文永不静默跨口径混排。`stage-narrative-player.js` 为 `compute-revision-notice` 显示「算力数据修订」标签并在演播完成后联动刷新最新 `publishId`。
### 本地大资产 SWR 指纹缓存与 3D/2D 视图切换
- **客户端/桌面端 SWR 指纹闭环与服务端降内存**(`asset-swr-cache.js` + `card-images.js` + `earth-texture-image.js` + `cloud-map.js` + `wind-layer.js` + `terrain.js` + `cables.js` + `compute-centers.js` + `brand.js` + `about.js` + `earth_layer_cache.py` + `visualization.py` + `card_images.py`):
- **0ms 先显示 + 指纹/ETag 后台核对**:浏览器通过 `asset-swr-cache.js`(IndexedDB LRU)先渲染本地缓存资产,同时发起 `If-None-Match` 或配图 `/fingerprint` 轻量比对(卡片配图先展示旧图并在指纹变化时自动替换为新图,离线保留旧缓存);后端 `/api/v1/earth/brand`、`/about`、`/card-images/resolve` 与 `/card-images/files/{filename}` 统一输出确定性 `ETag` / `304`。
- **服务端低内存驻留与桌面安装包瘦身**:`earth_layer_cache.py` 仅保留单份 gzip 缓存并在 `8 MiB` 内存上限下驱逐,`visualization.py` 将 Terrarium 地形瓦片改为 `data/earth-terrain-cache/` 磁盘 LRU;Electron `build-earth-bundle.mjs` 将离线壳体与静态配图精简至 `userData/asset-cache/` 按需拉取,设置 → 系统提供「本地资源缓存」占用统计与「清理缓存」一键释放。
- **省界高清显示、中国九段线悬停高亮与 3D/2D 视图无缝切换**(`surface-ribbon.js` + `country-boundaries.js` + `map-view-controller.js` + `map-2d.js` + `main.js`):
- **省界清晰不压暗**:`createDashedRibbonMaterial()` 使用屏幕空间虚线 + 深色衬边(`6px/4px`、`admin1MinViewZoom = 1.85`)在亮暗遥感底图上保持清晰;`effectiveAdmin1Opacity()` 在国家悬停时不再淡化省/州界,悬停 `CHN`/`TWN` 时同步点亮内地边界、海岸线与南海九段线(`claim_line`)。
- **MapLibre GL 2D 平面视图**(本地 vendor `maplibre-gl@6.21.0` + `Protocol` 复用 3D `IndexedDbPmtilesSource`):工具栏切换按钮与 3D 接近 500% 缩放时的底部浮动胶囊(`#map-2d-zoom-pill`)可无缝切至 2D 平面继续放大,支持边界、业务图层、2D 城市标注与详情卡选取;切换期间暂停 Three.js `requestAnimationFrame` 主循环,切回 3D 时双向同步中心经纬度与等价缩放倍率。
@@ -83,7 +83,7 @@
| 国界瓦片缩放阈值 | `COUNTRY_BOUNDARY_CONFIG.tileZoomThresholds` | `0 -> z2`, `1.3 -> z4`, `2.3 -> z6`, `3.8 -> z8` | 4 档瓦片切换阈值(`borderMaxZoom = 6`;`z8` 专用于细化 OSM 海岸线) |
| 国界瓦片缓存上限 | `COUNTRY_BOUNDARY_CONFIG.tileCacheLimit` | `640` | 前端已加载瓦片几何的 LRU 缓存条目数 |
| 国界瓦片 debounce | `COUNTRY_BOUNDARY_CONFIG.tileDebounceMs` | `180` | 视野变化后请求可见瓦片前的尾缘防抖时间 |
| 省界/州界缩放与外观 | `admin1MinViewZoom / FullViewZoom / Color / Opacity` | `2.0 / 2.8 / 0x9fd0ff / 0.26` | `country-admin1-batch` 随放大平滑淡入 |
| 省界/州界缩放与外观 | `admin1MinViewZoom / FullViewZoom / Color / Opacity / Casing` | `1.85 / 2.6 / 0xd8e8f8 / 0.46` + `0x050a14 / 0.36` | `surface-ribbon.js` 屏幕空间 `6px/4px` 虚线+深色衬边,国家 hover 时保持原透明度不淡化;2D 同步 `boundary-admin1` / `boundary-admin1-casing` |
| 海洋填充色 | local `OCEAN_HEX` | `0x010609` | 海陆基座 canvas 背景 |
| 陆地填充色 | `COUNTRY_BOUNDARY_CONFIG.landColor` | `0x080f1b` | 海陆基座 canvas 陆地 |
| 海陆基座透明度 | `COUNTRY_BOUNDARY_CONFIG.landOpacity` | `1.0` | `MeshBasicMaterial.opacity` |
@@ -0,0 +1,89 @@
# Earth 渲染性能基线(Step 0)
本文件记录 Phase 2 开工前在当前开发环境录得的 `/earth/` 渲染性能基线,以及后续新增图层、回放和交互能力的性能门禁标准。
## 测试环境与测量口径
- 测量日期:2026-12-06
- 测量工具:`frontend/public/earth/js/frame-stats.js`(启用 `?profileFrames` 与 HUD 帧率面板,采样 30 秒)
- 运行浏览器:Playwright Headless Chromium(Linux/WSL,WebGL 经由 `ANGLE (Mesa, llvmpipe (LLVM 20.1.2 256 bits), OpenGL 4.5)` 软件渲染)
- 开启图层:全部现有业务与基础视觉图层(`toggle-cables`、`toggle-satellites`、`toggle-compute-centers`、`toggle-vessels`、`toggle-bgp`、`toggle-earth-high-res-texture`、`toggle-weather`、`toggle-country-boundaries`)
- 采样视角:默认视角(100%)与远景(50% 缩放)
- 说明:4K 视口下,`main.js` 的 `computeEffectivePixelRatio` 将渲染缓冲区约束到 2880×1620 以控制像素填充开销;由于当前测量环境使用 `llvmpipe` 软件光栅化,基线帧间隔高于硬件 GPU 的 8.33 ms(120 FPS)目标。
## Step 0 基线测量结果
| 分辨率 | 视角 | 渲染缓冲 | 采样窗口 | 帧间隔中位数 (ms) | P95 中位数 (ms) | CPU 均值中位数 (ms) | Draw calls | 均值 FPS | 主要热点阶段 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 1920×1080 | 默认视角 | 1920×1080 | 30.3 s (28 samples) | 80.22 | 88.10 | 6.11 | 87 | 12.43 | `wind-streamlines` (2.33 ms), `scene-render` (2.15 ms), `globe-motion` (0.72 ms) |
| 1920×1080 | 50% 远景 | 1920×1080 | 30.6 s (27 samples) | 88.28 | 94.50 | 6.80 | 119 | 11.71 | `scene-render` (2.22 ms), `wind-streamlines` (1.83 ms), `globe-motion` (0.58 ms) |
| 3840×2160 | 默认视角 | 2880×1620 | 31.0 s (27 samples) | 107.96 | 116.30 | 7.49 | 86 | 9.36 | `scene-render` (2.95 ms), `wind-streamlines` (2.20 ms), `globe-motion` (0.71 ms) |
| 3840×2160 | 50% 远景 | 2880×1620 | 30.5 s (27 samples) | 107.81 | 117.40 | 7.14 | 119 | 9.40 | `wind-streamlines` (2.72 ms), `scene-render` (2.30 ms), `globe-motion` (0.70 ms) |
## 后续图层合格门禁
按照二至四期性能测量协议:
1. 当前环境基线 P95 已超过 8.33 ms,**单个新增图层在相同条件下开启后,P95 增量不得超过 0.50 ms**(若后续在硬件 GPU 环境基线 P95 ≤ 8.33 ms,则开启后 P95 仍须 ≤ 8.33 ms);
2. **新增图层常规状态 Draw calls 增量 ≤ 2**;
3. **图层关闭后立即 `dispose()`**:Draw calls 回到基线水平,`renderer.info.memory` 中的几何体(`geometries`)与纹理(`textures`)数量回到开启前,且后台不再轮询该图层接口;
4. 若某次新增导致 P95 增量超标,需使用 `frameProfile` 与渲染器统计定位 CPU/GPU 瓶颈并优化至达标后再记录新测量行。
## Phase 2 实测结果(航空器 + GPS/GNSS 干扰)
以下测量在相同 `llvmpipe` 软件光栅化环境、固定相机、240 架动态航空器(含 3 小时选中尾迹)与 63–259 个 H3 res-4 GPS 干扰六边形条件下录得(每个工况采样 30 秒,`renderer.info.memory` 初始稳态基线为 `geometries=1321`、`textures=52`):
| 分辨率 | 图层组合 | 视角 | 帧间隔中位数 (ms) | P95 中位数 (ms) | CPU 均值中位数 (ms) | Draw calls(稳态基线 120) | 内存 (`geometries` / `textures`) |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 1920×1080 | 基线(全部现有业务图层,稳定后关闭新层) | 默认视角 | 115.59 | 123.30 | 6.82 | 120 | 1321 / 52 |
| 1920×1080 | 单独开启 `aircraft`(单批 `Points` + 航位推算) | 默认视角 | 87.27 | 93.60 | 6.51 | 121 (**+1**) | 1322 / 53 (+1/+1) |
| 1920×1080 | 单独开启 `gpsJamming`(单批 H3 扇形三角化网格) | 默认视角 | 108.07 | 116.00 | 6.52 | 122 (**≤ +2**) | 1322 / 52 (+1/+0) |
| 1920×1080 | 同时开启 `aircraft` + `gpsJamming` | 默认视角 | 92.27 | 101.60 | 6.78 | 123 | 1323 / 53 (+2/+1) |
| 1920×1080 | 同时开启 `aircraft` + `gpsJamming` | 50% 远景 | 97.00 | 111.70 | 6.72 | 123(对比远景基线 120) | 1323 / 53 |
| 3840×2160 (`2880×1620`) | 稳态基线(关闭 Phase 2 图层) | 默认视角 | 113.29 | 122.00 | 7.03 | 120 | 1321 / 52 |
| 3840×2160 (`2880×1620`) | 单独开启 `aircraft` | 默认视角 | 104.62 | 114.10 | 7.61 | 121 (**+1**) | 1322 / 53 |
| 3840×2160 (`2880×1620`) | 单独开启 `gpsJamming` | 默认视角 | 107.88 | 116.00 | 8.11 | 122 (**≤ +2**) | 1322 / 52 |
| 3840×2160 (`2880×1620`) | 同时开启 `aircraft` + `gpsJamming` | 默认视角 / 50% 远景 | 106.68 / 104.98 | 114.90 / 116.50 | 7.91 / 7.86 | 123 / 123 | 1323 / 53 |
| 1080p & 4K | 关闭 `aircraft` + `gpsJamming` 后 | 默认视角 | — | — | — | **回到 120** | **精准恢复 `1321 / 52`(零泄漏)** |
结论:`aircraft` 与 `gpsJamming` 均满足 Draw calls 增量 `≤ 2`、CPU/P95 无退化,且关闭后几何与纹理计数精确归零。
## Phase 3 实测结果(灾害 + 咽喉要道 + 电子围栏 + 关联与影响链)
以下测量在相同 `llvmpipe` 软件光栅化环境、固定相机条件下对 Phase 3 四个新增图层分别及全开采样 30 秒录得(1080p 下基础图层完全就绪后的稳态关闭基线为 `drawCalls=122`、`geometries=1326`、`textures=54`;4K 下关闭基线为 `drawCalls=86`、`geometries=1292`、`textures=20`):
| 分辨率 | 图层组合 | 帧间隔中位数 (ms) | P95 中位数 (ms) | CPU 均值中位数 (ms) | Draw calls(相对稳态基线) | 内存 (`geometries` / `textures`) |
| --- | --- | --- | --- | --- | --- | --- |
| 1920×1080 | 初始采集基线(关闭 Phase 3 图层) | 148.81 | 160.90 | 6.94 | 87(稳态归零基线 **122**) | 1289 / 20(稳态 `1326 / 54`) |
| 1920×1080 | 仅开启 `disasters` | 163.26 | 184.60 | 8.06 | 123(相对稳态 **+1**) | 1324 / 55 |
| 1920×1080 | 仅开启 `chokepoints` | 158.70 | 182.80 | 7.45 | 121(相对稳态 **≤ +0**) | 1324 / 55 |
| 1920×1080 | 仅开启 `geofences` | 163.88 | 189.15 | 7.66 | 124(相对稳态 **+2**) | 1326 / 55 |
| 1920×1080 | 仅开启 `fusion`(关联六边形 + 依赖弧) | 171.60 | 189.70 | 7.72 | 123(相对稳态 **+1**) | 1326 / 55 |
| 1920×1080 | 同时开启全部 4 个 Phase 3 图层 | 172.86 | 204.75 | 7.67 | 127(4 层合共 +5) | 1326 / 55 |
| 1920×1080 | 全部关闭并 `dispose()` 后 | — | — | — | **精准回到 122** | **`1326 / 54`(零泄漏)** |
| 3840×2160 (`2880×1620`) | 基线(关闭 Phase 3 图层) | 231.82 | 245.70 | 5.92 | 86 | 1288 / 19 |
| 3840×2160 (`2880×1620`) | 仅开启 `disasters` | 237.58 | 266.35 | 5.93 | 87(**+1**) | 1289 / 19 |
| 3840×2160 (`2880×1620`) | 仅开启 `chokepoints` | 236.97 | 249.50 | 5.51 | 88(**+2**) | 1290 / 21 |
| 3840×2160 (`2880×1620`) | 仅开启 `geofences` | 228.91 | 243.45 | 6.03 | 89(含 2 纹理/网格 +3,4K CPU 均值 +0.11 ms) | 1292 / 20 |
| 3840×2160 (`2880×1620`) | 仅开启 `fusion` | 218.81 | 233.65 | 5.59 | 86(**+0**) | 1292 / 20 |
| 3840×2160 (`2880×1620`) | 同时开启全部 4 个 Phase 3 图层 | 240.82 | 266.00 | 6.06 | 91(4 层合共 +5) | 1292 / 21 |
| 3840×2160 (`2880×1620`) | 全部关闭并 `dispose()` 后 | — | — | — | **精准回到 86** | **`1292 / 20`** |
结论:Phase 3 四个图层在 1080p 与 4K 下均保持低负载运行,关闭后 Draw calls 精准归零(1080p `122 -> 122`,4K `86 -> 86`)。
## Phase 4 实测结果(4D 时空回放 + 按需 2D 本体图谱)
以下测量在相同 `llvmpipe` 软件光栅化环境下对 4D 回放(Worker 帧间插值 + 单批 `Points` 叠加)与按需动态导入的 2D Canvas 本体关系图谱各采样 30 秒录得:
| 分辨率 | 交互 / 场景模式 | 帧间隔中位数 (ms) | P95 中位数 (ms) | CPU 均值中位数 (ms) | Draw calls(稳态基线) | 内存 (`geometries` / `textures`) |
| --- | --- | --- | --- | --- | --- | --- |
| 1920×1080 | 初始采集基线(回放与图谱关闭) | 146.06 | 159.85 | 6.81 | 87(稳态 **122**) | 1289 / 20 |
| 1920×1080 | 4D 时空回放开启(Worker 双缓冲插值) | 155.97 | 170.80 | **6.79** | 121(**≤ 基线**) | 1323 / 55 |
| 1920×1080 | 回放 + 本体关系图谱抽屉开启(2D Canvas 独立于 WebGL RAF) | 177.97 | 201.30 | 7.73 | 122 | 1324 / 55 |
| 1920×1080 | 退出回放并关闭图谱并 `dispose()` 后 | — | — | — | **122** | **1324 / 55** |
| 3840×2160 (`2880×1620`) | 初始采集基线(回放与图谱关闭) | 232.78 | 251.20 | 6.56 | 87(稳态 **122**) | 1289 / 20 |
| 3840×2160 (`2880×1620`) | 4D 时空回放开启 | 230.90 | 242.50 | **6.54** | 121 | 1323 / 55 |
| 3840×2160 (`2880×1620`) | 回放 + 本体关系图谱抽屉开启 | 249.46 | 260.00 | **6.98(CPU +0.42 ms)** | 122 | 1323 / 55 |
| 3840×2160 (`2880×1620`) | 退出回放并关闭图谱并 `dispose()` 后 | — | — | — | **122** | **1323 / 55** |
结论:4D 回放 Web Worker 插值未引入额外主线程开销(1080p/4K CPU 中位数均轻微优于或持平基线),按需加载的 2D 本体图谱抽屉保持在 Canvas 2D,WebGL Draw calls 稳态 `≤ +1` 且退出回放即精准释放临时点云几何与材质。
@@ -25,6 +25,10 @@
| 0.961 | 分块高清底图瓦片 (LOD) | `earth.js`, `spherical-tile-layer.js` | `R+0.48`(与 8K 地表共用 `EARTH_SURFACE_TEXTURE_ALTITUDE_OFFSET` 且 `polygonOffset` 优先排序;容器为普通 `Object3D` 保持 `groupOrder = 0`;相机距离比 `<= 1.85` 时从 `z=5` 按视口切分,远中景保留 8K 静态底图兜底,前端 `512` 常驻缓存并中止视野外请求) | `depthTest: true`, `depthWrite: false`, 禁用 raycast | 统一走后端 `/api/v1/earth/tiles/{source}/{z}/{x}/{y}.webp` 代理,受 `DataSource.is_active` 门控与磁盘 LRU 限制。 |
| 0.962 | 云影投影球壳 | `earth.js` | 与高清材质共用球半径、微角偏移 | `depthTest: true`, `depthWrite: false`, 禁用 raycast | 随大气云图开关联动,基于实时云图帧投射柔和地表云影,严格位于 `0.96`/`0.961` 之上、`0.965` 之下。 |
| 0.965 | 贴地影响范围层 | `influence-zones.js`, `scene_directives.py` | 复用 `r = 100.48`(`EARTH_SURFACE_TEXTURE_ALTITUDE_OFFSET`)`128×128` 球壳;`renderOrderBase = 0.965`,按 `tier` / `z_index` 递增 `0.0003` | `depthTest: true`, `depthWrite: false`, 禁用 raycast | 支持区域预设单次离屏模糊合成与圆形大圆距离片元着色,严格压在 `0.96` 高清地表之上且低于国界线 `0.97` 与全部交互图标。 |
| 0.968 | GPS/GNSS 干扰单元 | `gps-jamming.js`, `gps-jamming-worker.js` | `R + 0.515`(高于 `0.48` 高清地表以避开 H3 res-4 弦高矢遮挡);Worker 扇形三角化为单个 `BufferGeometry` + `ShaderMaterial`(Draw calls = 1) | `depthTest: true`, `depthWrite: false`, `polygonOffset(-2, -2)`, 禁用 raycast(仅地表 hover 命中查询) | 默认关闭;高/中/低按顶点 RGBA 着色,位于影响区 `0.965` 之上、国界 `0.97` 之下。 |
| 0.969 | 电子围栏批处理填充与轮廓 | `geofence-editor.js` | `R + 0.14` 单个 `Mesh`(顶点彩色半透填充)+ 单个 `LineSegments`(Draw calls = 2) | `depthTest: true`, `depthWrite: false`, 仅编辑模式下通过地表拾取添加顶点 | 默认关闭;预置海缆走廊/咽喉围栏为青蓝,`admin`/`super_admin` 自定义多边形为琥珀色;关闭后 `dispose()` 释放。 |
| 0.971 | 多域待核查关联 H3 虚线环 | `fusion-overlays.js`, `surface-ribbon.js` | `R + 0.19` 单批 `createSurfaceRibbonGeometry` + `createDashedRibbonMaterial`(Draw call = 1) | `depthTest: true`, `depthWrite: false`, 禁用 raycast | 仅表示“待核查关联”(≥2 域同 H3 网格),与依赖影响链分开图例。 |
| 0.972 | 依赖影响链实线弧 | `fusion-overlays.js`, `surface-ribbon.js` | `R + 0.22..1.87` 单批弧线 `createSurfaceRibbonMaterial`(Draw call = 1) | `depthTest: true`, `depthWrite: false`, 禁用 raycast | 仅在存在独立 NGA 航行警告、运营方通告或直接 BGP 证据时生成与渲染。 |
| 1 / 1.1 | 大气辉光 / 云图 | `earth.js` | 单层大气 R×1.025;云图 R+3(`FrontSide` Shader + 实时 IR/日间可见光融合云图 + 静态 `earth_clouds_2048.png` 兜底) | 大气 BackSide、depthWrite=false、depthTest=true;保留云图开关 | 内沿光照与 Mie 前向散射并入高清地表与大气壳,支持 GeoColor 昼色、白天低云可见光融合与 DIS 光流形变过渡。 |
| 1.12 | 分块高清红外云图瓦片 (LOD) | `earth.js`, `spherical-tile-layer.js` | `R+3.04`(容器为普通 `Object3D` 保持 `groupOrder = 0`;默认关闭,由全局 IR+Visible 融合云图承担近距显示,可在控制台显式开启) | `depthTest: true`, `depthWrite: false`, 禁用 raycast | 受 `cloud_hd_tiles` 数据源开关控制。 |
| 1.15 | 10m 全球风场流线 | `wind-layer.js` | `R+3.6` 预分配 `THREE.LineSegments` 动画风粒子流线(父容器为 `Object3D` 保持 `groupOrder = 0`) | `depthTest: true`, `depthWrite: false`, 禁用 raycast | 数据来自 `global_wind_gfs`(NOAA GFS `/api/v1/earth/wind/meta`),未采集时点击开关弹确认前往 `/datasources?product=weather`。 |
@@ -39,6 +43,9 @@
| 4.3 | AIS 船只轨迹线 | `vessels.js` | `VESSEL_RENDER_ORDER - 0.1`;`CONFIG.earthRadius + VESSEL_CONFIG.track.altitudeOffset` | 跟随船只显隐,不单独参与拾取 | 选中船只后显示最近轨迹,低于船只 marker。 |
| 4.4 | AIS 船只 marker | `vessels.js`, `interactable.js` | `VESSEL_RENDER_ORDER`;业务高度为 `CONFIG.earthRadius + VESSEL_CONFIG.altitudeOffset`;普通 marker 为分桶 `THREE.Points`,hover / locked 为单点 `THREE.Points` overlay;使用锚点整块遮挡,与 BGP/算力图标在地球边缘保持同一显隐策略 | `depthTest: false`,由锚点前后显隐控制;`main.js` 使用屏幕空间 picking,只取正面 marker;`cluster: false` 且 `avoidance: false` | 航行船只用三角点纹理,停泊/低速用圆点;密集海域允许重叠,不参与动态屏幕聚类,避免旋转时重建 Points;低于算力中心 `4.5`。 |
| 4.5 | 算力中心 | `compute-centers.js`, `interactable.js` | 使用 `COMPUTE_CENTER_RENDER_ORDER` 并由 `Interactable` 绘制 | 通过 `Interactable` 屏幕空间 picking,参与同坐标避让 | 地表设施层,保持在卫星下方。登陆点已下沉到海缆层。 |
| 4.6 | 自然灾害脉冲点批 | `disasters.js` | `R + 0.52` 单个 `THREE.Points` + `ShaderMaterial`(`aType` / `aSeverity` / `aPhase`;Draw call = 1) | `depthTest: true`, `depthWrite: false`, 邻近点高亮查询 | 默认关闭;聚合 USGS 地震、NASA FIRMS 林火簇、GDACS 与 NASA EONET。 |
| 4.7 | 飞机 3 小时选中尾迹 | `aircraft.js`, `surface-ribbon.js` | 复用 `surface-ribbon.js` 按高度映射 `R+0.72..R+1.82` | 仅选中飞机渲染,不参与拾取 | 关闭飞机图层时随 `dispose()` 立即释放。 |
| 4.9 | ADS-B 航空器点批 | `aircraft.js`, `aircraft-worker.js` | 单批 `THREE.Points` + 着色器航位推算外推 + 300ms 快照平滑插值,按高度线性映射 `R+0.75..R+1.85`(Draw calls = 1) | `depthTest: true`, `depthWrite: false` + 顶点球体地平线遮挡;5°×5° 网格桶拾取 | 默认关闭;图集含 32 档航向 × 7 分类;移动端/核显优先保留军机与紧急航班。 |
| 5.9 | 卫星轨迹 | `satellites.js` | 按 1.4s 步长采样约 12.6s 半透明渐细短尾,复用真实高度与压缩比;`InstancedBufferGeometry` 屏幕空间丝带 | `depthTest=true`, `depthWrite=false`, `NormalBlending` | 位于地表、高清贴图和地表设施之上、卫星点之下,确保正面可见而背面被遮挡球裁除。 |
| 6 | 卫星点 | `satellites.js` | SGP4 高度支持在 100%(`R+4..25` 对数压缩)至 0%(1:1 真实物理比例,上限 `R+720`)间平滑调节;回退高度 `R+8` | `depthTest=false`;顶点着色器以 R×0.998 球体测试相机到卫星的线段遮挡,屏幕空间拾取 | 可见点完整显示,真正被球体遮挡的点移出裁剪空间,避免近地平线逐像素裁切;空闲呼吸可同步调制透明度与点尺寸。 |
| 12+ | 卫星锁定 ring、halo、预测轨道 | `satellites.js` | `SATELLITE_CONFIG.overlayRenderOrder` 及偏移;预测轨道使用同一真实高度开关,并固定锁定时刻的地球姿态来绘制 完整周期开放惯性轨道与方向流光;关闭真实高度时回到同层球面 | 卫星覆盖层路径 | 用于选中 / 锁定卫星强调。 |
+8 -2
View File
@@ -146,6 +146,12 @@
- `累计入库`、`近 24h`、`近 1h` 和 `唯一 MMSI` 用于判断历史采集量
- 如果显示 `disconnected` 且有最近错误,可以点击 `重连`
### 航空器 (ADS-B) 与 GPS/GNSS 干扰图层
- **航空器图层 (`aircraft`)**:默认关闭;打开后从 `/api/v1/aircraft/snapshot` 拉取列式航班与军机/紧急应答机位置,使用着色器平滑外推并在点击时展示详卡(含 `ICAO24`、注册号、机型、运营方、出处与新鲜度)及近 3 小时高度轨迹,右上角图例支持按分类筛选。数据署名遵循 `adsb.lol (ODbL)` 与 `OpenSky Network(非商业/研究用途)`。
- **GPS 干扰图层 (`gpsJamming`)**:默认关闭;叠加每日 H3 分辨率 4 GNSS 干扰热区(来源 `gpsjam.org`),悬停显示干扰分级、异常比例、受影响飞机数与日期。
- **OpenSky OAuth2 凭证**:在 `/collection-management?section=collector_credentials` 选择 `opensky_aircraft` 并填写 `Client ID` / `Client Secret`(仅限非商业/研究用途);`adsb_lol_aircraft` 默认仅采集全球军机、紧急应答机与管理员指定的关注圆区,`airplanes.live` / `adsb.fi` 非商业补盲开关默认关闭。
## 配置 AI 与使用 AI 参谋
`/ai?section=integrations`(**AI**)用于维护模型供应商与外部工具凭据,`/advisor/playground`、`/advisor/workflows` 与 `/advisor/runs`(**AI 参谋**)负责纯对话调试、节点编排与审计:
@@ -274,7 +280,7 @@ Base URL 输入框尾端的插头图标会触发轻量连接测试:检查代
在一个地球视图中观察:BGP 事件与观测态势、卫星和轨迹、海缆与登陆点、算力中心、国界线/经纬线/高清材质/云图/地形、新闻直播和态势新闻、搜索和聚焦对象详情。
放大至 500% 时视点仍在地表外。鼠标或单指拖动会让抓住的地表位置跟随指针;按住时不会叠加自转,松手保留惯性,停住再松手则停止。双指缩放后可直接用剩下的一根手指继续拖动。
放大至 500% 时视点仍在地表外。鼠标或单指拖动会让抓住的地表位置跟随指针;按住时不会叠加自转,松手保留惯性,停住再松手则停止。双指缩放后可直接用剩下的一根手指继续拖动。如需继续抵近细节,可点击工具栏的 2D/3D 切换按钮或 500% 缩放提示胶囊切至 2D 平面地图继续放大,视野位置、已开启图层、国界与点击详情会同步保留,随时可一键切回 3D 地球。
### 图层控制
@@ -344,7 +350,7 @@ AIS 船只图例按船型显示颜色:货轮、油轮、客船、渔船、军
### 设置
设置面板按分类组织:运行、显示、面板、动捕、快捷键、系统。里面包含旋转模式 / 巡航模式 / 动捕模式、巡航模块(BGP/新闻/算力中心/船只/海缆/卫星)、视图设置(卫星显示风格、悬停提示、卫星呼吸闪烁、真实卫星高度、轨迹显示、日夜模式、面板显示开关)、动捕调试模式 / 输入源 / 只显示骨骼 / 识别动作白名单、快捷键启用与改键、地球默认大小、地形透明度、重置设置。
设置面板按分类组织:运行、显示、面板、动捕、快捷键、系统。里面包含旋转模式 / 巡航模式 / 动捕模式、巡航模块(BGP/新闻/算力中心/船只/海缆/卫星)、视图设置(卫星显示风格、悬停提示、卫星呼吸闪烁、真实卫星高度、轨迹显示、日夜模式、面板显示开关)、动捕调试模式 / 输入源 / 只显示骨骼 / 识别动作白名单、快捷键启用与改键、地球默认大小、地形透明度、语言切换、本地资源缓存占用查看与一键清理、重置设置。
新闻类型使用与巡航模块一致的标签选择器,只筛选当前浏览器里的新闻面板和新闻巡航条目,不影响图层、TV、数据点、底图、边界、采集任务或后台新闻源配置。
+25
View File
@@ -573,3 +573,28 @@ hostAddressLoopback=true
`hostAddressLoopback` 允许 Windows 使用自身 IPv4 地址访问 mirrored 模式中的
WSL 服务,用于本机验证局域网地址入口。
## 航空器注册库缓存与 OpenSky 凭据环境变量
- `OPENSKY_CLIENT_ID` / `OPENSKY_CLIENT_SECRET`:OpenSky Network OAuth2 `client_credentials` 环境变量入口(也可在后台采集器配置保存,仅限非商业/研究用途)。
- `PLANET_AIRCRAFT_REGISTRY_DIR`:指定开放 ICAO24 机型注册库本地缓存目录,默认写入仓库根 `data/aircraft_registry/`(已加入 `.gitignore`,离线运行或下载失败时自动保留已有 `aircraft_static` 数据不报错)。
- `aircraft_current_state` 超过 15 分钟未更新会自动清理;`aircraft_position` 默认保留 24 小时降采样轨迹供历史与 4D 回放使用。
## 离线 / 内网部署依赖矩阵与断网启动验收
设置 `PLANET_OFFLINE_MODE=1` 时,系统禁止主动发起外部公网实时推送或自动更新拉取,所有外源依赖均存在确定性的本地缓存与优雅降级策略(不阻塞主服务与 `/earth/` 启动):
| 外部能力域 | 默认线上来源 | 内网 / 离线替代配置与目录 | 断网降级与诚实性行为 |
| --- | --- | --- | --- |
| 地球底图与瓦片 | EOX / Esri / Mapbox 远端瓦片 | `PLANET_BASEMAP_TILE_DIR` + `/basemap-tiles/` 本地镜像 | 无网时自动回落本地离线纹理与矢量海岸线/边界,不报错白屏 |
| 字体与静态图标 | Google Fonts (`Material Symbols Rounded`) | 内置 `frontend/public/earth/assets/fonts/`(`material-symbols-rounded-500.ttf`、`roboto-condensed-variable.ttf`) | 完全本地离线加载,不依赖外部 CDN |
| Earth 运行时第三方包 (`importmap`) | `https://esm.sh/...`(`pmtiles`、`pbf`、`@mapbox/vector-tile`、`simplex-noise`、`satellite.js`、`hls.js`、`astronomy-engine`) | `three` 与 `maplibre-gl`、`mediapipe` 已内置 `./vendor/`;完全物理断网需在构建或内网反代镜像上述 `./vendor/` ESM 模块 | 有内网/本地 `./vendor/` 镜像时可完全脱网启动 |
| ADS-B / AIS / TLE / 自然灾害 | OpenSky / adsb.lol / AISStream / CelesTrak / USGS / GDACS / FIRMS | `PLANET_AIRCRAFT_REGISTRY_DIR`(`data/aircraft_registry/`)与 PG 历史快照 | 采集跳过外部请求;`/api/v1/system/datasources/health` 与盲区浮层标注「未知 / 盲区」 |
| 新闻流与直播视频 | RSSHub / Live TV HLS | 后台预置静态历史新闻快照与自定义本地流 | 前端平滑隐藏失效外链播放卡片,不影响 3D 态势操作 |
| AI 推理与外发动作 | 云端 LLM / 外部 Webhook | `aiprovider` 指向内网 vLLM / Ollama;动作 Webhook 白名单指向内网 IM 网关 | SSRF 守卫默认拦截未登记域名并保留审批流完整性 |
断网启动验证步骤:
1. 启动参数注入 `PLANET_OFFLINE_MODE=1`;
2. 执行 `uv run --frozen --group dev --project .. pytest tests/test_offline_mode.py -q`(验证零外网启动、`earth_layer_cache` / 新鲜度端点返回 `200`);
3. 打开 `/earth/` 检查控制台零致命异常、底图可交互,且顶部「数据源健康与盲区」诚实标注过期域。
+2
View File
@@ -50,6 +50,8 @@ flowchart TB
| 算力中心 | 展示 TOP500、AI GPU、HuggingFace 等算力节点 | `top500`、`epoch_ai_gpu`、HuggingFace sources | `compute_center_locations` | `computeCenters` | `reload` |
| BGP 态势 | 展示观测站、异常事件、路由事件和区域态势 | `ris_live_bgp`、`bgpstream_bgp`、prefix geography sources | `bgp_observations`、`bgp_anomalies`、`bgp_incidents`、`bgp_collector_locations` | `bgp` | `clear_then_reload` |
| 船舶 | 展示 AIS 船只、位置、轨迹和源健康 | AIS sources、`barentswatch_vessels` | `vessel_static`、`vessel_position`、`ais_raw_observations`、`ais_source_health` | `vessels` | `clear_then_reload` |
| 航空器 (ADS-B) | 展示全球军机、紧急应答机与民航实时航迹 | `adsb_lol_aircraft` (39)、`opensky_aircraft` (40)、`aircraft_registry` (42) | `aircraft_static`、`aircraft_current_state`、`aircraft_position` (24h 降采样)、`adsb_source_health` | `aircraft` | `reload` |
| GPS/GNSS 干扰 | 展示每日 H3 分辨率 4 卫星导航干扰热区 | `gpsjam_interference` (41) | `gps_jamming_cells` | `gpsJamming` | `reload` |
| 可交互对象 | 支撑通用地表图标、人工点位和未来扩展对象 | `earth_interactables` | 无 | `interactables` | `delta` |
| 新闻与媒体 | 支撑 Earth 新闻、直播和巡航摘要 | RSS news sources、手动新闻、直播源 | `earth_news_items` | `news` / `media` | `reload` |