mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-06-22 23:11:12 +00:00
feat: stage6 — Image Pipeline (F05) and Rotation Manager (F06)
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
"""Rotation schemas (Component F06)."""
|
||||
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel
|
||||
import numpy as np
|
||||
|
||||
|
||||
class RotationResult(BaseModel):
|
||||
"""Result of a rotation sweep alignment."""
|
||||
matched: bool
|
||||
initial_angle: float
|
||||
precise_angle: float
|
||||
confidence: float
|
||||
# We will exclude np.ndarray from BaseModel to avoid validation issues,
|
||||
# but store it as an attribute if needed or use arbitrary_types_allowed.
|
||||
|
||||
model_config = {"arbitrary_types_allowed": True}
|
||||
homography: Optional[np.ndarray] = None
|
||||
inlier_count: int = 0
|
||||
|
||||
|
||||
class HeadingHistory(BaseModel):
|
||||
"""Flight heading tracking history."""
|
||||
flight_id: str
|
||||
current_heading: Optional[float] = None
|
||||
heading_history: list[float] = []
|
||||
last_update: Optional[datetime] = None
|
||||
sharp_turns: int = 0
|
||||
|
||||
|
||||
class RotationConfig(BaseModel):
|
||||
"""Configuration for rotation sweeps."""
|
||||
step_angle: float = 30.0
|
||||
sharp_turn_threshold: float = 45.0
|
||||
confidence_threshold: float = 0.7
|
||||
history_size: int = 10
|
||||
Reference in New Issue
Block a user