release: bump version to 0.47.0
This commit is contained in:
@@ -262,6 +262,30 @@ AIS 请求规则:
|
||||
|
||||
`VesselAISCollector` 不再自己读取环境变量,而是统一走 `resolve_barentswatch_config()` 和 `fetch_barentswatch_access_token()`,避免设置页、连接验证和采集器三套凭证逻辑分叉。
|
||||
|
||||
## AISStream 采集器链路
|
||||
|
||||
文件:
|
||||
|
||||
- [aisstream.py](/home/ray/dev/linkong/planet/backend/app/services/collectors/aisstream.py)
|
||||
- [vessel_ais_aggregation.py](/home/ray/dev/linkong/planet/backend/app/services/vessel_ais_aggregation.py)
|
||||
|
||||
AISStream 使用 WebSocket 实时流,采集器只写入 `ais_raw_observations` 原始观测层,不直接覆盖最终船只展示表。聚合接口负责多源去重、字段选择和冲突记录。
|
||||
|
||||
配置项:
|
||||
|
||||
- `api_key`:保存在 `DataSourceConfig.auth_config`,也可用环境变量 `AISSTREAM_API_KEY`。
|
||||
- `endpoint`:默认 `wss://stream.aisstream.io/v0/stream`。
|
||||
- `message_types`:默认 `PositionReport` 和 `ShipStaticData`。
|
||||
- `bounding_boxes`:AISStream 格式为 `[[[lat_min, lon_min], [lat_max, lon_max]]]`,设置页提供全球、挪威 / 北海、欧洲近海、东亚、北美东西海岸 preset。
|
||||
- `max_messages` 和 `receive_timeout_seconds`:控制单次批次式 WebSocket 采集窗口。
|
||||
|
||||
标准化规则:
|
||||
|
||||
- `PositionReport` 主要提供位置、速度、航向和状态。
|
||||
- 船名可以从 `MetaData.ShipName` 补入,即使消息体本身没有 `name`。
|
||||
- 船型通常来自低频 `ShipStaticData.Type`;后端会把 AIS 数字类型码映射为 Cargo / Tanker / Passenger / Fishing / Military。
|
||||
- 如果某艘船尚未收到静态消息,聚合结果的船型仍可能是 `Other`,后续由 v5 船舶资料 enrichment 补齐。
|
||||
|
||||
## 凭证教程
|
||||
|
||||
文件:
|
||||
@@ -279,6 +303,7 @@ POST /api/v1/settings/credential-guides/{provider}/reset
|
||||
当前支持:
|
||||
|
||||
- `barentswatch`
|
||||
- `aisstream`
|
||||
|
||||
默认教程包含 BarentsWatch 官方 tutorial 地址:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user