from __future__ import annotations
from abc import ABCMeta, abstractmethod
from dataclasses import dataclass, field
from typing import Annotated, Any
from ..utils.enums import Unit
from ..utils.time import Time
from .interface import Interface
@dataclass
class AltAzState:
alt: Annotated[float, Unit.DEGREES]
az: Annotated[float, Unit.DEGREES]
time: Time = field(default_factory=Time.now)
class IPointingAltAz(Interface, metaclass=ABCMeta):
"""The module can move to Alt/Az coordinates, usually combined with :class:`~pyobs.interfaces.ITelescope`."""
__module__ = "pyobs.interfaces"
state = AltAzState
[docs]
@abstractmethod
async def move_altaz(
self, alt: Annotated[float, Unit.DEGREES], az: Annotated[float, Unit.DEGREES], **kwargs: Any
) -> None:
"""Moves to given coordinates.
Args:
alt: Alt in deg to move to.
az: Az in deg to move to.
Raises:
MoveError: If device could not be moved.
"""
...
__all__ = ["IPointingAltAz", "AltAzState"]