fix: external radius

This commit is contained in:
2026-05-31 17:58:32 +03:00
parent 2ac6b0b476
commit 707288bb61

View File

@@ -105,7 +105,7 @@ class AutoPilot(Pilot):
self.points = points
self.target_idx = 0
self.target_reached_threshold = 5
self.direct_step_threshold = 35
self.direct_step_threshold = 15
self.timer = Timer()
self.chunk_points = np.array([[chunk.pos.x, chunk.pos.y] for chunk in self.chunks])
@@ -410,7 +410,13 @@ class AutoPilot(Pilot):
angle_diff -= 2 * math.pi
if distance_to_target < self.direct_step_threshold:
return PilotCommand(angle_diff, distance_to_target, False, self.timer.get_elapsed())
d_a_limit = np.radians(5)
return PilotCommand(
max(min(d_a_limit, angle_diff), -d_a_limit),
distance_to_target,
False,
self.timer.get_elapsed()
)
# Проверка на слепую зону
R = 120