"""Satellite-anchor hot-path dataclasses (ARCH-02).

TileCoords / TileBounds are hot during tile selection (per-frame).
SatelliteAnchor is a Phase-1 placeholder — Phase 3 (VERIFY) fills its
semantics. Phase 1 only requires it to exist for ARCH-02.
"""

from __future__ import annotations

from dataclasses import dataclass

from gps_denied.schemas import GPSPoint


@dataclass(slots=True, frozen=True)
class TileCoords:
    """Web Mercator tile coordinates."""

    x: int
    y: int
    zoom: int


@dataclass(slots=True, frozen=True)
class TileBounds:
    """GPS boundaries of a tile."""

    nw: GPSPoint
    ne: GPSPoint
    sw: GPSPoint
    se: GPSPoint
    center: GPSPoint
    gsd: float                     # Ground Sampling Distance (meters/pixel)


@dataclass(slots=True, frozen=True)
class SatelliteAnchor:
    """Placeholder for Phase-3 verified satellite anchor record (ARCH-02).

    Phase 1 declaration only — populated by Phase 3 (VERIFY). Carries the
    minimum fields required for the ARCH-02 type-surface to exist.
    """

    gps_center: GPSPoint
    timestamp: float
    matched_inlier_count: int = 0
    covariance_semimajor_m: float = 0.0
