feat: add pitch, roll in Geolocation

This commit is contained in:
2026-01-05 11:49:29 +05:00
parent 063c61589a
commit ec81ce95a5
3 changed files with 187 additions and 40 deletions

View File

@@ -103,7 +103,7 @@ class Simulator:
h, w = img_array.shape[:2]
# Получаем исходные точки с учётом перспективы
yaw_deg = -math.degrees(self.geo.angle)
yaw_deg = -math.degrees(self.geo.yaw)
src_points = self._get_perspective_points(w, h, yaw_deg)
# Целевые точки - квадрат 700x700
@@ -144,11 +144,11 @@ class Simulator:
action.move_to_element_with_offset(html, 200, 200)
action.click_and_hold()
self.geo.angle += dangle
self.geo.yaw += dangle
velocity = max(velocity, 10)
dx = math.cos(math.pi / 2 + self.geo.angle) * velocity / self.geo.z
dy = math.sin(math.pi / 2 + self.geo.angle) * velocity / self.geo.z
dx = math.cos(math.pi / 2 + self.geo.yaw) * velocity / self.geo.z
dy = math.sin(math.pi / 2 + self.geo.yaw) * velocity / self.geo.z
self.update_trajectory(dx, dy)