11 Commits

Author SHA1 Message Date
linkong
3fcbae55dc feat(earth): add cable-landing point relation via city_id
Backend:
- Fix arcgis_landing collector to extract city_id
- Fix arcgis_relation collector to extract city_id
- Fix convert_landing_point_to_geojson to use city_id mapping

Frontend:
- Update landing point cableNames to use array
- Add applyLandingPointVisualState for cable lock highlight
- Dim all landing points when satellite is locked
2026-03-20 15:45:02 +08:00
rayd1o
e21b783bef fix: 修复arcgis_landing解析GeoJSON坐标格式错误
- geometry.x/y 改为 geometry.coordinates[0]/[1]
- 修复后912个登陆点正确存储
2026-03-19 09:31:38 +08:00
rayd1o
c82e1d5a04 fix: 修复3D地球坐标映射多个严重bug
## Bug修复详情

### 1. 致命错误:球面距离计算 (calculateDistance)
- 问题:使用勾股定理计算经纬度距离,在球体表面完全错误
- 修复:改用Haversine公式计算球面大圆距离
- 影响:赤道1度=111km,极地1度=19km,原计算误差巨大

### 2. 经度范围规范化 (vector3ToLatLon)
- 问题:Math.atan2返回[-180°,180°],转换后可能超出标准范围
- 修复:添加while循环规范化到[-180, 180]区间
- 影响:避免本初子午线附近返回360°的异常值

### 3. 屏幕坐标转换支持非全屏 (screenToEarthCoords)
- 问题:假设Canvas永远全屏,非全屏时点击偏移严重
- 修复:新增domElement参数,使用getBoundingClientRect()计算相对坐标
- 影响:嵌入式3D地球组件也能精准拾取

### 4. 地球旋转时经纬度映射错误
- 问题:Raycaster返回世界坐标,未考虑地球自转
- 修复:使用earth.worldToLocal()转换到本地坐标空间
- 影响:地球旋转时经纬度显示正确跟随

## 新增功能

- CelesTrak卫星数据采集器
- Space-Track卫星数据采集器
- 卫星可视化模块(500颗,实时SGP4轨道计算)
- 海底光缆悬停显示info-card
- 统一info-card组件
- 工具栏按钮(Stellarium风格)
- 缩放控制(百分比显示)
- Docker volume映射(代码热更新)

## 文件变更

- utils.js: 坐标转换核心逻辑修复
- satellites.js: 新增卫星可视化
- cables.js: 悬停交互支持
- main.js: 悬停/锁定逻辑
- controls.js: 工具栏UI
- info-card.js: 统一卡片组件
- docker-compose.yml: volume映射
- restart.sh: 简化重启脚本
2026-03-17 04:10:24 +08:00
rayd1o
02991730e5 fix: add cable_id to API response for cable highlighting 2026-03-13 16:23:45 +08:00
rayd1o
b06cb4606f Fix: remove ignored files from tracking 2026-03-13 10:55:00 +08:00
rayd1o
de32552159 feat: add data sources config system and Earth API integration
- Add data_sources.yaml for configurable data source URLs
- Add data_sources.py to load config with database override support
- Add arcgis_landing_points and arcgis_cable_landing_relation collectors
- Change visualization API to query arcgis_landing_points
- Add /api/v1/datasources/configs/all endpoint
- Update Earth to fetch from API instead of static files
- Fix scheduler collector ID mappings
2026-03-13 10:54:02 +08:00
rayd1o
99771a88c5 feat(config): make ArcGIS data source URLs configurable
- Add ARCGIS_CABLE_URL, ARCGIS_LANDING_POINT_URL, ARCGIS_CABLE_LANDING_RELATION_URL to config
- Use @property to read URL from settings in collectors
- URLs can now be configured via environment variables
2026-03-12 17:08:18 +08:00
rayd1o
14d11cd99d feat(collectors): add ArcGIS landing points and cable-landing relation collectors
- Add ArcGISLandingPointCollector for FeatureServer/1 (landing points)
- Add ArcGISCableLandingRelationCollector for FeatureServer/3 (cable-landing relations)
- Register new collectors in __init__.py
- Fix earth cables.js with cable_id grouping for highlight
2026-03-12 16:37:18 +08:00
rayd1o
aaae6a53c3 feat(backend): Add cable graph service and data collectors
## Changelog

### New Features

#### Cable Graph Service
- Add cable_graph.py for finding shortest path between landing points
- Implement haversine distance calculation for great circle distances
- Support for dateline crossing (longitude normalization)
- NetworkX-based graph for optimal path finding

#### Data Collectors
- Add ArcGISCableCollector for fetching submarine cable data from ArcGIS GeoJSON API
- Add FAOLandingPointCollector for fetching landing point data from FAO CSV API

### Backend Changes

#### API Updates
- auth.py: Update authentication logic
- datasources.py: Add datasource endpoints and management
- visualization.py: Add visualization API endpoints
- config.py: Update configuration settings
- security.py: Improve security settings

#### Models & Schemas
- task.py: Update task model with new fields
- token.py: Update token schema

#### Services
- collectors/base.py: Improve base collector with better error handling
- collectors/__init__.py: Register new collectors
- scheduler.py: Update scheduler logic
- tasks/scheduler.py: Add task scheduling

### Frontend Changes
- AppLayout.tsx: Improve layout component
- index.css: Add global styles
- DataSources.tsx: Enhance data sources management page
- vite.config.ts: Add Vite configuration for earth module
2026-03-11 16:38:49 +08:00
rayd1o
4ada75ca14 new branch 2026-03-07 13:06:37 +08:00
rayd1o
e7033775d8 first commit 2026-03-05 11:46:58 +08:00