mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-04-22 11:16:37 +00:00
fix issues
This commit is contained in:
@@ -189,20 +189,27 @@
|
||||
| Client | F01 | `POST /flights` | Create flight |
|
||||
| F01 | F02 | `create_flight()` | Initialize flight state |
|
||||
| F02 | F16 | `get_flight_config()` | Get camera params, altitude |
|
||||
| F02 | F12 | `set_enu_origin(start_gps)` | Set ENU coordinate origin |
|
||||
| F02 | F13 | `set_enu_origin(flight_id, start_gps)` | Set ENU coordinate origin |
|
||||
| F02 | F04 | `prefetch_route_corridor()` | Prefetch tiles |
|
||||
| F04 | Satellite Provider | `GET /api/satellite/tiles/batch` | HTTP batch download |
|
||||
| F04 | H06 | `compute_tile_bounds()` | Tile coordinate calculations |
|
||||
| F02 | F03 | `insert_flight()` | Persist flight data |
|
||||
|
||||
### SSE Stream Creation
|
||||
|
||||
| Source | Target | Method | Purpose |
|
||||
|--------|--------|--------|---------|
|
||||
| Client | F01 | `GET .../stream` | Open SSE connection |
|
||||
| F01 | F14 | `create_stream()` | Establish SSE channel |
|
||||
| F01 | F02 | `create_client_stream()` | Route through coordinator |
|
||||
| F02 | F15 | `create_stream()` | Establish SSE channel |
|
||||
|
||||
### Image Upload
|
||||
|
||||
| Source | Target | Method | Purpose |
|
||||
|--------|--------|--------|---------|
|
||||
| Client | F01 | `POST .../images/batch` | Upload 10-50 images |
|
||||
| F01 | F05 | `queue_batch()` | Queue for processing |
|
||||
| F01 | F02 | `queue_images()` | Route through coordinator |
|
||||
| F02 | F05 | `queue_batch()` | Queue for processing |
|
||||
| F05 | H08 | `validate_batch()` | Validate sequence, format |
|
||||
| F05 | F03 | `save_image_metadata()` | Persist image metadata |
|
||||
|
||||
@@ -433,3 +440,41 @@ F02 Flight Processor handles multiple concerns:
|
||||
**Event Recovery**:
|
||||
- Events are fire-and-forget (no persistence)
|
||||
- Subscribers rebuild state from F03 on restart
|
||||
|
||||
### Error Propagation Strategy
|
||||
|
||||
**Principle**: Errors propagate upward through the component hierarchy. Lower-level components throw exceptions or return error results; higher-level coordinators handle recovery.
|
||||
|
||||
**Error Propagation Chain**:
|
||||
```
|
||||
H01-H08 (Helpers) → F07/F08/F09 (Visual Processing) → F11 (Recovery) → F02 (Coordinator) → F01 (API) → Client
|
||||
↓
|
||||
Events → F14 → F15 → SSE → Client
|
||||
```
|
||||
|
||||
**Error Categories**:
|
||||
1. **Recoverable** (F11 handles):
|
||||
- Tracking loss → Progressive search
|
||||
- Low confidence → Rotation sweep
|
||||
- Chunk matching fails → User input request
|
||||
|
||||
2. **Propagated to Client** (via SSE):
|
||||
- User input needed → `user_input_needed` event
|
||||
- Processing blocked → `processing_blocked` event
|
||||
- Flight completed → `flight_completed` event
|
||||
|
||||
3. **Fatal** (F02 handles, returns to F01):
|
||||
- Database connection lost → HTTP 503
|
||||
- Model loading failed → HTTP 500
|
||||
- Invalid configuration → HTTP 400
|
||||
|
||||
**User Fix Flow**:
|
||||
```
|
||||
Client ---> F01 (POST /user-fix) ---> F02.handle_user_fix() ---> F11.apply_user_anchor()
|
||||
↓
|
||||
F10.add_chunk_anchor()
|
||||
↓
|
||||
F02 receives UserFixApplied event
|
||||
↓
|
||||
F14.publish_result() ---> F15 ---> SSE ---> Client
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user