mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-04-22 22:46:36 +00:00
abc26d5c20
docs -> _docs
45 lines
1.1 KiB
Python
45 lines
1.1 KiB
Python
import math
|
|
|
|
from models.core import GPSPoint
|
|
from models.satellite import TileCoords, TileBounds
|
|
|
|
|
|
class WebMercatorUtils:
|
|
EARTH_RADIUS = 6378137.0
|
|
TILE_SIZE = 256
|
|
|
|
@classmethod
|
|
def gps_to_tile(cls, gps: GPSPoint, zoom: int) -> TileCoords:
|
|
raise NotImplementedError
|
|
|
|
@classmethod
|
|
def tile_to_gps(cls, coords: TileCoords) -> GPSPoint:
|
|
raise NotImplementedError
|
|
|
|
@classmethod
|
|
def get_tile_bounds(cls, coords: TileCoords) -> TileBounds:
|
|
raise NotImplementedError
|
|
|
|
@classmethod
|
|
def gps_to_pixel(
|
|
cls, gps: GPSPoint, zoom: int
|
|
) -> tuple[float, float]:
|
|
raise NotImplementedError
|
|
|
|
@classmethod
|
|
def pixel_to_gps(
|
|
cls, pixel: tuple[float, float], zoom: int
|
|
) -> GPSPoint:
|
|
raise NotImplementedError
|
|
|
|
@classmethod
|
|
def meters_per_pixel(cls, lat: float, zoom: int) -> float:
|
|
raise NotImplementedError
|
|
|
|
@classmethod
|
|
def get_tiles_in_bounds(
|
|
cls, nw: GPSPoint, se: GPSPoint, zoom: int
|
|
) -> list[TileCoords]:
|
|
raise NotImplementedError
|
|
|