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

Renamed from `IMUMeasurement` (Pydantic) per ARCH-02 canonical-name list.
The legacy name is preserved as an alias from the schemas/eskf.py shim
(`IMUMeasurement = IMUSample`), so existing import sites continue to work.

eq=False because numpy arrays in `__eq__` would raise; Pydantic was already
incomparable for this model (arbitrary_types_allowed), so dataclass behavior
matches existing semantics.
"""

from __future__ import annotations

from dataclasses import dataclass

import numpy as np


@dataclass(slots=True, frozen=True, eq=False)
class IMUSample:
    """Single IMU reading from flight controller."""

    accel: np.ndarray  # (3,) m/s^2 in body frame
    gyro: np.ndarray   # (3,) rad/s in body frame
    timestamp: float   # seconds since epoch
