"""PositionEstimate hot-path dataclass (ARCH-02).

NEW in Stage 2 — no stage1 analog. Phase 3 (SAFE-01..03) populates the
Optional `source_label` and `anchor_age_ms` fields; Phase 1 only declares
them so downstream code can be written against the final type.
"""

from __future__ import annotations

from dataclasses import dataclass
from typing import Optional


@dataclass(slots=True, frozen=True)
class PositionEstimate:
    """Unified per-frame position estimate emitted by the pipeline."""

    lat: float
    lon: float
    alt: float
    timestamp: float
    confidence: float
    covariance_semimajor_m: float = 0.0
    source_label: Optional[str] = None     # filled in Phase 3 (SAFE)
    anchor_age_ms: Optional[float] = None  # filled in Phase 3 (SAFE)
