from numpy.typing import ArrayLike
from typing import List

from spatz.sensors import Sensor
from spatz.transforms import Transform
from spatz.dataset import Dataset
from spatz.logger import Logger


class Gyroscope(Sensor):
    def __init__(self, dataset: Dataset, logger: Logger, offset: float = 0, transforms: List[Transform] = []):
        super().__init__(dataset, logger, transforms)

        self._offset = offset

    def _get_data(self) -> ArrayLike | float:
        # Rotation in rad/sec
        x = self._dataset.get_rotation_rates()

        return x
