mirror of
https://github.com/azaion/gps-denied-desktop.git
synced 2026-04-23 01:36:35 +00:00
put rest and sse to acceptance criteria. revise components. add system flows diagram
This commit is contained in:
@@ -101,7 +101,8 @@
|
||||
|
||||
**F13_coordinate_transformer**
|
||||
**Interface**: `ICoordinateTransformer`
|
||||
**API**: `set_enu_origin()`, `get_enu_origin()`, `gps_to_enu()`, `enu_to_gps()`, `pixel_to_gps()`, `gps_to_pixel()`, `image_object_to_gps()`, `compute_gsd()`, `transform_points()`
|
||||
**API**: `set_enu_origin()`, `get_enu_origin()`, `gps_to_enu()`, `enu_to_gps()`, `pixel_to_gps()`, `gps_to_pixel()`, `image_object_to_gps()`, `transform_points()`
|
||||
**Dependencies**: F10 Factor Graph Optimizer (for frame poses), H02 GSD Calculator (for GSD computation)
|
||||
|
||||
### Results & Communication
|
||||
|
||||
@@ -144,14 +145,14 @@
|
||||
|
||||
| Order | Component | Method | Purpose | Dependencies |
|
||||
|-------|-----------|--------|---------|--------------|
|
||||
| 1 | F16 Configuration Manager | `load_config()` | Load system configuration | None |
|
||||
| 2 | F03 Flight Database | Initialize connections | Establish DB connection pool | F16 |
|
||||
| 3 | F15 Model Manager | `load_model("SuperPoint")` | Load SuperPoint feature extractor | F16 |
|
||||
| 4 | F15 Model Manager | `load_model("LightGlue")` | Load LightGlue matcher | F16 |
|
||||
| 5 | F15 Model Manager | `load_model("DINOv2")` | Load DINOv2 for place recognition | F16 |
|
||||
| 6 | F15 Model Manager | `load_model("LiteSAM")` | Load LiteSAM for cross-view matching | F16 |
|
||||
| 7 | F04 Satellite Data Manager | Initialize cache | Initialize tile cache directory | F16 |
|
||||
| 8 | F08 Global Place Recognition | `build_index()` or `load_index()` | Build/load Faiss index from satellite tiles | F04, F15, H04 |
|
||||
| 1 | F17 Configuration Manager | `load_config()` | Load system configuration | None |
|
||||
| 2 | F03 Flight Database | Initialize connections | Establish DB connection pool | F17 |
|
||||
| 3 | F16 Model Manager | `load_model("SuperPoint")` | Load SuperPoint feature extractor | F17 |
|
||||
| 4 | F16 Model Manager | `load_model("LightGlue")` | Load LightGlue matcher | F17 |
|
||||
| 5 | F16 Model Manager | `load_model("DINOv2")` | Load DINOv2 for place recognition | F17 |
|
||||
| 6 | F16 Model Manager | `load_model("LiteSAM")` | Load LiteSAM for cross-view matching | F17 |
|
||||
| 7 | F04 Satellite Data Manager | Initialize cache | Initialize tile cache directory | F17 |
|
||||
| 8 | F08 Global Place Recognition | `load_index()` | Load pre-built Faiss index from satellite provider | F04, F16, H04 |
|
||||
| 9 | F12 Route Chunk Manager | Initialize | Initialize chunk state tracking | F10 |
|
||||
| 10 | F02 Flight Processor | Ready | Ready to accept flights | All above |
|
||||
| 11 | F01 Flight API | Start server | Start FastAPI/Uvicorn | F02 |
|
||||
@@ -176,7 +177,7 @@
|
||||
| Source | Target | Method | Purpose |
|
||||
|--------|--------|--------|---------|
|
||||
| F02 | F16 | `load_config()` | Load system configuration |
|
||||
| F02 | F15 | `load_model()` × 4 | Load SuperPoint, LightGlue, DINOv2, LiteSAM |
|
||||
| F02 | F16 | `load_model()` × 4 | Load SuperPoint, LightGlue, DINOv2, LiteSAM |
|
||||
| F04 | F08 | Satellite tiles | F08 generates descriptors for Faiss |
|
||||
| F08 | H04 | `build_index()` | Build satellite descriptor index |
|
||||
| F08 | F15 | `get_inference_engine("DINOv2")` | Get model for descriptor generation |
|
||||
@@ -246,6 +247,7 @@
|
||||
| F02 | F11 | `check_confidence()` → FAIL | Low confidence |
|
||||
| F11 | F12 | `create_chunk_on_tracking_loss()` | **Proactive chunk creation** |
|
||||
| F12 | F10 | `create_new_chunk()` | Create chunk in factor graph |
|
||||
| F12 | F03 | `save_chunk_state()` | Persist chunk state for recovery |
|
||||
| F02 | F12 | `get_active_chunk()` | Get new active chunk |
|
||||
| F11 | F06 | `requires_rotation_sweep()` | Trigger rotation sweep (single-image) |
|
||||
| F11 | F08 | `retrieve_candidate_tiles()` | Coarse localization (single-image) |
|
||||
@@ -292,7 +294,7 @@
|
||||
| F01 | F11 | `apply_user_anchor()` | Apply fix |
|
||||
| F11 | F10 | `add_absolute_factor()` (high confidence) | Hard constraint |
|
||||
| F10 | Internal | `optimize()` | Re-optimize |
|
||||
| F11 | F02 | `update_flight_status("PROCESSING")` | Resume |
|
||||
| F11 | Event | Emit `UserFixApplied` | F02 subscribes and resumes |
|
||||
|
||||
### Asynchronous Refinement
|
||||
|
||||
@@ -331,7 +333,7 @@
|
||||
|
||||
## Interaction Coverage Verification
|
||||
|
||||
✅ **Initialization**: F02→F15, F16, F17; F04→F08→H04
|
||||
✅ **Initialization**: F02→F16, F17; F04→F08→H04
|
||||
✅ **Flight creation**: Client→F01→F02→F04,F12,F16,F17,F14
|
||||
✅ **Image upload**: Client→F01→F05→H08,F17
|
||||
✅ **Rotation sweep**: F06→H07,F09 (12 iterations)
|
||||
@@ -392,3 +394,42 @@
|
||||
- [x] F17 Configuration Manager
|
||||
- [x] F03 Flight Database (merged from R04, G17)
|
||||
- [x] Helper components (H01-H08)
|
||||
|
||||
---
|
||||
|
||||
## Architecture Notes
|
||||
|
||||
### F02 Flight Processor Complexity
|
||||
|
||||
F02 Flight Processor handles multiple concerns:
|
||||
- Flight lifecycle management
|
||||
- Processing loop orchestration
|
||||
- Event subscription and state updates
|
||||
- Coordination of F07/F08/F09/F10
|
||||
|
||||
**Current Status**: Acceptable for MVP. The responsibilities are related (all flight processing) and the component acts as a coordinator rather than implementing logic directly.
|
||||
|
||||
**Future Consideration**: If complexity grows, consider splitting into:
|
||||
- F02a Flight State Manager (lifecycle, status)
|
||||
- F02b Processing Loop Coordinator (frame processing orchestration)
|
||||
|
||||
**Decision**: Keep as single component. Clear internal organization with separate methods for state vs processing concerns. Event-based communication with F11 keeps recovery logic separate.
|
||||
|
||||
### Error Recovery Strategy
|
||||
|
||||
**Per-Component Recovery**:
|
||||
- **F02**: Persists flight state via F03 on each significant update. On restart, loads last known state.
|
||||
- **F07**: Stateless - reprocesses frame if VO fails
|
||||
- **F10**: Factor graph state persisted periodically. On restart, rebuilds from F03 checkpoint.
|
||||
- **F11**: Chunk state persisted via F12→F03. Recovery continues from last chunk state.
|
||||
- **F12**: All chunk state persisted to F03. Restores chunk handles on restart.
|
||||
|
||||
**System-Wide Recovery**:
|
||||
1. On crash, F02 loads flight state from F03
|
||||
2. F12 restores chunk state from F03
|
||||
3. Processing resumes from last successfully processed frame
|
||||
4. Incomplete chunks continue building/matching
|
||||
|
||||
**Event Recovery**:
|
||||
- Events are fire-and-forget (no persistence)
|
||||
- Subscribers rebuild state from F03 on restart
|
||||
|
||||
Reference in New Issue
Block a user