release: bump version to 0.85.0
This commit is contained in:
1 parent
30b44ec00d
commit
1c0066edc6
223 files changed
+30277
-340
No files matched your search
@@ -8,6 +8,21 @@ This project follows the repository versioning rule:
|
||||
- `improvement` -> `+0.0.1`(bugfix + 小功能混合)
|
||||
- `bugfix` -> `+0.0.1`
|
||||
|
||||
## [0.85.0] — 2026-12-06
|
||||
|
||||
Released: 2026-12-06
|
||||
|
||||
### Highlights
|
||||
|
||||
- **地球全域态势感知二至四期融合(Phase 2–4)**:
|
||||
- 航空与 GPS 干扰(Phase 2):上线 ADS-B(adsb.lol / OpenSky / 航空器注册表)与 GPS 干扰数据源(`39`–`42`,迁移 `0008`),新增列式打包采样、Worker 解包与大圆航迹外推渲染。
|
||||
- 全球自然灾害、海事与推演汇聚(Phase 3):上线 USGS/GDACS/FIRMS/EONET 灾害与 NGA 海事航行警告/战略港口与咽喉要道(数据源 `43`–`47`,迁移 `0009`)、实体本体与关系策展(迁移 `0010`)、电子围栏与 H3 多源汇聚/推演情景(迁移 `0011`)及多源新鲜度与真实性诚实标识。
|
||||
- 四维回放、案例档案与私有工作流(Phase 4):上线 4D 历史回放与 2D 本体关系图谱、调查档案案例(迁移 `0012`)、私有 CSV/JSON/REST 接入向导、动作审批矩阵与 Webhook(迁移 `0013`)及离线依赖降级矩阵。
|
||||
- **地球 UI、3D↔2D 视图与桌面端增强**: 上线详情卡图片本地 SWR 缓存与 Electron 磁盘分桶缓存、MapLibre 3D↔2D 平滑视图切换、桌面端 UI 缩放模式(Auto/1x–2x)与无边框录屏增强,并优化 BGP 启动并发请求与客户端离线冒烟校验。
|
||||
- **质量清理与文档门禁**: 修复 `datasource_connectivity.py` 未定义变量与重复分支,清理 backend/frontend 测试夹具与 `ruff` 告警,同步中英文采集器与性能基线文档并发布全平台桌面安装包与生产容器镜像。
|
||||
|
||||
---
|
||||
|
||||
## [0.84.2] — 2026-12-05
|
||||
|
||||
Released: 2026-12-05
|
||||
|
||||
Executable
+423
@@ -0,0 +1,423 @@
|
||||
# Planet 二至四期连续执行计划
|
||||
|
||||
> **状态(2026-12-06)**:Phase 2(航空器 ADS-B + GPS 干扰 + 机型库,数据源 39–42,迁移 `0008`)、Phase 3(新鲜度盲区 + 灾害/海缆/港口/咽喉 + 本体 + 围栏 + H3 收敛与双兵棋场景,数据源 43–47,迁移 `0009`–`0011`)及 Phase 4(4D 回放 + 2D 本体图谱 + 调查卷宗 `0012` + 私有数据落图 + 审批矩阵 `0013` + 离线矩阵)已全部实施并经单元测试、规则门禁、性能基线对比与实景截图验收,随 `v0.85.0` 发布。
|
||||
> 本文件写给执行代理。一期(算力数据修订闭环)已完成并验收,本文件覆盖剩余的 **Phase 2 → Phase 3 → Phase 4**。
|
||||
> 仓库路径:`/home/ray/dev/linkong/planet`(Windows 侧 `\\wsl.localhost\Ubuntu\home\ray\dev\linkong\planet`)。
|
||||
> 遇到与代码现状不符的地方,以代码为准,在阶段报告中说明处理方式。
|
||||
|
||||
---
|
||||
|
||||
## 0. 连续执行规则(最重要,先读)
|
||||
|
||||
1. **三个阶段必须连续做完。** Phase 2 门禁全部通过后,**立即**开始 Phase 3;Phase 3 门禁通过后,**立即**开始 Phase 4。阶段报告写完就继续,不等用户回复。
|
||||
2. **阶段边界不是停止点。** 只有第 0.5 节列出的情况才允许停下来问用户。其余问题(测试失败、构建报错、接口不通、截图不对)自己定位、修复、重跑,直到通过。
|
||||
3. **门禁失败不能跳过。** 某阶段门禁没过,不能进入下一阶段,修到通过为止。
|
||||
4. **不要缩减范围。** 本文件列出的每一项都要交付。某项确实无法按原方案实现时,采用文中写明的降级方案,或自行选择最保守的等价方案,并在报告中说明;不能直接删掉这一项。
|
||||
5. 最终交付前,确认所有后台任务都已结束。
|
||||
|
||||
### 0.1 先读这些文件
|
||||
1. `rules.md`(必载 `core` / `security` / `workflow`;按需加载 `backend`、`frontend`、`earth`、`uiux`、`ai`、`docs`)
|
||||
2. `AGENTS.md`、`CODEMAP.md`、`docs/HARNESS.md`
|
||||
3. `docs/documentation-coverage-rules.md`(含**凭据采集器规则**)
|
||||
4. `docs/plans/phase1-compute-revision-plan.md`(一期的版本、血缘、演播、脱敏做法,后续阶段复用)
|
||||
5. `docs/technical/zh/platform-data-flows.md`、`docs/technical/zh/earth-render-layer-order.md`、`docs/technical/zh/earth-frontend-context.md`
|
||||
|
||||
开工前:
|
||||
```bash
|
||||
git status --short
|
||||
scripts/harness/doctor.sh
|
||||
```
|
||||
|
||||
### 0.2 工作区保护
|
||||
- 工作区可能有其他线程尚未提交的改动。**禁止** `git checkout` / `git stash` / `git restore` / `git reset`,禁止格式化或回滚无关文件。
|
||||
- 禁止 `git commit` / `git push`,除非用户明确要求。
|
||||
- 不修改已存在的迁移文件(迁移运行器校验 checksum)。新迁移用下一个空闲编号。
|
||||
|
||||
### 0.3 当前基线(开工时再确认一遍)
|
||||
| 项目 | 当前值 | 本计划的用法 |
|
||||
| --- | --- | --- |
|
||||
| 最新迁移 | `0007_add_compute_configuration_revisions.py` | 新迁移从 `0008` 起,每次先 `ls backend/app/db/migration_steps/` |
|
||||
| 已占用数据源 ID | `1–38`(35–38 为云图瓦片、两种底图、风场) | 新源从 `39` 起;开工时检查 `datasource_defaults.py`,若已被占用则顺延,并同步更新本计划中的编号 |
|
||||
| 用户角色 | `viewer` / `admin` / `super_admin`(`backend/app/core/enums.py`) | 不新增角色 |
|
||||
| Earth 图层适配器 | vessels、cables、satellites、computeCenters、bgp、media、news、interactables、situationalAwareness、clouds、windField、basemap | 新增图层在 `earth_layer_adapters.py` 注册 |
|
||||
| 一期成果 | `compute_configuration_revisions`、`compute_revision_diff.py`、`compute_lineage.py`、逐国 `value_sources`、演播补播、血缘抽屉与脱敏 | 后续对象的出处、新鲜度、脱敏照此实现 |
|
||||
|
||||
### 0.4 硬性规则
|
||||
- 前端只用 Bun;本地开发走 Vite(`./planet.sh start` / `./planet.sh restart -f`),不运行静态 Nginx `planet_admin` 容器。
|
||||
- 后端用结构化日志,禁止 `print()`,禁止 `except Exception: pass`。
|
||||
- 新增 Python 依赖用 `uv add`,不要手改 `uv.lock`;新增前端依赖用 `bun add`。依赖越少越好,有现成实现时不加。
|
||||
- 密钥只放环境变量或现有设置存储,不写进代码和文档示例。
|
||||
- 单个提交进仓库的数据文件不超过 5 MB;大型静态库走运行时下载缓存(见各节)。
|
||||
- 外部数据源必须遵守许可:
|
||||
- `adsb.lol`:ODbL,界面与文档需署名;
|
||||
- OpenSky:仅限非商业 / 研究用途,在数据源说明和管理界面中注明;
|
||||
- `airplanes.live`、`adsb.fi` 点查询:非商业,**默认关闭**,只有管理员显式开启才使用;
|
||||
- `gpsjam.org`:开工前核对其使用条款与署名要求,写入数据源说明;
|
||||
- NASA FIRMS 需要免费 MAP_KEY,按凭据采集器规则接入。
|
||||
|
||||
### 0.5 只有这些情况可以停下来问用户
|
||||
- 外部数据源条款明确禁止本用途,且没有可替代的公开源;
|
||||
- 需要新增用户角色,或需要修改已存在的迁移文件;
|
||||
- 需要改动 BGP 主动研判逻辑或一期已验收的算力修订核心流程(`compute_configuration_revisions`、发布、血缘)的行为;
|
||||
- 计划中的某项会破坏已有功能,且找不到保守做法。
|
||||
|
||||
其他情况一律自行处理并继续。
|
||||
|
||||
### 0.6 全局约束
|
||||
|
||||
**A. 对象出处与新鲜度(沿用一期做法)**
|
||||
每个新增对象的接口响应都带:`source`、`observed_at`(数据描述的时间)、`ingested_at`(入库时间)、`is_stale`(超过该源的新鲜度阈值)。详情卡显示这些字段。
|
||||
|
||||
**B. 证据边界**
|
||||
- 同一 H3 网格、同一时间窗出现多种信号,只能生成 **“待核查关联”**,界面和 AI 文案不得写成因果;
|
||||
- 只有存在有出处的依赖关系(例如海缆 ↔ 登陆点 ↔ ASN 拓扑)或独立告警(例如 NGA 海缆告警)时,才能画影响链;
|
||||
- 沿用 `workflow_registry.py` 中“无独立海缆告警证据时严禁把地理邻近推断为断缆”的守卫。
|
||||
|
||||
**C. 性能测量协议(替代“JS ≤ 3.5 ms”的旧口径)**
|
||||
1. Phase 2 开工前,在当前演示机上记录基线:1920×1080 与 3840×2160 两种分辨率,开启现有全部业务图层,固定相机视角(默认视角与一个 50% 远景),用 `frontend/public/earth/js/frame-stats.js` 记录 30 秒的帧间隔均值、**P95**、CPU、Draw calls,写入 `docs/technical/zh/earth-performance-baseline.md`(中英双语)。
|
||||
2. 每新增一个图层:在同样条件下开启该图层再测一次。
|
||||
3. 合格标准:
|
||||
- 基线 P95 ≤ 8.33 ms 时,加图层后 P95 仍 ≤ 8.33 ms;
|
||||
- 基线已超过 8.33 ms 时,单个新图层使 P95 增加不超过 0.5 ms;
|
||||
- 新图层常规状态 Draw calls ≤ 2;
|
||||
- 图层关闭后,Draw calls 回到基线,`renderer.info.memory` 中几何与纹理数量回到开启前。
|
||||
4. 不合格时用 `frameProfile` 区分 CPU / GPU 瓶颈并优化,直到合格。
|
||||
|
||||
**D. 渲染实现规则**
|
||||
- 海量点一律单批 `THREE.Points` 或实例化几何,禁止一个对象一个 Mesh / Sprite / DOM;
|
||||
- 解析、三角化、空间索引放在 Web Worker,用 Transferable `Float32Array` 传回主线程(参照 `satellite-position-worker.js`);
|
||||
- 动画循环中不分配新对象,复用 scratch 变量;
|
||||
- 新图层默认关闭;关闭时不请求接口、不建几何,并立即 `dispose()`;
|
||||
- 每新增或调整 `renderOrder`、半径偏移、深度策略,同步更新 `earth-render-layer-order.md`(中英)。下文给出的 renderOrder 是建议值,先对照当前文档确认没有冲突,有冲突就选相邻的空闲值并保持同样的层级意图。
|
||||
|
||||
**E. 凭据采集器**
|
||||
`requires_credentials: true` 且 `credential_status: supported` 的采集器,必须同时具备:`credential_provider`、`credential_guides.py` 教程、`datasource_connectivity.py` 连通性测试、`PlainResourcePages.tsx` 中的凭据表单或指引、一条缺失时会失败的回归测试(见 `docs/documentation-coverage-rules.md`)。
|
||||
|
||||
**F. 文档**
|
||||
每个阶段更新 `docs/technical/{zh,en}/platform-data-flows.md` 与 `earth-render-layer-order.md`;用户可见功能更新 `manual.md` / `quickstart.md`(中英);运维相关(环境变量、下载缓存、凭据)更新 `ops-runbook.md`(中英)。每阶段运行 `scripts/harness/docs-consistency-check.sh`。
|
||||
|
||||
---
|
||||
|
||||
## Phase 2:空域与电磁(飞机 ADS-B + GPS/GNSS 干扰)
|
||||
|
||||
### 2.1 数据源编号
|
||||
| ID | 名称 | 凭据 | 频率 | 说明 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| 39 | `adsb_lol_aircraft` | 不需要 | 60 秒 | `api.adsb.lol`:`/v2/mil` 军机,`/v2/sqk/7500`、`/7600`、`/7700` 紧急应答机,可选配置的重点区域 `/v2/point/{lat}/{lon}/{radius}` |
|
||||
| 40 | `opensky_aircraft` | OAuth2 Client Credentials | 120 秒 | `/api/states/all`,可配置 bbox 列表;未配凭据时安静跳过,状态显示“未配置” |
|
||||
| 41 | `gpsjam_interference` | 不需要 | 6 小时 | `gpsjam.org` H3 干扰数据(数据按天发布,频率不必更高) |
|
||||
| 42 | `aircraft_registry` | 不需要 | 7 天 | 开放的 icao24 机型库(OpenSky aircraft database 或同类开放库,开工前核对许可),运行时下载 |
|
||||
|
||||
在 `datasource_defaults.py`、`data_sources.py`(`COLLECTOR_URL_KEYS`)、`data_sources.yaml`、`collectors/__init__.py` 注册;40 号按凭据采集器规则补齐全部配套;`storage_policy.py` 的 `HIGH_VOLUME_SOURCES` 加入 39、40;`datasource_connectivity.py` 支持 39–42 的连通性测试。
|
||||
|
||||
### 2.2 数据模型(迁移 `0008_add_aircraft_and_gps_jamming.py`)
|
||||
新模型 `backend/app/models/aircraft.py`:
|
||||
|
||||
| 表 | 主键 | 字段 |
|
||||
| --- | --- | --- |
|
||||
| `aircraft_static` | `icao24` | `registration`、`aircraft_type`(ICAO 机型代码)、`type_description`、`operator`、`owner`、`origin_country`、`category`、`is_military`、`source`、`updated_at` |
|
||||
| `aircraft_current_state` | `icao24` | `callsign`、`lat`、`lon`、`baro_altitude_m`、`geo_altitude_m`、`ground_speed_ms`、`track_deg`、`vertical_rate_ms`、`squawk`、`on_ground`、`category`、`is_military`、`is_emergency`、`emergency_code`、`source`、`observed_at`、`ingested_at` |
|
||||
| `aircraft_position` | `id` 自增 | `icao24`、`lat`、`lon`、`altitude_m`、`ground_speed_ms`、`track_deg`、`observed_at`;索引 `(icao24, observed_at)`、`observed_at` |
|
||||
| `adsb_source_health` | `source` | `connection_state`、`active_count`、`last_success_at`、`last_error`、`cooldown_until`、`updated_at` |
|
||||
|
||||
新模型 `backend/app/models/gps_jamming.py`:
|
||||
|
||||
| 表 | 主键 | 字段 |
|
||||
| --- | --- | --- |
|
||||
| `gps_jamming_cells` | `(h3_index, observed_date)` | `lat`、`lon`、`resolution`、`level`(`low`/`medium`/`high`)、`bad_ratio`、`aircraft_count`、`boundary`(JSON 顶点数组)、`source`、`ingested_at` |
|
||||
|
||||
迁移兼容 PostgreSQL 与 SQLite,在 PostgreSQL 中让 `aircraft_current_state`、`gps_jamming_cells` 参与现有 `earth_data_change_events` outbox 通知(参照已有表的触发器写法)。
|
||||
|
||||
### 2.3 分类、富化与聚合
|
||||
- `backend/app/services/aircraft_types.py`:
|
||||
- 军机 ICAO 24 位地址段表(覆盖主要国家军用号段,注明出处)与军用呼号前缀规则;
|
||||
- 分类枚举 `commercial` / `cargo` / `military` / `emergency` / `general` / `helicopter` / `other`;7500/7600/7700 一律 `emergency`,同时保留 `is_military`。
|
||||
- `backend/app/services/aircraft_registry.py`(42 号源):下载开放机型库到 `data/aircraft_registry/`(路径走配置,加入 `.gitignore`),解析写入 `aircraft_static`;下载失败或离线时保留旧数据,不报错。
|
||||
- `backend/app/services/aircraft_aggregation.py`:
|
||||
- 多源合并写 `aircraft_current_state`:同一 `icao24` 以 `observed_at` 更新者为准,同一时刻 `adsb_lol` 优先(含军机标记);
|
||||
- 批量 UPSERT,一个采集批次只触发一次图层变更通知;
|
||||
- `aircraft_position` 降采样写入:距上次记录超过 30 秒,或航向变化超过 10°,或高度变化超过 300 m;
|
||||
- 清理:`aircraft_current_state` 超过 15 分钟未更新的删除;`aircraft_position` 保留时长可配置,**默认 24 小时**(Phase 4 回放需要),定时清理。
|
||||
- OpenSky 采集器:Token 缓存到过期前 60 秒刷新;遇 429 写 `cooldown_until` 并跳过后续请求直到冷却结束;请求间隔可配置。
|
||||
- adsb.lol 采集器:单次请求失败最多重试 2 次,指数退避;全部失败时保留上一批数据直到过期。
|
||||
|
||||
### 2.4 接口、适配器、AI 工具
|
||||
- `backend/app/api/v1/aircraft.py`,挂到 `api/main.py`:
|
||||
- `GET /api/v1/aircraft/snapshot`:参数 `bbox`、`category`(逗号分隔)、`include_ground`(默认 false)、`limit`(≤ 20000)、`since_minutes`(默认 15)。返回**列式紧凑结构**:`{"fields": [...], "rows": [[...], ...], "generated_at", "source_health"}`,避免大 JSON 对象数组。无数据返回 200 空集合。权限 `require_earth_or_api_access("aircraft:read")`。
|
||||
- `GET /api/v1/aircraft/{icao24}`:当前状态 + 静态档案 + 出处与新鲜度字段。
|
||||
- `GET /api/v1/aircraft/{icao24}/track?hours=3`:轨迹点。
|
||||
- `backend/app/api/v1/gps_jamming.py`:`GET /api/v1/gps-jamming/snapshot?date=` 返回干扰单元与分级统计,权限 `gps_jamming:read`。
|
||||
- 在 API Key 权限范围(`ApiKeySettings.tsx` 与后端 scope 列表)加入 `aircraft:read`、`gps_jamming:read`。
|
||||
- `earth_layer_adapters.py` 注册 `aircraft`(`cache_patterns=("aircraft*", "summary*")`,`refresh_strategy="reload"`)和 `gpsJamming`。
|
||||
- `visualization.py` 的 summary 加 `aircraft_count`、`military_aircraft_count`、`emergency_aircraft_count`、`gps_jamming_high_count`;`data_products.py` 加 `aircraft`、`gps_jamming` 两个数据产品。
|
||||
- `tool_registry.py` 新增只读工具 `query_aircraft_posture`(按区域统计军机 / 紧急 / 民航数量、重点空域列表)、`query_gps_jamming_posture`(高 / 中干扰区域列表与覆盖国家);在 `workflow_registry.py` 的 `TOOL_CATALOG` 注册,并加入 `default.general` 与 `wargame.infrastructure` 的可用工具;`entity_resolver.py` 的 `EntityRef.entity_type` 增加 `aircraft`、`gps_jamming_cell`,`workflow_registry.py` 的 bindings 实体类型白名单同步增加。
|
||||
|
||||
### 2.5 Earth 渲染
|
||||
建议渲染层级(先对照当前 `earth-render-layer-order.md`):
|
||||
|
||||
| 图层 | 半径 | renderOrder | 深度 | 说明 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| `gpsJamming` | `R + 0.48`(与高清地表同壳) | 0.968 | `depthTest: true`、`depthWrite: false` | 高于影响区 0.965,低于国界线 0.97 |
|
||||
| 飞机选中尾迹 | 按高度 | 4.7 | 复用 `surface-ribbon.js` | 仅选中目标 |
|
||||
| `aircraft` | `R + 0.75` ~ `R + 1.85`,按高度线性映射 | 4.9 | 锚点遮挡(参照船只) | 高于算力中心 4.5,低于卫星尾迹 5.9 |
|
||||
|
||||
文件:
|
||||
- `frontend/public/earth/js/aircraft-worker.js`:解包列式快照;为每架飞机计算球面初始位置、切向速度向量、显示半径、图集槽位(32 档航向 × 分类颜色);构建 5°×5° 经纬网格桶索引;用 Transferable 传回。
|
||||
- `frontend/public/earth/js/aircraft.js`:
|
||||
- 单批 `THREE.Points` + 自定义着色器:顶点着色器根据 `uElapsedSec` 沿大圆外推位置(航位推算),并做球体遮挡;每帧只更新这一个 uniform;
|
||||
- 新快照到达时在 Worker 里生成新缓冲区,主线程替换属性,过渡 300 ms 内插值,避免跳点;
|
||||
- 悬停 / 点击:拖动和惯性期间不拾取;平时先查网格桶,再在候选中做屏幕空间最近点判断;
|
||||
- 点击加载 3 小时轨迹,用 `surface-ribbon.js` 绘制;
|
||||
- 图例分类过滤;核显或移动端按上限降密度(优先保留军机和紧急航班)。
|
||||
- `frontend/public/earth/js/gps-jamming.js`:Worker 中把 H3 六边形三角化合并为一个 `BufferGeometry`,顶点颜色按等级;悬停显示干扰比例、受影响飞机数、日期。
|
||||
- 接线:`main.js`(图层注册、`earth_updates` 刷新、拾取)、`controls.js`、`index.html`、`layer-startup-tasks.js`、`legend.js`、`legend-filters.js`、`info-card.js`(呼号、icao24、注册号、机型、运营方、高度、地速、航向、升降率、应答机码、出处与新鲜度)、`search.js`(呼号 / icao24 / 注册号)、`i18n.js`。
|
||||
- 详情卡与图层说明中显示数据源署名(adsb.lol ODbL、OpenSky、gpsjam.org)。
|
||||
|
||||
### 2.6 Admin
|
||||
- `datasourceConfigHelpers.ts`:40 号 OAuth2 `client_id` / `client_secret` 与 bbox 列表配置;39 号重点区域点位配置;`airplanes.live` / `adsb.fi` 补盲开关(默认关闭,开关旁注明“非商业用途”)。
|
||||
- `PlainResourcePages.tsx`:40 号凭据指引。
|
||||
- 数据源健康页显示 `adsb_source_health`。
|
||||
|
||||
### 2.7 Phase 2 测试
|
||||
后端(新文件 `backend/tests/test_aircraft_*.py`、`test_gps_jamming.py`):
|
||||
1. adsb.lol 军机与紧急码响应解析(用录制的样例 JSON 作为 fixture,不访问外网);
|
||||
2. OpenSky Token 缓存、429 冷却、未配凭据时跳过;
|
||||
3. 军机号段与呼号分类;
|
||||
4. 多源合并优先级、轨迹降采样、过期清理;
|
||||
5. 快照接口列式结构、空数据 200、bbox 与分类过滤、权限;
|
||||
6. gpsjam 解析与 H3 边界生成;
|
||||
7. 机型库离线降级;
|
||||
8. 40 号凭据采集器配套回归测试。
|
||||
|
||||
前端(`bun test`):
|
||||
1. Worker 解包与航向槽位计算;
|
||||
2. 航位推算外推函数(与 CPU 参考实现对比误差);
|
||||
3. 网格桶拾取候选;
|
||||
4. H3 三角化顶点数量与颜色映射。
|
||||
|
||||
### 2.8 Phase 2 门禁
|
||||
- 第 8 节检查命令全部通过;
|
||||
- 第 0.6.C 性能测量:`aircraft` 与 `gpsJamming` 各自开启、两者同时开启都合格;
|
||||
- 浏览器实测:飞机平滑移动无跳点,点击显示详情与尾迹,图例过滤生效,关闭图层后无残留;GPS 干扰面不闪烁、不穿模(50% 远景与近景各截图);桌面、移动端、125% / 150% 缩放截图;
|
||||
- 文档更新完成。
|
||||
|
||||
通过后写 Phase 2 报告,**立即进入 Phase 3**。
|
||||
|
||||
---
|
||||
|
||||
## Phase 3:全域感知、本体扩展与跨域融合
|
||||
|
||||
Phase 3 内部按 3.1 → 3.10 顺序执行,每一节完成后跑相关测试再进入下一节。
|
||||
|
||||
### 3.1 新鲜度与情报盲区
|
||||
- `backend/app/services/source_freshness.py`:为每个业务域定义新鲜度阈值(建议:aircraft 5 分钟、vessels 30 分钟、bgp 30 分钟、disasters 60 分钟、gps_jamming 36 小时、satellites 48 小时、cables 14 天、compute 以发布版本为准、news 6 小时),状态 `fresh` / `stale` / `very_stale` / `degraded` / `offline` / `disabled` / `not_configured`,附原因。
|
||||
- `GET /api/v1/system/freshness`:返回各域状态、最后成功时间、原因。公开 Earth 可读(不含内部错误详情)。
|
||||
- AI 接入:`query_global_situational` 结果附 `blind_spots`;`default.general`、`wargame.*` 工作流的系统提示要求在回答中列出盲区。不是 `fresh` 的域不得被描述为“无事件”。
|
||||
- Earth HUD:紧凑的数据源健康胶囊,2 Hz 以下刷新,点击展开各域状态。遵守 `.hud-panel` 规范。
|
||||
|
||||
### 3.2 自然灾害
|
||||
| ID | 名称 | 凭据 | 频率 |
|
||||
| --- | --- | --- | --- |
|
||||
| 43 | `usgs_earthquakes` | 不需要 | 5 分钟(M4.5+ 全球 GeoJSON feed) |
|
||||
| 44 | `nasa_firms_wildfires` | MAP_KEY(凭据采集器) | 30 分钟(VIIRS 近实时;未配 Key 时状态 `not_configured`) |
|
||||
| 45 | `gdacs_disasters` | 不需要 | 15 分钟(过滤绿色级别) |
|
||||
| 46 | `nasa_eonet_events` | 不需要 | 30 分钟(排除地震类别,避免与 USGS 重复) |
|
||||
|
||||
- 模型 `disaster_events`(迁移 `0009_add_disaster_events.py`,与 3.3–3.4 的表合并到同一迁移也可以):`id`、`source`、`source_event_id`、`event_type`(earthquake / wildfire / cyclone / flood / volcano / drought / other)、`severity`、`title`、`lat`、`lon`、`magnitude`、`started_at`、`ended_at`、`url`、`observed_at`、`ingested_at`、`raw`(JSON);唯一约束 `(source, source_event_id)`;0.1° 网格 + 时间窗去重跨源同一事件(保留各源记录,标注 `duplicate_of`)。
|
||||
- 野火热点量大:按 0.25° 网格聚合为热点簇存储,保留簇内点数与最大亮温。
|
||||
- 接口 `GET /api/v1/disasters/snapshot?types=&since_hours=`,适配器 `disasters`,AI 工具 `query_disaster_posture`。
|
||||
- Earth:`frontend/public/earth/js/disasters.js`,单批 `THREE.Points`(建议 renderOrder 4.6,半径 `R + 0.52`),顶点属性区分类型与严重度,脉动在着色器中完成;默认关闭;详情卡含出处与新鲜度。
|
||||
|
||||
### 3.3 海缆告警(NGA)
|
||||
| ID | 名称 | 凭据 | 频率 |
|
||||
| --- | --- | --- | --- |
|
||||
| 47 | `nga_navigation_warnings` | 不需要 | 6 小时 |
|
||||
|
||||
- 读取 NGA MSI 公开航行警告(开工时确认接口地址与格式),用关键词规则(cable / submarine cable / cable repair / cable ship 等)筛出海缆相关警告,提取坐标(经纬度格式解析写单元测试)。
|
||||
- 模型 `cable_advisories`:`id`、`source_warning_id`、`text`、`lat`、`lon`、`polygon`(可选)、`issued_at`、`cancelled_at`、`matched_cable_ids`(按距离匹配现有海缆,阈值可配置,默认 50 km)、`match_method`、`ingested_at`。
|
||||
- 匹配结果用于海缆图层高亮(复用现有海缆样式纹理的强调通道,不新增 Draw call);海缆详情卡显示相关告警原文与出处。
|
||||
- AI 工具 `query_cable_posture` 结果附 `advisories`。
|
||||
|
||||
### 3.4 港口、咽喉要道与军舰识别
|
||||
- 静态字典 `backend/app/data/maritime_chokepoints.json`(咽喉要道多边形:马六甲、霍尔木兹、曼德、苏伊士、巴拿马、直布罗陀、博斯普鲁斯、台湾海峡、朝鲜海峡等)与 `strategic_ports.json`(战略港口:名称、坐标、类型 container / oil_lng / naval / mixed / bulk、吞吐量排名、出处)。每条记录注明来源。
|
||||
- `vessel_types.py` 扩展:军舰识别(AIS 船型 35、名称前缀 USS / HMS / HMCS / HMAS / INS / JS / ROKS / TCG 等、已知舰名白名单附出处),输出 `military_role`;海缆维修船识别(名称白名单 + AIS 船型)。
|
||||
- 船舶快照与 `query_vessel_posture` 输出各咽喉内船舶数、军舰数、与 7 天滚动基线对比。
|
||||
- Earth:咽喉要道作为低透明度区域(复用 `influence-zones.js` 的合成方式,不新增独立 Mesh),港口进入现有 `earth_interactables` 体系或算力中心同类的点批次。
|
||||
|
||||
### 3.5 新闻来源分级
|
||||
- 新闻源配置与 `earth_news_items` 增加 `credibility_tier`(1–4)、`state_affiliated`(布尔)、`theater_tags`(数组)。迁移加列,现有数据默认 `tier` 为空(界面显示“未分级”,不当作 4 级)。
|
||||
- Admin 新闻源配置页可编辑分级;Earth 新闻卡显示分级徽章;新闻面板增加战区预设筛选(全球 / 俄乌 / 中东 / 印太 / 欧洲)。
|
||||
- AI 研判引用新闻时按分级排序,国家背景媒体加标注。
|
||||
|
||||
### 3.6 通用空间对比卡片(一期遗留的通用化)
|
||||
一期已经让算力卡片和参谋共用同一 `publish_id` / 口径。本节把验证过的部分抽成通用能力,供 3.10 两个场景使用:
|
||||
- `workbench-blocks.js` 新增积木:`bilateral_duel`、`stacked_composition`、`corridor_with_milestones`、`entity_samples`,抽取自 `compute-topic.js` 现有实现,渲染结果保持一致;
|
||||
- `scene_spec` 增加 `spatial_cards`(卡片 key、锚点、左右偏好、对比伙伴 key、积木列表)和 `overlays`(首批:`national_hubs`、`chokepoints`、`geofences`、`dependency_arcs`);
|
||||
- 新增 `frontend/public/earth/js/spatial-workflow-cards.js`,使用 `regionCallouts.scope("workflow")` 渲染工作流产生的球面卡片;
|
||||
- `presentation_compiler.py` 的 `StageStepSpec` 增加通用字段 `workflow_params`、`spotlight_card_keys`、`overlays`,保留现有算力字段以兼容;
|
||||
- **算力卡片保持现有行为**,不在本阶段删除 `compute-topic.js`;新增一条测试:算力工作流输出的 `spatial_cards` 在新渲染器中显示的数值与原卡片一致。
|
||||
|
||||
### 3.7 本体扩展
|
||||
- 关系与实体解析继续**读取时推导**,不建镜像表:扩展 `entity_resolver.py`,支持 aircraft、vessel、cable、landing_point、asn、gps_jamming_cell、disaster_event、chokepoint、port、compute_center、country,统一 `object_id` 格式 `{type}:{id}`;
|
||||
- 新增两张**只存无法推导内容**的表(迁移 `0010_add_ontology_curation.py`):
|
||||
- `ontology_entity_aliases`:`alias`、`object_id`、`source`、`created_by`、`created_at`(新闻中的船名、航司名、海缆别名等人工或规则确认的别名);
|
||||
- `analyst_links`:`from_object_id`、`to_object_id`、`relation_type`、`note`、`evidence_ids`、`created_by`、`created_at`、`status`(分析员人工确认的关系);
|
||||
- 接口 `GET /api/v1/ontology/objects/{object_id}`(对象详情 + 出处 + 新鲜度)与 `GET /api/v1/ontology/objects/{object_id}/neighborhood?depth=1..2`(推导关系 + 人工关系,标注每条关系的来源类型:`derived_topology` / `derived_spatial` / `analyst_asserted`)。
|
||||
|
||||
### 3.8 电子围栏与确定性异常
|
||||
- 迁移 `0011_add_geofences_and_incidents.py`:
|
||||
- `geofences`:`id`、`name`、`kind`(preset / custom)、`geometry`(GeoJSON Polygon)、`rules`(JSON)、`enabled`、`created_by`、`created_at`、`updated_at`;
|
||||
- `situational_incidents`:`id`、`incident_type`、`severity`、`status`(open / acknowledged / dismissed / resolved)、`h3_index`、`window_start`、`window_end`、`object_ids`、`signal_summary`、`evidence`、`assessment_kind`(`rule_alert` / `candidate_correlation` / `dependency_impact`)、`created_at`、`updated_by`、`resolution_note`;
|
||||
- 预置围栏:主要海缆走廊(按海缆几何生成缓冲带,宽度可配置)、3.4 的咽喉要道;
|
||||
- `backend/app/services/fusion/anomaly_engine.py`(后台定时任务,按 `scheduler.py` 现有写法注册):
|
||||
1. 海缆走廊内船速 < 3 节且停留 > 30 分钟(疑似拖锚 / 徘徊);
|
||||
2. 重点围栏内船舶或飞机信号中断超过阈值(暗目标);
|
||||
3. 围栏内目标数比 14 天同时段基线增加超过 2 个标准差(激增);
|
||||
每条告警写入 `situational_incidents`(`assessment_kind="rule_alert"`),同一对象同一规则在冷却期内不重复生成;
|
||||
- Earth:`frontend/public/earth/js/geofence-editor.js`,在球面点选顶点闭合多边形,保存到后端;全部围栏合批为一个轮廓 + 填充几何(建议 renderOrder 0.969);`admin` / `super_admin` 可编辑,`viewer` 只读;
|
||||
- 告警列表进入现有告警 / 态势面板,可确认、驳回(必填理由)、解决。
|
||||
|
||||
### 3.9 待核查关联与依赖影响链
|
||||
- 引入 H3(`uv add h3`),分辨率 4;
|
||||
- `backend/app/services/fusion/convergence.py`:按 6 小时和 24 小时窗口扫描各域异常信号(3.8 规则告警、紧急应答机、高 GPS 干扰、灾害、BGP 异常、海缆告警、新闻热点),同一网格出现 ≥ 2 类信号时生成 `assessment_kind="candidate_correlation"` 的事件,标题固定使用“待核查关联”字样;
|
||||
- `backend/app/services/fusion/dependency_impact.py`:只基于有出处的拓扑(海缆 ↔ 登陆点 ↔ ASN ↔ 算力中心 ↔ 国家)计算断链影响与备用路径;只有存在 NGA 海缆告警、海缆运营方公告或 BGP 证据时才生成 `dependency_impact`;
|
||||
- 扩展 `proactive_pipeline.py`:新增 `process_fusion_incident(...)`,对新的待核查关联与依赖影响事件触发对应工作流和演播;**不修改**现有 BGP 函数和算力修订函数;
|
||||
- 前端:待核查关联显示为虚线网格高亮,文案“待核查”;依赖影响链显示为实线弧(复用 `surface-ribbon.js`)。两者图例分开。
|
||||
|
||||
### 3.10 两个端到端场景
|
||||
在 `workflow_registry.py` 的内置工作流中新增,使用 3.6 的空间卡片与 3.7 的本体接口:
|
||||
|
||||
1. **`wargame.cable_protection`(海缆安全护卫)**
|
||||
输入:海缆走廊规则告警或 NGA 告警或 BGP 异常。流程:取海缆、附近船舶轨迹、NGA 告警、BGP 事件 → 判断证据等级(只有邻近 = 待核查;有独立告警 = 依赖影响)→ 生成影响清单、空间卡片(海缆状态 / 可疑船舶 / 受影响国家与算力)和多幕演播。
|
||||
验收样例:用录制数据复现“某海缆走廊船舶徘徊 + 同时段 BGP 异常”,结果显示为“待核查关联”;再加入一条匹配的 NGA 告警,结果升级为“依赖影响”,并画出影响链。
|
||||
|
||||
2. **`wargame.air_sea_em`(空海电磁联合态势)**
|
||||
输入:待核查关联事件(军机 / 紧急航班 / GPS 干扰 / 咽喉军舰 / 灾害 / 新闻)。流程:汇总区域内各域对象 → 生成双边或多区域空间对比卡片、AI 简报(列出盲区)、演播。
|
||||
验收样例:用录制数据复现“某海域高 GPS 干扰 + 军机集中 + 军舰通过咽喉”,生成待核查关联、空间卡片与简报,简报中不出现因果断言。
|
||||
|
||||
两个场景的事件都能“确认 / 驳回(必填理由)”,结果写回 `situational_incidents` 并在地球上更新状态。
|
||||
|
||||
### 3.11 Phase 3 测试
|
||||
- 每个采集器的解析测试(录制样例,不访问外网),44 号凭据配套回归测试;
|
||||
- 跨源去重、野火聚合;
|
||||
- NGA 坐标解析与海缆匹配;
|
||||
- 军舰识别、咽喉计数与基线对比;
|
||||
- 新鲜度状态计算与 `blind_spots` 注入;
|
||||
- 三类异常规则(含冷却去重);
|
||||
- 待核查关联只在 ≥ 2 类信号时生成,且文案不含因果词;依赖影响在无独立证据时不生成;
|
||||
- 本体推导与人工关系接口、权限;
|
||||
- 空间卡片新旧渲染一致性;
|
||||
- 两个场景的端到端测试(后端工作流 + 前端渲染截图)。
|
||||
|
||||
### 3.12 Phase 3 门禁
|
||||
- 检查命令全部通过;
|
||||
- 新增图层(disasters、咽喉区域、围栏、关联高亮)逐一与全部同时开启的性能测量合格;
|
||||
- 浏览器实测:两个场景完整走通(截图),围栏绘制与保存,告警确认 / 驳回,数据源健康胶囊;桌面、移动端、125% / 150%;
|
||||
- 文档更新完成。
|
||||
|
||||
通过后写 Phase 3 报告,**立即进入 Phase 4**。
|
||||
|
||||
---
|
||||
|
||||
## Phase 4:4D 研判工作台与政企底座
|
||||
|
||||
### 4.1 4D 时间回放
|
||||
- 数据保留:`aircraft_position` 默认 24 小时(Phase 2 已设)、船舶位置沿用现有保留期(核对并在界面上显示实际可回放范围)、BGP / 灾害 / 新闻 / 事件按各自表的时间字段;卫星按回放时间用 TLE 现场传播。
|
||||
- `GET /api/v1/replay/frames?start=&end=&step_sec=60&layers=&bbox=`:按时间片返回列式关键帧,单次请求最长 6 小时,前端分段请求;超出保留范围的时段返回 `unavailable` 标记。
|
||||
- Earth 底部时间轴:实时 / 回放切换、拖动定位、0.5×–60× 倍速、显示每个图层的可回放范围;回放态下图层数据来自回放接口,返回实时态时恢复。
|
||||
- 帧间插值在 Worker 中完成,主线程双缓冲切换属性;回放播放时性能测量同样要合格。
|
||||
- 回放时间与一期的“系统发布时间轴”(算力 `as_of`)联动:拖到某时刻时,算力卡片自动切到当时生效的发布版本。
|
||||
|
||||
### 4.2 关系图谱与时间线
|
||||
- Earth 侧栏按需加载(动态 import)的 Canvas 2D 关系图谱,数据来自 `/ontology/objects/{id}/neighborhood`;自实现轻量力导向布局,不引入大型依赖;关系线按来源类型区分样式(推导 / 人工)。
|
||||
- 事件时间线:所选对象及其关联对象的事件(告警、修订、新闻、轨迹段)按时间排列。
|
||||
- 三者联动:点图谱节点 → 地球飞到对象并高亮;点地球对象 → 图谱与时间线展开;点时间线条目 → 时间轴跳到该时刻。
|
||||
- 图谱与时间线在 WebGL 帧循环之外渲染,交互时不影响地球帧率(性能测量验证)。
|
||||
|
||||
### 4.3 研判卷宗
|
||||
- 迁移 `0012_add_investigation_cases.py`:
|
||||
- `investigation_cases`:`id`、`title`、`status`(draft / in_review / frozen / closed)、`owner_id`、`summary`、`created_at`、`updated_at`;
|
||||
- `case_items`:`case_id`、`item_type`(object / incident / evidence / camera_bookmark / note / ai_result / compute_revision)、`ref_id`、`payload`(JSON 快照)、`added_by`、`added_at`;
|
||||
- `case_versions`:`case_id`、`version`、`snapshot`(JSON)、`content_sha256`、`frozen_by`、`frozen_at`;
|
||||
- 从地球、参谋、事件面板都能“加入卷宗”;卷宗冻结后生成不可变版本与哈希;
|
||||
- 导出 Markdown(复用 `export_revision_bound_markdown_report` 的风格),包含每条证据的出处与哈希;PDF 通过浏览器打印样式实现,不引入服务端 PDF 依赖;
|
||||
- 权限:`admin` / `super_admin` 创建与编辑,`viewer` 只读已共享卷宗。
|
||||
|
||||
### 4.4 私有数据上球
|
||||
- 复用现有 `custom_datasource_runtime.py` 与 `datasource_mapping.py`(字段映射 DSL)以及 `collection.assist` 工作流;
|
||||
- Admin 向导:上传 CSV / JSON 或配置 REST 接口 → 预览字段 → 映射为对象(必填:标识、名称、纬度、经度;可选:类型、分类、时间、任意属性)→ 预览地图 → 保存;
|
||||
- 映射结果写入现有 `earth_interactables`(已有 delta 刷新和通用图标渲染),`kind` 使用用户定义的类型;对象自动进入本体推导(`object_id = interactable:{id}`),可参与围栏规则和 AI 研判;
|
||||
- 上传文件大小上限与行数上限可配置(默认 20 MB / 10 万行),超出时提示分批;
|
||||
- 测试:CSV、JSON、REST 三种来源各一条端到端测试。
|
||||
|
||||
### 4.5 处置动作与审批
|
||||
- 迁移 `0013_add_action_requests.py`:
|
||||
- `action_types`(内置注册表即可,不一定建表):`add_to_watchlist`、`create_case`、`create_ticket_webhook`、`notify_webhook`,每种有风险等级;
|
||||
- `action_requests`:`id`、`action_type`、`target_object_ids`、`params`、`risk_level`、`status`(pending / approved / rejected / executed / failed)、`requested_by`、`requested_at`、`approved_by`、`approved_at`、`decision_reason`、`execution_result`、`source_workflow_run_id`;
|
||||
- 审批规则(基于现有三角色):
|
||||
- `viewer` 不能发起;
|
||||
- `admin` 可发起;低风险动作 `admin` 可直接执行;
|
||||
- 高风险动作(对外 Webhook 推送)需要 `super_admin` 审批,且审批人不能是发起人;
|
||||
- 审批与驳回都必须填写理由;
|
||||
- Webhook 执行器:通用 JSON Webhook、企业微信 / 钉钉 / 飞书机器人消息格式;目标地址只能来自管理员预先配置的白名单;复用现有 SSRF 防护;签名密钥存设置存储;超时与重试有上限;
|
||||
- AI 工作流可以“建议动作”(生成 `pending` 请求),不能直接执行;
|
||||
- 所有动作写 `AuditLog`;地球对象详情显示与其相关的动作记录。
|
||||
|
||||
### 4.6 离线交付验证
|
||||
- 列出所有外部依赖(数据源、底图、模型),为每项写明离线时的行为:静态库(机型库、港口 / 咽喉字典、国界、海缆底表)随数据目录打包;外部源不可达时新鲜度显示 `offline`,界面不报错;AI 通过 `aiprovider` 指向本地模型;
|
||||
- 断网测试:断开外网后启动服务与 Electron 客户端(`planet://earth/`),截图证明地球、已缓存图层、卷宗、回放(保留期内)可用;
|
||||
- 结果写入 `ops-runbook.md`(中英)的离线部署章节。
|
||||
|
||||
### 4.7 Phase 4 测试
|
||||
- 回放接口分段、保留期外 `unavailable`、算力 `as_of` 联动;
|
||||
- 插值函数单元测试;
|
||||
- 卷宗冻结哈希稳定、导出内容含出处;
|
||||
- 私有数据三种来源上球与围栏联动;
|
||||
- 审批规则矩阵(角色 × 风险等级 × 发起人是否为审批人)全覆盖;Webhook 白名单与 SSRF 拦截;
|
||||
- 离线模式启动测试。
|
||||
|
||||
### 4.8 Phase 4 门禁(即最终验收)
|
||||
- 检查命令全部通过,并运行 `scripts/harness/validate.sh`;
|
||||
- 回放播放、图谱交互时性能测量合格;
|
||||
- 浏览器实测(截图):回放一段海缆场景、从图谱跳转对象、冻结并导出卷宗、上传 CSV 上球、发起并审批一条 Webhook 动作、断网启动;桌面、移动端、125% / 150%;
|
||||
- 文档更新完成;
|
||||
- 所有后台任务结束。
|
||||
|
||||
---
|
||||
|
||||
## 8. 检查命令
|
||||
|
||||
每节完成后跑相关测试;每个阶段门禁跑全部:
|
||||
```bash
|
||||
cd backend && uv run --frozen --group dev --project .. python -m pytest -q
|
||||
scripts/harness/backend-rules-check.sh
|
||||
cd frontend && bun install --frozen-lockfile && bun run build && bun run build:admin
|
||||
cd frontend && bun test
|
||||
scripts/harness/frontend-rules-check.sh
|
||||
scripts/harness/docs-consistency-check.sh
|
||||
scripts/harness/quick-check.sh
|
||||
```
|
||||
Phase 4 结束再跑 `scripts/harness/validate.sh`。新增依赖后用 `uv sync` / `bun install` 更新锁文件,并确认 `--frozen` 命令仍通过。
|
||||
|
||||
测试失败时先判断它保护的行为:实现回归就修实现;只有断言绑定的是本计划明确改变的旧细节时才改测试,并在报告中说明。
|
||||
|
||||
---
|
||||
|
||||
## 9. 阶段报告格式
|
||||
|
||||
每个阶段结束写一次,写完立即继续下一阶段:
|
||||
```
|
||||
## Phase {n} 完成报告
|
||||
- 完成内容:(按小节编号列出)
|
||||
- 新增数据源与 ID:
|
||||
- 新增迁移:
|
||||
- 改动文件:(路径列表)
|
||||
- 新增/修改测试:(测试名 + 结果)
|
||||
- 检查命令结果:
|
||||
- 性能测量:(分辨率 / 图层组合 / 帧间隔均值 / P95 / Draw calls,与基线对比)
|
||||
- 浏览器实测截图:(文件路径)
|
||||
- 与计划不一致之处及处理方式:
|
||||
- 遗留风险:
|
||||
```
|
||||
|
||||
最终交付时附一份总表:三个阶段的全部数据源、迁移、接口、图层、工作流、测试数量与门禁结果。
|
||||
@@ -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. |
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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.
|
||||
@@ -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` |
|
||||
|
||||
|
||||
@@ -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` 及偏移;预测轨道使用同一真实高度开关,并固定锁定时刻的地球姿态来绘制 完整周期开放惯性轨道与方向流光;关闭真实高度时回到同层球面 | 卫星覆盖层路径 | 用于选中 / 锁定卫星强调。 |
|
||||
|
||||
@@ -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、数据点、底图、边界、采集任务或后台新闻源配置。
|
||||
|
||||
|
||||
@@ -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/` 检查控制台零致命异常、底图可交互,且顶部「数据源健康与盲区」诚实标注过期域。
|
||||
@@ -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` |
|
||||
|
||||
|
||||
@@ -16,12 +16,13 @@
|
||||
## Current Version
|
||||
|
||||
- `main` 当前主线历史推导到:`0.16.5`
|
||||
- `dev` 当前开发分支历史推导到:`0.84.2`
|
||||
- `dev` 当前开发分支历史推导到:`0.85.0`
|
||||
|
||||
## Timeline
|
||||
|
||||
| Version | Type | Branch | Commit | Summary |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| `0.85.0` | feature | `dev` | `v0.85.0` | 地球全域态势感知 Phase 2–4(航空器/GPS干扰/灾害/海事/本体图谱/电子围栏/H3汇聚与推演/4D回放/调查案例/私有接入/动作审批)、3D↔2D 视图切换与本地 SWR 缓存、桌面端缩放与全平台客户端发布 |
|
||||
| `0.84.2` | improvement | `dev` | `v0.84.2` | 后台数据台账英文和控件改进、Earth 图标对齐与卫星刷新、云图和底图内存优化、OCI 热更新与全平台客户端发布 |
|
||||
| `0.84.1` | bugfix | `dev` | `v0.84.1` | 在 backend/Dockerfile 补齐 OpenCV 运行时共享库(libxcb1/libgl1/libglib2.0-0 等),修复生产容器启动导入 cv2 失败并完成 v0.84 线上发布与 L1 热更上线 |
|
||||
| `0.84.0` | feature | `dev` | `v0.84.0` | 算力台账不可变修订/双时间轴/只读血缘、全球实时云图与风场/高清底图瓦片、高精度中国 POV 边界 PMTiles 与 3D 城市分级标注、图层数据台账与 9 节点位置 DAG 统一、修复线上独立 Admin 默认品牌/云图预览裂图及文档清理 |
|
||||
|
||||
Reference in new issue
Block a user