feat(protocol): Observation坐标字段可选化及协议v2扩展

- 将Observation中longitude/latitude/altitude_m/heading_deg改为Option类型,
  支持无位置信息的观测数据
- 新增DeviceTelemetry结构体承载设备遥测扩展字段(serial, mac, model, rssi,
  speed, vertical_speed, pressure_altitude, geometric_altitude, height_agl,
  pilot_position等)
- 新增LegacyObservation兼容结构体及From转换,保持旧接收器协议输入兼容
- PROTOCOL_VERSION从1升至2
- 新增coordinates()辅助方法统一提取有效坐标
- validate()适配Option类型,允许坐标字段同时缺失
- Store新增position_generation机制追踪位置可用性变化,确保合并帧间的
  位置丢失仍能正确断开轨迹
- geofence-map-adapter过滤无效坐标避免渲染异常
- 新增appearance.css外观主题系统,支持blue/graphite/white三套配色
```
This commit is contained in:
2026-10-26 15:14:43 +08:00
parent 6157143a3e
commit 4eaa88baeb
38 changed files with 1285 additions and 123 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ func TestDownloadValidatesAndResumes(t *testing.T) {
calls := 0
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { calls++; w.Write(imageBytes.Bytes()) }))
defer server.Close()
r := request{Bounds: bounds{120.15, 30.28, 120.16, 30.29}, MinZoom: 11, MaxZoom: 11, Layers: []string{"vec_w"}, Output: t.TempDir(), BaseURL: server.URL + "/api/maps/tile"}
r := request{Bounds: bounds{120.15, 30.28, 120.16, 30.29}, MinZoom: 11, MaxZoom: 11, Layers: []string{"vec_w"}, Output: filepath.Join(t.TempDir(), "地图下载", "offline"), BaseURL: server.URL + "/api/maps/tile"}
body, _ := json.Marshal(r)
var output bytes.Buffer
if err := run(bytes.NewReader(body), &output); err != nil {