feat(realtime): 多源观测追踪与启动配置文件支持

- 协议版本升至 3,Target 新增 sources 字段保留各接收器独立观测
- Store 改为按接收器维护 SourceObservation,基于 received_at_ms
  独立执行 TTL 过期,过期后自动 refresh 选取最新有效位置
- refresh() 按时间排序源观测,优先选取有坐标的最近记录
- rid-shared 新增 SourceObservation 结构体
- Observation 验证内联 target_id 规则,长度不超过 192
- DeviceTelemetry 扩展 raw_identity、raw_position、
  coordinate_system、position_unverified、relative_height_m
- 项目级 config.json 支持版本化配置与 sqlite.busy_timeout_ms,
  优先级:环境变量 > config.json > 旧版 maps/config.json
- web-worker 传递 sources 与 position_source 至前端
- 首页标题更新为"凌空智巡无人机监测系统"
```
This commit is contained in:
2026-10-27 15:49:52 +08:00
parent 4eaa88baeb
commit 11b71e5bf2
37 changed files with 1542 additions and 198 deletions
+4
View File
@@ -363,6 +363,7 @@ mod tests {
db,
&[(o.clone(), time)],
&[Target {
sources: vec![],
position_generation: 0,
observation: o,
received_at_ms: time,
@@ -510,6 +511,7 @@ mod tests {
(observation(121.0, 5), 1004),
];
let active = vec![Target {
sources: vec![],
position_generation: 0,
observation: observation(121.0, 5),
received_at_ms: 1004,
@@ -524,6 +526,7 @@ mod tests {
&mut db,
&[],
&[Target {
sources: vec![],
position_generation: 0,
observation: observation(120.0, 6),
received_at_ms: 1005
@@ -565,6 +568,7 @@ mod tests {
db.execute_batch("CREATE TRIGGER reject_event BEFORE INSERT ON monitoring_events BEGIN SELECT RAISE(ABORT,'test'); END;").unwrap();
let o = observation(120.0, 1);
let active = vec![Target {
sources: vec![],
position_generation: 0,
observation: o.clone(),
received_at_ms: 1000,