mirror of
https://github.com/azaion/gps-denied-desktop.git
synced 2026-04-22 22:06:36 +00:00
fix issues
This commit is contained in:
@@ -27,6 +27,21 @@ class IConfigurationManager(ABC):
|
||||
@abstractmethod
|
||||
def update_config(self, section: str, key: str, value: Any) -> bool:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def get_operational_altitude(self, flight_id: str) -> float:
|
||||
"""Returns predefined operational altitude for the flight (NOT from EXIF)."""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def get_frame_spacing(self, flight_id: str) -> float:
|
||||
"""Returns expected distance between consecutive frames in meters."""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def save_flight_config(self, flight_id: str, config: FlightConfig) -> bool:
|
||||
"""Persists flight-specific configuration."""
|
||||
pass
|
||||
```
|
||||
|
||||
## Component Description
|
||||
@@ -136,6 +151,62 @@ FlightConfig:
|
||||
1. Update value → succeeds
|
||||
2. Invalid key → fails
|
||||
|
||||
---
|
||||
|
||||
### `get_operational_altitude(flight_id: str) -> float`
|
||||
|
||||
**Description**: Returns predefined operational altitude for the flight in meters. This is the altitude provided during flight creation, NOT extracted from EXIF metadata (images don't have GPS/altitude metadata per problem constraints).
|
||||
|
||||
**Called By**:
|
||||
- F10 Factor Graph Optimizer (for scale resolution)
|
||||
- H02 GSD Calculator (for GSD computation)
|
||||
- F09 Metric Refinement (for alignment)
|
||||
|
||||
**Input**: `flight_id: str`
|
||||
|
||||
**Output**: `float` - Altitude in meters (typically 100-500m)
|
||||
|
||||
**Test Cases**:
|
||||
1. Get existing flight altitude → returns value
|
||||
2. Non-existent flight → raises error
|
||||
|
||||
---
|
||||
|
||||
### `get_frame_spacing(flight_id: str) -> float`
|
||||
|
||||
**Description**: Returns expected distance between consecutive frames in meters. Used for scale estimation in visual odometry.
|
||||
|
||||
**Called By**:
|
||||
- F10 Factor Graph Optimizer (for expected displacement calculation)
|
||||
|
||||
**Input**: `flight_id: str`
|
||||
|
||||
**Output**: `float` - Expected frame spacing in meters (typically ~100m)
|
||||
|
||||
**Test Cases**:
|
||||
1. Get frame spacing → returns expected distance
|
||||
|
||||
---
|
||||
|
||||
### `save_flight_config(flight_id: str, config: FlightConfig) -> bool`
|
||||
|
||||
**Description**: Persists flight-specific configuration when a flight is created.
|
||||
|
||||
**Called By**:
|
||||
- F02 Flight Processor (during flight creation)
|
||||
|
||||
**Input**:
|
||||
```python
|
||||
flight_id: str
|
||||
config: FlightConfig
|
||||
```
|
||||
|
||||
**Output**: `bool` - True if saved successfully
|
||||
|
||||
**Test Cases**:
|
||||
1. Save valid config → succeeds
|
||||
2. Invalid flight_id → fails
|
||||
|
||||
## Data Models
|
||||
|
||||
### SystemConfig
|
||||
|
||||
Reference in New Issue
Block a user