Files
autopilot/constants.py

36 lines
771 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import numpy as np
# Ширина 1 пикселя в метрах
YANDEX_PIXEL_RATIO = {
15: 2830 / 1049,
18: 350 / 1049,
}
GOOGLE_PIXEL_RATIO = {
15: 2766 / 1031,
18: 346 / 1031,
}
WINDOW_HEIGHT = 1031
# Ширина и высота снимка в пикселях
CHUNK_WIDTH = 700
# Высота, с которой произведен снимок (в метрах)
CAMERA_HEIGHT = 150
# Угол обзора
CAMERA_FOV = np.radians(90)
# Матрица параметров камеры
_K_FOCUS_DISTANCE = np.tan(CAMERA_FOV / 2) * CHUNK_WIDTH / 2
_K_CENTER = CHUNK_WIDTH / 2
K = np.array([
[_K_FOCUS_DISTANCE, 0, _K_CENTER],
[0, _K_FOCUS_DISTANCE, _K_CENTER],
[0, 0, 1]
])
DEBUG_FPS: bool = False
DEBUG_LANDMARK: bool = False