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
+3 -2
View File
@@ -6,7 +6,7 @@ $ridRepo = Split-Path $PSScriptRoot -Parent
if (-not $OutputRoot) { $OutputRoot = Join-Path $ridRepo 'dist' }
$ridOutputRoot = [IO.Path]::GetFullPath($OutputRoot)
$ridDestination = Join-Path $ridOutputRoot 'FPV-RID-Rust'
$ridWhitelist = @('fpv-rid-registry.exe', 'rid-map-downloader.exe', 'map-downloader-LICENSE.txt', '启动Rust版.cmd', '使用说明.md', 'third-party-licenses.txt', 'dependency-licenses.txt', 'build-info.json', 'SHA256SUMS.txt')
$ridWhitelist = @('fpv-rid-registry.exe', 'rid-map-downloader.exe', 'map-downloader-LICENSE.txt', '启动Rust版.cmd', '使用说明.md', 'config.example.json', 'third-party-licenses.txt', 'dependency-licenses.txt', 'build-info.json', 'SHA256SUMS.txt')
function Assert-CleanDestination {
if (Test-Path -LiteralPath $ridDestination) {
@@ -20,7 +20,7 @@ function Assert-CleanDestination {
}
function Get-RidSourceManifest {
$ridInputs = @('Cargo.toml','Cargo.lock','rust-toolchain.toml','build.rs') | ForEach-Object { Get-Item -LiteralPath (Join-Path $ridRepo $_) }
$ridInputs = @('Cargo.toml','Cargo.lock','rust-toolchain.toml','build.rs','config.example.json') | ForEach-Object { Get-Item -LiteralPath (Join-Path $ridRepo $_) }
$ridInputs += @('src','crates','xtask','scripts','.cargo') | ForEach-Object { Get-ChildItem -LiteralPath (Join-Path $ridRepo $_) -Recurse -File }
@($ridInputs | Sort-Object FullName | ForEach-Object { [ordered]@{path=$_.FullName.Substring($ridRepo.Length + 1).Replace('\','/');sha256=(Get-FileHash -LiteralPath $_.FullName -Algorithm SHA256).Hash} })
}
@@ -51,6 +51,7 @@ try {
Copy-Item -LiteralPath (Join-Path $PSScriptRoot 'map-downloader/LICENSE-upstream.txt') -Destination (Join-Path $ridStage 'map-downloader-LICENSE.txt')
Copy-Item -LiteralPath (Join-Path $ridRepo '启动Rust版.cmd') -Destination $ridStage
Copy-Item -LiteralPath (Join-Path $ridRepo 'doc/registry/rust/使用说明.md') -Destination $ridStage
Copy-Item -LiteralPath (Join-Path $ridRepo 'config.example.json') -Destination $ridStage
Copy-Item -LiteralPath (Join-Path $ridRepo 'crates/web-ui/public/vendor/LICENSE.txt') -Destination (Join-Path $ridStage 'third-party-licenses.txt')
$ridLicenses = cargo tree --workspace --locked --prefix none --format '{p} {l}'
if ($LASTEXITCODE -ne 0) { throw 'Dependency inventory failed' }