mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-06-22 15:31:13 +00:00
Refactor documentation to replace the Validation Harness with a separate E2E Test Suite, updating references throughout various documents. Adjust the autodev state to reflect the transition from the Decompose phase to the Implement phase, and revise the architecture documentation to clarify system boundaries and component relationships. Enhance risk mitigation documentation to specify affected components and update the component overview diagram accordingly.
This commit is contained in:
@@ -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 | basalt_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.
|
||||
@@ -18,12 +18,11 @@ project-root/
|
||||
│ ├── camera_ingest_calibration/
|
||||
│ ├── basalt_vio_adapter/
|
||||
│ ├── safety_anchor_wrapper/
|
||||
│ ├── satellite_retrieval/
|
||||
│ ├── satellite_service/
|
||||
│ ├── anchor_verification/
|
||||
│ ├── cache_tile_lifecycle/
|
||||
│ ├── tile_manager/
|
||||
│ ├── mavlink_gcs_integration/
|
||||
│ ├── fdr_observability/
|
||||
│ ├── validation_harness/
|
||||
│ ├── shared/
|
||||
│ │ ├── contracts/
|
||||
│ │ ├── geo_geometry/
|
||||
@@ -43,7 +42,8 @@ project-root/
|
||||
│ ├── integration/
|
||||
│ ├── blackbox/
|
||||
│ ├── fixtures/
|
||||
│ └── sitl/
|
||||
│ ├── sitl/
|
||||
│ └── e2e/
|
||||
├── e2e/
|
||||
│ ├── replay/
|
||||
│ └── reports/
|
||||
@@ -85,28 +85,27 @@ The scaffold separates runtime source, migrations, tests, deployment assets, con
|
||||
| DTO Name | Used By Components | Fields Summary |
|
||||
|----------|--------------------|----------------|
|
||||
| `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, 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, Tile Manager, FDR, validation harness | WGS84 coordinates, covariance semi-major axis, source label, fix type, horizontal accuracy, anchor age |
|
||||
| `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` | 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, 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 |
|
||||
| `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 Service, anchor verification, Tile Manager |
|
||||
| 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, Tile Manager, FDR, validation harness |
|
||||
| BASALT 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 |
|
||||
| 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
|
||||
|
||||
@@ -182,7 +181,6 @@ tests/
|
||||
│ ├── tile_manager/
|
||||
│ ├── mavlink_gcs_integration/
|
||||
│ ├── fdr_observability/
|
||||
│ └── validation_harness/
|
||||
├── integration/
|
||||
│ ├── contracts/
|
||||
│ ├── cache_postgis/
|
||||
@@ -200,10 +198,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
|
||||
|
||||
@@ -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,89 @@
|
||||
# BASALT VIO Adapter
|
||||
|
||||
**Task**: AZ-228_basalt_vio_adapter
|
||||
**Name**: BASALT VIO Adapter
|
||||
**Description**: Wrap BASALT as a replaceable relative VIO 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**: BASALT VIO Adapter
|
||||
**Tracker**: AZ-228
|
||||
**Epic**: AZ-213
|
||||
|
||||
## Problem
|
||||
|
||||
The safety wrapper needs relative VIO state from calibrated frames and FC IMU without inheriting BASALT-specific internals.
|
||||
|
||||
## Outcome
|
||||
|
||||
- BASALT 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**
|
||||
- BASALT 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 is not the safety authority.
|
||||
- GPL VIO dependencies remain reference-only unless explicitly approved.
|
||||
|
||||
## Risks & Mitigation
|
||||
|
||||
**Risk 1: Nadir fixed-wing fit**
|
||||
- *Risk*: BASALT 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_basalt_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
|
||||
- BASALT 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
|
||||
|
||||
- BASALT 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.
|
||||
Reference in New Issue
Block a user