mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-06-22 20:21:13 +00:00
Compare commits
5 Commits
35547e9b65
...
5156453224
| Author | SHA1 | Date | |
|---|---|---|---|
| 5156453224 | |||
| 72a9df6b57 | |||
| 79997e39ac | |||
| dd9afe2797 | |||
| 5bf2dbd85f |
@@ -0,0 +1,27 @@
|
||||
.git
|
||||
.github
|
||||
.cursor
|
||||
_docs
|
||||
.venv
|
||||
__pycache__
|
||||
.pytest_cache
|
||||
.ruff_cache
|
||||
.mypy_cache
|
||||
.env
|
||||
.env.*
|
||||
*.pem
|
||||
*.key
|
||||
*.secret
|
||||
data/input/*
|
||||
data/cache/*
|
||||
data/fdr/*
|
||||
data/test-results/*
|
||||
*.tlog
|
||||
*.ulg
|
||||
*.bag
|
||||
*.mcap
|
||||
*.cbor
|
||||
*.parquet
|
||||
*.mp4
|
||||
*.mov
|
||||
*.avi
|
||||
@@ -0,0 +1,10 @@
|
||||
GPSD_ENV=development
|
||||
GPSD_CONFIG_DIR=./config/development
|
||||
GPSD_CACHE_DIR=./data/cache
|
||||
GPSD_FDR_DIR=./data/fdr
|
||||
GPSD_DATABASE_URL=postgresql://gpsd:gpsd@localhost:5432/gpsd
|
||||
GPSD_MAVLINK_URL=udp:127.0.0.1:14550
|
||||
GPSD_CAMERA_SOURCE=./data/input
|
||||
GPSD_SIGNING_KEY_REF=test-key-ref
|
||||
GPSD_MAX_FDR_BYTES=104857600
|
||||
GPSD_LOG_LEVEL=info
|
||||
@@ -0,0 +1,43 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
jobs:
|
||||
python-quality:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.10"
|
||||
- name: Install
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install -e ".[dev]"
|
||||
- name: Format check
|
||||
run: python -m black --check src tests
|
||||
- name: Lint
|
||||
run: python -m ruff check src tests
|
||||
- name: Unit tests
|
||||
run: python -m pytest tests/unit
|
||||
|
||||
replay-compose-smoke:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Validate compose files
|
||||
run: |
|
||||
docker compose -f docker-compose.yml config
|
||||
docker compose -f docker-compose.test.yml config
|
||||
- name: Collect artifact placeholders
|
||||
run: mkdir -p data/test-results e2e/reports
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: replay-evidence-placeholders
|
||||
path: |
|
||||
data/test-results
|
||||
e2e/reports
|
||||
+41
@@ -1 +1,42 @@
|
||||
.DS_Store
|
||||
.venv/
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
.pytest_cache/
|
||||
.ruff_cache/
|
||||
.mypy_cache/
|
||||
.coverage
|
||||
htmlcov/
|
||||
*.egg-info/
|
||||
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
*.pem
|
||||
*.key
|
||||
*.secret
|
||||
|
||||
data/input/*
|
||||
data/cache/*
|
||||
data/fdr/*
|
||||
data/test-results/*
|
||||
data/expected/*
|
||||
!data/input/.gitkeep
|
||||
!data/cache/.gitkeep
|
||||
!data/fdr/.gitkeep
|
||||
!data/test-results/.gitkeep
|
||||
!data/expected/.gitkeep
|
||||
|
||||
*.tlog
|
||||
*.ulg
|
||||
*.bag
|
||||
*.mcap
|
||||
*.cbor
|
||||
*.parquet
|
||||
*.mp4
|
||||
*.mov
|
||||
*.avi
|
||||
*.jpg
|
||||
*.jpeg
|
||||
*.png
|
||||
!_docs/00_problem/input_data/**
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# GPS-Denied Onboard Runtime
|
||||
|
||||
Scaffold for the Jetson-hosted GPS-denied localization runtime, replay harness, and
|
||||
deployment evidence paths.
|
||||
|
||||
The project uses a Python `src/` layout for orchestration code. Native bridge
|
||||
placeholders live inside the owning component folders rather than in a shared
|
||||
native tree.
|
||||
Generated mission data, FDR payloads, cache payloads, and raw frame dumps are kept
|
||||
out of git unless they are explicitly curated test fixtures.
|
||||
|
||||
## Local Development
|
||||
|
||||
```bash
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
python -m pip install -e ".[dev]"
|
||||
python -m pytest
|
||||
```
|
||||
|
||||
Local replay infrastructure is described in `docker-compose.yml`; CI and black-box
|
||||
test infrastructure are described in `docker-compose.test.yml`.
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
## Scope
|
||||
|
||||
`coordinates.csv` is the current source of truth for the provided nadir image set. It gives expected WGS84 frame-center coordinates for `AD000001.jpg` through `AD000060.jpg`.
|
||||
`coordinates.csv` is the current source of truth for the provided still-image nadir set. It gives expected WGS84 frame-center coordinates for `AD000001.jpg` through `AD000060.jpg`.
|
||||
|
||||
This data is sufficient for black-box frame-center geolocation tests against still images. It is not sufficient for final BASALT VIO, IMU-fusion, blackout, spoofing, or flight-controller tests because synchronized IMU/attitude/airspeed/altitude and ground-truth trajectory are not present in this sample set.
|
||||
This data is sufficient for black-box frame-center geolocation tests against still images. The Derkachi representative fixture in `input_data/flight_derkachi/` adds cropped nadir video plus synchronized `SCALED_IMU2` and `GLOBAL_POSITION_INT` telemetry. It is sufficient for fixture validation, video/telemetry synchronization, replay, latency, VIO smoke tests, and trajectory comparison against the tlog GPS path. It is not sufficient by itself for final production accuracy because raw camera calibration, lens distortion, and exact camera-to-body calibration are still pending.
|
||||
|
||||
## Pass / Fail Rules
|
||||
|
||||
@@ -15,6 +15,8 @@ This data is sufficient for black-box frame-center geolocation tests against sti
|
||||
|
||||
## Input To Expected Output Map
|
||||
|
||||
### Still-Image Frame Centers
|
||||
|
||||
| Input image | Expected latitude | Expected longitude | Primary threshold | Stretch threshold |
|
||||
|-------------|-------------------|--------------------|-------------------|-------------------|
|
||||
| AD000001.jpg | 48.275292 | 37.385220 | <= 50 m | <= 20 m |
|
||||
@@ -78,9 +80,18 @@ This data is sufficient for black-box frame-center geolocation tests against sti
|
||||
| AD000059.jpg | 48.255481 | 37.356501 | <= 50 m | <= 20 m |
|
||||
| AD000060.jpg | 48.256246 | 37.357485 | <= 50 m | <= 20 m |
|
||||
|
||||
### Representative Derkachi Video/IMU Fixture
|
||||
|
||||
| Input fixture | Expected validation result | Threshold |
|
||||
|---------------|----------------------------|-----------|
|
||||
| `flight_derkachi/data_imu.csv` | Telemetry CSV has required `timestamp(ms)`, `Time`, `SCALED_IMU2.*`, and `GLOBAL_POSITION_INT.*` columns; non-empty rows are monotonic from `Time=0.0` to `489.9` | 0 missing required columns; 0 decreasing timestamps; 4,900 nonblank rows |
|
||||
| `flight_derkachi/flight_derkachi.mp4` | Video stream is readable as cropped nadir footage for replay | H.264, 880 x 720, 30 fps, approximately 490.07 s |
|
||||
| Video/telemetry alignment | Video has 14,700 frames and telemetry has 4,900 rows | Exactly 3 video frames per telemetry row; duration delta <=250 ms |
|
||||
| Derkachi trajectory comparison | Replay output can be compared to `GLOBAL_POSITION_INT.lat`, `GLOBAL_POSITION_INT.lon`, `GLOBAL_POSITION_INT.alt`, `GLOBAL_POSITION_INT.relative_alt`, velocity, and heading | Thresholds are calibration-gated; use for smoke/relative trajectory validation until intrinsics and camera-to-body calibration are pinned |
|
||||
|
||||
## Known Gaps
|
||||
|
||||
- No synchronized IMU, attitude, airspeed, altitude, or timestamp stream is present for these images.
|
||||
- No ground-truth trajectory exists beyond per-image center coordinates.
|
||||
- The sample cadence is slower than the target 3 fps runtime profile.
|
||||
- Final acceptance requires additional public and representative datasets with synchronized camera/IMU/ground truth.
|
||||
- The still-image set has expected WGS84 centers but no synchronized IMU, attitude, airspeed, altitude, or timestamp stream.
|
||||
- The Derkachi fixture has synchronized video, IMU, and GPS trajectory, but no raw camera calibration, lens distortion, exact camera-to-body transform, attitude, or airspeed columns.
|
||||
- The still-image sample cadence is slower than the target 3 fps runtime profile; the Derkachi video is 30 fps and must be sampled to target replay cadence for runtime tests.
|
||||
- Final production acceptance requires camera calibration and representative datasets with synchronized camera/IMU plus ground-truth trajectory.
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# Derkachi Representative Flight Fixture
|
||||
|
||||
## Files
|
||||
|
||||
| File | Description | Observed Metadata |
|
||||
|------|-------------|-------------------|
|
||||
| `flight_derkachi.mp4` | Cropped nadir flight footage for replay | H.264, 880 x 720, 30 fps, about 490.07 s |
|
||||
| `data_imu.csv` | Flight-controller telemetry trace exported from the tlog | 4,900 rows at 10 Hz from `Time=0.0` to `489.9`; includes `SCALED_IMU2` and `GLOBAL_POSITION_INT` trajectory fields |
|
||||
|
||||
## Test Use
|
||||
|
||||
Use this fixture for video/telemetry synchronization checks, representative replay smoke tests, VIO hot-path latency, frame-drop accounting, and trajectory comparison against `GLOBAL_POSITION_INT`. The video and telemetry align at exactly three video frames per telemetry row. Camera intrinsics, lens distortion, raw camera resolution, and exact camera-to-body calibration are still unknown, so this fixture is not sufficient by itself for final production camera calibration or satellite-anchor accuracy claims.
|
||||
|
||||
For the test recording, the rotating camera was mechanically fixed in a downward/nadir orientation. Treat the MP4 as a cleaned/cropped replay fixture rather than the raw camera feed.
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9acb97042fc648301d73d3c0fe7d80f7e3e2697000c0d33afa8a7b7a74a20005
|
||||
size 282207328
|
||||
@@ -1,2 +1,2 @@
|
||||
We have a wing-type UAV with a fixed downward navigation camera that can take photos 3 times per second. The authoritative navigation-camera spec is defined in `restrictions.md` as the ADTi 20MP 20L V1, APS-C sensor, about 5472 x 3648 px; older higher-resolution references are superseded. Also plane has flight controller with IMU. During the plane flight, we know GPS coordinates initially. During the flight, GPS could be disabled or spoofed. We need to determine the GPS of the centers of the next frame from the camera. And also the coordinates of the center of any object in these photos. We can use an external satellite provider for ground checks on the existing photos. So, before the flight, UAV's operator should upload the satellite photos to the plane's companion PC.
|
||||
The real world examples are in input_data folder, but the distance between each photo is way bigger than it will be from a real plane. On that particular example photos were taken 1 photo per 2-3 seconds. But in real-world scenario frames would appear within the interval no more than 500ms. We also don't have IMU data for the test. For now we have to search for the public data for that in internet. We've tried to record that with Mavic 3 Pro Mini, but failed, cause of the closed system if DJI.
|
||||
The real world examples are in input_data folder, but the original still-image set has a much larger distance between photos than the target aircraft will have. On that particular example photos were taken 1 photo per 2-3 seconds. But in real-world scenario frames would appear within the interval no more than 500ms. Additional representative data is available in `input_data/flight_derkachi/`: cropped nadir flight footage plus synchronized `SCALED_IMU2` and `GLOBAL_POSITION_INT` telemetry. This supports video/telemetry synchronization, replay, latency, VIO smoke tests, and trajectory comparison against the tlog GPS path. Camera intrinsics, lens distortion, raw camera feed parameters, and exact camera-to-body calibration are still pending, so final production accuracy claims remain gated on calibration data or a separately surveyed representative dataset.
|
||||
@@ -46,7 +46,7 @@
|
||||
## Sensors & Integration
|
||||
|
||||
- High-rate **IMU** data is available from the flight controller via MAVLink.
|
||||
- The provided sample imagery does **not** include synchronized IMU or ground-truth pose. Prototype validation may use public datasets or synthetic IMU injection, but final acceptance claims require synchronized navigation-camera frames, FC IMU/attitude/airspeed/altitude, emitted MAVLink messages, and ground-truth trajectory from a representative flight or replay rig.
|
||||
- The original still-image sample does **not** include synchronized IMU or ground-truth pose. The Derkachi representative fixture adds cropped nadir video plus synchronized `SCALED_IMU2` and `GLOBAL_POSITION_INT` telemetry, which is enough for replay, synchronization, latency, VIO smoke tests, and trajectory comparison against the tlog GPS path. Final production acceptance still requires camera intrinsics, lens distortion, exact camera-to-body calibration, and representative synchronized navigation-camera frames, FC IMU/attitude/airspeed/altitude, emitted MAVLink messages, and ground-truth trajectory from a representative flight or replay rig.
|
||||
- The system communicates with the flight controller via MAVLink. Telemetry plumbing uses **MAVSDK**; the `GPS_INPUT` injection path is implemented via **pymavlink**, since MAVSDK does not expose a native `GPS_INPUT` API.
|
||||
- **Autopilot target: ArduPilot only** (with `GPS1_TYPE=14` for MAVLink GPS injection). PX4 is out of scope for the build; if it ever returns to scope it will use `VISION_POSITION_ESTIMATE`, not `GPS_INPUT`. (See `_docs/00_research/00_ac_assessment.md` Q-1.)
|
||||
- The system outputs WGS84 GPS coordinates to the flight controller as a replacement for the real GPS module (MAVLink GPS_INPUT, AC-4.3).
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
| Constraint Area | Binding Constraint |
|
||||
|-----------------|-------------------|
|
||||
| Camera | ADTi 20MP 20L V1, APS-C, ~5472 x 3648, fixed nadir, no gimbal stabilization. |
|
||||
| Sensors | FC IMU/attitude/airspeed/altitude available over MAVLink; sample data lacks synchronized IMU. |
|
||||
| Sensors | FC IMU/attitude/airspeed/altitude available over MAVLink; original still-image sample lacks synchronized IMU, while Derkachi replay data now provides synchronized IMU and `GLOBAL_POSITION_INT` trajectory. |
|
||||
| Reference imagery | Offline cache only, 0.5 m/px minimum and 0.3 m/px ideal, freshness gates, no in-flight provider fetch. |
|
||||
| Runtime | Jetson Orin Nano Super, CUDA/TensorRT available, 25 W thermal envelope. |
|
||||
| Autopilot | ArduPilot only, v1 emits `GPS_INPUT` only; ODOMETRY intentionally disabled. |
|
||||
|
||||
@@ -21,7 +21,7 @@ Image quality + calibration + orthorectification
|
||||
+--> Tile path: new COG tile + quality/provenance sidecar --> manifest update --> post-flight Satellite Service sync
|
||||
```
|
||||
|
||||
Heavy retrieval and local matching are not steady-state per-frame dependencies. They run on cold start, VO failure, sharp turns, disconnected segments, covariance growth, stale-anchor age, or operator-assisted relocalization.
|
||||
Heavy local retrieval and local matching are not steady-state per-frame dependencies. They run on cold start, VO failure, sharp turns, disconnected segments, covariance growth, stale-anchor age, or operator-assisted relocalization, using only preloaded cache/index data during flight.
|
||||
|
||||
## Architecture
|
||||
|
||||
@@ -42,7 +42,7 @@ Heavy retrieval and local matching are not steady-state per-frame dependencies.
|
||||
|
||||
BASALT does not replace the project-owned safety logic. The wrapper remains responsible for satellite anchor acceptance, confidence calibration, source labels, blackout/spoofing modes, tile-write eligibility, and MAVLink `GPS_INPUT` semantics.
|
||||
|
||||
### Satellite Retrieval And Anchor Verification
|
||||
### Satellite Service And Anchor Verification
|
||||
|
||||
| Solution | Tools | Pinned Mode/Config | Fit |
|
||||
|----------|-------|--------------------|-----|
|
||||
@@ -50,16 +50,16 @@ BASALT does not replace the project-owned safety logic. The wrapper remains resp
|
||||
| SuperPoint+LightGlue | SuperPoint, LightGlue | Same matcher with SuperPoint features | License-gated benchmark/fallback only. |
|
||||
| Classical SIFT/ORB | OpenCV | Handcrafted features + homography | Regression/fallback baseline. |
|
||||
|
||||
The VPR index is built over ground-footprint-sized chunks with overlap and a multi-scale descriptor set. VPR is invoked only on relocalization triggers or covariance/anchor-age growth; normal flight uses BASALT VIO plus wrapper propagation.
|
||||
The Satellite Service component imports mission cache/index packages before flight, uploads generated-tile packages after landing, and serves local VPR queries during flight. The VPR index is built over ground-footprint-sized chunks with overlap and a multi-scale descriptor set. VPR is invoked only on relocalization triggers or covariance/anchor-age growth; normal flight uses BASALT VIO plus wrapper propagation. No satellite-provider or Satellite Service network calls are allowed mid-flight.
|
||||
|
||||
### Cache And Tile Lifecycle
|
||||
### Tile Manager
|
||||
|
||||
| Solution | Tools | Pinned Mode/Config | Fit |
|
||||
|----------|-------|--------------------|-----|
|
||||
| COG tile objects + PostgreSQL/PostGIS manifest + signed JSON sidecars | GDAL COG, PostgreSQL/PostGIS, signed JSON sidecars, FAISS index files | Service tiles and generated tiles are write-new COG objects; active version selected by PostGIS-backed manifest | Selected. Fits geospatial raster access, provenance, spatial/freshness queries, and write-new tile lifecycle. |
|
||||
| PMTiles | PMTiles | Read-only archive snapshot | Rejected for live cache because in-flight tile generation needs mutable write-new objects. |
|
||||
|
||||
Service-source tiles and generated tiles carry CRS, capture date, source, m/px, freshness, quality score, sidecar hashes, and descriptor references. Stale tiles are rejected or down-confidence weighted.
|
||||
Service-source tiles and generated tiles carry CRS, capture date, source, m/px, freshness, quality score, sidecar hashes, and descriptor references. The Tile Manager also orthorectifies eligible nadir frames into generated COG tiles. Stale tiles are rejected or down-confidence weighted.
|
||||
|
||||
### MAVLink Integration
|
||||
|
||||
@@ -96,7 +96,7 @@ The system emits per-frame estimates locally and downsampled status to QGroundCo
|
||||
- DINOv2 descriptor fidelity: compare PyTorch/ONNX/TensorRT embeddings and retrieval rankings before accepting optimized engines.
|
||||
- FAISS CPU index tests: top-K recall, query latency, index size, save/load behavior on Jetson ARM64.
|
||||
- LightGlue extractor matrix: ALIKED vs DISK vs SIFT/ORB vs SuperPoint benchmark; SuperPoint excluded from production unless legal approves.
|
||||
- COG cache lifecycle: write-new generated tile, update manifest, verify active version and rollback.
|
||||
- Tile Manager: orthorectify eligible nadir frames into write-new generated tiles, update manifest, verify active version and rollback.
|
||||
- `GPS_INPUT` SITL: validate fix type, `horiz_accuracy`, velocity fields, ignore flags, `EK3_SRC1_*` parameters, QGC behavior.
|
||||
- Security gates: stale tile, mismatched tile hash, low inlier ratio, impossible velocity jump, and spoofed GPS during blackout.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## Executive Summary
|
||||
|
||||
The solution planning phase decomposed the GPS-denied onboard localization service into 9 implementation components, 2 cross-cutting foundation epics, a bootstrap epic, and a blackbox-test epic. The architecture centers on a Jetson-hosted hot path using camera ingest, BASALT VIO, and a project-owned safety/anchor wrapper, with triggered satellite retrieval and ALIKED/DISK-LightGlue anchor verification against an offline PostgreSQL/PostGIS-backed cache.
|
||||
The solution planning phase decomposed the GPS-denied onboard localization service into 8 runtime implementation components, 2 cross-cutting foundation epics, a bootstrap epic, and separate e2e/blackbox test epics. The architecture centers on a Jetson-hosted hot path using camera ingest, BASALT VIO, and a project-owned safety/anchor wrapper, with triggered Satellite Service candidate retrieval and ALIKED/DISK-LightGlue anchor verification against an offline PostgreSQL/PostGIS-backed cache.
|
||||
|
||||
Jira epics were created in project `AZ` from AZ-206 through AZ-218. Total estimated effort across epics is approximately 87-141 story points, with large work intentionally decomposed into child tasks of 2, 3, or 5 points where possible.
|
||||
|
||||
@@ -23,32 +23,32 @@ The system is a trigger-based hybrid estimator. Normal flight uses camera ingest
|
||||
| # | Component | Purpose | Dependencies | Epic |
|
||||
|---|-----------|---------|--------------|------|
|
||||
| 01 | Camera Ingest And Calibration | Ingest frames, validate calibration, detect total occlusion before VIO | Bootstrap, shared geometry/time, config/errors | AZ-209 |
|
||||
| 02 | BASALT VIO Adapter | Wrap BASALT relative VIO and emit replaceable state DTOs | Camera, MAVLink telemetry, shared helpers | AZ-213 |
|
||||
| 02 | VIO Adapter | Wrap the selected relative VIO backend and emit replaceable state DTOs | Camera, MAVLink telemetry, shared helpers | AZ-213 |
|
||||
| 03 | Safety And Anchor Wrapper | Own localization state, covariance, anchors, blackout/failsafe, output semantics | Camera, MAVLink, VIO, anchor verification | AZ-216 |
|
||||
| 04 | Satellite Retrieval | Retrieve VPR candidates from cache descriptors and FAISS | Camera, cache lifecycle, shared helpers | AZ-214 |
|
||||
| 05 | Anchor Verification | Verify retrieved candidates with learned matching and RANSAC | Retrieval, camera, cache lifecycle | AZ-215 |
|
||||
| 06 | Cache And Tile Lifecycle | Manage COGs, PostGIS manifests, sidecars, freshness, generated tiles | Bootstrap, shared helpers, config/errors | AZ-211 |
|
||||
| 04 | Satellite Service | Sync Satellite Service cache/upload packages and retrieve local VPR candidates from cache descriptors and FAISS | Camera, Tile Manager, shared helpers | AZ-214 |
|
||||
| 05 | Anchor Verification | Verify retrieved candidates with learned matching and RANSAC | Satellite Service, camera, Tile Manager | AZ-215 |
|
||||
| 06 | Tile Manager | Manage COGs, PostGIS manifests, sidecars, freshness, and orthorectified generated tiles | Bootstrap, shared helpers, config/errors | AZ-211 |
|
||||
| 07 | MAVLink And GCS Integration | Consume FC telemetry and emit v1 `GPS_INPUT`/QGC status | Bootstrap, config/errors | AZ-210 |
|
||||
| 08 | FDR And Observability | Record bounded replayable evidence and status | Bootstrap, config/errors, runtime DTOs | AZ-212 |
|
||||
| 09 | Validation Harness | Drive blackbox, public replay, SITL, Jetson, and release evidence tests | All runtime components | AZ-217 |
|
||||
| Test | E2E Test Suite | Separate black-box replay, SITL, Jetson, and release evidence tests; not onboard runtime | All runtime components | AZ-217 |
|
||||
|
||||
**Implementation order**:
|
||||
1. Bootstrap and cross-cutting foundations: AZ-206, AZ-207, AZ-208.
|
||||
2. Independent adapters/stores: AZ-209, AZ-210, AZ-211, AZ-212.
|
||||
3. Estimation/relocalization: AZ-213, AZ-214, AZ-215.
|
||||
4. Safety orchestration: AZ-216.
|
||||
5. Validation and blackbox test implementation: AZ-217, AZ-218.
|
||||
5. Separate e2e/blackbox test implementation: AZ-217, AZ-218.
|
||||
|
||||
## System Flows
|
||||
|
||||
| Flow | Description | Key Components |
|
||||
|------|-------------|----------------|
|
||||
| Pre-flight cache preparation | Validate offline cache, sidecars, descriptors, and indexes | Cache lifecycle, retrieval |
|
||||
| Pre-flight cache preparation | Validate offline cache, sidecars, descriptors, and indexes | Satellite Service, Tile Manager |
|
||||
| Normal frame processing | Route usable frames through BASALT; route total occlusion to IMU-only degraded path | Camera, BASALT, safety, MAVLink, FDR |
|
||||
| Satellite relocalization | Retrieve and verify cache candidates, then accept/reject anchors | Safety, retrieval, anchor verification, cache |
|
||||
| Satellite relocalization | Retrieve and verify cache candidates, then accept/reject anchors | Safety, Satellite Service, anchor verification, Tile Manager |
|
||||
| Visual blackout / spoofing | Propagate IMU-only from last trusted state and fail safe at thresholds | Camera, safety, MAVLink, QGC, FDR |
|
||||
| Generated tile lifecycle | Write generated COG candidates only under covariance/quality gates | Safety, cache, FDR |
|
||||
| Post-flight sync and audit | Package generated tiles and FDR evidence | Cache, FDR, Satellite Service |
|
||||
| Generated tile lifecycle | Write generated COG candidates only under covariance/quality gates | Safety, Tile Manager, FDR |
|
||||
| Post-flight sync and audit | Package generated tiles and FDR evidence | Tile Manager, FDR, Satellite Service |
|
||||
| Validation replay | Exercise runtime through public interfaces | Validation harness, all runtime components |
|
||||
|
||||
See `system-flows.md` for full diagrams and details.
|
||||
@@ -72,14 +72,14 @@ See `risk_mitigations.md` for the full register.
|
||||
| Component | Integration | Performance | Security | Acceptance | AC Coverage |
|
||||
|-----------|-------------|-------------|----------|------------|-------------|
|
||||
| Camera Ingest And Calibration | 3 | 1 | 1 | 2 | 7 ACs |
|
||||
| BASALT VIO Adapter | 4 | 1 | 1 | 1 | 8 ACs |
|
||||
| VIO Adapter | 4 | 1 | 1 | 1 | 8 ACs |
|
||||
| Safety And Anchor Wrapper | 7 | 1 | 1 | 3 | 15 ACs |
|
||||
| Satellite Retrieval | 4 | 2 | 1 | 1 | 10 ACs |
|
||||
| Satellite Service | 4 | 2 | 1 | 1 | 10 ACs |
|
||||
| Anchor Verification | 2 | 1 | 2 | 1 | 9 ACs |
|
||||
| Cache And Tile Lifecycle | 4 | 1 | 3 | 1 | 10 ACs |
|
||||
| Tile Manager | 4 | 1 | 3 | 1 | 10 ACs |
|
||||
| MAVLink And GCS Integration | 6 | 2 | 1 | 1 | 10 ACs |
|
||||
| FDR And Observability | 6 | 1 | 1 | 1 | 11 ACs |
|
||||
| Validation Harness | 9 | 2 | 1 | 2 | All AC groups |
|
||||
| E2E Test Suite | 9 | 2 | 1 | 2 | All AC groups |
|
||||
|
||||
**Overall acceptance criteria coverage**: 39 / 39 acceptance criteria covered (100%).
|
||||
**Restrictions coverage**: 10 / 10 restriction groups covered (100%).
|
||||
@@ -93,13 +93,13 @@ See `risk_mitigations.md` for the full register.
|
||||
| 3 | AZ-208: Cross-Cutting: Runtime Configuration And Errors | Shared helper | S-M / 3-5 pts | AZ-206 |
|
||||
| 4 | AZ-209: Camera Ingest And Calibration | Component 01 | M / 5-8 pts | AZ-206, AZ-207, AZ-208 |
|
||||
| 5 | AZ-210: MAVLink And GCS Integration | Component 07 | M / 5-8 pts | AZ-206, AZ-208 |
|
||||
| 6 | AZ-211: Cache And Tile Lifecycle | Component 06 | L / 8-13 pts | AZ-206, AZ-207, AZ-208 |
|
||||
| 6 | AZ-211: Tile Manager | Component 06 | L / 8-13 pts | AZ-206, AZ-207, AZ-208 |
|
||||
| 7 | AZ-212: FDR And Observability | Component 08 | M-L / 5-8 pts | AZ-206, AZ-208 |
|
||||
| 8 | AZ-213: BASALT VIO Adapter | Component 02 | L / 8-13 pts | AZ-209, AZ-210 |
|
||||
| 9 | AZ-214: Satellite Retrieval | Component 04 | L / 8-13 pts | AZ-209, AZ-211 |
|
||||
| 8 | AZ-213: VIO Adapter | Component 02 | L / 8-13 pts | AZ-209, AZ-210 |
|
||||
| 9 | AZ-214: Satellite Service | Component 04 | L / 8-13 pts | AZ-209, AZ-211 |
|
||||
| 10 | AZ-215: Anchor Verification | Component 05 | L / 8-13 pts | AZ-214, AZ-209, AZ-211 |
|
||||
| 11 | AZ-216: Safety And Anchor Wrapper | Component 03 | XL / 13-21 pts | AZ-209, AZ-210, AZ-213, AZ-215 |
|
||||
| 12 | AZ-217: Validation Harness | Component 09 | L / 8-13 pts | Component epics |
|
||||
| 12 | AZ-217: E2E Test Suite | Separate test support | L / 8-13 pts | Component epics |
|
||||
| 13 | AZ-218: Blackbox Tests | System tests | L / 8-13 pts | AZ-217, component epics |
|
||||
|
||||
**Total estimated effort**: 87-141 story points.
|
||||
|
||||
@@ -7,18 +7,18 @@ Build a Jetson-hosted onboard localization pipeline for fixed-wing GPS-denied fl
|
||||
### Components / Responsibilities
|
||||
|
||||
- Camera ingest/calibration: load frames, apply intrinsics/extrinsics, validate image quality.
|
||||
- BASALT VIO adapter: produce relative camera+IMU motion from synchronized nav frames and FC IMU.
|
||||
- VIO adapter: produce relative camera+IMU motion from synchronized nav frames and FC IMU.
|
||||
- Safety/anchor wrapper: own covariance calibration, source labels, degraded modes, anchor fusion, and `GPS_INPUT`.
|
||||
- Satellite retrieval: retrieve VPR chunks from offline descriptor indexes.
|
||||
- Satellite Service: sync mission cache packages before flight, upload generated-tile packages after flight, and serve local VPR candidate retrieval from the offline cache.
|
||||
- Anchor verification: run local matching/RANSAC and reject unsafe anchors.
|
||||
- Cache/tile lifecycle: manage COGs, manifests, freshness, generated tiles, and sync metadata.
|
||||
- Tile Manager: manage COGs, manifests, freshness/provenance, orthorectified generated tiles, and local tile metadata.
|
||||
- MAVLink/GCS integration: consume FC telemetry and emit `GPS_INPUT`/QGC status.
|
||||
- FDR/observability: record replayable mission evidence under storage caps.
|
||||
- Validation harness: run still-image, public dataset, SITL, Jetson, and representative replay tests.
|
||||
|
||||
### Principles / Non-Negotiables
|
||||
|
||||
- No in-flight satellite-provider calls; runtime uses offline cache only.
|
||||
- No in-flight satellite-provider or Satellite Service calls; runtime uses offline cache only.
|
||||
- BASALT is a VIO component, not the safety authority.
|
||||
- Confidence must be honest; covariance must grow in degraded modes.
|
||||
- Heavy VPR/local matching is trigger-based, not per-frame.
|
||||
@@ -33,7 +33,7 @@ Build a Jetson-hosted onboard localization pipeline for fixed-wing GPS-denied fl
|
||||
|
||||
**System boundaries**:
|
||||
|
||||
- In scope: onboard localization runtime, offline cache consumption, BASALT VIO integration, satellite anchor verification, MAVLink output, QGC status, FDR, generated tile metadata, validation harness.
|
||||
- In scope: onboard localization runtime, offline cache consumption, BASALT VIO integration, satellite anchor verification, MAVLink output, QGC status, FDR, generated tile metadata, and a separate e2e/black-box test suite.
|
||||
- Out of scope: upstream commercial satellite-provider sourcing, Satellite Service ingest implementation, AI mission-camera detection itself, PX4 support, raw-frame retention as a normal operating mode.
|
||||
|
||||
**External systems**:
|
||||
@@ -42,7 +42,7 @@ Build a Jetson-hosted onboard localization pipeline for fixed-wing GPS-denied fl
|
||||
|--------|------------------|-----------|---------|
|
||||
| ArduPilot Plane FC | MAVLink | Inbound/Outbound | FC telemetry in, `GPS_INPUT` and status out |
|
||||
| QGroundControl | MAVLink telemetry | Outbound | Downsampled operator status and failsafe messages |
|
||||
| Azaion Suite Satellite Service | Offline file/cache sync | Inbound before flight, outbound after landing | Provides cache and receives generated tiles |
|
||||
| Azaion Suite Satellite Service | Offline file/cache sync | Inbound before flight, outbound after landing | Provides mission cache packages and receives generated-tile packages; never called mid-flight |
|
||||
| Public/replay datasets | File/rosbag/fixture | Inbound to validation | De-risk BASALT, VPR, and anchor logic |
|
||||
|
||||
## 2. Technology Stack
|
||||
@@ -97,12 +97,12 @@ Build a Jetson-hosted onboard localization pipeline for fixed-wing GPS-denied fl
|
||||
|--------|-------------|--------------------|
|
||||
| FrameRecord | Navigation-camera frame metadata, total-occlusion status, and processing status | Camera ingest/calibration |
|
||||
| TelemetrySample | FC IMU, attitude, airspeed, altitude, GPS health | MAVLink/GCS integration |
|
||||
| VioState | BASALT-relative pose/velocity/bias output and quality metadata | BASALT VIO adapter |
|
||||
| VioState | Backend-relative pose/velocity/bias output and quality metadata | VIO adapter |
|
||||
| PositionEstimate | WGS84 estimate, covariance, source label, fix type, anchor age | Safety/anchor wrapper |
|
||||
| VprChunk | Retrieval unit over cache imagery and descriptors | Satellite retrieval |
|
||||
| VprChunk | Retrieval unit over cache imagery and descriptors | Satellite Service |
|
||||
| AnchorCandidate | Retrieved tile/chunk with local-match and RANSAC evidence | Anchor verification |
|
||||
| CacheTile | COG tile plus manifest and sidecar metadata | Cache/tile lifecycle |
|
||||
| GeneratedTile | In-flight orthorectified tile with trust/provenance metadata | Cache/tile lifecycle |
|
||||
| CacheTile | COG tile plus manifest and sidecar metadata | Tile Manager |
|
||||
| GeneratedTile | In-flight orthorectified tile with trust/provenance metadata | Tile Manager |
|
||||
| FdrSegment | Bounded replayable log segment | FDR/observability |
|
||||
|
||||
**Data flow summary**:
|
||||
@@ -117,11 +117,11 @@ Build a Jetson-hosted onboard localization pipeline for fixed-wing GPS-denied fl
|
||||
|
||||
| From | To | Protocol | Pattern | Notes |
|
||||
|------|----|----------|---------|-------|
|
||||
| Camera ingest/calibration | BASALT VIO adapter | In-process queue or shared frame bus | Streaming | Timestamp discipline is critical |
|
||||
| MAVLink telemetry | BASALT VIO adapter | In-process telemetry buffer | Streaming | IMU/attitude/altitude sync |
|
||||
| BASALT VIO adapter | Safety/anchor wrapper | Typed state messages | Streaming | Wrapper calibrates confidence |
|
||||
| Safety/anchor wrapper | Satellite retrieval | Command | Triggered request | Only on relocalization conditions |
|
||||
| Satellite retrieval | Anchor verification | Candidate list | Request-response | Dynamic top-K |
|
||||
| Camera ingest/calibration | VIO adapter | In-process queue or shared frame bus | Streaming | Timestamp discipline is critical |
|
||||
| MAVLink telemetry | VIO adapter | In-process telemetry buffer | Streaming | IMU/attitude/altitude sync |
|
||||
| VIO adapter | Safety/anchor wrapper | Typed state messages | Streaming | Wrapper calibrates confidence |
|
||||
| Safety/anchor wrapper | Satellite Service | Command | Triggered local request | Uses only preloaded cache/index data during flight |
|
||||
| Satellite Service | Anchor verification | Candidate list | Request-response | Dynamic top-K |
|
||||
| Anchor verification | Safety/anchor wrapper | Anchor decision | Request-response | Includes MRE/inliers/provenance |
|
||||
| Safety/anchor wrapper | MAVLink/GCS integration | Position/status DTO | Streaming | `GPS_INPUT` emitted frame-by-frame |
|
||||
| Safety/anchor wrapper | FDR/observability | Append-only events | Streaming | Bounded segments |
|
||||
@@ -132,7 +132,7 @@ Build a Jetson-hosted onboard localization pipeline for fixed-wing GPS-denied fl
|
||||
|-----------------|----------|------|--------------|
|
||||
| ArduPilot Plane | MAVLink | Source/system ID allowlist | Degrade/failsafe; never trust spoofed GPS blindly |
|
||||
| QGroundControl | MAVLink | FC telemetry path | Downsampled status may be delayed but local FDR remains authoritative |
|
||||
| Satellite Service | Offline cache files | Signed manifests/sidecars | Missing/stale cache causes degraded mode, not network fetch |
|
||||
| Azaion Suite Satellite Service | Offline package sync | Signed manifests/sidecars | Missing/stale cache causes degraded mode, not mid-flight network fetch |
|
||||
| Public datasets | File/rosbag | License constraints | Not final acceptance unless representative and license-compatible |
|
||||
|
||||
## 6. Non-Functional Requirements
|
||||
@@ -157,7 +157,7 @@ Build a Jetson-hosted onboard localization pipeline for fixed-wing GPS-denied fl
|
||||
**Data protection**:
|
||||
|
||||
- At rest: FDR and cache sidecars should be integrity protected; mission secrets/signing keys are not stored in code.
|
||||
- In transit: no in-flight satellite-provider network dependency; MAVLink link security depends on FC/GCS deployment.
|
||||
- In transit: no in-flight satellite-provider or Satellite Service network dependency; MAVLink link security depends on FC/GCS deployment.
|
||||
|
||||
**Audit logging**:
|
||||
|
||||
@@ -204,7 +204,7 @@ Build a Jetson-hosted onboard localization pipeline for fixed-wing GPS-denied fl
|
||||
1. JSON-only manifest — simpler, but weak for query/update scale, spatial search, and consistency.
|
||||
2. Embedded single-file metadata DB — efficient for small deployments, but rejected because the project will use PostgreSQL/PostGIS.
|
||||
|
||||
**Consequences**: The cache lifecycle component owns PostgreSQL migrations, PostGIS indexes, signature checks, and sidecar/db consistency.
|
||||
**Consequences**: The Tile Manager owns PostgreSQL migrations, PostGIS indexes, signature checks, generated-tile orthorectification metadata, and sidecar/db consistency.
|
||||
|
||||
### ADR-004: FDR Format
|
||||
|
||||
@@ -234,7 +234,7 @@ Build a Jetson-hosted onboard localization pipeline for fixed-wing GPS-denied fl
|
||||
|
||||
### ADR-005: Public Dataset Strategy
|
||||
|
||||
**Context**: Current project sample data lacks synchronized IMU and ground-truth trajectory.
|
||||
**Context**: The original still-image sample lacks synchronized IMU and ground-truth trajectory. The Derkachi fixture adds cropped nadir video synchronized with IMU and `GLOBAL_POSITION_INT` trajectory, but camera intrinsics, distortion, and camera-to-body calibration remain pending.
|
||||
|
||||
**Decision**: Prioritize MUN-FRL for synchronized nadir camera + IMU + GNSS/ground truth; use ALTO for aerial localization/VPR and long nadir trajectories; investigate Kagaru/EPFL for fixed-wing/farmland relevance; use EuRoC/UZH FPV only as VIO proxies if license-compatible.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## Purpose
|
||||
|
||||
Shared geospatial and camera-geometry utilities used by camera ingest, safety wrapper, cache lifecycle, anchor verification, and validation.
|
||||
Shared geospatial and camera-geometry utilities used by camera ingest, safety wrapper, Tile Manager, anchor verification, and validation.
|
||||
|
||||
## Responsibilities
|
||||
|
||||
@@ -26,5 +26,5 @@ Shared geospatial and camera-geometry utilities used by camera ingest, safety wr
|
||||
| Camera ingest/calibration | Footprint and calibration sanity checks |
|
||||
| Safety/anchor wrapper | Distance/covariance/unit conversion |
|
||||
| Anchor verification | Pixel-to-ground error reporting |
|
||||
| Cache/tile lifecycle | Tile footprint metadata |
|
||||
| Tile Manager | Tile footprint metadata |
|
||||
| Validation harness | Error thresholds and reports |
|
||||
|
||||
@@ -23,7 +23,7 @@ Shared timestamp validation and alignment utilities for frame, IMU, telemetry, F
|
||||
| Component | Usage |
|
||||
|-----------|-------|
|
||||
| Camera ingest/calibration | Frame ordering and timestamp metadata |
|
||||
| BASALT VIO adapter | IMU/frame synchronization |
|
||||
| VIO adapter | IMU/frame synchronization |
|
||||
| MAVLink/GCS integration | Telemetry timestamp normalization |
|
||||
| FDR/observability | Segment ordering |
|
||||
| Validation harness | Fixture validation |
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
**Upstream dependencies**: Navigation camera, camera calibration files.
|
||||
|
||||
**Downstream consumers**: BASALT VIO adapter, satellite retrieval, anchor verification, cache/tile lifecycle, FDR.
|
||||
**Downstream consumers**: VIO adapter, Satellite Service, anchor verification, Tile Manager, FDR.
|
||||
|
||||
## 2. Internal Interfaces
|
||||
|
||||
@@ -82,7 +82,7 @@ ImageQualityReport:
|
||||
|
||||
| Helper | Purpose | Used By |
|
||||
|--------|---------|---------|
|
||||
| `geo_geometry_helper` | Coordinate transforms, GSD, WGS84/local conversions | Camera ingest, safety wrapper, cache lifecycle |
|
||||
| `geo_geometry_helper` | Coordinate transforms, GSD, WGS84/local conversions | Camera ingest, safety wrapper, Tile Manager |
|
||||
|
||||
## 6. Caveats & Edge Cases
|
||||
|
||||
@@ -98,9 +98,9 @@ ImageQualityReport:
|
||||
|
||||
**Must be implemented after**: none.
|
||||
|
||||
**Can be implemented in parallel with**: cache/tile lifecycle, MAVLink/GCS integration.
|
||||
**Can be implemented in parallel with**: Tile Manager, MAVLink/GCS integration.
|
||||
|
||||
**Blocks**: BASALT VIO adapter, anchor verification, generated tile lifecycle.
|
||||
**Blocks**: VIO adapter, anchor verification, generated tile lifecycle.
|
||||
|
||||
## 8. Logging Strategy
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
**Max execution time**: 100 ms per frame.
|
||||
|
||||
**Dependencies**: Cache lifecycle test double.
|
||||
**Dependencies**: Tile Manager test double.
|
||||
|
||||
## Performance Tests
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
| Step | Action | Expected Result |
|
||||
|------|--------|-----------------|
|
||||
| 1 | Feed a calibrated normal frame | Occlusion status is `clear` |
|
||||
| 2 | Process quality gate | Frame is emitted to BASALT adapter |
|
||||
| 2 | Process quality gate | Frame is emitted to VIO adapter |
|
||||
|
||||
---
|
||||
|
||||
|
||||
+9
-9
@@ -1,14 +1,14 @@
|
||||
# BASALT VIO Adapter
|
||||
# VIO Adapter
|
||||
|
||||
## 1. High-Level Overview
|
||||
|
||||
**Purpose**: Wrap BASALT as a replaceable relative VIO component that consumes calibrated frames and FC IMU data, then emits relative pose/velocity/bias state and tracking quality.
|
||||
**Purpose**: Wrap the selected relative VIO backend as a replaceable component that consumes calibrated frames and FC IMU data, then emits relative pose/velocity/bias state and tracking quality.
|
||||
|
||||
**Architectural Pattern**: Adapter / anti-corruption layer.
|
||||
|
||||
**Upstream dependencies**: Camera ingest/calibration, MAVLink telemetry stream.
|
||||
|
||||
**Downstream consumers**: Safety/anchor wrapper, validation harness, FDR.
|
||||
**Downstream consumers**: Safety/anchor wrapper, FDR, separate e2e test suite.
|
||||
|
||||
## 2. Internal Interfaces
|
||||
|
||||
@@ -48,14 +48,14 @@ No persistent production data ownership. Reads calibration/config at startup and
|
||||
|
||||
## 4. Implementation Details
|
||||
|
||||
**State Management**: Owns BASALT runtime state and resets only through explicit wrapper command.
|
||||
**State Management**: Owns selected VIO backend runtime state and resets only through explicit wrapper command.
|
||||
|
||||
**Key Dependencies**:
|
||||
|
||||
| Library | Purpose |
|
||||
|---------|---------|
|
||||
| BASALT | Relative visual-inertial odometry |
|
||||
| Eigen/Sophus or BASALT native math stack | Pose and transform representation |
|
||||
| BASALT | Current selected relative visual-inertial odometry backend |
|
||||
| Eigen/Sophus or backend-native math stack | Pose and transform representation |
|
||||
|
||||
**Error Handling Strategy**:
|
||||
- Tracking loss is surfaced to the safety/anchor wrapper, not hidden.
|
||||
@@ -66,7 +66,7 @@ No persistent production data ownership. Reads calibration/config at startup and
|
||||
|
||||
**Known limitations**:
|
||||
- BASALT has no special fixed-wing nadir mode; validation must prove fit under low-parallax/planar terrain.
|
||||
- BASALT covariance/confidence output is not the product authority; wrapper calibration is required.
|
||||
- Backend covariance/confidence output is not the product authority; wrapper calibration is required.
|
||||
|
||||
**Performance bottlenecks**:
|
||||
- Native VIO runtime and image resolution can exceed Jetson budget if not tuned.
|
||||
@@ -75,7 +75,7 @@ No persistent production data ownership. Reads calibration/config at startup and
|
||||
|
||||
**Must be implemented after**: Camera ingest/calibration, MAVLink telemetry DTO definitions.
|
||||
|
||||
**Can be implemented in parallel with**: satellite retrieval, cache lifecycle.
|
||||
**Can be implemented in parallel with**: Satellite Service, Tile Manager.
|
||||
|
||||
**Blocks**: Safety/anchor wrapper final integration.
|
||||
|
||||
@@ -83,7 +83,7 @@ No persistent production data ownership. Reads calibration/config at startup and
|
||||
|
||||
| Log Level | When | Example |
|
||||
|-----------|------|---------|
|
||||
| ERROR | BASALT initialization fails | `basalt_init_failed reason=...` |
|
||||
| ERROR | VIO backend initialization fails | `vio_init_failed reason=...` |
|
||||
| WARN | Tracking quality drops | `vio_tracking_degraded quality=...` |
|
||||
| INFO | VIO reset/reinitialized | `vio_reset cause=...` |
|
||||
|
||||
+10
-9
@@ -1,4 +1,4 @@
|
||||
# Test Specification — BASALT VIO Adapter
|
||||
# Test Specification — VIO Adapter
|
||||
|
||||
## Acceptance Criteria Traceability
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
|
||||
### IT-01: Public Dataset VIO Replay
|
||||
|
||||
**Summary**: Verify BASALT adapter produces relative motion for synchronized camera/IMU replay.
|
||||
**Summary**: Verify the VIO adapter produces relative motion for synchronized camera/IMU replay.
|
||||
|
||||
**Traces to**: AC-2.1a, AC-2.2
|
||||
|
||||
**Input data**: MUN-FRL preferred slice, or representative synchronized nav-camera + IMU + ground truth.
|
||||
**Input data**: Derkachi cropped nadir video + `SCALED_IMU2` + `GLOBAL_POSITION_INT`, MUN-FRL preferred slice, or representative synchronized nav-camera + IMU + ground truth.
|
||||
|
||||
**Expected result**: VO registration succeeds for >95% of normal usable frames; frame-to-frame MRE <1.0 px where ground-truth/feature evaluation supports it.
|
||||
**Expected result**: VO registration succeeds for >95% of normal usable frames; frame-to-frame MRE <1.0 px where ground-truth/feature evaluation supports it. Derkachi runs are accepted as calibration-limited until intrinsics, distortion, and camera-to-body transform are pinned.
|
||||
|
||||
**Max execution time**: Dataset-dependent; report per-frame latency.
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
**Traces to**: AC-3.1
|
||||
|
||||
**Input data**: Replay segment with synthetic ±20° tilt and up to 350 m apparent outlier.
|
||||
**Input data**: Replay segment with synthetic +/-20 degree tilt and up to 350 m apparent outlier.
|
||||
|
||||
**Expected result**: Adapter either tracks with quality metadata or emits `TrackingLost`; it never hides a failure as high-quality VIO.
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
**Traces to**: AC-3.2, AC-3.4
|
||||
|
||||
**Input data**: <5% overlap sequence with heading change <70°.
|
||||
**Input data**: <5% overlap sequence with heading change <70 degrees.
|
||||
|
||||
**Expected result**: Adapter emits low tracking quality or `TrackingLost` within the loss window, allowing relocalization trigger.
|
||||
|
||||
@@ -75,14 +75,14 @@
|
||||
|
||||
## Performance Tests
|
||||
|
||||
### PT-01: BASALT Adapter Runtime Budget
|
||||
### PT-01: VIO Adapter Runtime Budget
|
||||
|
||||
**Summary**: Verify VIO processing does not consume the full <400 ms system p95 budget.
|
||||
|
||||
**Traces to**: AC-4.1, AC-4.2
|
||||
|
||||
**Load scenario**:
|
||||
- Input: synchronized public/representative replay.
|
||||
- Input: Derkachi synchronized replay and public/representative replay.
|
||||
- Duration: 30 minutes plus release long-run slice.
|
||||
- Target: Jetson Orin Nano Super.
|
||||
|
||||
@@ -130,8 +130,9 @@
|
||||
|
||||
| Data Set | Description | Source | Size |
|
||||
|----------|-------------|--------|------|
|
||||
| `derkachi_video_telemetry` | Cropped nadir MP4 + synchronized IMU and `GLOBAL_POSITION_INT` trajectory | Project fixture | ~282 MB video + CSV |
|
||||
| `public_nadir_vio_candidates` | MUN-FRL/ALTO/Kagaru/EPFL slices | Public pinned fixtures | Dataset-dependent |
|
||||
| `representative_sync_replay` | Target camera + FC IMU + ground truth | Project collection | TBD |
|
||||
| `representative_sync_replay` | Target camera + FC IMU + calibrated ground truth | Project collection | TBD |
|
||||
|
||||
**Setup procedure**: Pin calibration/extrinsics and mount read-only synchronized replay data.
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
|
||||
**Architectural Pattern**: Stateful coordinator / safety facade.
|
||||
|
||||
**Upstream dependencies**: BASALT VIO adapter, anchor verification, MAVLink telemetry, camera quality reports.
|
||||
**Upstream dependencies**: VIO adapter, anchor verification, MAVLink telemetry, camera quality reports.
|
||||
|
||||
**Downstream consumers**: MAVLink/GCS integration, FDR, cache/tile lifecycle, validation harness.
|
||||
**Downstream consumers**: MAVLink/GCS integration, FDR, Tile Manager, separate e2e test suite.
|
||||
|
||||
## 2. Internal Interfaces
|
||||
|
||||
@@ -73,7 +73,7 @@ No direct tile/image storage ownership. Writes all decisions to FDR via observab
|
||||
- Never emit optimistic accuracy when confidence is degraded.
|
||||
- On total occlusion or visual blackout, do not call VIO for that frame; propagate from the last trusted state with IMU-only dynamics, set `source_label=dead_reckoned`, and grow covariance monotonically.
|
||||
- If covariance or blackout thresholds exceed AC limits, emit no-fix/failsafe semantics.
|
||||
- Treat cache freshness and provenance as evidence carried by `AnchorDecision`; do not call the cache lifecycle component directly during anchor acceptance.
|
||||
- Treat cache freshness and provenance as evidence carried by `AnchorDecision`; do not call the Tile Manager directly during anchor acceptance.
|
||||
|
||||
## 5. Caveats & Edge Cases
|
||||
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
# Satellite Retrieval
|
||||
# Satellite Service
|
||||
|
||||
## 1. High-Level Overview
|
||||
|
||||
**Purpose**: Convert a query frame and prior state into ranked satellite/cache VPR chunk candidates using DINOv2-VLAD descriptors and FAISS.
|
||||
**Purpose**: Own the onboard boundary to the suite Satellite Service: import pre-flight mission cache packages, upload generated-tile packages after flight, and convert query frames into ranked local VPR candidates using preloaded DINOv2-VLAD descriptors and FAISS.
|
||||
|
||||
**Architectural Pattern**: Query service / retrieval index adapter.
|
||||
**Architectural Pattern**: Offline sync gateway + local retrieval index adapter.
|
||||
|
||||
**Upstream dependencies**: Camera ingest/calibration, cache/tile lifecycle, safety/anchor wrapper.
|
||||
**Upstream dependencies**: Camera ingest/calibration, Tile Manager, safety/anchor wrapper, Azaion Suite Satellite Service before/after flight.
|
||||
|
||||
**Downstream consumers**: Anchor verification, FDR.
|
||||
|
||||
## 2. Internal Interfaces
|
||||
|
||||
### Interface: `CandidateRetriever`
|
||||
### Interface: `SatelliteService`
|
||||
|
||||
| Method | Input | Output | Async | Error Types |
|
||||
|--------|-------|--------|-------|-------------|
|
||||
| `import_mission_cache` | `CacheImportRequest` | `CacheImportResult` | Yes | `SyncUnavailable`, `PackageInvalid` |
|
||||
| `upload_generated_tiles` | `GeneratedTileUploadRequest` | `GeneratedTileUploadResult` | Yes | `SyncUnavailable`, `PackageRejected` |
|
||||
| `retrieve` | `RetrievalRequest` | `RetrievalResult` | Yes | `IndexUnavailable`, `DescriptorFailed` |
|
||||
| `load_index` | `IndexLoadRequest` | `IndexStatus` | No | `ManifestInvalid`, `IndexUnavailable` |
|
||||
|
||||
@@ -49,11 +51,12 @@ VprCandidate:
|
||||
| Query | Frequency | Hot Path | Index Needed |
|
||||
|-------|-----------|----------|--------------|
|
||||
| Top-K FAISS search | Triggered only | No steady-state | FAISS index |
|
||||
| Import/export package sync | Pre-flight / post-flight only | No mid-flight | Package manifest and sidecar hashes |
|
||||
| Load chunk metadata | Per candidate | No | PostgreSQL/PostGIS spatial and chunk indexes |
|
||||
|
||||
## 4. Implementation Details
|
||||
|
||||
**State Management**: Holds loaded descriptor model and FAISS index handles.
|
||||
**State Management**: Holds loaded descriptor model and FAISS index handles; tracks pre-flight import and post-flight upload package status.
|
||||
|
||||
**Key Dependencies**:
|
||||
|
||||
@@ -61,16 +64,19 @@ VprCandidate:
|
||||
|---------|---------|
|
||||
| DINOv2 / ONNX / TensorRT candidate path | Query descriptor extraction |
|
||||
| FAISS CPU | Top-K retrieval |
|
||||
| Satellite Service client | Pre-flight cache import and post-flight generated-tile upload |
|
||||
|
||||
**Error Handling Strategy**:
|
||||
- If descriptor extraction or index load fails, return no candidates and trigger degraded mode.
|
||||
- Optimized engines are allowed only after descriptor-fidelity tests pass.
|
||||
- Network/package sync failures are allowed only before takeoff or after landing; during flight, the component must never call a satellite provider or suite service.
|
||||
|
||||
## 5. Caveats & Edge Cases
|
||||
|
||||
**Known limitations**:
|
||||
- VPR result is only a candidate, never an accepted fix.
|
||||
- Cross-domain retrieval can be wrong under seasonal, lighting, or terrain ambiguity.
|
||||
- External Satellite Service availability cannot be part of the mid-flight localization safety case.
|
||||
|
||||
**Performance bottlenecks**:
|
||||
- Descriptor extraction on Jetson must be trigger-limited and profiled separately from BASALT.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Test Specification — Satellite Retrieval
|
||||
# Test Specification — Satellite Service
|
||||
|
||||
## Acceptance Criteria Traceability
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
---
|
||||
|
||||
### IT-02: Sharp-Turn Retrieval Trigger
|
||||
### IT-02: Sharp-Turn Local Retrieval Trigger
|
||||
|
||||
**Summary**: Verify sharp-turn state requests candidates rather than relying on frame-to-frame VO.
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
**Input data**: Wrapper relocalization request with sharp-turn/loss reason.
|
||||
|
||||
**Expected result**: Retrieval returns bounded top-K candidates based on sector/covariance policy.
|
||||
**Expected result**: Satellite Service returns bounded top-K candidates from preloaded local indexes based on sector/covariance policy.
|
||||
|
||||
**Max execution time**: 2 seconds per query.
|
||||
|
||||
@@ -126,6 +126,25 @@
|
||||
|
||||
**Pass criteria**: 0 stale candidates without explicit stale/down-confidence metadata.
|
||||
|
||||
---
|
||||
|
||||
### ST-02: No Mid-Flight Satellite Service Calls
|
||||
|
||||
**Summary**: Verify relocalization never performs satellite-provider or suite Satellite Service network calls during flight.
|
||||
|
||||
**Traces to**: AC-8.3, R-SAT-01
|
||||
|
||||
**Attack vector**: Runtime attempts to fetch missing cache/index data over the network during relocalization.
|
||||
|
||||
**Test procedure**:
|
||||
1. Disable external network access during a replay scenario.
|
||||
2. Trigger relocalization against preloaded cache fixtures.
|
||||
3. Inspect network call logs and Satellite Service client telemetry.
|
||||
|
||||
**Expected behavior**: Retrieval uses only mounted local cache/index data; missing data produces degraded/no-candidate behavior, not a network fetch.
|
||||
|
||||
**Pass criteria**: 0 mid-flight Satellite Service or satellite-provider calls.
|
||||
|
||||
## Acceptance Tests
|
||||
|
||||
### AT-01: Relocalization Candidate Returned
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
**Architectural Pattern**: Validation pipeline.
|
||||
|
||||
**Upstream dependencies**: Satellite retrieval, camera ingest/calibration, cache/tile lifecycle.
|
||||
**Upstream dependencies**: Satellite Service, camera ingest/calibration, Tile Manager.
|
||||
|
||||
**Downstream consumers**: Safety/anchor wrapper, FDR.
|
||||
|
||||
@@ -74,9 +74,9 @@ AnchorDecision:
|
||||
|
||||
## 6. Dependency Graph
|
||||
|
||||
**Must be implemented after**: satellite retrieval candidate DTOs, cache tile access.
|
||||
**Must be implemented after**: Satellite Service candidate DTOs, Tile Manager tile access.
|
||||
|
||||
**Can be implemented in parallel with**: BASALT VIO adapter.
|
||||
**Can be implemented in parallel with**: VIO adapter.
|
||||
|
||||
**Blocks**: accepted satellite-anchor path.
|
||||
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
# Cache And Tile Lifecycle
|
||||
# Tile Manager
|
||||
|
||||
## 1. High-Level Overview
|
||||
|
||||
**Purpose**: Manage offline service-source tiles, manifests, descriptor metadata, freshness/provenance checks, generated tile writes, and post-flight sync packaging.
|
||||
**Purpose**: Manage local tiles: service-source COGs, manifests, descriptor metadata, freshness/provenance checks, nadir-image orthorectification into generated tiles, generated tile writes, and post-flight package preparation.
|
||||
|
||||
**Architectural Pattern**: Repository + policy gate.
|
||||
|
||||
**Upstream dependencies**: Satellite Service cache packages, safety/anchor wrapper, camera ingest/calibration.
|
||||
|
||||
**Downstream consumers**: Satellite retrieval, anchor verification, FDR, post-flight sync.
|
||||
**Downstream consumers**: Satellite Service, anchor verification, FDR, post-flight sync.
|
||||
|
||||
## 2. Internal Interfaces
|
||||
|
||||
### Interface: `CacheRepository`
|
||||
### Interface: `TileManager`
|
||||
|
||||
| Method | Input | Output | Async | Error Types |
|
||||
|--------|-------|--------|-------|-------------|
|
||||
| `validate_cache` | `CacheValidationRequest` | `CacheValidationReport` | No | `ManifestInvalid`, `SignatureInvalid` |
|
||||
| `get_tile_window` | `TileWindowRequest` | `TileWindow` | No | `TileUnavailable`, `TileRejected` |
|
||||
| `orthorectify_frame` | `TileGenerationRequest` | `GeneratedTileCandidate` | Yes | `TileWriteRejected`, `FrameNotUsable` |
|
||||
| `write_generated_tile` | `GeneratedTileRequest` | `GeneratedTileRecord` | Yes | `TileWriteRejected`, `StorageFull` |
|
||||
| `package_sync` | `SyncPackageRequest` | `SyncPackage` | Yes | `PackageFailed` |
|
||||
|
||||
@@ -26,7 +27,7 @@
|
||||
| Query | Frequency | Hot Path | Index Needed |
|
||||
|-------|-----------|----------|--------------|
|
||||
| Tile by footprint/time/freshness | Per retrieval/anchor | Yes during relocalization | Spatial/time indexes |
|
||||
| Descriptor metadata by chunk | Per retrieval | Yes during relocalization | Chunk ID index |
|
||||
| Descriptor metadata by chunk | Per Satellite Service retrieval | Yes during relocalization | Chunk ID index |
|
||||
| Generated tile by mission/sector | Post-flight | No | Mission ID index |
|
||||
|
||||
### Caching Strategy
|
||||
@@ -53,6 +54,7 @@
|
||||
|---------|---------|
|
||||
| PostgreSQL + PostGIS | Manifest, spatial metadata, freshness queries, and generated-tile metadata |
|
||||
| GDAL/rasterio candidate | COG read/write |
|
||||
| OpenCV/GDAL geometry utilities | Nadir-frame orthorectification into generated COG tiles |
|
||||
| Cryptographic hash/signature library | Sidecar validation |
|
||||
|
||||
**Error Handling Strategy**:
|
||||
@@ -75,7 +77,7 @@
|
||||
|
||||
**Can be implemented in parallel with**: camera ingest, MAVLink integration.
|
||||
|
||||
**Blocks**: satellite retrieval, anchor verification, generated tile lifecycle.
|
||||
**Blocks**: Satellite Service retrieval, anchor verification, generated tile lifecycle.
|
||||
|
||||
## 7. Logging Strategy
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Test Specification — Cache And Tile Lifecycle
|
||||
# Test Specification — Tile Manager
|
||||
|
||||
## Acceptance Criteria Traceability
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
### IT-03: Generated Tile Write
|
||||
|
||||
**Summary**: Verify generated tiles are written only when pose and frame quality gates pass.
|
||||
**Summary**: Verify nadir frames are orthorectified and written as generated tiles only when pose and frame quality gates pass.
|
||||
|
||||
**Traces to**: AC-8.4
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
|
||||
### ST-02: Raw Frame Persistence Check
|
||||
|
||||
**Summary**: Verify cache lifecycle persists tiles, not raw frames.
|
||||
**Summary**: Verify Tile Manager persists tiles, not raw frames.
|
||||
|
||||
**Traces to**: AC-8.5
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
|
||||
| Step | Action | Expected Result |
|
||||
|------|--------|-----------------|
|
||||
| 1 | Write generated candidate tile | COG + sidecar + PostGIS manifest row created |
|
||||
| 1 | Orthorectify and write generated candidate tile | COG + sidecar + PostGIS manifest row created |
|
||||
| 2 | Package post-flight sync | Manifest delta includes trust level and parent covariance |
|
||||
| 3 | Inspect package | No tile is marked trusted basemap by onboard runtime |
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
**Upstream dependencies**: ArduPilot Plane FC, safety/anchor wrapper.
|
||||
|
||||
**Downstream consumers**: BASALT VIO adapter, safety/anchor wrapper, QGC, FDR.
|
||||
**Downstream consumers**: VIO adapter, safety/anchor wrapper, QGC, FDR.
|
||||
|
||||
## 2. Internal Interfaces
|
||||
|
||||
@@ -52,7 +52,7 @@ No persistent data ownership; telemetry and emitted packets are mirrored to FDR.
|
||||
|
||||
**Must be implemented after**: position estimate DTO and MAVLink output contract.
|
||||
|
||||
**Can be implemented in parallel with**: cache lifecycle, camera ingest.
|
||||
**Can be implemented in parallel with**: Tile Manager, camera ingest.
|
||||
|
||||
**Blocks**: SITL integration and production FC output.
|
||||
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
# Validation Harness
|
||||
|
||||
## 1. High-Level Overview
|
||||
|
||||
**Purpose**: Drive black-box replay, public dataset, SITL, Jetson, and representative validation through the runtime's public interfaces.
|
||||
|
||||
**Architectural Pattern**: Test harness / scenario runner.
|
||||
|
||||
**Upstream dependencies**: Test data fixtures, public datasets, SITL, Jetson environment.
|
||||
|
||||
**Downstream consumers**: CI/CD pipeline, release evidence review.
|
||||
|
||||
## 2. Internal Interfaces
|
||||
|
||||
### Interface: `ScenarioRunner`
|
||||
|
||||
| Method | Input | Output | Async | Error Types |
|
||||
|--------|-------|--------|-------|-------------|
|
||||
| `run_scenario` | `ScenarioRequest` | `ScenarioReport` | Yes | `FixtureInvalid`, `RuntimeFailed`, `ThresholdFailed` |
|
||||
| `validate_fixture` | `FixtureRequest` | `FixtureValidationReport` | No | `FixtureInvalid` |
|
||||
|
||||
**Input DTOs**:
|
||||
|
||||
```yaml
|
||||
ScenarioRequest:
|
||||
scenario_id: string
|
||||
execution_environment: enum(replay, sitl, jetson, representative)
|
||||
fixture_paths: list[string]
|
||||
```
|
||||
|
||||
**Output DTOs**:
|
||||
|
||||
```yaml
|
||||
ScenarioReport:
|
||||
scenario_id: string
|
||||
result: enum(pass, fail, blocked)
|
||||
metrics: object
|
||||
artifacts: list[path]
|
||||
failure_reason: string optional
|
||||
```
|
||||
|
||||
## 3. Data Access Patterns
|
||||
|
||||
Reads versioned fixtures and writes reports. Does not import runtime internals.
|
||||
|
||||
## 4. Implementation Details
|
||||
|
||||
**State Management**: Per-run temporary directories and report aggregation.
|
||||
|
||||
**Key Dependencies**:
|
||||
|
||||
| Library | Purpose |
|
||||
|---------|---------|
|
||||
| pytest or equivalent | Test orchestration |
|
||||
| pymavlink/log parser | SITL and output validation |
|
||||
| Docker/compose runner | Replay/SITL environment |
|
||||
|
||||
**Error Handling Strategy**:
|
||||
- Fixture gaps are reported as blocked, not passed.
|
||||
- Threshold failures include metrics and artifacts.
|
||||
|
||||
## 5. Caveats & Edge Cases
|
||||
|
||||
**Known limitations**:
|
||||
- Public datasets are not final acceptance evidence unless representative and license-compatible.
|
||||
- Missing synchronized target data remains a final acceptance blocker.
|
||||
|
||||
## 6. Dependency Graph
|
||||
|
||||
**Must be implemented after**: public interfaces are defined.
|
||||
|
||||
**Can be implemented in parallel with**: runtime components using mocks/fixtures only after interfaces are stable.
|
||||
|
||||
**Blocks**: CI/release gates.
|
||||
|
||||
## 7. Logging Strategy
|
||||
|
||||
| Log Level | When | Example |
|
||||
|-----------|------|---------|
|
||||
| ERROR | Runtime/test process fails | `scenario_failed id=... reason=...` |
|
||||
| WARN | Fixture blocked | `fixture_blocked missing=...` |
|
||||
| INFO | Scenario complete | `scenario_complete id=... result=pass` |
|
||||
|
||||
**Log format**: Test report CSV/Markdown plus structured runner logs.
|
||||
|
||||
**Log storage**: `test-results/`.
|
||||
@@ -1,232 +0,0 @@
|
||||
# Test Specification — Validation Harness
|
||||
|
||||
## Acceptance Criteria Traceability
|
||||
|
||||
| AC ID | Acceptance Criterion | Test IDs | Coverage |
|
||||
|-------|---------------------|----------|----------|
|
||||
| AC-1.1 through AC-1.4 | Position accuracy, drift, confidence | IT-01, AT-01 | Covered |
|
||||
| AC-2.1a/b, AC-2.2 | VO and satellite registration | IT-02, IT-03 | Covered |
|
||||
| AC-3.1 through AC-3.5 | Resilience edge cases | IT-04, IT-05 | Covered |
|
||||
| AC-4.1 through AC-4.5 | Latency, memory, MAVLink streaming | PT-01, IT-06 | Covered |
|
||||
| AC-5.1 through AC-5.3 | Startup/failsafe/reboot | IT-07 | Covered |
|
||||
| AC-6.1 through AC-6.3 | QGC/GCS/WGS84 | IT-06 | Covered |
|
||||
| AC-7.1, AC-7.2 | Object coordinate contract | IT-08 | Covered at system boundary |
|
||||
| AC-8.1 through AC-8.6 | Offline cache, freshness, tiles, VPR | IT-03, IT-09, ST-01 | Covered |
|
||||
| AC-NEW-1 through AC-NEW-8 | Cold start, spoofing, FDR, false-position, thermal, freshness, poisoning, blackout | IT-05, IT-07, PT-02, ST-01, AT-02 | Covered |
|
||||
|
||||
## Blackbox Tests
|
||||
|
||||
### IT-01: Still-Image Accuracy Runner
|
||||
|
||||
**Summary**: Verify project still-image replay reports frame-center accuracy.
|
||||
|
||||
**Traces to**: AC-1.1, AC-1.2, AC-1.4
|
||||
|
||||
**Input data**: Project mapped images and `expected_results/results_report.md`.
|
||||
|
||||
**Expected result**: Report includes per-image error, aggregate 50 m/20 m pass rates, covariance, source label, and anchor age.
|
||||
|
||||
**Max execution time**: 15 minutes.
|
||||
|
||||
---
|
||||
|
||||
### IT-02: Public VIO Replay Runner
|
||||
|
||||
**Summary**: Verify public/representative synchronized data can drive BASALT/wrapper tests.
|
||||
|
||||
**Traces to**: AC-1.3, AC-2.1a, AC-2.2
|
||||
|
||||
**Input data**: MUN-FRL preferred slice or representative synchronized dataset.
|
||||
|
||||
**Expected result**: Runner validates trajectory, VIO registration, latency, and covariance calibration.
|
||||
|
||||
**Max execution time**: Dataset-dependent.
|
||||
|
||||
---
|
||||
|
||||
### IT-03: Satellite Anchor Replay Runner
|
||||
|
||||
**Summary**: Verify VPR and anchor verification test scenarios are executable.
|
||||
|
||||
**Traces to**: AC-2.1b, AC-2.2, AC-8.1, AC-8.2, AC-8.6
|
||||
|
||||
**Input data**: ALTO/AerialVL/representative aerial localization fixture plus cache.
|
||||
|
||||
**Expected result**: Runner reports retrieval recall, MRE, accepted/rejected anchors, and freshness behavior.
|
||||
|
||||
**Max execution time**: Dataset-dependent.
|
||||
|
||||
---
|
||||
|
||||
### IT-04: Outlier/Sharp-Turn/Disconnected Runner
|
||||
|
||||
**Summary**: Verify resilience scenarios are executable and reported.
|
||||
|
||||
**Traces to**: AC-3.1, AC-3.2, AC-3.3, AC-3.4
|
||||
|
||||
**Input data**: Synthetic and public disconnected-segment fixtures.
|
||||
|
||||
**Expected result**: Runner validates relocalization and records degraded-mode timelines.
|
||||
|
||||
**Max execution time**: 30 minutes.
|
||||
|
||||
---
|
||||
|
||||
### IT-05: Blackout And Spoofing Runner
|
||||
|
||||
**Summary**: Verify total blackout plus spoofing scenarios can be driven through SITL/replay.
|
||||
|
||||
**Traces to**: AC-3.5, AC-NEW-2, AC-NEW-8
|
||||
|
||||
**Input data**: Plane SITL spoofing scenario with 5 s, 15 s, and 35 s blackout windows.
|
||||
|
||||
**Expected result**: Runner measures <=400 ms mode switch, <3 s promotion, monotonic covariance, and failsafe thresholds.
|
||||
|
||||
**Max execution time**: 30 minutes.
|
||||
|
||||
---
|
||||
|
||||
### IT-06: MAVLink/QGC Contract Runner
|
||||
|
||||
**Summary**: Verify MAVLink output and GCS status assertions are automated.
|
||||
|
||||
**Traces to**: AC-4.3, AC-4.4, AC-4.5, AC-6.1, AC-6.2, AC-6.3
|
||||
|
||||
**Input data**: Plane SITL, QGC observer/log parser, position fixtures.
|
||||
|
||||
**Expected result**: Runner validates v1 GPS_INPUT-only output, WGS84 coordinates, status rate, and command ingress.
|
||||
|
||||
**Max execution time**: 60 minutes.
|
||||
|
||||
---
|
||||
|
||||
### IT-07: Startup/Reboot Runner
|
||||
|
||||
**Summary**: Verify cold-start and reboot scenarios are measurable.
|
||||
|
||||
**Traces to**: AC-5.1, AC-5.2, AC-5.3, AC-NEW-1
|
||||
|
||||
**Input data**: 50 cold-start runs and companion reboot trace.
|
||||
|
||||
**Expected result**: First valid `GPS_INPUT` <30 s p95; reboot reinitializes from FC state.
|
||||
|
||||
**Max execution time**: Runset-dependent.
|
||||
|
||||
---
|
||||
|
||||
### IT-08: Object Coordinate Contract Runner
|
||||
|
||||
**Summary**: Verify AI-camera object coordinate request contract at system boundary.
|
||||
|
||||
**Traces to**: AC-7.1, AC-7.2
|
||||
|
||||
**Input data**: Frame-center estimate, object pixel/angle fixture, gimbal angle, altitude.
|
||||
|
||||
**Expected result**: Output coordinate includes frame-center-consistent accuracy and maneuvering-flight projection error bound.
|
||||
|
||||
**Max execution time**: 5 minutes.
|
||||
|
||||
---
|
||||
|
||||
### IT-09: Cache And Tile Lifecycle Runner
|
||||
|
||||
**Summary**: Verify cache, generated tiles, and storage tests are executable.
|
||||
|
||||
**Traces to**: AC-8.3, AC-8.4, AC-8.5, AC-NEW-6, AC-NEW-7
|
||||
|
||||
**Input data**: Cache integrity fixtures, generated tile scenarios, PostGIS manifest.
|
||||
|
||||
**Expected result**: Runner validates cache load, tile write gates, no raw-frame retention, stale rejection, and poisoning budget evidence.
|
||||
|
||||
**Max execution time**: Dataset-dependent.
|
||||
|
||||
## Performance Tests
|
||||
|
||||
### PT-01: End-To-End Release Gate Runner
|
||||
|
||||
**Summary**: Verify performance and resource tests can run in the proper environment.
|
||||
|
||||
**Traces to**: AC-4.1, AC-4.2, AC-NEW-5
|
||||
|
||||
**Load scenario**:
|
||||
- Environments: replay, Jetson hardware, SITL.
|
||||
- Duration: smoke, nightly, and release-gate profiles.
|
||||
|
||||
| Metric | Target | Failure Threshold |
|
||||
|--------|--------|-------------------|
|
||||
| End-to-end p95 | <400 ms | >=400 ms |
|
||||
| Memory | <8 GB | >=8 GB |
|
||||
| Thermal throttle | 0 events in release gate | Any throttle event |
|
||||
|
||||
---
|
||||
|
||||
### PT-02: FDR/Storage Runner
|
||||
|
||||
**Summary**: Verify 8-hour storage/endurance test orchestration.
|
||||
|
||||
**Traces to**: AC-NEW-3
|
||||
|
||||
| Metric | Target | Failure Threshold |
|
||||
|--------|--------|-------------------|
|
||||
| FDR cap | <=64 GB | >64 GB |
|
||||
| Rollover logging | Complete | Missing rollover event |
|
||||
|
||||
## Security Tests
|
||||
|
||||
### ST-01: Security Fixture Runner
|
||||
|
||||
**Summary**: Verify stale/tampered cache, spoofed MAVLink, and false-anchor scenarios are automated.
|
||||
|
||||
**Traces to**: AC-NEW-4, AC-NEW-6, AC-NEW-7
|
||||
|
||||
**Attack vector**: Cache tampering, stale imagery, spoofed GPS, impossible anchors.
|
||||
|
||||
**Test procedure**:
|
||||
1. Load each security fixture.
|
||||
2. Run scenario through public runtime interfaces.
|
||||
3. Validate output labels, FDR, and rejection reasons.
|
||||
|
||||
**Expected behavior**: No tampered/stale/spoofed input produces a trusted false fix.
|
||||
|
||||
**Pass criteria**: 0 accepted unsafe anchors or spoofed GPS promotions outside gates.
|
||||
|
||||
## Acceptance Tests
|
||||
|
||||
### AT-01: Traceability Completeness Report
|
||||
|
||||
**Summary**: Verify every AC has executable or explicitly blocked test coverage.
|
||||
|
||||
**Traces to**: All ACs
|
||||
|
||||
| Step | Action | Expected Result |
|
||||
|------|--------|-----------------|
|
||||
| 1 | Read traceability matrix | All ACs mapped to tests |
|
||||
| 2 | Run fixture validation | Missing public/representative data is reported as blocked, not passed |
|
||||
|
||||
---
|
||||
|
||||
### AT-02: Release Evidence Bundle
|
||||
|
||||
**Summary**: Verify release evidence can be assembled.
|
||||
|
||||
**Traces to**: AC-NEW-1 through AC-NEW-8
|
||||
|
||||
| Step | Action | Expected Result |
|
||||
|------|--------|-----------------|
|
||||
| 1 | Run release profile | Reports, tlogs, FDR summaries, cache reports are produced |
|
||||
| 2 | Collate artifacts | Bundle contains pass/fail status and residual blockers |
|
||||
|
||||
## Test Data Management
|
||||
|
||||
| Data Set | Description | Source | Size |
|
||||
|----------|-------------|--------|------|
|
||||
| `project_60_still_images` | Frame-center geolocation smoke | Project data | Project size |
|
||||
| `public_dataset_slices` | MUN-FRL/ALTO/Kagaru/EPFL/AerialVL as licensed | Public pinned fixtures | Dataset-dependent |
|
||||
| `sitl_scenarios` | Plane spoofing/failsafe traces | Generated | Small |
|
||||
| `security_fixtures` | Stale/tampered/cache poisoning cases | Generated | Small |
|
||||
|
||||
**Setup procedure**: Create isolated run directory, restore PostgreSQL schema, mount fixtures read-only, and start requested environment.
|
||||
|
||||
**Teardown procedure**: Stop environments, archive reports, drop run schema, and delete temp volumes.
|
||||
|
||||
**Data isolation strategy**: Unique run ID, schema, ports, cache staging directory, and FDR directory per scenario.
|
||||
@@ -0,0 +1,51 @@
|
||||
# Contract: Config Errors Telemetry
|
||||
|
||||
**Component**: shared/config, shared/errors, shared/telemetry
|
||||
**Producer task**: AZ-222 — AZ-222_runtime_config_errors_telemetry.md
|
||||
**Consumer tasks**: AZ-223, AZ-224, AZ-225, AZ-226, AZ-227, AZ-228, AZ-229, AZ-230, AZ-231, AZ-232
|
||||
**Version**: 1.0.0
|
||||
**Status**: draft
|
||||
**Last Updated**: 2026-05-03
|
||||
|
||||
## Purpose
|
||||
|
||||
Defines shared runtime configuration, error/result envelope, health, and telemetry metadata behavior consumed by all runtime components.
|
||||
|
||||
## Shape
|
||||
|
||||
| Contract | Required Behavior |
|
||||
|----------|-------------------|
|
||||
| Runtime profile | environment-specific settings loaded and validated before use |
|
||||
| Error envelope | component, category, message, cause, retryability, severity |
|
||||
| Health event | liveness/readiness status, dependency state, timestamp, component |
|
||||
| Metrics labels | bounded component/action/status labels suitable for runtime reports |
|
||||
|
||||
## Invariants
|
||||
|
||||
- Missing required production settings fail startup or readiness loudly.
|
||||
- Errors are returned or logged with component and category; no silent suppression.
|
||||
- Secrets are referenced, not serialized into FDR, logs, or metrics.
|
||||
|
||||
## Non-Goals
|
||||
|
||||
- Does not define component-specific business errors.
|
||||
- Does not replace FDR payload schemas.
|
||||
|
||||
## Versioning Rules
|
||||
|
||||
- Removing required config keys or error categories requires a major version bump.
|
||||
- Adding optional health fields or metrics labels requires a minor version bump.
|
||||
|
||||
## Test Cases
|
||||
|
||||
| Case | Input | Expected | Notes |
|
||||
|------|-------|----------|-------|
|
||||
| missing-required-prod | production profile missing cache dir | readiness/startup failure | Clear error category |
|
||||
| secret-value | signing key ref present | only key ref logged | No secret leakage |
|
||||
| component-error | component reports dependency failure | structured envelope emitted | FDR-safe |
|
||||
|
||||
## Change Log
|
||||
|
||||
| Version | Date | Change | Author |
|
||||
|---------|------|--------|--------|
|
||||
| 1.0.0 | 2026-05-03 | Initial contract | autodev |
|
||||
@@ -0,0 +1,52 @@
|
||||
# Contract: Geometry And Time Sync Helpers
|
||||
|
||||
**Component**: shared/geo_geometry, shared/time_sync
|
||||
**Producer task**: AZ-221 — AZ-221_shared_geometry_time_sync.md
|
||||
**Consumer tasks**: AZ-223, AZ-225, AZ-226, AZ-228, AZ-230, AZ-231, AZ-232
|
||||
**Version**: 1.0.0
|
||||
**Status**: draft
|
||||
**Last Updated**: 2026-05-03
|
||||
|
||||
## Purpose
|
||||
|
||||
Defines shared geospatial and timestamp helper behavior used by runtime components to avoid duplicated math and inconsistent frame/IMU alignment.
|
||||
|
||||
## Shape
|
||||
|
||||
| API Area | Shape | Errors |
|
||||
|----------|-------|--------|
|
||||
| Coordinate conversion | WGS84/local tangent conversions and distance calculations | invalid CRS, missing origin |
|
||||
| Camera footprint | intrinsics/extrinsics/attitude/altitude to footprint and GSD | invalid calibration, missing altitude |
|
||||
| Homography metrics | homography/covariance conversions and MRE support | invalid geometry |
|
||||
| Time sync | monotonic checks, frame-to-IMU window selection, replay ordering | timestamp mismatch, gap/jitter exceeded |
|
||||
|
||||
## Invariants
|
||||
|
||||
- Helpers are deterministic for the same calibration, pose, and timestamp inputs.
|
||||
- Time helpers report gaps/jitter instead of silently dropping samples.
|
||||
- Geometry helpers do not decide safety policy; callers decide degrade/reject behavior.
|
||||
|
||||
## Non-Goals
|
||||
|
||||
- No VIO state estimation.
|
||||
- No MAVLink parsing beyond normalized timestamp fields.
|
||||
- No tile freshness or cache policy decisions.
|
||||
|
||||
## Versioning Rules
|
||||
|
||||
- Breaking changes to units, coordinate frames, or timestamp semantics require a major version bump.
|
||||
- New helper outputs may be added as optional fields in minor versions.
|
||||
|
||||
## Test Cases
|
||||
|
||||
| Case | Input | Expected | Notes |
|
||||
|------|-------|----------|-------|
|
||||
| valid-wgs84-local | known WGS84 point and origin | round-trip within tolerance | Uses representative coordinates |
|
||||
| frame-imu-window | frame timestamp plus IMU samples | correct aligned window | Includes gap metrics |
|
||||
| invalid-calibration | missing intrinsics/extrinsics | explicit error | No silent fallback |
|
||||
|
||||
## Change Log
|
||||
|
||||
| Version | Date | Change | Author |
|
||||
|---------|------|--------|--------|
|
||||
| 1.0.0 | 2026-05-03 | Initial contract | autodev |
|
||||
@@ -0,0 +1,56 @@
|
||||
# Contract: Runtime Shared Contracts
|
||||
|
||||
**Component**: shared/contracts
|
||||
**Producer task**: AZ-220 — AZ-220_shared_runtime_contracts.md
|
||||
**Consumer tasks**: AZ-223, AZ-224, AZ-225, AZ-226, AZ-227, AZ-228, AZ-229, AZ-230, AZ-231, AZ-232
|
||||
**Version**: 1.0.0
|
||||
**Status**: draft
|
||||
**Last Updated**: 2026-05-03
|
||||
|
||||
## Purpose
|
||||
|
||||
Defines the shared runtime DTO/event contract surface that component implementations consume instead of inventing local shapes.
|
||||
|
||||
## Shape
|
||||
|
||||
| Contract | Required Fields / Methods | Consumers |
|
||||
|----------|---------------------------|-----------|
|
||||
| `FramePacket` | frame ID, timestamp, image reference, calibration ID, occlusion, quality, normalization hint | camera, VIO, Satellite Service, Anchor Verification, Tile Manager, FDR |
|
||||
| `TelemetrySample` | timestamp, IMU, attitude, altitude, airspeed, GPS health | MAVLink, VIO, safety wrapper, FDR |
|
||||
| `VioStatePacket` | timestamp, relative pose, velocity, bias, tracking quality, covariance hint | VIO, safety wrapper, FDR |
|
||||
| `PositionEstimate` | WGS84 coordinates, covariance, source label, fix type, horizontal accuracy, anchor age | safety wrapper, MAVLink, Tile Manager, FDR |
|
||||
| `VprCandidate` | chunk ID, tile ID, score, footprint, freshness status | Satellite Service, Anchor Verification, FDR |
|
||||
| `AnchorDecision` | candidate ID, acceptance result, estimated pose, inliers, MRE, rejection reason | Anchor Verification, safety wrapper, FDR |
|
||||
| `CacheTileRecord` | tile ID, CRS, meters per pixel, capture date, signature/hash, trust level | Tile Manager, Satellite Service, Anchor Verification |
|
||||
| `FdrEvent` | event type, timestamp, component, severity, payload reference, mission/run ID | all runtime components |
|
||||
|
||||
## Invariants
|
||||
|
||||
- Timestamps are normalized to a shared monotonic nanosecond representation before cross-component use.
|
||||
- Confidence fields must not under-report known uncertainty.
|
||||
- Raw frame payloads are referenced, not persisted in shared DTOs.
|
||||
- Generated tile and anchor records must carry provenance/freshness metadata.
|
||||
|
||||
## Non-Goals
|
||||
|
||||
- Does not prescribe internal classes or storage implementation.
|
||||
- Does not define e2e test runner-only report schemas.
|
||||
|
||||
## Versioning Rules
|
||||
|
||||
- Removing or renaming a field requires a major version bump.
|
||||
- Adding optional telemetry or diagnostic fields requires a minor version bump.
|
||||
|
||||
## Test Cases
|
||||
|
||||
| Case | Input | Expected | Notes |
|
||||
|------|-------|----------|-------|
|
||||
| valid-frame | frame with timestamp, calibration, quality | accepted by consumers | Includes normalization hint |
|
||||
| invalid-time | non-monotonic timestamp | rejected or marked invalid | Time-sync contract decides details |
|
||||
| stale-anchor | anchor decision with stale freshness | rejected/down-confidenced | Safety wrapper must not accept blindly |
|
||||
|
||||
## Change Log
|
||||
|
||||
| Version | Date | Change | Author |
|
||||
|---------|------|--------|--------|
|
||||
| 1.0.0 | 2026-05-03 | Initial contract | autodev |
|
||||
@@ -8,16 +8,16 @@ This model defines system-level runtime, cache, telemetry, and validation data.
|
||||
|
||||
| Entity | Purpose | Storage / Transport | Owner |
|
||||
|--------|---------|---------------------|-------|
|
||||
| MissionProfile | Operational area, sector type, route shape, altitude band, cache budget | Mission config file | Cache/tile lifecycle |
|
||||
| MissionProfile | Operational area, sector type, route shape, altitude band, cache budget | Mission config file | Tile Manager |
|
||||
| CameraCalibration | Intrinsics, distortion, lens, fixed extrinsics, capture settings | Versioned calibration file | Camera ingest/calibration |
|
||||
| FrameRecord | Per-frame metadata, timestamp, total-occlusion/blackout state, image quality, processing status | PostgreSQL/FDR event; replay fixture | Camera ingest/calibration |
|
||||
| TelemetrySample | FC IMU, attitude, altitude, airspeed, GPS health | MAVLink stream; FDR event | MAVLink/GCS integration |
|
||||
| VioState | BASALT relative state, velocity, bias, tracking quality | Internal DTO; FDR event | BASALT VIO adapter |
|
||||
| VioState | Backend-relative state, velocity, bias, tracking quality | Internal DTO; FDR event | VIO adapter |
|
||||
| PositionEstimate | WGS84 output, covariance, source label, anchor age, fix type | MAVLink DTO; FDR event | Safety/anchor wrapper |
|
||||
| VprChunk | Retrieval footprint and descriptor metadata | PostgreSQL/PostGIS manifest + descriptor files | Satellite retrieval |
|
||||
| VprChunk | Retrieval footprint and descriptor metadata | PostgreSQL/PostGIS manifest + descriptor files | Satellite Service |
|
||||
| AnchorCandidate | Top-K retrieval result and local verification metrics | Internal DTO; FDR event | Anchor verification |
|
||||
| CacheTile | Service-source or generated COG tile metadata | PostgreSQL/PostGIS manifest + signed JSON sidecar | Cache/tile lifecycle |
|
||||
| GeneratedTile | In-flight tile candidate with trust/provenance metadata | COG + sidecar + FDR event | Cache/tile lifecycle |
|
||||
| CacheTile | Service-source or generated COG tile metadata | PostgreSQL/PostGIS manifest + signed JSON sidecar | Tile Manager |
|
||||
| GeneratedTile | In-flight tile candidate with trust/provenance metadata | COG + sidecar + FDR event | Tile Manager |
|
||||
| FdrSegment | Bounded append-only mission evidence segment | PostgreSQL event index + CBOR segment payloads | FDR/observability |
|
||||
| ValidationRun | Replay/test run metadata and outcomes | CSV/Markdown/test artifacts | Validation harness |
|
||||
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
```mermaid
|
||||
flowchart LR
|
||||
camera[01 Camera Ingest And Calibration]
|
||||
vio[02 BASALT VIO Adapter]
|
||||
vio[02 VIO Adapter]
|
||||
wrapper[03 Safety And Anchor Wrapper]
|
||||
retrieval[04 Satellite Retrieval]
|
||||
retrieval[04 Satellite Service]
|
||||
verify[05 Anchor Verification]
|
||||
cache[06 Cache And Tile Lifecycle]
|
||||
cache[06 Tile Manager]
|
||||
mav[07 MAVLink And GCS Integration]
|
||||
fdr[08 FDR And Observability]
|
||||
tests[09 Validation Harness]
|
||||
tests[[Separate E2E Test Suite]]
|
||||
|
||||
navCam[[Nav Camera]] --> camera
|
||||
fc[[ArduPilot Plane FC]] --> mav
|
||||
satSvc[[Satellite Service]] --> cache
|
||||
satSvc[[Azaion Suite Satellite Service]] --> retrieval
|
||||
datasets[[Replay/Public Datasets]] --> tests
|
||||
|
||||
camera --> vio
|
||||
@@ -42,5 +42,5 @@ flowchart LR
|
||||
tests --> cache
|
||||
mav --> qgc[[QGroundControl]]
|
||||
mav --> fc
|
||||
cache --> satSvc
|
||||
retrieval --> satSvc
|
||||
```
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
# Flow: Cache And Generated Tile Lifecycle
|
||||
# Flow: Tile Manager And Generated Tile Lifecycle
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
preflight([Pre-flight cache sync]) --> validate[06 Validate manifest signatures hashes freshness]
|
||||
preflight([Pre-flight Satellite Service sync]) --> validate[06 Tile Manager validates manifest signatures hashes freshness]
|
||||
validate --> cacheOk{Cache valid?}
|
||||
cacheOk -->|No| block[Block cache usage and report]
|
||||
cacheOk -->|Yes| load[04 Load descriptor metadata and FAISS index]
|
||||
cacheOk -->|Yes| load[04 Satellite Service loads local descriptor metadata and FAISS index]
|
||||
load --> flight([Flight runtime])
|
||||
flight --> eligibility[03 Tile write eligibility check]
|
||||
eligibility --> eligible{Covariance and quality pass?}
|
||||
eligible -->|No| noWrite[Do not write generated tile]
|
||||
eligible -->|Yes| write[06 Write COG + signed JSON sidecar]
|
||||
eligible -->|Yes| write[06 Orthorectify frame and write COG + signed JSON sidecar]
|
||||
write --> fdr[08 Record tile-write audit]
|
||||
fdr --> postflight([Post-flight])
|
||||
postflight --> package[06 Package generated tiles + manifest delta]
|
||||
package --> sync[[Satellite Service ingest]]
|
||||
package --> sync[[Post-flight Satellite Service upload]]
|
||||
```
|
||||
|
||||
@@ -7,7 +7,7 @@ flowchart TD
|
||||
occlusion -->|Yes| imuOnly[03 IMU-only dead_reckoned propagation]
|
||||
occlusion -->|No| frameOk{Frame usable for VIO?}
|
||||
frameOk -->|No| degrade[03 Safety wrapper degraded mode]
|
||||
frameOk -->|Yes| vio[02 BASALT VIO adapter]
|
||||
frameOk -->|Yes| vio[02 VIO adapter]
|
||||
telemetry[07 MAVLink telemetry] --> vio
|
||||
vio --> healthy{VIO healthy?}
|
||||
healthy -->|Yes| wrap[03 Covariance calibration + source label]
|
||||
|
||||
+21
-16
@@ -15,14 +15,14 @@
|
||||
| 3 | AZ-208 | Cross-Cutting: Runtime Configuration And Errors | cross-cutting | AZ-206 | S-M / 3-5 pts |
|
||||
| 4 | AZ-209 | Camera Ingest And Calibration | component | AZ-206, AZ-207, AZ-208 | M / 5-8 pts |
|
||||
| 5 | AZ-210 | MAVLink And GCS Integration | component | AZ-206, AZ-208 | M / 5-8 pts |
|
||||
| 6 | AZ-211 | Cache And Tile Lifecycle | component | AZ-206, AZ-207, AZ-208 | L / 8-13 pts |
|
||||
| 6 | AZ-211 | Tile Manager | component | AZ-206, AZ-207, AZ-208 | L / 8-13 pts |
|
||||
| 7 | AZ-212 | FDR And Observability | component | AZ-206, AZ-208 | M-L / 5-8 pts |
|
||||
| 8 | AZ-213 | BASALT VIO Adapter | component | AZ-206, AZ-207, AZ-208, AZ-209, AZ-210 | L / 8-13 pts |
|
||||
| 9 | AZ-214 | Satellite Retrieval | component | AZ-206, AZ-207, AZ-208, AZ-209, AZ-211 | L / 8-13 pts |
|
||||
| 8 | AZ-213 | VIO Adapter | component | AZ-206, AZ-207, AZ-208, AZ-209, AZ-210 | L / 8-13 pts |
|
||||
| 9 | AZ-214 | Satellite Service | component | AZ-206, AZ-207, AZ-208, AZ-209, AZ-211 | L / 8-13 pts |
|
||||
| 10 | AZ-215 | Anchor Verification | component | AZ-206, AZ-207, AZ-208, AZ-209, AZ-211, AZ-214 | L / 8-13 pts |
|
||||
| 11 | AZ-216 | Safety And Anchor Wrapper | component | AZ-206, AZ-207, AZ-208, AZ-209, AZ-210, AZ-213, AZ-215 | XL / 13-21 pts |
|
||||
| 12 | AZ-217 | Validation Harness | component | AZ-206, AZ-207, AZ-208, component epics | L / 8-13 pts |
|
||||
| 13 | AZ-218 | Blackbox Tests | blackbox-tests | AZ-206, AZ-217, component epics | L / 8-13 pts |
|
||||
| 12 | AZ-217 | E2E Test Suite | test-support | component epics | L / 8-13 pts |
|
||||
| 13 | AZ-218 | Blackbox Tests | blackbox-tests | AZ-217, component epics | L / 8-13 pts |
|
||||
|
||||
## Component Mapping
|
||||
|
||||
@@ -33,14 +33,14 @@
|
||||
| `common-helpers/02_helper_time_sync.md` | AZ-207 |
|
||||
| Runtime config, error contracts, health checks | AZ-208 |
|
||||
| `components/01_camera_ingest_calibration/` | AZ-209 |
|
||||
| `components/02_basalt_vio_adapter/` | AZ-213 |
|
||||
| `components/02_vio_adapter/` | AZ-213 |
|
||||
| `components/03_safety_anchor_wrapper/` | AZ-216 |
|
||||
| `components/04_satellite_retrieval/` | AZ-214 |
|
||||
| `components/05_anchor_verification/` | AZ-215 |
|
||||
| `components/06_cache_tile_lifecycle/` | AZ-211 |
|
||||
| `components/07_mavlink_gcs_integration/` | AZ-210 |
|
||||
| `components/08_fdr_observability/` | AZ-212 |
|
||||
| `components/09_validation_harness/` | AZ-217 |
|
||||
| `tests/e2e-test-suite.md`, `tests/blackbox-tests.md`, `tests/environment.md` | AZ-217 |
|
||||
| System blackbox/performance/resilience/security/resource tests | AZ-218 |
|
||||
|
||||
## Epic Relationship Diagram
|
||||
@@ -52,13 +52,13 @@ flowchart TD
|
||||
config[AZ-208 Runtime Configuration And Errors]
|
||||
camera[AZ-209 Camera Ingest]
|
||||
mavlink[AZ-210 MAVLink And GCS]
|
||||
cache[AZ-211 Cache And Tile Lifecycle]
|
||||
cache[AZ-211 Tile Manager]
|
||||
fdr[AZ-212 FDR And Observability]
|
||||
vio[AZ-213 BASALT VIO Adapter]
|
||||
retrieval[AZ-214 Satellite Retrieval]
|
||||
vio[AZ-213 VIO Adapter]
|
||||
retrieval[AZ-214 Satellite Service]
|
||||
anchor[AZ-215 Anchor Verification]
|
||||
safety[AZ-216 Safety And Anchor Wrapper]
|
||||
validation[AZ-217 Validation Harness]
|
||||
validation[AZ-217 E2E Test Suite]
|
||||
blackbox[AZ-218 Blackbox Tests]
|
||||
|
||||
bootstrap --> geo
|
||||
@@ -96,9 +96,14 @@ flowchart TD
|
||||
safety --> fdr
|
||||
camera --> fdr
|
||||
cache --> fdr
|
||||
validation --> blackbox
|
||||
safety --> validation
|
||||
fdr --> validation
|
||||
camera --> validation
|
||||
mavlink --> validation
|
||||
retrieval --> validation
|
||||
anchor --> validation
|
||||
cache --> validation
|
||||
validation --> blackbox
|
||||
```
|
||||
|
||||
## Cross-Cutting Ownership
|
||||
@@ -117,13 +122,13 @@ flowchart TD
|
||||
- AZ-208 — Cross-Cutting: Runtime Configuration And Errors
|
||||
- AZ-209 — Camera Ingest And Calibration
|
||||
- AZ-210 — MAVLink And GCS Integration
|
||||
- AZ-211 — Cache And Tile Lifecycle
|
||||
- AZ-211 — Tile Manager
|
||||
- AZ-212 — FDR And Observability
|
||||
- AZ-213 — BASALT VIO Adapter
|
||||
- AZ-214 — Satellite Retrieval
|
||||
- AZ-213 — VIO Adapter
|
||||
- AZ-214 — Satellite Service
|
||||
- AZ-215 — Anchor Verification
|
||||
- AZ-216 — Safety And Anchor Wrapper
|
||||
- AZ-217 — Validation Harness
|
||||
- AZ-217 — E2E Test Suite
|
||||
- AZ-218 — Blackbox Tests
|
||||
|
||||
## Tracker Notes
|
||||
|
||||
@@ -0,0 +1,243 @@
|
||||
# Module Layout
|
||||
|
||||
**Language**: mixed (Python orchestration + C++ native vision bridges)
|
||||
**Layout Convention**: src-layout
|
||||
**Root**: `src/`
|
||||
**Last Updated**: 2026-05-03
|
||||
|
||||
## Layout Rules
|
||||
|
||||
1. Each product component owns one top-level directory under `src/`.
|
||||
2. Shared contracts and cross-cutting helpers live under `src/shared/`.
|
||||
3. Native hot-path or third-party bridge code lives inside the owning component folder under `native/`.
|
||||
4. Public API surface per component is limited to `__init__.py`, `types.py`, and `interfaces.py` unless a component entry lists another public file.
|
||||
5. Tests live under `tests/` by test type and component; implementation tasks must not place tests inside the component tree unless a later test task explicitly changes this layout.
|
||||
|
||||
## Per-Component Mapping
|
||||
|
||||
### Component: Camera Ingest And Calibration
|
||||
|
||||
- **Epic**: AZ-209
|
||||
- **Directory**: `src/camera_ingest_calibration/`
|
||||
- **Technologies**: Python, OpenCV 4.x, camera SDK/V4L2/GigE adapter boundary, calibration files, shared geometry/time helpers
|
||||
- **Public API**:
|
||||
- `src/camera_ingest_calibration/__init__.py`
|
||||
- `src/camera_ingest_calibration/types.py`
|
||||
- `src/camera_ingest_calibration/interfaces.py`
|
||||
- **Internal (do NOT import from other components)**:
|
||||
- `src/camera_ingest_calibration/internal/*`
|
||||
- `src/camera_ingest_calibration/_*.py`
|
||||
- **Owns (exclusive write during implementation)**: `src/camera_ingest_calibration/**`
|
||||
- **Imports from**: shared/contracts, shared/geo_geometry, shared/time_sync, shared/config, shared/errors, shared/telemetry
|
||||
- **Consumed by**: VIO Adapter, Satellite Service, Anchor Verification, Tile Manager, FDR And Observability
|
||||
|
||||
### Component: VIO Adapter
|
||||
|
||||
- **Epic**: AZ-213
|
||||
- **Directory**: `src/vio_adapter/`
|
||||
- **Native Directory**: `src/vio_adapter/native/`
|
||||
- **Technologies**: Python adapter, C++ native bridge, BASALT as current backend, Eigen/Sophus or backend-native math stack, OpenCV 4.x, shared time-sync contracts
|
||||
- **Public API**:
|
||||
- `src/vio_adapter/__init__.py`
|
||||
- `src/vio_adapter/types.py`
|
||||
- `src/vio_adapter/interfaces.py`
|
||||
- **Internal (do NOT import from other components)**:
|
||||
- `src/vio_adapter/internal/*`
|
||||
- `src/vio_adapter/_*.py`
|
||||
- `src/vio_adapter/native/**`
|
||||
- **Owns (exclusive write during implementation)**:
|
||||
- `src/vio_adapter/**`
|
||||
- **Imports from**: Camera Ingest And Calibration, MAVLink And GCS Integration, shared/contracts, shared/geo_geometry, shared/time_sync, shared/config, shared/errors, shared/telemetry
|
||||
- **Consumed by**: Safety And Anchor Wrapper, FDR And Observability
|
||||
|
||||
### Component: Safety And Anchor Wrapper
|
||||
|
||||
- **Epic**: AZ-216
|
||||
- **Directory**: `src/safety_anchor_wrapper/`
|
||||
- **Technologies**: Python state machine, OpenCV geometry helpers, covariance/gating logic, shared DTO contracts, MAVLink output DTOs
|
||||
- **Public API**:
|
||||
- `src/safety_anchor_wrapper/__init__.py`
|
||||
- `src/safety_anchor_wrapper/types.py`
|
||||
- `src/safety_anchor_wrapper/interfaces.py`
|
||||
- **Internal (do NOT import from other components)**:
|
||||
- `src/safety_anchor_wrapper/internal/*`
|
||||
- `src/safety_anchor_wrapper/_*.py`
|
||||
- **Owns (exclusive write during implementation)**: `src/safety_anchor_wrapper/**`
|
||||
- **Imports from**: VIO Adapter, Anchor Verification, MAVLink And GCS Integration, Camera Ingest And Calibration, shared/contracts, shared/geo_geometry, shared/time_sync, shared/config, shared/errors, shared/telemetry
|
||||
- **Consumed by**: MAVLink And GCS Integration, Tile Manager, FDR And Observability
|
||||
|
||||
### Component: Satellite Service
|
||||
|
||||
- **Epic**: AZ-214
|
||||
- **Directory**: `src/satellite_service/`
|
||||
- **Native Directory**: `src/satellite_service/native/`
|
||||
- **Technologies**: Python service adapter, DINOv2-VLAD descriptors, ONNX/TensorRT candidate path, CPU FAISS, offline package sync client
|
||||
- **Public API**:
|
||||
- `src/satellite_service/__init__.py`
|
||||
- `src/satellite_service/types.py`
|
||||
- `src/satellite_service/interfaces.py`
|
||||
- **Internal (do NOT import from other components)**:
|
||||
- `src/satellite_service/internal/*`
|
||||
- `src/satellite_service/_*.py`
|
||||
- `src/satellite_service/native/**`
|
||||
- **Owns (exclusive write during implementation)**:
|
||||
- `src/satellite_service/**`
|
||||
- **Imports from**: Camera Ingest And Calibration, Tile Manager, Safety And Anchor Wrapper, shared/contracts, shared/geo_geometry, shared/time_sync, shared/config, shared/errors, shared/telemetry
|
||||
- **Consumed by**: Anchor Verification, FDR And Observability
|
||||
- **Network invariant**: external Satellite Service sync is allowed only pre-flight or post-flight; no mid-flight satellite-provider or suite-service calls.
|
||||
|
||||
### Component: Anchor Verification
|
||||
|
||||
- **Epic**: AZ-215
|
||||
- **Directory**: `src/anchor_verification/`
|
||||
- **Native Directory**: `src/anchor_verification/native/`
|
||||
- **Technologies**: Python validation pipeline, ALIKED/DISK + LightGlue, OpenCV RANSAC/USAC, SIFT/ORB baseline, native feature-matching bridge
|
||||
- **Public API**:
|
||||
- `src/anchor_verification/__init__.py`
|
||||
- `src/anchor_verification/types.py`
|
||||
- `src/anchor_verification/interfaces.py`
|
||||
- **Internal (do NOT import from other components)**:
|
||||
- `src/anchor_verification/internal/*`
|
||||
- `src/anchor_verification/_*.py`
|
||||
- `src/anchor_verification/native/**`
|
||||
- **Owns (exclusive write during implementation)**:
|
||||
- `src/anchor_verification/**`
|
||||
- **Imports from**: Satellite Service, Camera Ingest And Calibration, Tile Manager, shared/contracts, shared/geo_geometry, shared/time_sync, shared/config, shared/errors, shared/telemetry
|
||||
- **Consumed by**: Safety And Anchor Wrapper, FDR And Observability
|
||||
|
||||
### Component: Tile Manager
|
||||
|
||||
- **Epic**: AZ-211
|
||||
- **Directory**: `src/tile_manager/`
|
||||
- **Technologies**: Python repository/policy layer, PostgreSQL/PostGIS, GDAL/rasterio COG handling, signed JSON sidecars, OpenCV/GDAL orthorectification, hash/signature validation
|
||||
- **Public API**:
|
||||
- `src/tile_manager/__init__.py`
|
||||
- `src/tile_manager/types.py`
|
||||
- `src/tile_manager/interfaces.py`
|
||||
- **Internal (do NOT import from other components)**:
|
||||
- `src/tile_manager/internal/*`
|
||||
- `src/tile_manager/_*.py`
|
||||
- **Owns (exclusive write during implementation)**:
|
||||
- `src/tile_manager/**`
|
||||
- `migrations/postgresql/cache_*.sql`
|
||||
- `migrations/seed/cache_*`
|
||||
- **Imports from**: Camera Ingest And Calibration, Safety And Anchor Wrapper, shared/contracts, shared/geo_geometry, shared/time_sync, shared/config, shared/errors, shared/telemetry
|
||||
- **Consumed by**: Satellite Service, Anchor Verification, FDR And Observability
|
||||
|
||||
### Component: MAVLink And GCS Integration
|
||||
|
||||
- **Epic**: AZ-210
|
||||
- **Directory**: `src/mavlink_gcs_integration/`
|
||||
- **Technologies**: Python, MAVSDK telemetry subscriptions, pymavlink `GPS_INPUT` emission, MAVLink/QGC status messages
|
||||
- **Public API**:
|
||||
- `src/mavlink_gcs_integration/__init__.py`
|
||||
- `src/mavlink_gcs_integration/types.py`
|
||||
- `src/mavlink_gcs_integration/interfaces.py`
|
||||
- **Internal (do NOT import from other components)**:
|
||||
- `src/mavlink_gcs_integration/internal/*`
|
||||
- `src/mavlink_gcs_integration/_*.py`
|
||||
- **Owns (exclusive write during implementation)**: `src/mavlink_gcs_integration/**`
|
||||
- **Imports from**: Safety And Anchor Wrapper, shared/contracts, shared/time_sync, shared/config, shared/errors, shared/telemetry
|
||||
- **Consumed by**: VIO Adapter, Safety And Anchor Wrapper, FDR And Observability
|
||||
|
||||
### Component: FDR And Observability
|
||||
|
||||
- **Epic**: AZ-212
|
||||
- **Directory**: `src/fdr_observability/`
|
||||
- **Technologies**: Python append/export layer, PostgreSQL event index, CBOR segment payloads, optional Parquet export, structured logging/health events
|
||||
- **Public API**:
|
||||
- `src/fdr_observability/__init__.py`
|
||||
- `src/fdr_observability/types.py`
|
||||
- `src/fdr_observability/interfaces.py`
|
||||
- **Internal (do NOT import from other components)**:
|
||||
- `src/fdr_observability/internal/*`
|
||||
- `src/fdr_observability/_*.py`
|
||||
- **Owns (exclusive write during implementation)**:
|
||||
- `src/fdr_observability/**`
|
||||
- `migrations/postgresql/fdr_*.sql`
|
||||
- `migrations/seed/fdr_*`
|
||||
- **Imports from**: shared/contracts, shared/time_sync, shared/config, shared/errors, shared/telemetry
|
||||
- **Consumed by**: all runtime components
|
||||
|
||||
## Shared / Cross-Cutting
|
||||
|
||||
### shared/contracts
|
||||
|
||||
- **Epic**: AZ-206
|
||||
- **Directory**: `src/shared/contracts/`
|
||||
- **Technologies**: Python typed DTOs, schema/contract definitions, Markdown API-contract documents
|
||||
- **Purpose**: Shared DTOs, protocol shapes, schemas, and public contract exports.
|
||||
- **Owned by**: initial structure and shared-contract tasks under AZ-206.
|
||||
- **Consumed by**: all components.
|
||||
|
||||
### shared/geo_geometry
|
||||
|
||||
- **Epic**: AZ-207
|
||||
- **Directory**: `src/shared/geo_geometry/`
|
||||
- **Technologies**: Python geometry utilities, OpenCV 4.x, WGS84/local-frame math, homography/covariance conversions
|
||||
- **Purpose**: WGS84/local conversions, GSD, camera footprint projection, homography/covariance unit conversion, and distance calculations.
|
||||
- **Owned by**: shared geometry task under AZ-207.
|
||||
- **Consumed by**: Camera Ingest And Calibration, Safety And Anchor Wrapper, Anchor Verification, Tile Manager.
|
||||
|
||||
### shared/time_sync
|
||||
|
||||
- **Epic**: AZ-207
|
||||
- **Directory**: `src/shared/time_sync/`
|
||||
- **Technologies**: Python timestamp utilities, monotonic-clock validation, MAVLink/camera timestamp normalization, replay ordering checks
|
||||
- **Purpose**: Monotonic timestamp checks, frame-to-IMU alignment, clock-domain metadata, replay ordering, and gap/jitter metrics.
|
||||
- **Owned by**: time-sync task under AZ-207.
|
||||
- **Consumed by**: Camera Ingest And Calibration, VIO Adapter, MAVLink And GCS Integration, FDR And Observability.
|
||||
|
||||
### shared/config
|
||||
|
||||
- **Epic**: AZ-208
|
||||
- **Directory**: `src/shared/config/`
|
||||
- **Technologies**: Python configuration loader, environment variables, `.env.example`, startup readiness validation
|
||||
- **Purpose**: Runtime profile loading, environment validation, typed settings, and startup readiness inputs.
|
||||
- **Owned by**: runtime configuration task under AZ-208.
|
||||
- **Consumed by**: all runtime components.
|
||||
|
||||
### shared/errors
|
||||
|
||||
- **Epic**: AZ-208
|
||||
- **Directory**: `src/shared/errors/`
|
||||
- **Technologies**: Python exception/result envelope types, shared error categories, fail-fast helpers
|
||||
- **Purpose**: Error categories, result envelopes, fail-fast helpers, and non-silent exception contracts.
|
||||
- **Owned by**: runtime error contract task under AZ-208.
|
||||
- **Consumed by**: all components.
|
||||
|
||||
### shared/telemetry
|
||||
|
||||
- **Epic**: AZ-208
|
||||
- **Directory**: `src/shared/telemetry/`
|
||||
- **Technologies**: Python structured logging, metrics labels, health event DTOs, FDR-safe telemetry metadata
|
||||
- **Purpose**: Structured logging, metrics labels, health event shapes, and FDR-safe event metadata helpers.
|
||||
- **Owned by**: observability/config contract task under AZ-208.
|
||||
- **Consumed by**: all components.
|
||||
|
||||
## Allowed Dependencies (layering)
|
||||
|
||||
Read top-to-bottom; an upper layer may import from a lower layer but never the reverse.
|
||||
|
||||
| Layer | Components | May import from |
|
||||
|-------|------------|-----------------|
|
||||
| 4. Runtime Output / Coordination | Safety And Anchor Wrapper, MAVLink And GCS Integration, FDR And Observability | 1, 2, 3 public interfaces |
|
||||
| 3. Perception / Satellite Anchor | VIO Adapter, Satellite Service, Anchor Verification | 1, 2 public interfaces |
|
||||
| 2. Data Ingest / Persistence | Camera Ingest And Calibration, Tile Manager | 1 |
|
||||
| 1. Shared / Foundation | shared/contracts, shared/geo_geometry, shared/time_sync, shared/config, shared/errors, shared/telemetry | none |
|
||||
|
||||
Violations of this table are Architecture findings in code-review Phase 7 and are High severity.
|
||||
|
||||
## Out-of-Product E2E Test Suite
|
||||
|
||||
The e2e replay/SITL/Jetson validation suite is not a product component and must not receive Step 6 product implementation tasks. It owns test-support artifacts under `tests/blackbox/**`, `tests/e2e/**`, `e2e/replay/**`, and `e2e/reports/**`, and it exercises the runtime only through public file, MAVLink, cache, status, and FDR interfaces.
|
||||
|
||||
- **Technologies**: Python, pytest-style runner, Docker/compose, pymavlink/log parser, ArduPilot Plane SITL, QGC observer/log parser, CSV/Markdown reports
|
||||
|
||||
## Self-Verification
|
||||
|
||||
- Every runtime component under `_docs/02_document/components/` has a mapping entry.
|
||||
- Cross-cutting epics AZ-206, AZ-207, and AZ-208 have shared ownership entries.
|
||||
- Layering covers all components and keeps shared code at the bottom.
|
||||
- Component-owned paths do not overlap; native bridge paths live inside the component that owns them.
|
||||
- Paths follow the project `src/` layout already confirmed by `AZ-219_initial_structure`.
|
||||
@@ -4,12 +4,12 @@
|
||||
|
||||
| Check | Result | Notes |
|
||||
|-------|--------|-------|
|
||||
| Single Responsibility | Pass | Components each own one primary concern: ingest, VIO, safety, retrieval, verification, cache, MAVLink, FDR, validation |
|
||||
| Single Responsibility | Pass | Components each own one primary concern: ingest, VIO, safety, Satellite Service sync/retrieval, verification, Tile Manager storage/generation, MAVLink, FDR, validation |
|
||||
| Dumb Code / Smart Data | Pass | Complex behavior is mostly expressed through DTOs, mode labels, covariance fields, manifests, and gates |
|
||||
| Interface Consistency | Pass with fix | Safety wrapper no longer directly depends on cache lifecycle for anchor acceptance; cache freshness/provenance travels through `AnchorDecision` |
|
||||
| Interface Consistency | Pass with fix | Safety wrapper no longer directly depends on Tile Manager for anchor acceptance; cache freshness/provenance travels through `AnchorDecision` |
|
||||
| Circular Dependencies | Pass with caution | Runtime flow is acyclic at component ownership level; MAVLink remains a bidirectional protocol adapter but owns no localization policy |
|
||||
| Missing Interactions | Pass | Pre-VIO occlusion, IMU-only blackout, relocalization, tile writes, FDR, and SITL validation are all represented |
|
||||
| Security Considerations | Pass | Signed cache sidecars, source/system ID checks, spoofing rejection, and no in-flight satellite-provider access are covered |
|
||||
| Security Considerations | Pass | Signed cache sidecars, source/system ID checks, spoofing rejection, and no in-flight satellite-provider or Satellite Service access are covered |
|
||||
| Performance Bottlenecks | Pass | Jetson latency, VPR/local matching, FDR append pressure, PostgreSQL availability, and thermal limits are identified |
|
||||
| API Contracts | Pass | Core DTO handoffs are documented: `FramePacket`, `VioStatePacket`, `AnchorDecision`, `PositionEstimate`, `FdrEvent` |
|
||||
|
||||
@@ -35,13 +35,13 @@
|
||||
| ID | Risk | Category | Probability | Impact | Score | Mitigation | Owner | Status |
|
||||
|----|------|----------|-------------|--------|-------|------------|-------|--------|
|
||||
| R01 | ADTi 20MP 20L V1 public specs conflict with planning assumptions for resolution, FPS, lens, interface, and temperature | Technical / External | Medium | High | High | Pin manufacturer datasheet and exact lens/interface before implementation; make camera calibration/spec task a bootstrap blocker | Camera ingest/calibration | Mitigated by gate |
|
||||
| R02 | BASALT may underperform or lose tracking on nadir fixed-wing low-parallax terrain | Technical | Medium | High | High | Public replay with MUN-FRL/ALTO/Kagaru/EPFL where applicable, representative target replay, OpenVINS reference comparison, Kimera backup path | BASALT VIO adapter | Mitigated by validation |
|
||||
| R02 | BASALT may underperform or lose tracking on nadir fixed-wing low-parallax terrain | Technical | Medium | High | High | Public replay with MUN-FRL/ALTO/Kagaru/EPFL where applicable, representative target replay, OpenVINS reference comparison, Kimera backup path | VIO adapter | Mitigated by validation |
|
||||
| R03 | BASALT confidence/covariance may under-report real error | Safety | Medium | High | High | Wrapper owns covariance calibration; compare against ground truth, satellite residuals, and OpenVINS reference; never emit optimistic `horiz_accuracy` | Safety/anchor wrapper | Mitigated by wrapper design |
|
||||
| R04 | Total occlusion detector may false-negative and feed unusable frames into VIO | Safety / Technical | Medium | High | High | Conservative pre-VIO occlusion gate, FDR status, tests for total blackout, and fallback to IMU-only `dead_reckoned` mode | Camera ingest/calibration | Mitigated by spec/test |
|
||||
| R05 | IMU-only blackout propagation could be trusted too long | Safety | Medium | High | High | Monotonic covariance growth, `dead_reckoned` label, `fix_type=0`/`horiz_accuracy=999.0` when >30 s or covariance >500 m | Safety/anchor wrapper | Mitigated by AC gate |
|
||||
| R06 | DINOv2-VLAD + ALIKED/DISK-LightGlue exceeds Jetson latency/memory budget | Performance | Medium | High | High | Trigger-only execution, CPU FAISS first, top-K caps, model profiling, TensorRT only after fidelity checks | Satellite retrieval / Anchor verification | Mitigated by profiling gates |
|
||||
| R07 | PostgreSQL/PostGIS local DB is unavailable or too heavy for onboard runtime | Technical / Operational | Medium | High | High | Run local onboard PostgreSQL, health-check before flight, keep large payloads in files, fail mission cache validation if DB unavailable | Cache lifecycle / FDR | Mitigated by deployment gates |
|
||||
| R08 | Generated tile cache poisoning corrupts future anchors | Security / Safety | Low | High | Medium | Sigma gate, provenance sidecars, post-flight Satellite Service voting, no direct promotion to trusted basemap | Cache/tile lifecycle | Mitigated by policy |
|
||||
| R06 | DINOv2-VLAD + ALIKED/DISK-LightGlue exceeds Jetson latency/memory budget | Performance | Medium | High | High | Trigger-only execution, CPU FAISS first, top-K caps, model profiling, TensorRT only after fidelity checks | Satellite Service / Anchor verification | Mitigated by profiling gates |
|
||||
| R07 | PostgreSQL/PostGIS local DB is unavailable or too heavy for onboard runtime | Technical / Operational | Medium | High | High | Run local onboard PostgreSQL, health-check before flight, keep large payloads in files, fail mission cache validation if DB unavailable | Tile Manager / FDR | Mitigated by deployment gates |
|
||||
| R08 | Generated tile cache poisoning corrupts future anchors | Security / Safety | Low | High | Medium | Sigma gate, provenance sidecars, post-flight Satellite Service voting, no direct promotion to trusted basemap | Tile Manager | Mitigated by policy |
|
||||
| R09 | Public datasets do not cover final target terrain or commercial license needs | External / Schedule | Medium | Medium | Medium | Use public data for de-risking only; representative synchronized target data remains mandatory for acceptance | Validation harness | Mitigated by acceptance rule |
|
||||
| R10 | MAVLink `GPS_INPUT` parameters or Plane behavior differs from assumptions | Integration | Medium | High | High | Plane SITL release gate with production parameters, spoofing/failsafe tests, raw field validation with pymavlink | MAVLink/GCS integration | Mitigated by SITL gate |
|
||||
| R11 | FDR appends or PostgreSQL indexing interferes with hot-path latency | Performance | Medium | Medium | Medium | Append asynchronously, use CBOR payload segments for high-volume data, keep PostgreSQL as event index/query surface | FDR/observability | Mitigated by design |
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
**Trigger conditions**: Manufacturer documentation or hardware testing contradicts assumed FPS, interface, temperature, or lens characteristics.
|
||||
|
||||
**Affected components**: Camera ingest/calibration, BASALT VIO adapter, validation harness, deployment procedures.
|
||||
**Affected components**: Camera ingest/calibration, VIO adapter, separate e2e test suite, deployment procedures.
|
||||
|
||||
**Mitigation strategy**:
|
||||
1. Make camera specification verification a bootstrap task.
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
**Trigger conditions**: Public or representative replay shows high drift, frequent tracking loss, or poor initialization.
|
||||
|
||||
**Affected components**: BASALT VIO adapter, safety/anchor wrapper, validation harness.
|
||||
**Affected components**: VIO adapter, safety/anchor wrapper, separate e2e test suite.
|
||||
|
||||
**Mitigation strategy**:
|
||||
1. Run MUN-FRL first for synchronized nadir camera + IMU + ground truth.
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
**Residual risk after mitigation**: Medium.
|
||||
|
||||
**Documents updated**: `architecture.md`, `components/02_basalt_vio_adapter/description.md`, `tests/test-data.md`.
|
||||
**Documents updated**: `architecture.md`, `components/02_vio_adapter/description.md`, `tests/test-data.md`.
|
||||
|
||||
---
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
**Trigger conditions**: Lens cover, cloud/whiteout, decode failure, underexposure/overexposure, or textureless frame reaches VIO as usable.
|
||||
|
||||
**Affected components**: Camera ingest/calibration, safety/anchor wrapper, BASALT VIO adapter.
|
||||
**Affected components**: Camera ingest/calibration, safety/anchor wrapper, VIO adapter.
|
||||
|
||||
**Mitigation strategy**:
|
||||
1. Camera ingest exposes `OcclusionReport` and sets `usable_for_vio=false` for total occlusion/blackout.
|
||||
@@ -160,7 +160,7 @@
|
||||
|
||||
**Trigger conditions**: Relocalization exceeds p95 latency, memory budget, or causes thermal throttling.
|
||||
|
||||
**Affected components**: Satellite retrieval, anchor verification, validation harness.
|
||||
**Affected components**: Satellite Service, anchor verification, separate e2e test suite.
|
||||
|
||||
**Mitigation strategy**:
|
||||
1. Keep VPR/local matching trigger-based.
|
||||
@@ -181,7 +181,7 @@
|
||||
|
||||
**Trigger conditions**: Local DB does not start, DB files corrupt, DB consumes too much memory/I/O, or migrations fail.
|
||||
|
||||
**Affected components**: Cache/tile lifecycle, FDR/observability, deployment procedures.
|
||||
**Affected components**: Tile Manager, FDR/observability, deployment procedures.
|
||||
|
||||
**Mitigation strategy**:
|
||||
1. Require local onboard PostgreSQL health check before flight.
|
||||
@@ -202,7 +202,7 @@
|
||||
|
||||
**Trigger conditions**: Generated tile is promoted despite high parent covariance, stale source, bad sidecar, or inconsistent overlap voting.
|
||||
|
||||
**Affected components**: Cache/tile lifecycle, safety/anchor wrapper, Satellite Service integration.
|
||||
**Affected components**: Tile Manager, safety/anchor wrapper, Satellite Service integration.
|
||||
|
||||
**Mitigation strategy**:
|
||||
1. Require tile-write sigma gates.
|
||||
@@ -223,7 +223,7 @@
|
||||
|
||||
**Trigger conditions**: MUN-FRL/ALTO/Kagaru/EPFL slices are unavailable, unrepresentative, or license-incompatible for acceptance.
|
||||
|
||||
**Affected components**: Validation harness, BASALT VIO adapter, anchor verification.
|
||||
**Affected components**: Validation harness, VIO adapter, anchor verification.
|
||||
|
||||
**Mitigation strategy**:
|
||||
1. Use public datasets for de-risking only.
|
||||
@@ -244,7 +244,7 @@
|
||||
|
||||
**Trigger conditions**: Plane SITL rejects or mishandles emitted `GPS_INPUT`, or QGC status is insufficient.
|
||||
|
||||
**Affected components**: MAVLink/GCS integration, safety/anchor wrapper, validation harness.
|
||||
**Affected components**: MAVLink/GCS integration, safety/anchor wrapper, separate e2e test suite.
|
||||
|
||||
**Mitigation strategy**:
|
||||
1. Use pymavlink for exact `GPS_INPUT` field control.
|
||||
@@ -262,7 +262,7 @@
|
||||
| Risk ID | Document Modified | Change Description |
|
||||
|---------|-------------------|--------------------|
|
||||
| R04 | `components/01_camera_ingest_calibration/description.md` | Added explicit `detect_occlusion`, `OcclusionReport`, and pre-VIO bypass behavior |
|
||||
| R04/R05 | `components/03_safety_anchor_wrapper/description.md` | Added `propagate_imu_only`, `total_occlusion`, monotonic covariance behavior, and no direct cache lifecycle dependency |
|
||||
| R04/R05 | `components/03_safety_anchor_wrapper/description.md` | Added `propagate_imu_only`, `total_occlusion`, monotonic covariance behavior, and no direct Tile Manager dependency |
|
||||
| R07 | `data_model.md` | Replaced embedded DB references with PostgreSQL/PostGIS structured metadata and CBOR FDR payload segments |
|
||||
| R07 | `architecture.md` | Added PostgreSQL/PostGIS ADR and FDR storage decision |
|
||||
| R05 | `tests/blackbox-tests.md` / `tests/resilience-tests.md` | Made total occlusion and IMU-only blackout behavior explicit |
|
||||
|
||||
@@ -4,19 +4,19 @@
|
||||
|
||||
| # | Flow Name | Trigger | Primary Components | Criticality |
|
||||
|---|-----------|---------|--------------------|-------------|
|
||||
| F1 | Pre-flight cache preparation | Operator sync before mission | Satellite Service, cache/tile lifecycle, satellite retrieval | High |
|
||||
| F2 | Normal frame processing | Navigation frame + FC telemetry | Camera ingest, BASALT VIO adapter, safety/anchor wrapper, MAVLink, FDR | High |
|
||||
| F3 | Satellite relocalization | Cold start, VO failure, sharp turn, covariance growth, stale anchor | Satellite retrieval, anchor verification, safety/anchor wrapper | High |
|
||||
| F1 | Pre-flight cache preparation | Operator sync before mission | Satellite Service, Tile Manager | High |
|
||||
| F2 | Normal frame processing | Navigation frame + FC telemetry | Camera ingest, VIO adapter, safety/anchor wrapper, MAVLink, FDR | High |
|
||||
| F3 | Satellite relocalization | Cold start, VO failure, sharp turn, covariance growth, stale anchor | Satellite Service, anchor verification, safety/anchor wrapper | High |
|
||||
| F4 | Visual blackout / spoofing degraded mode | Image-quality failure and GPS health failure | Camera ingest, MAVLink telemetry, safety/anchor wrapper, QGC, FDR | Critical |
|
||||
| F5 | Generated tile lifecycle | High-confidence pose + usable frame | Camera ingest, safety/anchor wrapper, cache/tile lifecycle, FDR | Medium |
|
||||
| F6 | Post-flight sync and audit | Landing / operator offload | Cache/tile lifecycle, Satellite Service, FDR | Medium |
|
||||
| F7 | Validation replay | Test harness invocation | Validation harness, system runtime, public datasets, SITL | High |
|
||||
| F5 | Generated tile lifecycle | High-confidence pose + usable frame | Camera ingest, safety/anchor wrapper, Tile Manager, FDR | Medium |
|
||||
| F6 | Post-flight sync and audit | Landing / operator offload | Tile Manager, Satellite Service, FDR | Medium |
|
||||
| F7 | E2E validation replay | Test-suite invocation | Separate e2e test suite, system runtime, public datasets, SITL | High |
|
||||
|
||||
## Flow Dependencies
|
||||
|
||||
| Flow | Depends On | Shares Data With |
|
||||
|------|------------|------------------|
|
||||
| F1 | Satellite Service cache export | F2, F3, F5 |
|
||||
| F1 | Satellite Service cache export and Tile Manager validation | F2, F3, F5 |
|
||||
| F2 | F1 for cache availability; FC telemetry | F3, F4, F5, FDR |
|
||||
| F3 | F1 cache/index; F2 state estimate | F2, F5 |
|
||||
| F4 | F2 telemetry and quality signals | F2, QGC/FDR |
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
### Description
|
||||
|
||||
Before flight, the Satellite Service provides an offline cache for the operational area, including COG tiles, manifests, sidecars, VPR chunks, descriptors, and FAISS index files.
|
||||
Before flight, the Satellite Service imports an offline cache package for the operational area, including COG tiles, manifests, sidecars, VPR chunks, descriptors, and FAISS index files. No Satellite Service or satellite-provider calls are allowed during flight.
|
||||
|
||||
### Preconditions
|
||||
|
||||
@@ -44,23 +44,22 @@ Before flight, the Satellite Service provides an offline cache for the operation
|
||||
sequenceDiagram
|
||||
participant Operator
|
||||
participant SatelliteService
|
||||
participant CacheLifecycle
|
||||
participant SatelliteRetrieval
|
||||
participant TileManager
|
||||
|
||||
Operator->>SatelliteService: Request mission cache
|
||||
SatelliteService-->>CacheLifecycle: COG tiles + manifests + sidecars
|
||||
CacheLifecycle->>CacheLifecycle: Verify signatures, hashes, freshness, resolution
|
||||
CacheLifecycle->>SatelliteRetrieval: Load VPR chunks + FAISS index
|
||||
CacheLifecycle-->>Operator: Cache validation report
|
||||
SatelliteService-->>TileManager: COG tiles + manifests + sidecars
|
||||
TileManager->>TileManager: Verify signatures, hashes, freshness, resolution
|
||||
TileManager-->>SatelliteService: Local cache/index ready
|
||||
TileManager-->>Operator: Cache validation report
|
||||
```
|
||||
|
||||
### Data Flow
|
||||
|
||||
| Step | From | To | Data | Format |
|
||||
|------|------|----|------|--------|
|
||||
| 1 | Satellite Service | Cache lifecycle | Tiles and metadata | COG + PostgreSQL/PostGIS manifest + signed JSON sidecars |
|
||||
| 2 | Cache lifecycle | Satellite retrieval | Descriptor/index files | FAISS index + descriptor sidecars |
|
||||
| 3 | Cache lifecycle | Operator/FDR | Validation report | Markdown/CSV/log |
|
||||
| 1 | Satellite Service | Tile Manager | Tiles and metadata | COG + PostgreSQL/PostGIS manifest + signed JSON sidecars |
|
||||
| 2 | Tile Manager | Satellite Service | Descriptor/index readiness | FAISS index + descriptor sidecars |
|
||||
| 3 | Tile Manager | Operator/FDR | Validation report | Markdown/CSV/log |
|
||||
|
||||
### Error Scenarios
|
||||
|
||||
@@ -74,7 +73,7 @@ sequenceDiagram
|
||||
|
||||
| Metric | Target | Notes |
|
||||
|--------|--------|-------|
|
||||
| Runtime network calls | 0 | No in-flight provider calls |
|
||||
| Runtime network calls | 0 | No in-flight Satellite Service or provider calls |
|
||||
| Cache load | Within cold-start budget contribution | Exact threshold set during implementation |
|
||||
|
||||
---
|
||||
@@ -83,12 +82,12 @@ sequenceDiagram
|
||||
|
||||
### Description
|
||||
|
||||
During normal flight, the system processes each navigation frame and FC telemetry sample. The camera component first checks for total occlusion/blackout. Usable frames go to BASALT VIO; total-occlusion frames bypass VIO and send the wrapper into IMU-only degraded propagation.
|
||||
During normal flight, the system processes each navigation frame and FC telemetry sample. The camera component first checks for total occlusion/blackout. Usable frames go to the VIO adapter; total-occlusion frames bypass VIO and send the wrapper into IMU-only degraded propagation.
|
||||
|
||||
### Preconditions
|
||||
|
||||
- Camera calibration/extrinsics are loaded.
|
||||
- BASALT and wrapper are initialized.
|
||||
- VIO adapter and wrapper are initialized.
|
||||
- FC telemetry stream is healthy.
|
||||
|
||||
### Sequence Diagram
|
||||
@@ -116,9 +115,9 @@ sequenceDiagram
|
||||
|
||||
| Step | From | To | Data | Format |
|
||||
|------|------|----|------|--------|
|
||||
| 1 | Camera ingest | BASALT adapter or safety wrapper | Frame metadata, image, occlusion status | Frame DTO / DegradationSignal |
|
||||
| 2 | FC telemetry | BASALT adapter | IMU/attitude/altitude | MAVLink-derived telemetry DTO |
|
||||
| 3 | BASALT adapter | Safety wrapper | Relative VIO state | VioState DTO |
|
||||
| 1 | Camera ingest | VIO adapter or safety wrapper | Frame metadata, image, occlusion status | Frame DTO / DegradationSignal |
|
||||
| 2 | FC telemetry | VIO adapter | IMU/attitude/altitude | MAVLink-derived telemetry DTO |
|
||||
| 3 | VIO adapter | Safety wrapper | Relative VIO state | VioState DTO |
|
||||
| 4 | Safety wrapper | MAVLink output | WGS84 estimate | `GPS_INPUT` |
|
||||
| 5 | Safety wrapper | FDR | Inputs/outputs/audit | FDR segment event |
|
||||
|
||||
@@ -126,9 +125,9 @@ sequenceDiagram
|
||||
|
||||
| Error | Where | Detection | Recovery |
|
||||
|-------|-------|-----------|----------|
|
||||
| Total occlusion / blackout | Camera ingest | Occlusion status, exposure/texture/decode checks | Bypass BASALT, enter IMU-only `dead_reckoned` propagation |
|
||||
| Frame unreadable | Camera ingest | Decode/quality failure | Mark visual signal degraded and bypass BASALT for that frame |
|
||||
| VIO quality low | BASALT adapter | Tracking/completion metrics | Trigger relocalization or dead reckoning |
|
||||
| Total occlusion / blackout | Camera ingest | Occlusion status, exposure/texture/decode checks | Bypass VIO, enter IMU-only `dead_reckoned` propagation |
|
||||
| Frame unreadable | Camera ingest | Decode/quality failure | Mark visual signal degraded and bypass VIO for that frame |
|
||||
| VIO quality low | VIO adapter | Tracking/completion metrics | Trigger relocalization or dead reckoning |
|
||||
| Covariance grows | Safety wrapper | Covariance threshold | Degrade fix type/source label |
|
||||
|
||||
### Performance Expectations
|
||||
@@ -157,14 +156,14 @@ When the state becomes uncertain or disconnected, the system retrieves satellite
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant SafetyWrapper
|
||||
participant SatelliteRetrieval
|
||||
participant SatelliteService
|
||||
participant AnchorVerification
|
||||
participant CacheLifecycle
|
||||
participant TileManager
|
||||
participant FDR
|
||||
|
||||
SafetyWrapper->>SatelliteRetrieval: Relocalization request
|
||||
SatelliteRetrieval->>CacheLifecycle: Read candidate chunk metadata
|
||||
SatelliteRetrieval-->>AnchorVerification: Top-K candidates
|
||||
SafetyWrapper->>SatelliteService: Relocalization request
|
||||
SatelliteService->>TileManager: Read candidate chunk metadata
|
||||
SatelliteService-->>AnchorVerification: Top-K candidates
|
||||
AnchorVerification->>AnchorVerification: ALIKED/DISK+LightGlue + RANSAC
|
||||
AnchorVerification-->>SafetyWrapper: Accepted/rejected anchor
|
||||
SafetyWrapper->>SafetyWrapper: Mahalanobis + freshness + provenance gates
|
||||
@@ -175,8 +174,8 @@ sequenceDiagram
|
||||
|
||||
| Step | From | To | Data | Format |
|
||||
|------|------|----|------|--------|
|
||||
| 1 | Safety wrapper | Satellite retrieval | Query frame and prior/covariance | Relocalization DTO |
|
||||
| 2 | Satellite retrieval | Anchor verification | Top-K chunks | Candidate list |
|
||||
| 1 | Safety wrapper | Satellite Service | Query frame and prior/covariance | Relocalization DTO |
|
||||
| 2 | Satellite Service | Anchor verification | Top-K chunks from local cache/index | Candidate list |
|
||||
| 3 | Anchor verification | Safety wrapper | MRE, inliers, homography, provenance | AnchorDecision DTO |
|
||||
|
||||
### Error Scenarios
|
||||
@@ -184,7 +183,7 @@ sequenceDiagram
|
||||
| Error | Where | Detection | Recovery |
|
||||
|-------|-------|-----------|----------|
|
||||
| No good candidate | Retrieval/verification | Low score or failed RANSAC | Continue degraded and request GCS hint after threshold |
|
||||
| Stale candidate | Cache lifecycle | Capture date gate | Reject/down-confidence |
|
||||
| Stale candidate | Tile Manager | Capture date gate | Reject/down-confidence |
|
||||
| Implausible anchor | Safety wrapper | Mahalanobis/impossible velocity gate | Reject and log |
|
||||
|
||||
### Performance Expectations
|
||||
@@ -259,17 +258,17 @@ When pose confidence is strong enough, the system orthorectifies navigation imag
|
||||
|
||||
| Step | From | To | Data | Format |
|
||||
|------|------|----|------|--------|
|
||||
| 1 | Safety wrapper | Cache lifecycle | Pose/covariance + frame metadata | TileGenerationRequest |
|
||||
| 2 | Cache lifecycle | Local storage | Generated COG + sidecar | COG + signed JSON |
|
||||
| 3 | Cache lifecycle | FDR | Tile write event | FDR event |
|
||||
| 1 | Safety wrapper | Tile Manager | Pose/covariance + frame metadata | TileGenerationRequest |
|
||||
| 2 | Tile Manager | Local storage | Orthorectified generated COG + sidecar | COG + signed JSON |
|
||||
| 3 | Tile Manager | FDR | Tile write event | FDR event |
|
||||
|
||||
### Error Scenarios
|
||||
|
||||
| Error | Where | Detection | Recovery |
|
||||
|-------|-------|-----------|----------|
|
||||
| Parent covariance too high | Safety wrapper | Sigma gate | Do not write tile |
|
||||
| Duplicate sector | Cache lifecycle | Spatial deduplication | Keep latest/highest-quality tile |
|
||||
| Sidecar write failure | Cache lifecycle | I/O error | Log and do not mark tile eligible |
|
||||
| Duplicate sector | Tile Manager | Spatial deduplication | Keep latest/highest-quality tile |
|
||||
| Sidecar write failure | Tile Manager | I/O error | Log and do not mark tile eligible |
|
||||
|
||||
---
|
||||
|
||||
@@ -277,13 +276,13 @@ When pose confidence is strong enough, the system orthorectifies navigation imag
|
||||
|
||||
### Description
|
||||
|
||||
After landing, generated tiles and FDR evidence are exported for Satellite Service ingest and incident analysis.
|
||||
After landing, generated tiles and FDR evidence are exported through Satellite Service sync for ingest and incident analysis.
|
||||
|
||||
### Data Flow
|
||||
|
||||
| Step | From | To | Data | Format |
|
||||
|------|------|----|------|--------|
|
||||
| 1 | Cache lifecycle | Satellite Service | Generated tile package | COG + sidecar + manifest delta |
|
||||
| 1 | Tile Manager | Satellite Service | Generated tile package | COG + sidecar + manifest delta |
|
||||
| 2 | FDR | Operator/audit tools | Mission replay evidence | Segmented logs + optional Parquet export |
|
||||
|
||||
### Error Scenarios
|
||||
@@ -299,7 +298,7 @@ After landing, generated tiles and FDR evidence are exported for Satellite Servi
|
||||
|
||||
### Description
|
||||
|
||||
The validation harness runs deterministic still-image, public dataset, SITL, Jetson, and representative replay scenarios against public interfaces.
|
||||
The separate e2e test suite runs deterministic still-image, public dataset, SITL, Jetson, and representative replay scenarios against public interfaces.
|
||||
|
||||
### Preconditions
|
||||
|
||||
@@ -310,9 +309,9 @@ The validation harness runs deterministic still-image, public dataset, SITL, Jet
|
||||
|
||||
| Step | From | To | Data | Format |
|
||||
|------|------|----|------|--------|
|
||||
| 1 | Validation harness | Runtime | Images/telemetry/cache fixtures | File/stream/MAVLink |
|
||||
| 2 | Runtime | Validation harness | GPS_INPUT/FDR/status | MAVLink/log files |
|
||||
| 3 | Validation harness | Reports | Pass/fail metrics | CSV/Markdown |
|
||||
| 1 | E2E test suite | Runtime | Images/telemetry/cache fixtures | File/stream/MAVLink |
|
||||
| 2 | Runtime | E2E test suite | GPS_INPUT/FDR/status | MAVLink/log files |
|
||||
| 3 | E2E test suite | Reports | Pass/fail metrics | CSV/Markdown |
|
||||
|
||||
### Performance Expectations
|
||||
|
||||
|
||||
@@ -52,33 +52,38 @@
|
||||
|
||||
---
|
||||
|
||||
### FT-P-03: BASALT VIO Replay With Public Synchronized Data
|
||||
### FT-P-03: BASALT VIO Replay With Synchronized Video/Telemetry
|
||||
|
||||
**Summary**: Validate that BASALT + safety/anchor wrapper can process synchronized camera/IMU data and produce trajectory estimates with calibrated confidence.
|
||||
**Summary**: Validate that BASALT + safety/anchor wrapper can process synchronized nadir video, IMU, and trajectory telemetry and produce frame-by-frame estimates with honest confidence.
|
||||
|
||||
**Traces to**: AC-1.3, AC-2.1a, AC-2.2, AC-4.1, AC-4.2
|
||||
|
||||
**Category**: VO / IMU Propagation
|
||||
|
||||
**Preconditions**:
|
||||
- Public synchronized dataset slice is pinned during implementation. Strongest candidates: MUN-FRL, ALTO, EPFL fixed-wing, Kagaru; EuRoC/UZH FPV are proxy-only.
|
||||
- Ground-truth trajectory or frame poses are available.
|
||||
- Derkachi replay fixture is mounted from `input_data/flight_derkachi/`.
|
||||
- `flight_derkachi.mp4` is readable as cropped nadir video: 880 x 720, 30 fps, approximately 490.07 s.
|
||||
- `data_imu.csv` contains monotonic 10 Hz `Time`, `timestamp(ms)`, `SCALED_IMU2.*`, and `GLOBAL_POSITION_INT.*` fields for 4,900 rows.
|
||||
- Camera intrinsics, lens distortion, and camera-to-body transform are either pinned or the run is marked as calibration-limited.
|
||||
- Public synchronized dataset slice remains useful for calibrated final comparison. Strongest candidates: MUN-FRL, ALTO, EPFL fixed-wing, Kagaru; EuRoC/UZH FPV are proxy-only.
|
||||
|
||||
**Input data**: `public_nadir_vio_candidates`
|
||||
**Input data**: `derkachi_video_telemetry`, `public_nadir_vio_candidates`
|
||||
|
||||
| Step | Consumer Action | Expected System Response |
|
||||
|------|-----------------|--------------------------|
|
||||
| 1 | Replay synchronized camera and IMU stream | System emits frame-by-frame `vo_extrapolated` or `satellite_anchored` estimates |
|
||||
| 2 | Compare output trajectory to dataset ground truth | Error and covariance calibration are reported per segment |
|
||||
| 3 | Compare against OpenVINS reference replay | BASALT + wrapper does not materially under-report uncertainty relative to error |
|
||||
| 1 | Validate Derkachi video/telemetry alignment | Harness accepts the fixture only if MP4 duration and CSV duration differ by <=250 ms and there are exactly 3 video frames per telemetry row |
|
||||
| 2 | Replay synchronized video frames and IMU stream | System emits frame-by-frame `vo_extrapolated` or `satellite_anchored` estimates without batching |
|
||||
| 3 | Compare output trajectory to `GLOBAL_POSITION_INT` lat/lon/alt/heading | Error, covariance, source label, and anchor age are reported per segment |
|
||||
| 4 | Compare calibrated public/representative replay against ground truth when available | BASALT + wrapper does not materially under-report uncertainty relative to error |
|
||||
| 5 | Compare against OpenVINS reference replay when available | BASALT + wrapper does not materially under-report uncertainty relative to error |
|
||||
|
||||
**Expected outcome**: VO registration succeeds for >95% of normal overlapping frames in dataset-supported normal segments; VO homography MRE is <1.0 px where homography validation is applicable.
|
||||
**Expected outcome**: Derkachi replay is accepted as a synchronized representative fixture and produces continuous estimates for >95% of normal overlapping frames. Absolute geolocation and covariance pass/fail thresholds are calibration-gated until camera intrinsics, distortion, and camera-to-body transform are pinned. For calibrated datasets, VO homography MRE is <1.0 px where homography validation is applicable.
|
||||
|
||||
**Max execution time**: Dataset-dependent, but replay must report per-frame latency.
|
||||
|
||||
---
|
||||
|
||||
### FT-P-04: Satellite Retrieval And Anchor Verification
|
||||
### FT-P-04: Satellite Service And Anchor Verification
|
||||
|
||||
**Summary**: Validate that relocalization uses global retrieval plus local verification and emits only verified satellite anchors.
|
||||
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
# E2E Test Suite
|
||||
|
||||
## Scope
|
||||
|
||||
The e2e test suite is separate test tooling, not part of the onboard runtime. It drives black-box replay, public dataset, SITL, Jetson, and representative validation through public runtime interfaces only.
|
||||
|
||||
## Purpose
|
||||
|
||||
- Feed navigation frames, telemetry traces, cache manifests, and fault triggers into the system under test.
|
||||
- Validate emitted coordinates, confidence fields, MAVLink `GPS_INPUT`, QGC status, FDR, and generated-tile evidence.
|
||||
- Produce release evidence without importing runtime internals.
|
||||
|
||||
## Ownership
|
||||
|
||||
- **Epic**: AZ-217 (E2E Test Suite / test-support work, not product runtime)
|
||||
- **Owns**:
|
||||
- `tests/blackbox/**`
|
||||
- `tests/e2e/**`
|
||||
- `e2e/replay/**`
|
||||
- `e2e/reports/**`
|
||||
- **Does not own**:
|
||||
- `src/**`
|
||||
- runtime component internals
|
||||
- production deployment code
|
||||
|
||||
## Public Interfaces Under Test
|
||||
|
||||
| Interface | Protocol / Contract |
|
||||
|-----------|---------------------|
|
||||
| Navigation frames | Ordered image/video replay with timestamps |
|
||||
| FC telemetry | MAVLink replay or generated stream |
|
||||
| Satellite cache | Local COG + manifest + descriptor fixtures |
|
||||
| GPS output | MAVLink `GPS_INPUT` |
|
||||
| Operator status | QGC-visible MAVLink status |
|
||||
| FDR | Filesystem/database-backed evidence outputs |
|
||||
|
||||
## Runner Contract
|
||||
|
||||
| Method | Input | Output | Error Types |
|
||||
|--------|-------|--------|-------------|
|
||||
| `run_scenario` | `ScenarioRequest` | `ScenarioReport` | `FixtureInvalid`, `RuntimeFailed`, `ThresholdFailed` |
|
||||
| `validate_fixture` | `FixtureRequest` | `FixtureValidationReport` | `FixtureInvalid` |
|
||||
|
||||
```yaml
|
||||
ScenarioRequest:
|
||||
scenario_id: string
|
||||
execution_environment: enum(replay, sitl, jetson, representative)
|
||||
fixture_paths: list[string]
|
||||
|
||||
ScenarioReport:
|
||||
scenario_id: string
|
||||
result: enum(pass, fail, blocked)
|
||||
metrics: object
|
||||
artifacts: list[path]
|
||||
failure_reason: string optional
|
||||
```
|
||||
|
||||
## Scenario Coverage
|
||||
|
||||
| Scenario | Purpose | Evidence |
|
||||
|----------|---------|----------|
|
||||
| Still-image accuracy runner | Verify project still-image replay reports frame-center accuracy | Per-image error, aggregate pass rates, covariance, source label, anchor age |
|
||||
| Synchronized VIO replay runner | Verify Derkachi and public/representative synchronized data drive BASALT/wrapper tests | Fixture alignment, trajectory comparison, VIO registration, latency, covariance calibration |
|
||||
| Satellite anchor replay runner | Verify VPR and anchor verification scenarios are executable | Retrieval recall, MRE, accepted/rejected anchors, freshness behavior |
|
||||
| Outlier/sharp-turn/disconnected runner | Verify relocalization resilience scenarios are executable | Degraded-mode timelines and relocalization outcomes |
|
||||
| Blackout and spoofing runner | Verify total blackout plus spoofing through SITL/replay | Mode-switch timing, covariance growth, failsafe thresholds |
|
||||
| MAVLink/QGC contract runner | Verify MAVLink output and GCS status assertions | `GPS_INPUT`, WGS84 coordinates, status rate, command ingress |
|
||||
| Startup/reboot runner | Verify cold-start and companion reboot scenarios | First valid `GPS_INPUT` p95 and FC-state reinitialization |
|
||||
| Object coordinate contract runner | Verify AI-camera object coordinate request at system boundary | Frame-center-consistent coordinate accuracy and projection bound |
|
||||
| Tile Manager runner | Verify cache, generated tiles, and storage tests | Cache load, tile write gates, no raw-frame retention, stale rejection, poisoning evidence |
|
||||
|
||||
## Release Evidence
|
||||
|
||||
The suite assembles CSV, Markdown, MAVLink tlogs, FDR summaries, cache validation reports, and pass/fail metadata into release evidence bundles. Missing public or representative data is reported as `blocked`, not `passed`.
|
||||
|
||||
## Non-Responsibilities
|
||||
|
||||
- No onboard flight logic.
|
||||
- No direct estimator, BASALT, wrapper, or tile-manager imports.
|
||||
- No mutation of runtime internal state.
|
||||
- No production service APIs.
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
| Environment | Purpose | Required for |
|
||||
|-------------|---------|--------------|
|
||||
| Local replay workstation | Fast still-image and dataset replay validation | Frame-center geolocation, satellite retrieval, stale-tile rejection |
|
||||
| Local replay workstation | Fast still-image and dataset replay validation | Frame-center geolocation, Satellite Service local retrieval, stale-tile rejection |
|
||||
| Jetson Orin Nano Super | Production-like latency, memory, thermal, and TensorRT/ONNX profiling | AC-4.1, AC-4.2, AC-NEW-1, AC-NEW-5 |
|
||||
| ArduPilot Plane SITL + QGroundControl | MAVLink `GPS_INPUT`, spoofing, failsafe, and GCS status validation | AC-4.3, AC-5.2, AC-NEW-2, AC-NEW-8 |
|
||||
| Representative flight/replay rig | Final acceptance evidence with synchronized nav camera, FC IMU/attitude/airspeed/altitude, MAVLink logs, and ground truth | Final AC signoff |
|
||||
@@ -38,6 +38,7 @@
|
||||
|--------|------------|---------|
|
||||
| input-data | `/data/input` | `_docs/00_problem/input_data/` and public dataset slices |
|
||||
| expected-results | `/data/expected` | `_docs/00_problem/input_data/expected_results/` |
|
||||
| derkachi-replay | `/data/input/flight_derkachi` | Cropped nadir MP4 plus synchronized IMU and `GLOBAL_POSITION_INT` trajectory |
|
||||
| satellite-cache | `/cache/satellite` | COG tiles, manifests, descriptor index fixtures |
|
||||
| fdr-output | `/fdr` | Flight-data-recorder outputs for validation |
|
||||
|
||||
@@ -98,6 +99,7 @@
|
||||
Use Docker or local host replay for deterministic, reproducible tests that do not require physical Jetson hardware:
|
||||
|
||||
- Still-image frame-center geolocation.
|
||||
- Derkachi synchronized video/telemetry replay, including alignment and VIO smoke checks.
|
||||
- Satellite-cache freshness and integrity fixtures.
|
||||
- FAISS descriptor/index behavior.
|
||||
- Public dataset replay where GPU/hardware timing is not the assertion.
|
||||
|
||||
@@ -25,23 +25,25 @@
|
||||
|
||||
### NFT-PERF-02: BASALT + Wrapper Replay Latency
|
||||
|
||||
**Summary**: Validate relative VIO hot-path latency using synchronized public or representative camera/IMU data.
|
||||
**Summary**: Validate relative VIO hot-path latency using synchronized Derkachi video/telemetry and public or representative camera/IMU data.
|
||||
|
||||
**Traces to**: AC-2.1a, AC-4.1, AC-4.2
|
||||
|
||||
**Metric**: Per-frame VIO latency, completion rate, and memory usage.
|
||||
|
||||
**Preconditions**:
|
||||
- MUN-FRL/ALTO/EPFL/Kagaru or representative synchronized dataset slice is pinned.
|
||||
- OpenVINS reference replay is available for comparison.
|
||||
- Derkachi `flight_derkachi.mp4` and `data_imu.csv` are mounted and pass fixture validation.
|
||||
- MUN-FRL/ALTO/EPFL/Kagaru or another representative synchronized dataset slice is pinned for calibrated final comparison.
|
||||
- OpenVINS reference replay is available for comparison when the dataset supports it.
|
||||
|
||||
| Step | Consumer Action | Measurement |
|
||||
|------|-----------------|-------------|
|
||||
| 1 | Replay synchronized camera/IMU stream through BASALT + wrapper | Measure per-frame processing time |
|
||||
| 2 | Compare emitted trajectory against ground truth | Measure completion rate and error distribution |
|
||||
| 3 | Monitor memory | Track CPU/GPU shared memory peak |
|
||||
| 1 | Replay Derkachi video at target 3 fps and stress rates from the 30 fps source | Measure per-frame processing time, dropped frames, and telemetry alignment |
|
||||
| 2 | Replay synchronized camera/IMU stream through BASALT + wrapper | Measure VIO processing time and completion rate |
|
||||
| 3 | Compare emitted trajectory against Derkachi `GLOBAL_POSITION_INT` and calibrated dataset ground truth where available | Measure completion rate and error distribution |
|
||||
| 4 | Monitor memory | Track CPU/GPU shared memory peak |
|
||||
|
||||
**Pass criteria**: Normal-frame VO registration >95%; p95 processing latency <400 ms for the hot path; memory <8 GB shared.
|
||||
**Pass criteria**: Normal-frame VO registration >95% on calibration-supported segments; p95 processing latency <400 ms for the hot path; memory <8 GB shared; Derkachi replay maintains stable 3-video-frames-per-telemetry-row alignment with <=10% dropped frames under sustained target-rate replay.
|
||||
|
||||
**Duration**: Dataset-dependent; at least one normal segment and one challenging segment.
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
| `project_60_still_images` | 60 nadir images with WGS84 frame-center coordinates from `coordinates.csv`; height 400 m | FT-P-01, FT-P-02, FT-N-01, NFT-PERF-01 | Mounted from `_docs/00_problem/input_data/` | Read-only |
|
||||
| `project_gmaps_reference_subset` | Google Maps reference images available for the first sample frames | FT-P-02, FT-N-01 | Mounted from `_docs/00_problem/input_data/` | Read-only |
|
||||
| `expected_frame_centers` | Expected lat/lon and thresholds derived from `coordinates.csv` | FT-P-01, FT-P-02 | `_docs/00_problem/input_data/expected_results/results_report.md` | Read-only |
|
||||
| `derkachi_video_telemetry` | Cropped nadir MP4 synchronized with IMU and `GLOBAL_POSITION_INT` trajectory: 880 x 720, 30 fps, ~490.07 s; telemetry 10 Hz, 4,900 rows | FT-P-03, NFT-PERF-02, NFT-RES-02 | Mounted from `_docs/00_problem/input_data/flight_derkachi/` | Read-only |
|
||||
| `public_nadir_vio_candidates` | MUN-FRL, ALTO, EPFL fixed-wing, Kagaru, AerialVL/VPAir slices, EuRoC/UZH FPV proxy slices | FT-P-03, FT-P-04, NFT-PERF-02, NFT-RES-02 | Downloaded or mounted by replay harness; exact files pinned during implementation | Reset fixture volume |
|
||||
| `sitl_spoofing_scenarios` | Generated ArduPilot Plane SITL GPS loss/spoofing traces | FT-N-02, NFT-RES-01, NFT-SEC-03 | Generated by test harness | Discard generated logs after report |
|
||||
| `cache_integrity_fixtures` | Fresh, stale, unsigned, hash-mismatched, and low-resolution cache manifests | FT-N-03, NFT-SEC-01, NFT-SEC-02 | Mounted fixture volume | Read-only |
|
||||
@@ -36,6 +37,7 @@ Every replay test uses read-only fixture mounts and writes results to a fresh `t
|
||||
| `coordinates.csv` | `_docs/00_problem/input_data/coordinates.csv` | Machine-readable expected frame centers | FT-P-01, FT-P-02 |
|
||||
| `data_parameters.md` | `_docs/00_problem/input_data/data_parameters.md` | Height 400 m and camera model | FT-P-01, NFT-PERF-01 |
|
||||
| `AD000001_gmaps.png`, `AD000002_gmaps.png` | `_docs/00_problem/input_data/` | Reference map screenshots for sample sanity checks | FT-P-02 |
|
||||
| `flight_derkachi/flight_derkachi.mp4` + `flight_derkachi/data_imu.csv` | `_docs/00_problem/input_data/flight_derkachi/` | Cropped nadir video synchronized with IMU and `GLOBAL_POSITION_INT` GPS trajectory | FT-P-03, NFT-PERF-02, NFT-RES-02 |
|
||||
| Public dataset slices | External fixture paths pinned during implementation | Synchronized camera/IMU/GNSS/ground truth where available | FT-P-03, FT-P-04, NFT-PERF-02, NFT-RES-02 |
|
||||
|
||||
## Expected Results Mapping
|
||||
@@ -44,7 +46,7 @@ Every replay test uses read-only fixture mounts and writes results to a fresh `t
|
||||
|------------------|------------|-----------------|-------------------|-----------|------------------------|
|
||||
| FT-P-01 | `AD000001.jpg` ... `AD000060.jpg` | Output WGS84 frame center per mapped row; >=80% within 50 m, >=50% within 20 m | Haversine distance threshold + aggregate pass rate | 50 m primary, 20 m stretch | `input_data/expected_results/results_report.md` |
|
||||
| FT-P-02 | Same 60 images + map references where present | Output includes source label, covariance semi-major axis, and anchor age for every emitted estimate | Required-field validation + geolocation threshold | Required fields present; geolocation thresholds as above | `input_data/expected_results/results_report.md` |
|
||||
| FT-P-03 | Public synchronized VIO dataset slice | BASALT + wrapper emits trajectory with calibrated covariance and no optimistic under-reporting | Dataset ground-truth trajectory comparison | Dataset-specific threshold pinned at implementation; must support AC-1/AC-2 signoff only after representative data | Public dataset ground truth |
|
||||
| FT-P-03 | `derkachi_video_telemetry` plus public synchronized VIO dataset slice when available | BASALT + wrapper emits trajectory with calibrated covariance and no optimistic under-reporting | Compare Derkachi output to `GLOBAL_POSITION_INT` trajectory for smoke/relative validation; compare public/representative calibrated runs to ground truth for final accuracy | Derkachi threshold is calibration-gated; final threshold is dataset-specific and pinned after camera calibration | `data_imu.csv` trajectory plus public dataset ground truth |
|
||||
| FT-P-04 | AerialVL/ALTO/VPAir-style aerial localization slice | Satellite retrieval returns candidate chunks and local verification produces accepted/rejected anchors | Georeference error + MRE + source-label checks | AC-1.1/1.2 and AC-2.2 thresholds where dataset supports them | Public dataset ground truth/reference map |
|
||||
| FT-N-01 | Low-texture/repetitive frames from sample or public data | System emits degraded confidence or rejects anchor rather than confident false fix | Source label and covariance threshold | No `satellite_anchored` label unless gates pass | Fixture-specific |
|
||||
| FT-N-02 | Plane SITL GPS spoof/loss trace | Spoofed GPS rejected; system promotes own estimate within <3 s when trigger conditions are met | Event timing and MAVLink field checks | <3 s promotion; blackout thresholds from AC-NEW-8 | Generated SITL trace |
|
||||
@@ -64,7 +66,9 @@ Every replay test uses read-only fixture mounts and writes results to a fresh `t
|
||||
|-----------|------------|------------------|--------------------------|
|
||||
| Image frame | Existing file, readable image, expected timestamp/order metadata if sequence replay | Missing image, corrupt image, unsupported resolution | Mark estimate unavailable/degraded, log error, continue if possible |
|
||||
| Expected coordinate | Valid WGS84 latitude/longitude | Out-of-range lat/lon, missing row | Reject test fixture before replay |
|
||||
| Video/telemetry pair | MP4 duration matches telemetry duration, frame-to-telemetry ratio is stable, timestamps are monotonic | Duration drift >250 ms, missing trajectory columns, non-monotonic timestamps | Reject fixture before replay |
|
||||
| IMU trace | Monotonic timestamps, angular rate/accel fields, calibrated units | Non-monotonic timestamps, missing samples | Reject fixture or enter degraded mode depending scenario |
|
||||
| GPS trajectory trace | Valid WGS84 lat/lon, altitude, velocity, and heading fields | Out-of-range lat/lon, impossible altitude, missing `GLOBAL_POSITION_INT` columns | Reject trajectory comparison while allowing pure video replay if applicable |
|
||||
| Cache tile manifest | CRS, m/px, capture date, source, hashes, signature/provenance | Stale, unsigned, hash mismatch, low resolution | Reject or down-confidence per AC-8.2 and AC-NEW-6 |
|
||||
| MAVLink output | Valid `GPS_INPUT` fields and fix type/accuracy semantics | Missing `horiz_accuracy`, impossible fix type | Fail test; output contract violated |
|
||||
|
||||
@@ -74,13 +78,13 @@ Every replay test uses read-only fixture mounts and writes results to a fresh `t
|
||||
|------------------|-------|---------------------|--------------------------|-----------------|---------------------------|---------------------|
|
||||
| FT-P-01 | Input/output | 60 project images + `coordinates.csv` | WGS84 center per image with 50 m / 20 m thresholds | Yes | Yes | Keep |
|
||||
| FT-P-02 | Input/output | 60 project images + output schema expectations | Required confidence/source-label fields and thresholds | Yes | Yes | Keep |
|
||||
| FT-P-03 | Input/output | Public or representative synchronized camera/IMU dataset | Dataset ground truth and calibrated covariance checks | Accepted as required external fixture | Accepted as dataset ground truth | Keep with acquisition task |
|
||||
| FT-P-03 | Input/output | Derkachi synchronized video/IMU/GPS fixture; public or calibrated representative dataset for final accuracy | Derkachi `GLOBAL_POSITION_INT` trajectory for smoke/relative validation; calibrated ground truth for final covariance checks | Yes for Derkachi; public/calibrated dataset still useful for final signoff | Yes for Derkachi GPS trajectory; calibrated camera thresholds pending | Keep with calibration gate |
|
||||
| FT-P-04 | Input/output | Public aerial localization or project cache fixture | Georeference, MRE, and source-label checks | Accepted as required external fixture | Accepted as dataset/reference-map ground truth | Keep with acquisition task |
|
||||
| FT-N-01 | Behavioral/input-output | Ambiguous low-texture/repetitive frames | 0 confident false anchors | Accepted as project/public fixture | Yes | Keep |
|
||||
| FT-N-02 | Behavioral | Generated Plane SITL spoof/blackout trace | Timing and MAVLink field thresholds from AC-NEW-8 | Generated by test harness | Yes | Keep |
|
||||
| FT-N-03 | Behavioral/input-output | Cache integrity fixtures | 0 trusted anchors from stale/invalid tiles | Generated fixture | Yes | Keep |
|
||||
| NFT-PERF-01 | Input/output | 60 project images | p95 latency and drop-rate thresholds | Yes | Yes | Keep |
|
||||
| NFT-PERF-02 | Input/output | Public/representative synchronized camera/IMU dataset | VO registration, latency, memory thresholds | Accepted as required external fixture | Yes | Keep with acquisition task |
|
||||
| NFT-PERF-02 | Input/output | Derkachi synchronized video/IMU/GPS fixture; public/representative synchronized camera/IMU dataset | VO registration, latency, memory thresholds | Yes for Derkachi | Yes | Keep with calibration gate |
|
||||
| NFT-PERF-03 | Behavioral/input-output | Precomputed descriptor/cache fixture | Trigger-path latency and MRE thresholds | Generated fixture | Yes | Keep |
|
||||
| NFT-PERF-04 | Behavioral | Cold-start harness and cache fixture | <30 s p95 over 50 runs | Generated by test harness | Yes | Keep |
|
||||
| NFT-RES-* | Behavioral | Fault triggers and generated traces | AC-defined timing/status thresholds | Generated by test harness | Yes | Keep |
|
||||
@@ -90,6 +94,7 @@ Every replay test uses read-only fixture mounts and writes results to a fresh `t
|
||||
**Coverage after validation**: 49/49 AC and restriction groups remain covered. No tests were removed.
|
||||
|
||||
**Acquisition tasks required downstream**:
|
||||
- Pin camera intrinsics, lens distortion, raw camera feed parameters, and camera-to-body mounting transform for the Derkachi fixture or future representative recordings.
|
||||
- Pin and download at least one strong synchronized nadir camera + IMU + ground-truth dataset, preferably MUN-FRL or ALTO, with EPFL fixed-wing and Kagaru as fixed-wing/farmland candidates.
|
||||
- Pin license-compatible VPR/localization datasets for satellite anchor tests; VPAir and UZH FPV have non-commercial restrictions and must not be used for commercial acceptance unless license terms allow it.
|
||||
- Create generated fixtures for Plane SITL spoofing, stale cache manifests, signed/unsigned manifests, FDR load, and thermal/resource monitoring during implementation.
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
| R-SAT-01 | Offline-only Satellite Service cache, no in-flight provider fetch | NFT-SEC-04 | Covered |
|
||||
| R-SAT-02 | Cache resolution/freshness/metadata conventions | FT-N-03, NFT-RES-LIM-03 | Covered |
|
||||
| R-HW-01 | Jetson Orin Nano Super 8 GB / 25 W | NFT-RES-LIM-01, NFT-RES-LIM-02 | Covered |
|
||||
| R-SENSOR-01 | FC IMU available; sample data lacks synchronized IMU | FT-P-03, NFT-PERF-02 | Covered through public/representative dataset plan |
|
||||
| R-SENSOR-01 | FC IMU available; original still-image sample lacks synchronized IMU; Derkachi fixture provides video/IMU/GPS trajectory but calibration is pending | FT-P-03, NFT-PERF-02 | Covered through Derkachi representative replay plus public/calibrated dataset plan |
|
||||
| R-MAV-01 | MAVLink, ArduPilot only, GPS_INPUT via pymavlink | FT-N-02, NFT-SEC-03 | Covered |
|
||||
| R-GCS-01 | QGroundControl supported GCS | FT-N-02, NFT-SEC-03 | Covered |
|
||||
| R-SAFETY-01 | False-position, cold-start, spoofing, and failsafe constraints | FT-N-01, FT-N-02, NFT-PERF-04, NFT-RES-01 | Covered |
|
||||
@@ -76,5 +76,6 @@
|
||||
## Data Coverage Caveats
|
||||
|
||||
- Current project data fully supports still-image frame-center checks for 60 mapped images.
|
||||
- Current project data does not contain synchronized IMU or ground-truth trajectory for BASALT VIO validation.
|
||||
- Phase 3 must validate public dataset acquisition before FT-P-03, FT-P-04, and NFT-PERF-02 can remain in the executable test plan.
|
||||
- Derkachi project data supports synchronized video/IMU/GPS trajectory replay for FT-P-03 and NFT-PERF-02.
|
||||
- Derkachi project data is calibration-limited: raw camera intrinsics, lens distortion, and camera-to-body transform are still required before final absolute accuracy thresholds can be treated as production acceptance.
|
||||
- Phase 3 must validate camera calibration inputs and public/calibrated dataset acquisition before FT-P-03, FT-P-04, and NFT-PERF-02 can be used for final signoff.
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# Dependencies Table
|
||||
|
||||
**Date**: 2026-05-03
|
||||
**Total Tasks**: 14
|
||||
**Total Complexity Points**: 60
|
||||
**Lessons applied**: No `_docs/LESSONS.md` file exists; no prior estimation or dependency lessons were available.
|
||||
|
||||
| Task | Name | Complexity | Dependencies | Epic |
|
||||
|------|------|------------|--------------|------|
|
||||
| AZ-219 | initial_structure | 5 | None | AZ-206 |
|
||||
| AZ-220 | shared_runtime_contracts | 3 | AZ-219 | AZ-206 |
|
||||
| AZ-221 | shared_geometry_time_sync | 3 | AZ-219, AZ-220 | AZ-207 |
|
||||
| AZ-222 | runtime_config_errors_telemetry | 3 | AZ-219, AZ-220 | AZ-208 |
|
||||
| AZ-223 | camera_ingest_calibration | 5 | AZ-220, AZ-221, AZ-222 | AZ-209 |
|
||||
| AZ-224 | mavlink_gcs_gateway | 3 | AZ-220, AZ-222 | AZ-210 |
|
||||
| AZ-225 | tile_manager_cache_manifest | 5 | AZ-220, AZ-221, AZ-222 | AZ-211 |
|
||||
| AZ-226 | generated_tile_orthorectification | 5 | AZ-223, AZ-225 | AZ-211 |
|
||||
| AZ-227 | fdr_event_recorder | 5 | AZ-220, AZ-222 | AZ-212 |
|
||||
| AZ-228 | vio_adapter | 5 | AZ-221, AZ-222, AZ-223, AZ-224 | AZ-213 |
|
||||
| AZ-229 | satellite_service_sync | 3 | AZ-222, AZ-225, AZ-226 | AZ-214 |
|
||||
| AZ-230 | satellite_service_vpr_retrieval | 5 | AZ-223, AZ-225, AZ-229 | AZ-214 |
|
||||
| AZ-231 | anchor_verification_matching | 5 | AZ-223, AZ-225, AZ-230 | AZ-215 |
|
||||
| AZ-232 | safety_anchor_state_machine | 5 | AZ-223, AZ-224, AZ-227, AZ-228, AZ-231 | AZ-216 |
|
||||
|
||||
## Verification Notes
|
||||
|
||||
- No task exceeds 5 complexity points.
|
||||
- E2E/blackbox test work remains outside this product implementation task set and is deferred to the greenfield Decompose Tests phase.
|
||||
- The graph is acyclic: foundations precede adapters/stores, then VIO/retrieval/matching, then safety wrapper orchestration.
|
||||
+38
-37
@@ -16,14 +16,16 @@ project-root/
|
||||
├── src/
|
||||
│ ├── __init__.py
|
||||
│ ├── camera_ingest_calibration/
|
||||
│ ├── basalt_vio_adapter/
|
||||
│ ├── vio_adapter/
|
||||
│ │ └── native/
|
||||
│ ├── safety_anchor_wrapper/
|
||||
│ ├── satellite_retrieval/
|
||||
│ ├── satellite_service/
|
||||
│ │ └── native/
|
||||
│ ├── anchor_verification/
|
||||
│ ├── cache_tile_lifecycle/
|
||||
│ │ └── native/
|
||||
│ ├── tile_manager/
|
||||
│ ├── mavlink_gcs_integration/
|
||||
│ ├── fdr_observability/
|
||||
│ ├── validation_harness/
|
||||
│ ├── shared/
|
||||
│ │ ├── contracts/
|
||||
│ │ ├── geo_geometry/
|
||||
@@ -31,10 +33,6 @@ project-root/
|
||||
│ │ ├── config/
|
||||
│ │ ├── errors/
|
||||
│ │ └── telemetry/
|
||||
│ └── native/
|
||||
│ ├── basalt_bridge/
|
||||
│ ├── feature_matching/
|
||||
│ └── tensor_rt/
|
||||
├── migrations/
|
||||
│ ├── postgresql/
|
||||
│ └── seed/
|
||||
@@ -43,7 +41,8 @@ project-root/
|
||||
│ ├── integration/
|
||||
│ ├── blackbox/
|
||||
│ ├── fixtures/
|
||||
│ └── sitl/
|
||||
│ ├── sitl/
|
||||
│ └── e2e/
|
||||
├── e2e/
|
||||
│ ├── replay/
|
||||
│ └── reports/
|
||||
@@ -74,7 +73,7 @@ project-root/
|
||||
|
||||
### Layout Rationale
|
||||
|
||||
The runtime is organized directly under `src/` because this repository already represents the GPS-denied onboard system. Component directories live at the source root, with native bridges isolated under `src/native/` for BASALT, feature matching, and TensorRT-sensitive paths. Shared contracts, geometry, time-sync, configuration, error envelopes, and telemetry DTOs are centralized so component tasks consume a single public interface instead of duplicating cross-cutting logic.
|
||||
The runtime is organized directly under `src/` because this repository already represents the GPS-denied onboard system. Component directories live at the source root, and native bridges stay inside the component folder that owns the backend or hot path. Shared contracts, geometry, time-sync, configuration, error envelopes, and telemetry DTOs are centralized so component tasks consume a single public interface instead of duplicating cross-cutting logic.
|
||||
|
||||
The scaffold separates runtime source, migrations, tests, deployment assets, configuration, and mutable data. Production runs on Jetson hardware, while Docker/compose is used for replay, SITL, and deterministic CI environments.
|
||||
|
||||
@@ -84,29 +83,28 @@ The scaffold separates runtime source, migrations, tests, deployment assets, con
|
||||
|
||||
| DTO Name | Used By Components | Fields Summary |
|
||||
|----------|--------------------|----------------|
|
||||
| `FramePacket` | Camera ingest, BASALT VIO, satellite retrieval, anchor verification, cache lifecycle, FDR | Frame ID, timestamp, image reference, calibration ID, occlusion status, quality metrics |
|
||||
| `TelemetrySample` | MAVLink/GCS, BASALT VIO, safety wrapper, FDR, validation harness | Timestamp, IMU, attitude, airspeed, altitude, GPS health |
|
||||
| `VioStatePacket` | BASALT VIO, safety wrapper, FDR, validation harness | Timestamp, relative pose, velocity, bias, tracking quality, covariance hint |
|
||||
| `PositionEstimate` | Safety wrapper, MAVLink/GCS, cache lifecycle, FDR, validation harness | WGS84 coordinates, covariance semi-major axis, source label, fix type, horizontal accuracy, anchor age |
|
||||
| `VprCandidate` | Satellite retrieval, anchor verification, FDR | Chunk ID, tile ID, score, footprint, freshness status |
|
||||
| `FramePacket` | Camera ingest, BASALT VIO, Satellite Service, anchor verification, Tile Manager, FDR | Frame ID, timestamp, image reference, camera calibration ID, occlusion status, quality metrics |
|
||||
| `TelemetrySample` | MAVLink/GCS, BASALT VIO, safety wrapper, FDR, e2e tests | Timestamp, IMU, attitude, airspeed, altitude, GPS health |
|
||||
| `VioStatePacket` | BASALT VIO, safety wrapper, FDR, e2e tests | Timestamp, relative pose, velocity, bias, tracking quality, covariance hint |
|
||||
| `PositionEstimate` | Safety wrapper, MAVLink/GCS, Tile Manager, FDR, e2e tests | WGS84 coordinates, covariance semi-major axis, source label, fix type, horizontal accuracy, anchor age |
|
||||
| `VprCandidate` | Satellite Service, anchor verification, FDR | Chunk ID, tile ID, score, footprint, freshness status |
|
||||
| `AnchorDecision` | Anchor verification, safety wrapper, FDR | Candidate ID, acceptance result, estimated pose, inliers, MRE, rejection reason |
|
||||
| `CacheTileRecord` | Cache lifecycle, satellite retrieval, anchor verification, FDR | Tile ID, type, CRS, meters per pixel, capture date, signature/hash status, trust level |
|
||||
| `FdrEvent` | All runtime components, validation harness | Event type, timestamp, component, severity, payload reference, mission/run ID |
|
||||
| `ScenarioReport` | Validation harness, CI/CD, release evidence | Scenario ID, result, metrics, artifacts, failure reason |
|
||||
| `CacheTileRecord` | Tile Manager, Satellite Service, anchor verification, FDR | Tile ID, type, CRS, meters per pixel, capture date, signature/hash status, trust level |
|
||||
| `FdrEvent` | All runtime components, e2e tests | Event type, timestamp, component, severity, payload reference, mission/run ID |
|
||||
| `ScenarioReport` | Separate e2e test suite, CI/CD, release evidence | Scenario ID, result, metrics, artifacts, failure reason |
|
||||
|
||||
### Component Interfaces
|
||||
|
||||
| Component | Interface | Methods | Exposed To |
|
||||
|-----------|-----------|---------|------------|
|
||||
| Camera ingest/calibration | `FrameProvider` | `next_frame`, `detect_occlusion`, `classify_quality` | BASALT VIO, satellite retrieval, anchor verification, cache lifecycle |
|
||||
| BASALT VIO adapter | `VioAdapter` | `initialize`, `process`, `health` | Safety wrapper, validation harness |
|
||||
| Safety/anchor wrapper | `LocalizationStateMachine` | `update_vio`, `consider_anchor`, `degrade`, `propagate_imu_only`, `tile_write_eligibility` | MAVLink/GCS, cache lifecycle, FDR, validation harness |
|
||||
| Satellite retrieval | `CandidateRetriever` | `load_index`, `retrieve` | Safety wrapper, anchor verification |
|
||||
| Camera ingest/calibration | `FrameProvider` | `next_frame`, `detect_occlusion`, `classify_quality` | VIO Adapter, Satellite Service, anchor verification, Tile Manager |
|
||||
| VIO adapter | `VioAdapter` | `initialize`, `process`, `health` | Safety wrapper, e2e tests |
|
||||
| Safety/anchor wrapper | `LocalizationStateMachine` | `update_vio`, `consider_anchor`, `degrade`, `propagate_imu_only`, `tile_write_eligibility` | MAVLink/GCS, Tile Manager, FDR, e2e tests |
|
||||
| Satellite Service | `SatelliteService` | `import_mission_cache`, `load_index`, `retrieve`, `upload_generated_tiles` | Safety wrapper, anchor verification, Tile Manager |
|
||||
| Anchor verification | `AnchorVerifier` | `verify`, `benchmark_matcher` | Safety wrapper, FDR |
|
||||
| Cache/tile lifecycle | `CacheRepository` | `validate_cache`, `get_tile_window`, `write_generated_tile`, `package_sync` | Satellite retrieval, anchor verification, post-flight sync |
|
||||
| Tile Manager | `TileManager` | `validate_cache`, `get_tile_window`, `orthorectify_frame`, `write_generated_tile`, `package_sync` | Satellite Service, anchor verification, post-flight sync |
|
||||
| MAVLink/GCS integration | `MavlinkGateway` | `subscribe_telemetry`, `emit_gps_input`, `emit_status` | BASALT VIO, safety wrapper, QGC, FDR |
|
||||
| FDR/observability | `FlightRecorder` | `append_event`, `rollover`, `export` | All runtime components, validation harness |
|
||||
| Validation harness | `ScenarioRunner` | `validate_fixture`, `run_scenario` | CI/CD, release evidence review |
|
||||
| FDR/observability | `FlightRecorder` | `append_event`, `rollover`, `export` | All runtime components, e2e tests |
|
||||
|
||||
## CI/CD Pipeline
|
||||
|
||||
@@ -115,7 +113,7 @@ The scaffold separates runtime source, migrations, tests, deployment assets, con
|
||||
| Format / lint | Enforce code style and static quality | Every PR and push to `dev` |
|
||||
| Unit tests | Validate component-local behavior and shared contracts | Every PR and push to `dev` |
|
||||
| Replay black-box smoke | Run deterministic still-image/cache/SITL subsets | Every PR |
|
||||
| Cache/security fixture tests | Validate signed manifests, stale-tile rejection, no provider calls | Every PR |
|
||||
| Cache/security fixture tests | Validate signed manifests, stale-tile rejection, and no mid-flight provider/Satellite Service calls | Every PR |
|
||||
| Plane SITL spoof/failsafe | Validate ArduPilot Plane `GPS_INPUT`, failsafe, spoofing promotion | Nightly and release candidate |
|
||||
| Public dataset replay | Exercise VIO, retrieval, and anchor behavior against pinned public slices | Nightly and release candidate |
|
||||
| Jetson latency/resource tests | Measure p95 latency, memory, cold start, TensorRT/ONNX fidelity | Release candidate |
|
||||
@@ -175,14 +173,13 @@ tests/
|
||||
├── unit/
|
||||
│ ├── shared/
|
||||
│ ├── camera_ingest_calibration/
|
||||
│ ├── basalt_vio_adapter/
|
||||
│ ├── vio_adapter/
|
||||
│ ├── safety_anchor_wrapper/
|
||||
│ ├── satellite_retrieval/
|
||||
│ ├── satellite_service/
|
||||
│ ├── anchor_verification/
|
||||
│ ├── cache_tile_lifecycle/
|
||||
│ ├── tile_manager/
|
||||
│ ├── mavlink_gcs_integration/
|
||||
│ ├── fdr_observability/
|
||||
│ └── validation_harness/
|
||||
├── integration/
|
||||
│ ├── contracts/
|
||||
│ ├── cache_postgis/
|
||||
@@ -200,10 +197,14 @@ tests/
|
||||
│ ├── satellite_cache/
|
||||
│ ├── telemetry/
|
||||
│ └── public_dataset_slices/
|
||||
└── sitl/
|
||||
├── plane_gps_input/
|
||||
├── spoofing_promotion/
|
||||
└── failsafe/
|
||||
├── sitl/
|
||||
│ ├── plane_gps_input/
|
||||
│ ├── spoofing_promotion/
|
||||
│ └── failsafe/
|
||||
└── e2e/
|
||||
├── replay/
|
||||
├── reports/
|
||||
└── release_evidence/
|
||||
```
|
||||
|
||||
### Test Configuration Notes
|
||||
@@ -241,10 +242,10 @@ Each deployable service exposes `/health/live`, `/health/ready`, and `/metrics`
|
||||
| 3 | Runtime configuration and error handling | Prevent duplicated config/error behavior across components |
|
||||
| 4 | Camera ingest/calibration | Produces the frame and occlusion signals required by VIO, anchor, cache, and tests |
|
||||
| 5 | MAVLink/GCS integration | Supplies FC telemetry DTOs and validates `GPS_INPUT` output contract early |
|
||||
| 6 | Cache/tile lifecycle | Owns PostGIS cache manifest, sidecars, COG access, and freshness gates |
|
||||
| 6 | Tile Manager | Owns PostGIS cache manifest, sidecars, COG access, freshness gates, and generated-tile orthorectification |
|
||||
| 7 | FDR/observability | Provides audit path for all components and validation reports |
|
||||
| 8 | BASALT VIO adapter | Depends on frame and telemetry contracts, blocks wrapper integration |
|
||||
| 9 | Satellite retrieval | Depends on cache schema and frame DTOs, feeds anchor verification |
|
||||
| 8 | VIO adapter | Depends on frame and telemetry contracts, blocks wrapper integration |
|
||||
| 9 | Satellite Service | Depends on tile schema and frame DTOs, feeds anchor verification, and handles pre-flight/post-flight package sync |
|
||||
| 10 | Anchor verification | Depends on retrieval candidates and cache tile access |
|
||||
| 11 | Safety/anchor wrapper | Consumes VIO, anchor, camera degradation, MAVLink, and FDR contracts |
|
||||
| 12 | Validation harness | Uses public interfaces once contracts and runtime components are stable |
|
||||
@@ -0,0 +1,78 @@
|
||||
# Shared Runtime Contracts
|
||||
|
||||
**Task**: AZ-220_shared_runtime_contracts
|
||||
**Name**: Shared Runtime Contracts
|
||||
**Description**: Define the shared DTO and event contract surface used across the onboard runtime.
|
||||
**Complexity**: 3 points
|
||||
**Dependencies**: AZ-219_initial_structure
|
||||
**Component**: Bootstrap / Shared Contracts
|
||||
**Tracker**: AZ-220
|
||||
**Epic**: AZ-206
|
||||
|
||||
## Problem
|
||||
|
||||
Runtime components need common shapes for frames, telemetry, VIO state, position estimates, candidates, anchors, cache tiles, and FDR events.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Components consume one documented shared contract surface.
|
||||
- Cross-component DTO drift is prevented before implementation begins.
|
||||
|
||||
## Scope
|
||||
|
||||
### Included
|
||||
- Shared runtime DTO names, fields, invariants, versioning rules, and contract tests.
|
||||
- Public contract document for consumers.
|
||||
|
||||
### Excluded
|
||||
- Component-specific algorithms.
|
||||
- E2E runner-only report schemas.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
**AC-1: Shared contract exists**
|
||||
Given runtime components need common DTOs
|
||||
When the shared contracts are implemented
|
||||
Then each runtime component can import or reference the same contract surface.
|
||||
|
||||
**AC-2: Contract validation exists**
|
||||
Given a malformed shared DTO
|
||||
When validation runs
|
||||
Then the input is rejected with a structured error.
|
||||
|
||||
## Non-Functional Requirements
|
||||
|
||||
**Compatibility**
|
||||
- Contract changes follow documented versioning rules.
|
||||
|
||||
**Reliability**
|
||||
- Invalid or missing required fields are not silently ignored.
|
||||
|
||||
## Unit Tests
|
||||
|
||||
| AC Ref | What to Test | Required Outcome |
|
||||
|--------|--------------|------------------|
|
||||
| AC-1 | DTO construction for valid minimal values | Accepted |
|
||||
| AC-2 | Missing required timestamp or ID | Rejected with structured error |
|
||||
|
||||
## Blackbox Tests
|
||||
|
||||
| AC Ref | Initial Data/Conditions | What to Test | Expected Behavior | NFR References |
|
||||
|--------|-------------------------|--------------|-------------------|----------------|
|
||||
| AC-1 | Runtime started with contract consumers | Public interfaces exchange typed records | No component-specific duplicate shape required | Compatibility |
|
||||
|
||||
## Constraints
|
||||
|
||||
- Contracts are shared API surface and must be consumed through documented public modules.
|
||||
- Raw frame payloads are referenced, not retained in shared DTOs.
|
||||
|
||||
## Risks & Mitigation
|
||||
|
||||
**Risk 1: Contract drift**
|
||||
- *Risk*: Consumers create local incompatible DTOs.
|
||||
- *Mitigation*: Contract file is required dependency for consuming tasks.
|
||||
|
||||
## Contract
|
||||
|
||||
This task produces/implements the contract at `_docs/02_document/contracts/shared/runtime_contracts.md`.
|
||||
Consumers MUST read that file — not this task spec — to discover the interface.
|
||||
@@ -0,0 +1,78 @@
|
||||
# Shared Geometry And Time Sync
|
||||
|
||||
**Task**: AZ-221_shared_geometry_time_sync
|
||||
**Name**: Shared Geometry And Time Sync
|
||||
**Description**: Provide shared geospatial and timestamp helper behavior for runtime components.
|
||||
**Complexity**: 3 points
|
||||
**Dependencies**: AZ-219_initial_structure, AZ-220_shared_runtime_contracts
|
||||
**Component**: Shared Geometry And Time Sync
|
||||
**Tracker**: AZ-221
|
||||
**Epic**: AZ-207
|
||||
|
||||
## Problem
|
||||
|
||||
Camera, VIO, Tile Manager, Satellite Service, Anchor Verification, safety, and FDR need consistent coordinate, footprint, homography, and timestamp behavior.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Shared helpers provide deterministic geometry and time-sync behavior.
|
||||
- Components do not duplicate geospatial or timestamp alignment logic.
|
||||
|
||||
## Scope
|
||||
|
||||
### Included
|
||||
- WGS84/local conversions, distance/GSD helpers, footprint projection, homography/covariance conversion support.
|
||||
- Monotonic timestamp checks, frame-to-IMU window selection, replay ordering, gap/jitter metrics.
|
||||
|
||||
### Excluded
|
||||
- VIO estimation.
|
||||
- Cache policy and safety degrade decisions.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
**AC-1: Geometry helpers are deterministic**
|
||||
Given the same calibration, attitude, altitude, and coordinates
|
||||
When geometry helpers run
|
||||
Then they return repeatable footprint and metric outputs.
|
||||
|
||||
**AC-2: Time-sync violations are explicit**
|
||||
Given frame and telemetry timestamps with a gap or mismatch
|
||||
When alignment runs
|
||||
Then the result reports the violation instead of dropping data silently.
|
||||
|
||||
## Non-Functional Requirements
|
||||
|
||||
**Performance**
|
||||
- Helpers are suitable for hot-path use under the system latency budget.
|
||||
|
||||
**Reliability**
|
||||
- Invalid calibration, CRS, or timestamp inputs fail explicitly.
|
||||
|
||||
## Unit Tests
|
||||
|
||||
| AC Ref | What to Test | Required Outcome |
|
||||
|--------|--------------|------------------|
|
||||
| AC-1 | WGS84/local round-trip | Error within tolerance |
|
||||
| AC-2 | Non-monotonic timestamps | Explicit mismatch result |
|
||||
|
||||
## Blackbox Tests
|
||||
|
||||
| AC Ref | Initial Data/Conditions | What to Test | Expected Behavior | NFR References |
|
||||
|--------|-------------------------|--------------|-------------------|----------------|
|
||||
| AC-1 | Derkachi/replay frame metadata | Footprint and ordering evidence | Deterministic helper outputs in reports | Performance |
|
||||
|
||||
## Constraints
|
||||
|
||||
- Shared helpers do not own policy decisions.
|
||||
- Timestamp units must match the shared runtime contract.
|
||||
|
||||
## Risks & Mitigation
|
||||
|
||||
**Risk 1: Coordinate-frame confusion**
|
||||
- *Risk*: Components interpret helper outputs differently.
|
||||
- *Mitigation*: Contract documents units, frames, and error semantics.
|
||||
|
||||
## Contract
|
||||
|
||||
This task produces/implements the contract at `_docs/02_document/contracts/shared/geometry_time_sync.md`.
|
||||
Consumers MUST read that file — not this task spec — to discover the interface.
|
||||
@@ -0,0 +1,80 @@
|
||||
# Runtime Config Errors And Telemetry
|
||||
|
||||
**Task**: AZ-222_runtime_config_errors_telemetry
|
||||
**Name**: Runtime Config Errors And Telemetry
|
||||
**Description**: Provide shared configuration, error envelope, health, and telemetry behavior for runtime components.
|
||||
**Complexity**: 3 points
|
||||
**Dependencies**: AZ-219_initial_structure, AZ-220_shared_runtime_contracts
|
||||
**Component**: Runtime Configuration And Errors
|
||||
**Tracker**: AZ-222
|
||||
**Epic**: AZ-208
|
||||
|
||||
## Problem
|
||||
|
||||
Runtime components need common configuration loading, readiness validation, error handling, and telemetry metadata.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Environment profiles are validated before runtime use.
|
||||
- Errors and health events are structured and FDR-safe.
|
||||
- Secrets are referenced without leaking into logs or reports.
|
||||
|
||||
## Scope
|
||||
|
||||
### Included
|
||||
- Runtime profile validation.
|
||||
- Shared error/result envelopes.
|
||||
- Health and metrics metadata.
|
||||
|
||||
### Excluded
|
||||
- Component-specific business logic.
|
||||
- FDR storage implementation.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
**AC-1: Required settings are validated**
|
||||
Given a production profile is missing a required setting
|
||||
When startup/readiness validation runs
|
||||
Then the component reports a structured failure.
|
||||
|
||||
**AC-2: Errors are not silent**
|
||||
Given a dependency failure occurs
|
||||
When a component reports it
|
||||
Then the error includes component, category, severity, and retryability.
|
||||
|
||||
## Non-Functional Requirements
|
||||
|
||||
**Reliability**
|
||||
- Missing configuration and dependency failures are never silently ignored.
|
||||
|
||||
**Compatibility**
|
||||
- Error categories and config keys follow the contract versioning rules.
|
||||
|
||||
## Unit Tests
|
||||
|
||||
| AC Ref | What to Test | Required Outcome |
|
||||
|--------|--------------|------------------|
|
||||
| AC-1 | Missing production cache dir | Readiness failure |
|
||||
| AC-2 | Dependency error envelope | Structured fields present |
|
||||
|
||||
## Blackbox Tests
|
||||
|
||||
| AC Ref | Initial Data/Conditions | What to Test | Expected Behavior | NFR References |
|
||||
|--------|-------------------------|--------------|-------------------|----------------|
|
||||
| AC-1 | Invalid env profile | Runtime readiness | Service refuses ready state | Reliability |
|
||||
|
||||
## Constraints
|
||||
|
||||
- Secrets must not be serialized into logs, FDR, or metrics.
|
||||
- Error handling must not use silent suppression.
|
||||
|
||||
## Risks & Mitigation
|
||||
|
||||
**Risk 1: Environment-specific behavior drifts**
|
||||
- *Risk*: Development and production profiles behave differently in unsafe ways.
|
||||
- *Mitigation*: Profile validation is shared and tested.
|
||||
|
||||
## Contract
|
||||
|
||||
This task produces/implements the contract at `_docs/02_document/contracts/shared/config_errors_telemetry.md`.
|
||||
Consumers MUST read that file — not this task spec — to discover the interface.
|
||||
@@ -0,0 +1,89 @@
|
||||
# Camera Ingest Calibration And Frame Quality
|
||||
|
||||
**Task**: AZ-223_camera_ingest_calibration
|
||||
**Name**: Camera Ingest Calibration And Frame Quality
|
||||
**Description**: Ingest navigation frames, attach calibration/timestamp metadata, classify quality, detect occlusion, and provide north-up normalization hints.
|
||||
**Complexity**: 5 points
|
||||
**Dependencies**: AZ-220_shared_runtime_contracts, AZ-221_shared_geometry_time_sync, AZ-222_runtime_config_errors_telemetry
|
||||
**Component**: Camera Ingest And Calibration
|
||||
**Tracker**: AZ-223
|
||||
**Epic**: AZ-209
|
||||
|
||||
## Problem
|
||||
|
||||
Downstream VIO, retrieval, anchor verification, Tile Manager, and FDR need trustworthy frame metadata and quality decisions before using image data.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Replay and live-source frames are exposed with timestamps, calibration ID, quality, occlusion, and normalization hints.
|
||||
- Total occlusion/blackout frames are marked unusable for VIO and anchor paths.
|
||||
|
||||
## Scope
|
||||
|
||||
### Included
|
||||
- Frame source abstraction for replay/live camera boundary.
|
||||
- Calibration metadata loading and validation.
|
||||
- Quality and occlusion reports.
|
||||
- North-up/orthorectification hints as metadata, not unconditional frame mutation.
|
||||
|
||||
### Excluded
|
||||
- Tile writing and generated COG persistence.
|
||||
- BASALT processing.
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Document Dependencies
|
||||
- `_docs/02_document/contracts/shared/runtime_contracts.md`
|
||||
- `_docs/02_document/contracts/shared/geometry_time_sync.md`
|
||||
- `_docs/02_document/contracts/shared/config_errors_telemetry.md`
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
**AC-1: Usable frame packet emitted**
|
||||
Given a valid replay frame and calibration
|
||||
When the frame is ingested
|
||||
Then a frame packet includes timestamp, calibration ID, quality report, occlusion report, and normalization hint.
|
||||
|
||||
**AC-2: Blackout bypass signal emitted**
|
||||
Given an unreadable, covered, or total-occlusion frame
|
||||
When quality classification runs
|
||||
Then the frame is marked unusable for VIO and anchor matching.
|
||||
|
||||
**AC-3: Raw frames are not retained**
|
||||
Given normal runtime operation
|
||||
When a frame is processed
|
||||
Then only allowed metadata/references are retained outside explicit fixture/test paths.
|
||||
|
||||
## Non-Functional Requirements
|
||||
|
||||
**Performance**
|
||||
- Frame preprocessing must fit within the system p95 latency budget.
|
||||
|
||||
**Reliability**
|
||||
- Missing calibration blocks production readiness.
|
||||
|
||||
## Unit Tests
|
||||
|
||||
| AC Ref | What to Test | Required Outcome |
|
||||
|--------|--------------|------------------|
|
||||
| AC-1 | Valid frame with calibration | Frame packet contains required metadata |
|
||||
| AC-2 | Total occlusion input | `usable_for_vio=false` and `usable_for_anchor=false` |
|
||||
| AC-3 | Processed frame cleanup | No raw-frame persistence |
|
||||
|
||||
## Blackbox Tests
|
||||
|
||||
| AC Ref | Initial Data/Conditions | What to Test | Expected Behavior | NFR References |
|
||||
|--------|-------------------------|--------------|-------------------|----------------|
|
||||
| AC-1 | Derkachi replay fixture | Frame/telemetry alignment | Accepted frame packets are timestamped | Performance |
|
||||
| AC-2 | Blackout fixture | Occlusion handling | Visual path degrades safely | Reliability |
|
||||
|
||||
## Constraints
|
||||
|
||||
- Do not rotate every frame in ingest; emit normalization hints for downstream use.
|
||||
- ADTi hardware assumptions remain blocked until exact specs are verified.
|
||||
|
||||
## Risks & Mitigation
|
||||
|
||||
**Risk 1: False-negative occlusion**
|
||||
- *Risk*: Bad frames enter VIO or matching.
|
||||
- *Mitigation*: Conservative occlusion gate and explicit quality flags.
|
||||
@@ -0,0 +1,84 @@
|
||||
# MAVLink GCS Gateway
|
||||
|
||||
**Task**: AZ-224_mavlink_gcs_gateway
|
||||
**Name**: MAVLink GCS Gateway
|
||||
**Description**: Subscribe to FC telemetry, emit `GPS_INPUT`, and publish QGC-visible status/failsafe messages.
|
||||
**Complexity**: 3 points
|
||||
**Dependencies**: AZ-220_shared_runtime_contracts, AZ-222_runtime_config_errors_telemetry
|
||||
**Component**: MAVLink And GCS Integration
|
||||
**Tracker**: AZ-224
|
||||
**Epic**: AZ-210
|
||||
|
||||
## Problem
|
||||
|
||||
The runtime needs a strict protocol boundary for ArduPilot Plane telemetry in and GPS-denied estimates/status out.
|
||||
|
||||
## Outcome
|
||||
|
||||
- FC telemetry is normalized into shared samples.
|
||||
- `GPS_INPUT` is emitted only from validated position estimates.
|
||||
- QGC status is rate-limited and safety-relevant.
|
||||
|
||||
## Scope
|
||||
|
||||
### Included
|
||||
- Telemetry subscription behavior.
|
||||
- `GPS_INPUT` field validation and emission result.
|
||||
- QGC status/failsafe message emission.
|
||||
|
||||
### Excluded
|
||||
- Safety policy and covariance calculation.
|
||||
- SITL test runner implementation.
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Document Dependencies
|
||||
- `_docs/02_document/contracts/shared/runtime_contracts.md`
|
||||
- `_docs/02_document/contracts/shared/config_errors_telemetry.md`
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
**AC-1: Telemetry sample emitted**
|
||||
Given a valid FC telemetry stream
|
||||
When the gateway subscribes
|
||||
Then normalized telemetry samples are available to consumers.
|
||||
|
||||
**AC-2: Invalid GPS_INPUT is rejected**
|
||||
Given a malformed or unsafe position estimate
|
||||
When emission is requested
|
||||
Then no invalid `GPS_INPUT` packet is emitted.
|
||||
|
||||
**AC-3: Operator status is rate-limited**
|
||||
Given repeated mode changes or warnings
|
||||
When status is emitted
|
||||
Then QGC-visible messages stay within the configured rate.
|
||||
|
||||
## Non-Functional Requirements
|
||||
|
||||
**Reliability**
|
||||
- Connection loss is surfaced to wrapper/FDR.
|
||||
|
||||
## Unit Tests
|
||||
|
||||
| AC Ref | What to Test | Required Outcome |
|
||||
|--------|--------------|------------------|
|
||||
| AC-1 | Telemetry normalization | Shared sample emitted |
|
||||
| AC-2 | Invalid fix type/accuracy | Emission rejected |
|
||||
| AC-3 | Status burst | Rate limit enforced |
|
||||
|
||||
## Blackbox Tests
|
||||
|
||||
| AC Ref | Initial Data/Conditions | What to Test | Expected Behavior | NFR References |
|
||||
|--------|-------------------------|--------------|-------------------|----------------|
|
||||
| AC-2 | Plane SITL | `GPS_INPUT` output | Fields match ArduPilot expectations | Reliability |
|
||||
|
||||
## Constraints
|
||||
|
||||
- v1 emits `GPS_INPUT` only.
|
||||
- Do not hide MAVLink disconnects or invalid output errors.
|
||||
|
||||
## Risks & Mitigation
|
||||
|
||||
**Risk 1: ArduPilot parameter mismatch**
|
||||
- *Risk*: Plane ignores or mishandles emitted estimates.
|
||||
- *Mitigation*: SITL validation remains a release gate.
|
||||
@@ -0,0 +1,89 @@
|
||||
# Tile Manager Cache Manifest
|
||||
|
||||
**Task**: AZ-225_tile_manager_cache_manifest
|
||||
**Name**: Tile Manager Cache Manifest
|
||||
**Description**: Validate local cache manifests, signed sidecars, tile freshness, and spatial/descriptor metadata access.
|
||||
**Complexity**: 5 points
|
||||
**Dependencies**: AZ-220_shared_runtime_contracts, AZ-221_shared_geometry_time_sync, AZ-222_runtime_config_errors_telemetry
|
||||
**Component**: Tile Manager
|
||||
**Tracker**: AZ-225
|
||||
**Epic**: AZ-211
|
||||
|
||||
## Problem
|
||||
|
||||
The runtime must trust only preloaded offline cache tiles with valid signatures, hashes, freshness, resolution, and spatial metadata.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Mission cache validation blocks invalid cache usage.
|
||||
- Tile windows and descriptor metadata are queryable through local PostGIS-backed metadata.
|
||||
- Stale or tampered tiles cannot become trusted anchor inputs.
|
||||
|
||||
## Scope
|
||||
|
||||
### Included
|
||||
- Cache package validation.
|
||||
- Signed sidecar/hash/freshness checks.
|
||||
- Tile window and descriptor metadata lookup.
|
||||
- Cache validation report events.
|
||||
|
||||
### Excluded
|
||||
- Satellite Service package transfer.
|
||||
- Generated tile orthorectification/write-back.
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Document Dependencies
|
||||
- `_docs/02_document/contracts/shared/runtime_contracts.md`
|
||||
- `_docs/02_document/contracts/shared/geometry_time_sync.md`
|
||||
- `_docs/02_document/contracts/shared/config_errors_telemetry.md`
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
**AC-1: Valid cache activates**
|
||||
Given a cache package with valid manifests, sidecars, hashes, freshness, and spatial coverage
|
||||
When cache validation runs
|
||||
Then the cache becomes available to retrieval and anchor paths.
|
||||
|
||||
**AC-2: Invalid cache is rejected**
|
||||
Given a stale, unsigned, or hash-mismatched tile
|
||||
When validation runs
|
||||
Then the tile is rejected and an auditable reason is recorded.
|
||||
|
||||
**AC-3: Tile metadata is queryable**
|
||||
Given a candidate footprint or chunk ID
|
||||
When a consumer requests tile metadata
|
||||
Then the Tile Manager returns a valid local record or explicit rejection.
|
||||
|
||||
## Non-Functional Requirements
|
||||
|
||||
**Performance**
|
||||
- Indexed tile lookups meet relocalization-path latency needs.
|
||||
|
||||
**Reliability**
|
||||
- Local PostgreSQL/PostGIS unavailability blocks mission cache activation.
|
||||
|
||||
## Unit Tests
|
||||
|
||||
| AC Ref | What to Test | Required Outcome |
|
||||
|--------|--------------|------------------|
|
||||
| AC-1 | Valid fixture | Cache available |
|
||||
| AC-2 | Tampered sidecar | Tile rejected |
|
||||
| AC-3 | Chunk metadata lookup | Correct record or explicit error |
|
||||
|
||||
## Blackbox Tests
|
||||
|
||||
| AC Ref | Initial Data/Conditions | What to Test | Expected Behavior | NFR References |
|
||||
|--------|-------------------------|--------------|-------------------|----------------|
|
||||
| AC-2 | Stale/unsigned fixtures | Cache security gate | No invalid tile reaches retrieval | Reliability |
|
||||
|
||||
## Constraints
|
||||
|
||||
- Runtime never fetches satellite data mid-flight.
|
||||
- Large imagery/descriptors stay as files, not DB blobs.
|
||||
|
||||
## Risks & Mitigation
|
||||
|
||||
**Risk 1: Cache poisoning**
|
||||
- *Risk*: Bad cache entries influence anchor decisions.
|
||||
- *Mitigation*: Signature, hash, freshness, and provenance gates are mandatory.
|
||||
@@ -0,0 +1,88 @@
|
||||
# Generated Tile Orthorectification And Sync Package
|
||||
|
||||
**Task**: AZ-226_generated_tile_orthorectification
|
||||
**Name**: Generated Tile Orthorectification And Sync Package
|
||||
**Description**: Convert eligible nadir frames into generated orthorectified COG tiles and prepare post-flight sync packages.
|
||||
**Complexity**: 5 points
|
||||
**Dependencies**: AZ-223_camera_ingest_calibration, AZ-225_tile_manager_cache_manifest
|
||||
**Component**: Tile Manager
|
||||
**Tracker**: AZ-226
|
||||
**Epic**: AZ-211
|
||||
|
||||
## Problem
|
||||
|
||||
Generated tiles must be written only when pose, frame quality, and provenance gates make them safe to retain for post-flight Satellite Service review.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Eligible nadir frames can become generated COG candidates with sidecars.
|
||||
- Unsafe or over-confident tile writes are rejected.
|
||||
- Post-flight generated-tile packages carry enough metadata for Satellite Service ingest/voting.
|
||||
|
||||
## Scope
|
||||
|
||||
### Included
|
||||
- Orthorectification request handling.
|
||||
- Generated COG + sidecar metadata creation.
|
||||
- Covariance/quality gates and trust level assignment.
|
||||
- Sync package preparation.
|
||||
|
||||
### Excluded
|
||||
- Satellite Service upload transport.
|
||||
- Promotion to trusted basemap onboard.
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Document Dependencies
|
||||
- `_docs/02_document/contracts/shared/runtime_contracts.md`
|
||||
- `_docs/02_document/contracts/shared/geometry_time_sync.md`
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
**AC-1: Eligible frame writes generated tile**
|
||||
Given a high-confidence pose and usable frame
|
||||
When tile generation runs
|
||||
Then a generated COG candidate and sidecar are staged.
|
||||
|
||||
**AC-2: Unsafe frame is rejected**
|
||||
Given high covariance or unusable frame quality
|
||||
When tile generation runs
|
||||
Then no trusted tile is written.
|
||||
|
||||
**AC-3: Sync package is auditable**
|
||||
Given generated candidate tiles exist
|
||||
When a package is prepared
|
||||
Then it includes manifest delta, sidecars, parent covariance, and trust level.
|
||||
|
||||
## Non-Functional Requirements
|
||||
|
||||
**Reliability**
|
||||
- Generated tiles are never promoted directly to trusted basemap onboard.
|
||||
|
||||
**Performance**
|
||||
- Tile generation must not block localization output.
|
||||
|
||||
## Unit Tests
|
||||
|
||||
| AC Ref | What to Test | Required Outcome |
|
||||
|--------|--------------|------------------|
|
||||
| AC-1 | Valid tile request | COG + sidecar staged |
|
||||
| AC-2 | Covariance too high | Write rejected |
|
||||
| AC-3 | Package creation | Required metadata present |
|
||||
|
||||
## Blackbox Tests
|
||||
|
||||
| AC Ref | Initial Data/Conditions | What to Test | Expected Behavior | NFR References |
|
||||
|--------|-------------------------|--------------|-------------------|----------------|
|
||||
| AC-2 | Poisoning fixture | Generated tile gate | No direct trusted promotion | Reliability |
|
||||
|
||||
## Constraints
|
||||
|
||||
- Tile Manager performs generated tile writes; camera ingest only provides metadata/hints.
|
||||
- Missing sidecars make generated tiles ineligible for upload.
|
||||
|
||||
## Risks & Mitigation
|
||||
|
||||
**Risk 1: Misaligned generated tile**
|
||||
- *Risk*: Wrong pose creates harmful future anchor data.
|
||||
- *Mitigation*: Parent covariance, frame quality, and post-flight validation gates.
|
||||
@@ -0,0 +1,88 @@
|
||||
# FDR Event Recorder And Export Surface
|
||||
|
||||
**Task**: AZ-227_fdr_event_recorder
|
||||
**Name**: FDR Event Recorder And Export Surface
|
||||
**Description**: Record bounded replayable mission evidence and expose exportable post-flight summaries.
|
||||
**Complexity**: 5 points
|
||||
**Dependencies**: AZ-220_shared_runtime_contracts, AZ-222_runtime_config_errors_telemetry
|
||||
**Component**: FDR And Observability
|
||||
**Tracker**: AZ-227
|
||||
**Epic**: AZ-212
|
||||
|
||||
## Problem
|
||||
|
||||
The system needs compact, bounded, queryable evidence for estimates, inputs, health, anchors, tile writes, and safety transitions.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Runtime components can append structured FDR events.
|
||||
- Storage rollover and health behavior are explicit.
|
||||
- Post-flight exports are available for analysis and release evidence.
|
||||
|
||||
## Scope
|
||||
|
||||
### Included
|
||||
- Append event behavior.
|
||||
- PostgreSQL event index and CBOR segment payload contract.
|
||||
- Rollover and storage-full handling.
|
||||
- Export request/result behavior.
|
||||
|
||||
### Excluded
|
||||
- Component-specific event payload generation.
|
||||
- E2E report collation.
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Document Dependencies
|
||||
- `_docs/02_document/contracts/shared/runtime_contracts.md`
|
||||
- `_docs/02_document/contracts/shared/config_errors_telemetry.md`
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
**AC-1: Events are appendable**
|
||||
Given a valid FDR event
|
||||
When a component appends it
|
||||
Then metadata is indexed and payload is stored within bounds.
|
||||
|
||||
**AC-2: Storage pressure is handled**
|
||||
Given segment or storage limits are reached
|
||||
When append continues
|
||||
Then rollover or critical status behavior is explicit.
|
||||
|
||||
**AC-3: Export produces evidence**
|
||||
Given a completed run
|
||||
When export is requested
|
||||
Then queryable evidence and optional analytics artifacts are produced.
|
||||
|
||||
## Non-Functional Requirements
|
||||
|
||||
**Performance**
|
||||
- FDR appends must not block hot-path localization.
|
||||
|
||||
**Reliability**
|
||||
- Append failures are surfaced to callers and health state.
|
||||
|
||||
## Unit Tests
|
||||
|
||||
| AC Ref | What to Test | Required Outcome |
|
||||
|--------|--------------|------------------|
|
||||
| AC-1 | Valid event append | Indexed metadata and payload reference |
|
||||
| AC-2 | Rollover threshold | Rollover event recorded |
|
||||
| AC-3 | Export request | Evidence artifact produced |
|
||||
|
||||
## Blackbox Tests
|
||||
|
||||
| AC Ref | Initial Data/Conditions | What to Test | Expected Behavior | NFR References |
|
||||
|--------|-------------------------|--------------|-------------------|----------------|
|
||||
| AC-2 | 8-hour synthetic load | FDR cap and rollover | <=64 GB or explicit rollover evidence | Performance |
|
||||
|
||||
## Constraints
|
||||
|
||||
- Raw frames are not retained by default.
|
||||
- Secrets are not logged in FDR payloads.
|
||||
|
||||
## Risks & Mitigation
|
||||
|
||||
**Risk 1: FDR affects latency**
|
||||
- *Risk*: Append pressure slows localization.
|
||||
- *Mitigation*: Bounded segments and async-friendly append semantics.
|
||||
@@ -0,0 +1,90 @@
|
||||
# VIO Adapter
|
||||
|
||||
**Task**: AZ-228_vio_adapter
|
||||
**Name**: VIO Adapter
|
||||
**Description**: Wrap the selected relative VIO backend as a replaceable component with health and error behavior.
|
||||
**Complexity**: 5 points
|
||||
**Dependencies**: AZ-221_shared_geometry_time_sync, AZ-222_runtime_config_errors_telemetry, AZ-223_camera_ingest_calibration, AZ-224_mavlink_gcs_gateway
|
||||
**Component**: VIO Adapter
|
||||
**Tracker**: AZ-228
|
||||
**Epic**: AZ-213
|
||||
|
||||
## Problem
|
||||
|
||||
The safety wrapper needs relative VIO state from calibrated frames and FC IMU without inheriting backend-specific internals.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Backend initialization, processing, and health behavior are exposed through a replaceable adapter.
|
||||
- Tracking loss and timestamp mismatch are explicit.
|
||||
- The adapter never emits WGS84 coordinates or safety decisions.
|
||||
|
||||
## Scope
|
||||
|
||||
### Included
|
||||
- Initialization and runtime health.
|
||||
- Frame + IMU processing behavior.
|
||||
- Relative pose/velocity/bias output and quality metadata.
|
||||
- Native bridge boundary.
|
||||
|
||||
### Excluded
|
||||
- Absolute anchor fusion and covariance authority.
|
||||
- Satellite matching fallback implementation.
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Document Dependencies
|
||||
- `_docs/02_document/contracts/shared/runtime_contracts.md`
|
||||
- `_docs/02_document/contracts/shared/geometry_time_sync.md`
|
||||
- `_docs/02_document/contracts/shared/config_errors_telemetry.md`
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
**AC-1: VIO state emitted**
|
||||
Given synchronized frame and IMU samples
|
||||
When processing succeeds
|
||||
Then a relative VIO state packet with tracking quality is emitted.
|
||||
|
||||
**AC-2: Timestamp mismatch is explicit**
|
||||
Given frame/IMU timestamps are inconsistent
|
||||
When processing is requested
|
||||
Then the adapter rejects the packet with a timestamp mismatch error.
|
||||
|
||||
**AC-3: Health is observable**
|
||||
Given initialization or tracking quality changes
|
||||
When health is requested
|
||||
Then the adapter reports current VIO readiness and degradation state.
|
||||
|
||||
## Non-Functional Requirements
|
||||
|
||||
**Performance**
|
||||
- Adapter processing must be profiled against Jetson latency/memory limits.
|
||||
|
||||
**Reliability**
|
||||
- Backend failures are surfaced, not hidden.
|
||||
|
||||
## Unit Tests
|
||||
|
||||
| AC Ref | What to Test | Required Outcome |
|
||||
|--------|--------------|------------------|
|
||||
| AC-1 | Valid synchronized packet | VIO state emitted |
|
||||
| AC-2 | Bad timestamp window | Explicit error |
|
||||
| AC-3 | Tracking loss | Health reports degraded |
|
||||
|
||||
## Blackbox Tests
|
||||
|
||||
| AC Ref | Initial Data/Conditions | What to Test | Expected Behavior | NFR References |
|
||||
|--------|-------------------------|--------------|-------------------|----------------|
|
||||
| AC-1 | Derkachi/public replay | Relative VIO path | Continuous estimates where data supports it | Performance |
|
||||
|
||||
## Constraints
|
||||
|
||||
- BASALT remains the current selected backend, but package and folder names must stay backend-neutral.
|
||||
- The VIO adapter is not the safety authority.
|
||||
- GPL VIO dependencies remain reference-only unless explicitly approved.
|
||||
|
||||
## Risks & Mitigation
|
||||
|
||||
**Risk 1: Nadir fixed-wing fit**
|
||||
- *Risk*: The selected VIO backend underperforms on low-parallax terrain.
|
||||
- *Mitigation*: Representative replay and reference comparisons gate acceptance.
|
||||
@@ -0,0 +1,87 @@
|
||||
# Satellite Service Sync Boundary
|
||||
|
||||
**Task**: AZ-229_satellite_service_sync
|
||||
**Name**: Satellite Service Sync Boundary
|
||||
**Description**: Import mission cache packages before flight and upload generated-tile packages after flight.
|
||||
**Complexity**: 3 points
|
||||
**Dependencies**: AZ-222_runtime_config_errors_telemetry, AZ-225_tile_manager_cache_manifest, AZ-226_generated_tile_orthorectification
|
||||
**Component**: Satellite Service
|
||||
**Tracker**: AZ-229
|
||||
**Epic**: AZ-214
|
||||
|
||||
## Problem
|
||||
|
||||
The onboard runtime needs a clear boundary for Satellite Service package exchange without allowing mid-flight network calls.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Pre-flight cache packages can be imported and handed to Tile Manager validation.
|
||||
- Post-flight generated-tile packages can be uploaded/retried.
|
||||
- Mid-flight provider or Satellite Service calls are explicitly blocked.
|
||||
|
||||
## Scope
|
||||
|
||||
### Included
|
||||
- Pre-flight import behavior.
|
||||
- Post-flight generated-tile upload behavior.
|
||||
- Package status and retry/error reporting.
|
||||
|
||||
### Excluded
|
||||
- In-flight retrieval ranking.
|
||||
- Tile manifest validation and generated tile creation.
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Document Dependencies
|
||||
- `_docs/02_document/contracts/shared/runtime_contracts.md`
|
||||
- `_docs/02_document/contracts/shared/config_errors_telemetry.md`
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
**AC-1: Pre-flight package import succeeds**
|
||||
Given a valid Satellite Service mission cache package
|
||||
When import runs before flight
|
||||
Then the package is available for Tile Manager validation.
|
||||
|
||||
**AC-2: Post-flight upload is auditable**
|
||||
Given a generated-tile package exists after landing
|
||||
When upload runs
|
||||
Then success, rejection, or retryable failure is recorded.
|
||||
|
||||
**AC-3: Mid-flight network calls are blocked**
|
||||
Given the runtime is in flight mode
|
||||
When cache data is missing
|
||||
Then the component does not call a satellite provider or suite service.
|
||||
|
||||
## Non-Functional Requirements
|
||||
|
||||
**Reliability**
|
||||
- Upload failures retain packages for retry.
|
||||
|
||||
**Security**
|
||||
- Signing credentials are never logged.
|
||||
|
||||
## Unit Tests
|
||||
|
||||
| AC Ref | What to Test | Required Outcome |
|
||||
|--------|--------------|------------------|
|
||||
| AC-1 | Valid import package | Package ready for validation |
|
||||
| AC-2 | Upload unavailable | Retryable failure recorded |
|
||||
| AC-3 | Flight-mode missing data | No network call |
|
||||
|
||||
## Blackbox Tests
|
||||
|
||||
| AC Ref | Initial Data/Conditions | What to Test | Expected Behavior | NFR References |
|
||||
|--------|-------------------------|--------------|-------------------|----------------|
|
||||
| AC-3 | Network disabled in replay | Relocalization missing data | Degraded/no-candidate behavior, no fetch | Security |
|
||||
|
||||
## Constraints
|
||||
|
||||
- No in-flight Satellite Service or satellite-provider network dependency.
|
||||
- Package sync is before takeoff or after landing only.
|
||||
|
||||
## Risks & Mitigation
|
||||
|
||||
**Risk 1: Boundary confusion**
|
||||
- *Risk*: Retrieval code starts fetching provider data mid-flight.
|
||||
- *Mitigation*: Flight-mode invariant is acceptance-tested.
|
||||
@@ -0,0 +1,89 @@
|
||||
# Satellite Service Local VPR Retrieval
|
||||
|
||||
**Task**: AZ-230_satellite_service_vpr_retrieval
|
||||
**Name**: Satellite Service Local VPR Retrieval
|
||||
**Description**: Retrieve local VPR candidates from preloaded descriptors and FAISS indexes.
|
||||
**Complexity**: 5 points
|
||||
**Dependencies**: AZ-223_camera_ingest_calibration, AZ-225_tile_manager_cache_manifest, AZ-229_satellite_service_sync
|
||||
**Component**: Satellite Service
|
||||
**Tracker**: AZ-230
|
||||
**Epic**: AZ-214
|
||||
|
||||
## Problem
|
||||
|
||||
Relocalization needs ranked satellite/cache candidates, but retrieval must be trigger-based and use only local preloaded cache/index data.
|
||||
|
||||
## Outcome
|
||||
|
||||
- DINOv2-VLAD descriptor extraction and CPU FAISS top-K candidate retrieval are available.
|
||||
- Candidate freshness and dynamic top-K policy are carried forward.
|
||||
- No-candidate/index failures produce degraded behavior rather than unsafe anchors.
|
||||
|
||||
## Scope
|
||||
|
||||
### Included
|
||||
- Index load/readiness behavior.
|
||||
- Query descriptor and top-K candidate retrieval.
|
||||
- Freshness tagging and retrieval result metadata.
|
||||
- Descriptor fidelity gate for optimized engines.
|
||||
|
||||
### Excluded
|
||||
- Local matching/RANSAC.
|
||||
- In-flight network fetches.
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Document Dependencies
|
||||
- `_docs/02_document/contracts/shared/runtime_contracts.md`
|
||||
- `_docs/02_document/contracts/shared/geometry_time_sync.md`
|
||||
- `_docs/02_document/contracts/shared/config_errors_telemetry.md`
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
**AC-1: Index loads before retrieval**
|
||||
Given a valid local descriptor/index package
|
||||
When index loading runs
|
||||
Then retrieval readiness is reported.
|
||||
|
||||
**AC-2: Top-K candidates returned**
|
||||
Given a relocalization request and loaded local index
|
||||
When retrieval runs
|
||||
Then bounded candidates include tile/chunk IDs, scores, footprints, and freshness status.
|
||||
|
||||
**AC-3: Missing candidates degrade safely**
|
||||
Given no valid candidates or index failure
|
||||
When retrieval runs
|
||||
Then the result is explicit no-candidate/degraded behavior.
|
||||
|
||||
## Non-Functional Requirements
|
||||
|
||||
**Performance**
|
||||
- Retrieval is trigger-based and profiled against Jetson limits.
|
||||
|
||||
**Security**
|
||||
- Retrieval never performs mid-flight provider calls.
|
||||
|
||||
## Unit Tests
|
||||
|
||||
| AC Ref | What to Test | Required Outcome |
|
||||
|--------|--------------|------------------|
|
||||
| AC-1 | Valid index | Ready status |
|
||||
| AC-2 | Query frame | Candidate list with freshness |
|
||||
| AC-3 | Missing index | Explicit degraded/no-candidate result |
|
||||
|
||||
## Blackbox Tests
|
||||
|
||||
| AC Ref | Initial Data/Conditions | What to Test | Expected Behavior | NFR References |
|
||||
|--------|-------------------------|--------------|-------------------|----------------|
|
||||
| AC-2 | Public/cache fixture | VPR recall and top-K policy | Correct candidate bounds and freshness | Performance |
|
||||
|
||||
## Constraints
|
||||
|
||||
- Retrieval is not per-frame steady-state work.
|
||||
- TensorRT/ONNX path is accepted only after descriptor-fidelity tests pass.
|
||||
|
||||
## Risks & Mitigation
|
||||
|
||||
**Risk 1: Trigger path exceeds Jetson budget**
|
||||
- *Risk*: Descriptor extraction or FAISS query is too slow.
|
||||
- *Mitigation*: CPU-first FAISS, bounded top-K, and profiling gates.
|
||||
@@ -0,0 +1,88 @@
|
||||
# Anchor Verification Matching And Geometry Gates
|
||||
|
||||
**Task**: AZ-231_anchor_verification_matching
|
||||
**Name**: Anchor Verification Matching And Geometry Gates
|
||||
**Description**: Verify retrieved candidates with ALIKED/DISK + LightGlue and geometric safety gates.
|
||||
**Complexity**: 5 points
|
||||
**Dependencies**: AZ-223_camera_ingest_calibration, AZ-225_tile_manager_cache_manifest, AZ-230_satellite_service_vpr_retrieval
|
||||
**Component**: Anchor Verification
|
||||
**Tracker**: AZ-231
|
||||
**Epic**: AZ-215
|
||||
|
||||
## Problem
|
||||
|
||||
VPR candidates are not trusted fixes; they require local feature matching, RANSAC geometry, provenance checks, and measurable rejection evidence.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Anchor candidates are accepted or rejected with MRE, inlier count, homography, freshness/provenance, and reason metadata.
|
||||
- Matcher profiles can be benchmarked without making learned matching a per-frame VIO hot path.
|
||||
|
||||
## Scope
|
||||
|
||||
### Included
|
||||
- ALIKED/DISK + LightGlue matching profile behavior.
|
||||
- SIFT/ORB baseline profile.
|
||||
- OpenCV RANSAC/USAC geometry checks.
|
||||
- Anchor decision output and rejection reasons.
|
||||
|
||||
### Excluded
|
||||
- VPR retrieval ranking.
|
||||
- Safety wrapper anchor fusion.
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Document Dependencies
|
||||
- `_docs/02_document/contracts/shared/runtime_contracts.md`
|
||||
- `_docs/02_document/contracts/shared/geometry_time_sync.md`
|
||||
- `_docs/02_document/contracts/shared/config_errors_telemetry.md`
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
**AC-1: Candidate verification emits evidence**
|
||||
Given retrieved candidates and a usable frame
|
||||
When verification runs
|
||||
Then each result includes acceptance state, MRE, inlier count, and rejection/acceptance reason.
|
||||
|
||||
**AC-2: Unsafe candidates are rejected**
|
||||
Given low inliers, high MRE, stale provenance, or geometry failure
|
||||
When verification runs
|
||||
Then no accepted anchor decision is emitted for that candidate.
|
||||
|
||||
**AC-3: Matcher benchmark is reportable**
|
||||
Given configured matcher profiles
|
||||
When benchmark runs
|
||||
Then profile runtime and quality metrics are reported.
|
||||
|
||||
## Non-Functional Requirements
|
||||
|
||||
**Performance**
|
||||
- Learned matching is trigger-based and profiled separately from BASALT.
|
||||
|
||||
**Reliability**
|
||||
- SuperPoint is excluded from production unless legal approval exists.
|
||||
|
||||
## Unit Tests
|
||||
|
||||
| AC Ref | What to Test | Required Outcome |
|
||||
|--------|--------------|------------------|
|
||||
| AC-1 | Valid matching fixture | Evidence fields present |
|
||||
| AC-2 | Bad geometry fixture | Rejected decision |
|
||||
| AC-3 | Benchmark profiles | Metrics emitted |
|
||||
|
||||
## Blackbox Tests
|
||||
|
||||
| AC Ref | Initial Data/Conditions | What to Test | Expected Behavior | NFR References |
|
||||
|--------|-------------------------|--------------|-------------------|----------------|
|
||||
| AC-1 | Aerial/cache fixture | Anchor verification path | Accepted anchors meet MRE/inlier gates | Performance |
|
||||
|
||||
## Constraints
|
||||
|
||||
- ALIKED/DISK + LightGlue supplies correspondences, not full VIO.
|
||||
- Anchor verification does not decide final safety fusion.
|
||||
|
||||
## Risks & Mitigation
|
||||
|
||||
**Risk 1: False anchor acceptance**
|
||||
- *Risk*: Cross-domain match looks plausible but is wrong.
|
||||
- *Mitigation*: Geometry, freshness, provenance, and downstream Mahalanobis gates.
|
||||
@@ -0,0 +1,97 @@
|
||||
# Safety Anchor State Machine
|
||||
|
||||
**Task**: AZ-232_safety_anchor_state_machine
|
||||
**Name**: Safety Anchor State Machine
|
||||
**Description**: Own authoritative localization state, confidence, anchor fusion, degraded modes, tile-write eligibility, and MAVLink output semantics.
|
||||
**Complexity**: 5 points
|
||||
**Dependencies**: AZ-223_camera_ingest_calibration, AZ-224_mavlink_gcs_gateway, AZ-227_fdr_event_recorder, AZ-228_vio_adapter, AZ-231_anchor_verification_matching
|
||||
**Component**: Safety And Anchor Wrapper
|
||||
**Tracker**: AZ-232
|
||||
**Epic**: AZ-216
|
||||
|
||||
## Problem
|
||||
|
||||
The product needs one safety authority that converts VIO, telemetry, camera quality, and anchor evidence into honest localization outputs and degraded/failsafe behavior.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Wrapper updates localization state from VIO and anchors.
|
||||
- Covariance grows honestly in degraded modes.
|
||||
- `GPS_INPUT` semantics, source labels, and tile-write eligibility are controlled by the wrapper.
|
||||
|
||||
## Scope
|
||||
|
||||
### Included
|
||||
- VIO update handling.
|
||||
- Anchor acceptance/rejection integration.
|
||||
- IMU-only degraded propagation.
|
||||
- Covariance/source-label/fix-type behavior.
|
||||
- Tile-write eligibility decisions.
|
||||
|
||||
### Excluded
|
||||
- VIO backend internals.
|
||||
- MAVLink transport implementation.
|
||||
- Generated tile writing.
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Document Dependencies
|
||||
- `_docs/02_document/contracts/shared/runtime_contracts.md`
|
||||
- `_docs/02_document/contracts/shared/geometry_time_sync.md`
|
||||
- `_docs/02_document/contracts/shared/config_errors_telemetry.md`
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
**AC-1: VIO state updates position estimate**
|
||||
Given valid VIO state and telemetry context
|
||||
When the wrapper processes the update
|
||||
Then it emits an estimate with source label and honest covariance.
|
||||
|
||||
**AC-2: Accepted anchor can correct state**
|
||||
Given an anchor decision that passes safety gates
|
||||
When the wrapper considers it
|
||||
Then the state may become `satellite_anchored` with recorded evidence.
|
||||
|
||||
**AC-3: Blackout degrades safely**
|
||||
Given total visual blackout or tracking loss
|
||||
When degraded propagation runs
|
||||
Then covariance grows monotonically and failsafe/no-fix semantics occur at thresholds.
|
||||
|
||||
**AC-4: Tile-write eligibility is conservative**
|
||||
Given a frame and current estimate
|
||||
When tile eligibility is requested
|
||||
Then only sufficiently trusted poses are eligible for generated tile writes.
|
||||
|
||||
## Non-Functional Requirements
|
||||
|
||||
**Safety**
|
||||
- Confidence must not be optimistic relative to known error/covariance.
|
||||
|
||||
**Reliability**
|
||||
- State invariant violations are surfaced and recorded.
|
||||
|
||||
## Unit Tests
|
||||
|
||||
| AC Ref | What to Test | Required Outcome |
|
||||
|--------|--------------|------------------|
|
||||
| AC-1 | Healthy VIO update | Estimate emitted |
|
||||
| AC-2 | Accepted/rejected anchors | State updates only on accepted evidence |
|
||||
| AC-3 | Blackout thresholds | `dead_reckoned` then no-fix/failsafe |
|
||||
| AC-4 | Tile eligibility | Covariance/quality gates enforced |
|
||||
|
||||
## Blackbox Tests
|
||||
|
||||
| AC Ref | Initial Data/Conditions | What to Test | Expected Behavior | NFR References |
|
||||
|--------|-------------------------|--------------|-------------------|----------------|
|
||||
| AC-3 | Blackout + spoofing SITL | Degraded behavior | QGC/FDR/fix fields match thresholds | Safety |
|
||||
|
||||
## Constraints
|
||||
|
||||
- The VIO backend is not the safety authority.
|
||||
- The wrapper does not call Tile Manager directly during anchor acceptance; freshness/provenance arrives through anchor evidence.
|
||||
|
||||
## Risks & Mitigation
|
||||
|
||||
**Risk 1: Over-trusted dead reckoning**
|
||||
- *Risk*: IMU-only propagation is believed for too long.
|
||||
- *Mitigation*: Monotonic covariance growth and no-fix/failsafe thresholds.
|
||||
@@ -0,0 +1,41 @@
|
||||
# Batch Report
|
||||
|
||||
**Batch**: 1
|
||||
**Tasks**: AZ-219_initial_structure
|
||||
**Date**: 2026-05-03
|
||||
|
||||
## Task Results
|
||||
|
||||
| Task | Status | Files Modified | Tests | AC Coverage | Issues |
|
||||
|------|--------|----------------|-------|-------------|--------|
|
||||
| AZ-219_initial_structure | Done | 98 files | Pass | 7/7 ACs covered | None |
|
||||
|
||||
## AC Test Coverage: All covered
|
||||
|
||||
| AC Ref | Coverage |
|
||||
|--------|----------|
|
||||
| AC-1 | `test_scaffold_paths_cover_runtime_test_and_evidence_layout` verifies source, tests, migrations, deployment, configuration, data, CI, and compose scaffold paths. |
|
||||
| AC-2 | `test_runtime_component_public_modules_are_importable` and `test_shared_contract_locations_are_importable` verify public component and shared contract namespaces. |
|
||||
| AC-3 | `test_scaffold_paths_cover_runtime_test_and_evidence_layout` verifies compose, env template, and migration paths; compose config validation passed. |
|
||||
| AC-4 | `test_scaffold_paths_cover_runtime_test_and_evidence_layout` verifies `.github/workflows/ci.yml`; the workflow defines format, lint, unit test, compose config, and artifact placeholder jobs. |
|
||||
| AC-5 | `test_scaffold_paths_cover_runtime_test_and_evidence_layout` verifies unit, integration, black-box, fixture, SITL, and e2e runner paths. |
|
||||
| AC-6 | `test_scaffold_paths_cover_runtime_test_and_evidence_layout` verifies deployment scripts and evidence report paths. |
|
||||
| AC-7 | `test_ignore_rules_exclude_runtime_payloads_and_secrets` verifies secrets, raw frames, cache/FDR payloads, and test result artifacts are ignored. |
|
||||
|
||||
## Code Review Verdict: PASS
|
||||
|
||||
Review report: `_docs/03_implementation/reviews/batch_01_review.md`
|
||||
|
||||
## Auto-Fix Attempts: 0
|
||||
|
||||
## Stuck Agents: None
|
||||
|
||||
## Verification
|
||||
|
||||
- `.venv/bin/python -m black --check src tests e2e/replay` passed.
|
||||
- `.venv/bin/python -m ruff check src tests e2e/replay` passed.
|
||||
- `.venv/bin/python -m pytest` passed: 5 tests.
|
||||
- `docker compose -f docker-compose.yml config` passed.
|
||||
- `docker compose -f docker-compose.test.yml config` passed.
|
||||
|
||||
## Next Batch: AZ-220_shared_runtime_contracts
|
||||
@@ -0,0 +1,34 @@
|
||||
# Batch Report
|
||||
|
||||
**Batch**: 2
|
||||
**Tasks**: AZ-220_shared_runtime_contracts
|
||||
**Date**: 2026-05-03
|
||||
|
||||
## Task Results
|
||||
|
||||
| Task | Status | Files Modified | Tests | AC Coverage | Issues |
|
||||
|------|--------|----------------|-------|-------------|--------|
|
||||
| AZ-220_shared_runtime_contracts | Done | 8 files | Pass | 2/2 ACs covered | None |
|
||||
|
||||
## AC Test Coverage: All covered
|
||||
|
||||
| AC Ref | Coverage |
|
||||
|--------|----------|
|
||||
| AC-1 | `test_runtime_dtos_accept_valid_minimal_values` verifies the shared DTO contract surface can be imported and constructed. |
|
||||
| AC-2 | `test_missing_required_timestamp_is_rejected_with_structured_error`, `test_raw_frame_retention_is_rejected`, `test_position_accuracy_cannot_under_report_covariance`, and `test_accepted_anchor_requires_estimated_pose` verify malformed DTOs are rejected with structured Pydantic validation errors. |
|
||||
|
||||
## Code Review Verdict: PASS
|
||||
|
||||
Review report: `_docs/03_implementation/reviews/batch_02_review.md`
|
||||
|
||||
## Auto-Fix Attempts: 0
|
||||
|
||||
## Stuck Agents: None
|
||||
|
||||
## Verification
|
||||
|
||||
- `.venv/bin/python -m black --check src tests e2e/replay` passed.
|
||||
- `.venv/bin/python -m ruff check src tests e2e/replay` passed.
|
||||
- `.venv/bin/python -m pytest` passed: 11 tests.
|
||||
|
||||
## Next Batch: AZ-221_shared_geometry_time_sync, AZ-222_runtime_config_errors_telemetry
|
||||
@@ -0,0 +1,29 @@
|
||||
# Code Review Report
|
||||
|
||||
**Batch**: AZ-219_initial_structure
|
||||
**Date**: 2026-05-03
|
||||
**Verdict**: PASS
|
||||
|
||||
## Findings
|
||||
|
||||
| # | Severity | Category | File:Line | Title |
|
||||
|---|----------|----------|-----------|-------|
|
||||
| - | - | - | - | No findings |
|
||||
|
||||
## Review Notes
|
||||
|
||||
- AC-1 is satisfied by the `src/`, `migrations/`, `tests/`, `e2e/`, `deployment/`, `config/`, and `data/` scaffold plus tracked placeholders.
|
||||
- AC-2 is satisfied by importable component and shared package namespaces under `src/`.
|
||||
- AC-3 is satisfied by `docker-compose.yml`, `docker-compose.test.yml`, `.env.example`, and the initial PostGIS migration.
|
||||
- AC-4 is satisfied by `.github/workflows/ci.yml` with format, lint, unit-test, compose-config, and artifact placeholder stages.
|
||||
- AC-5 is satisfied by pytest unit scaffold coverage and black-box/SITL/e2e fixture entry-point directories.
|
||||
- AC-6 is satisfied by deployment Dockerfiles, Jetson/deployment placeholders, `e2e/reports/`, and `deployment/scripts/collect_evidence.sh`.
|
||||
- AC-7 is satisfied by `.gitignore`, `.dockerignore`, and non-secret environment templates excluding generated runtime payloads and credentials.
|
||||
|
||||
## Verification
|
||||
|
||||
- `.venv/bin/python -m black --check src tests e2e/replay` passed.
|
||||
- `.venv/bin/python -m ruff check src tests e2e/replay` passed.
|
||||
- `.venv/bin/python -m pytest` passed: 5 tests.
|
||||
- `docker compose -f docker-compose.yml config` passed.
|
||||
- `docker compose -f docker-compose.test.yml config` passed.
|
||||
@@ -0,0 +1,24 @@
|
||||
# Code Review Report
|
||||
|
||||
**Batch**: AZ-220_shared_runtime_contracts
|
||||
**Date**: 2026-05-03
|
||||
**Verdict**: PASS
|
||||
|
||||
## Findings
|
||||
|
||||
| # | Severity | Category | File:Line | Title |
|
||||
|---|----------|----------|-----------|-------|
|
||||
| - | - | - | - | No findings |
|
||||
|
||||
## Review Notes
|
||||
|
||||
- AC-1 is satisfied by the public exports in `src/shared/contracts/__init__.py` and the DTO models in `src/shared/contracts/models.py`.
|
||||
- AC-2 is satisfied by Pydantic validation for missing required fields, raw frame retention, optimistic covariance reporting, and inconsistent anchor decisions.
|
||||
- The implementation stays inside `shared/contracts` ownership and does not introduce component-specific algorithms.
|
||||
- Raw frame payloads remain references only; the model rejects retained raw-frame payload flags.
|
||||
|
||||
## Verification
|
||||
|
||||
- `.venv/bin/python -m black --check src tests e2e/replay` passed.
|
||||
- `.venv/bin/python -m ruff check src tests e2e/replay` passed.
|
||||
- `.venv/bin/python -m pytest` passed: 11 tests.
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
## Current Step
|
||||
flow: greenfield
|
||||
step: 5
|
||||
name: Decompose
|
||||
step: 7
|
||||
name: Implement
|
||||
status: in_progress
|
||||
tracker: jira
|
||||
sub_step:
|
||||
phase: 1
|
||||
name: bootstrap-structure
|
||||
detail: "AZ-219_initial_structure.md flattened to src/ root; awaiting structure confirmation"
|
||||
name: batch-loop
|
||||
detail: "batch 2: AZ-220_shared_runtime_contracts"
|
||||
retry_count: 0
|
||||
cycle: 1
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
GPSD_ENV=ci
|
||||
GPSD_LOG_LEVEL=info
|
||||
GPSD_CONFIG_DIR=./config/ci
|
||||
GPSD_CACHE_DIR=./data/cache
|
||||
GPSD_FDR_DIR=./data/fdr
|
||||
GPSD_CAMERA_SOURCE=./tests/fixtures
|
||||
@@ -0,0 +1,6 @@
|
||||
GPSD_ENV=development
|
||||
GPSD_LOG_LEVEL=debug
|
||||
GPSD_CONFIG_DIR=./config/development
|
||||
GPSD_CACHE_DIR=./data/cache
|
||||
GPSD_FDR_DIR=./data/fdr
|
||||
GPSD_CAMERA_SOURCE=./data/input
|
||||
@@ -0,0 +1,6 @@
|
||||
GPSD_ENV=jetson
|
||||
GPSD_LOG_LEVEL=info
|
||||
GPSD_CONFIG_DIR=/etc/gps-denied-onboard
|
||||
GPSD_CACHE_DIR=/var/lib/gps-denied/cache
|
||||
GPSD_FDR_DIR=/var/lib/gps-denied/fdr
|
||||
GPSD_CAMERA_SOURCE=hardware
|
||||
@@ -0,0 +1,10 @@
|
||||
GPSD_ENV=production
|
||||
GPSD_LOG_LEVEL=info
|
||||
GPSD_CONFIG_DIR=/etc/gps-denied-onboard
|
||||
GPSD_CACHE_DIR=/var/lib/gps-denied/cache
|
||||
GPSD_FDR_DIR=/var/lib/gps-denied/fdr
|
||||
GPSD_DATABASE_URL=postgresql://user:password@localhost:5432/gpsd
|
||||
GPSD_MAVLINK_URL=serial:/dev/ttyTHS1:921600
|
||||
GPSD_CAMERA_SOURCE=hardware
|
||||
GPSD_SIGNING_KEY_REF=replace-with-secret-manager-reference
|
||||
GPSD_MAX_FDR_BYTES=68719476736
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
# Compose Configuration
|
||||
|
||||
Runtime compose files live at the repository root so local and CI commands can
|
||||
use Docker defaults without extra path arguments.
|
||||
@@ -0,0 +1,19 @@
|
||||
FROM python:3.12-slim-bookworm
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN groupadd --system gpsd && useradd --system --gid gpsd --home-dir /app gpsd
|
||||
|
||||
COPY pyproject.toml README.md ./
|
||||
COPY src ./src
|
||||
COPY tests ./tests
|
||||
|
||||
RUN python -m pip install --no-cache-dir --upgrade pip \
|
||||
&& python -m pip install --no-cache-dir ".[dev]"
|
||||
|
||||
USER gpsd
|
||||
|
||||
CMD ["python", "-m", "pytest"]
|
||||
@@ -0,0 +1,18 @@
|
||||
FROM python:3.12-slim-bookworm
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN groupadd --system gpsd && useradd --system --gid gpsd --home-dir /app gpsd
|
||||
|
||||
COPY pyproject.toml README.md ./
|
||||
COPY src ./src
|
||||
|
||||
RUN python -m pip install --no-cache-dir --upgrade pip \
|
||||
&& python -m pip install --no-cache-dir .
|
||||
|
||||
USER gpsd
|
||||
|
||||
CMD ["python", "-c", "import shared.contracts; print('gps-denied runtime scaffold ready')"]
|
||||
@@ -0,0 +1,4 @@
|
||||
# Jetson Deployment Notes
|
||||
|
||||
Reserved for Jetson provisioning, thermal/resource evidence, and hardware-runner
|
||||
qualification procedures.
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
mkdir -p e2e/reports data/test-results
|
||||
printf 'Evidence collection placeholder. Wire runtime reports in deploy phase.\n'
|
||||
@@ -0,0 +1,27 @@
|
||||
services:
|
||||
postgis:
|
||||
image: postgis/postgis:16-3.4
|
||||
environment:
|
||||
POSTGRES_DB: gpsd_test
|
||||
POSTGRES_USER: gpsd
|
||||
POSTGRES_PASSWORD: gpsd
|
||||
volumes:
|
||||
- ./migrations/postgresql:/docker-entrypoint-initdb.d:ro
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U gpsd -d gpsd_test"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
replay-tests:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: deployment/docker/Dockerfile.replay
|
||||
env_file:
|
||||
- config/ci/runtime.env
|
||||
depends_on:
|
||||
postgis:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- ./tests/fixtures:/app/tests/fixtures:ro
|
||||
- ./data/test-results:/app/data/test-results
|
||||
@@ -0,0 +1,34 @@
|
||||
services:
|
||||
postgis:
|
||||
image: postgis/postgis:16-3.4
|
||||
environment:
|
||||
POSTGRES_DB: gpsd
|
||||
POSTGRES_USER: gpsd
|
||||
POSTGRES_PASSWORD: gpsd
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- postgis-data:/var/lib/postgresql/data
|
||||
- ./migrations/postgresql:/docker-entrypoint-initdb.d:ro
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U gpsd -d gpsd"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
runtime:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: deployment/docker/Dockerfile.runtime
|
||||
env_file:
|
||||
- .env.example
|
||||
depends_on:
|
||||
postgis:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- ./data/cache:/app/data/cache
|
||||
- ./data/fdr:/app/data/fdr
|
||||
- ./data/input:/app/data/input:ro
|
||||
|
||||
volumes:
|
||||
postgis-data:
|
||||
@@ -0,0 +1,4 @@
|
||||
# Replay Harness
|
||||
|
||||
Reserved for suite-level replay entry points that drive the runtime only through
|
||||
public files, MAVLink/cache/FDR interfaces, and published reports.
|
||||
@@ -0,0 +1,14 @@
|
||||
"""Replay runner entry point."""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def main() -> int:
|
||||
report_path = Path("e2e/reports/replay_smoke.txt")
|
||||
report_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
report_path.write_text("replay scaffold ready\n", encoding="utf-8")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
CREATE EXTENSION IF NOT EXISTS postgis;
|
||||
@@ -0,0 +1,4 @@
|
||||
# Seed Data
|
||||
|
||||
Place deterministic development and CI seed data here. Do not add production
|
||||
mission payloads, signing material, or raw frame dumps.
|
||||
@@ -0,0 +1,34 @@
|
||||
[build-system]
|
||||
requires = ["setuptools>=69", "wheel"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "gps-denied-onboard"
|
||||
version = "0.1.0"
|
||||
description = "Jetson-hosted GPS-denied localization runtime scaffold."
|
||||
requires-python = ">=3.10"
|
||||
dependencies = [
|
||||
"pydantic==2.13.3",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"black>=24.0",
|
||||
"pytest>=8.0",
|
||||
"ruff>=0.5",
|
||||
]
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
where = ["src"]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
pythonpath = ["src"]
|
||||
testpaths = ["tests"]
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 100
|
||||
src = ["src", "tests"]
|
||||
|
||||
[tool.black]
|
||||
line-length = 100
|
||||
target-version = ["py310"]
|
||||
@@ -0,0 +1 @@
|
||||
"""Source-root package marker for editable installs."""
|
||||
@@ -0,0 +1 @@
|
||||
"""Anchor verification component."""
|
||||
@@ -0,0 +1,10 @@
|
||||
"""Public anchor verification interfaces."""
|
||||
|
||||
from typing import Any, Protocol
|
||||
|
||||
|
||||
class AnchorVerifier(Protocol):
|
||||
"""Verifies retrieved candidates against camera observations."""
|
||||
|
||||
def verify(self, frame: Any, candidate: Any) -> Any:
|
||||
"""Return an anchor decision for one candidate."""
|
||||
@@ -0,0 +1,3 @@
|
||||
# Anchor Verification Native Bridge
|
||||
|
||||
Reserved for native feature extraction, matching, and RANSAC acceleration code owned by `anchor_verification`.
|
||||
@@ -0,0 +1,5 @@
|
||||
"""Public anchor verification type aliases."""
|
||||
|
||||
from typing import Any
|
||||
|
||||
AnchorDecisionLike = Any
|
||||
@@ -0,0 +1 @@
|
||||
"""Camera ingest and calibration component."""
|
||||
@@ -0,0 +1,10 @@
|
||||
"""Public camera ingest interfaces."""
|
||||
|
||||
from typing import Any, Protocol
|
||||
|
||||
|
||||
class FrameProvider(Protocol):
|
||||
"""Source of navigation frames for downstream localization components."""
|
||||
|
||||
def next_frame(self) -> Any:
|
||||
"""Return the next frame packet."""
|
||||
@@ -0,0 +1,5 @@
|
||||
"""Public camera ingest type aliases."""
|
||||
|
||||
from typing import Any
|
||||
|
||||
FramePacketLike = Any
|
||||
@@ -0,0 +1 @@
|
||||
"""Flight data recorder and observability component."""
|
||||
@@ -0,0 +1,13 @@
|
||||
"""Public flight recorder interfaces."""
|
||||
|
||||
from typing import Any, Protocol
|
||||
|
||||
|
||||
class FlightRecorder(Protocol):
|
||||
"""Append-only event recorder for runtime evidence."""
|
||||
|
||||
def append_event(self, event: Any) -> None:
|
||||
"""Persist one FDR event."""
|
||||
|
||||
def export(self) -> Any:
|
||||
"""Export recorded evidence for post-flight analysis."""
|
||||
@@ -0,0 +1,5 @@
|
||||
"""Public FDR type aliases."""
|
||||
|
||||
from typing import Any
|
||||
|
||||
FdrEventLike = Any
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user