from __future__ import annotations

from datetime import UTC, datetime

import pytest

from mgf.tele.core import DecodedAvlRecord, GeoPoint


def make_record(*, speed_kmh: float = 40.0) -> DecodedAvlRecord:
    return DecodedAvlRecord(
        ts=datetime.now(UTC),
        priority=1,
        position=GeoPoint(lon=44.36, lat=33.31),
        speed_kmh=speed_kmh,
        heading_deg=90.0,
        satellites=8,
        event_io_id=0,
        inputs={239: 1},
        codec="C8",
    )


@pytest.fixture
def record() -> DecodedAvlRecord:
    return make_record()
