This commit is contained in:
zenloger
2026-02-05 21:49:15 +03:00
parent 5385641d28
commit 339e5f210c
5 changed files with 47 additions and 6 deletions

View File

@@ -146,14 +146,14 @@ class Position:
R = R[best_id]
rot = Rotation.from_matrix(R).as_euler('XYZ').flatten()
self.roll = rot[0]
self.pitch = rot[1]
self.roll = min(np.radians(5), max(np.radians(-5), rot[0]))
self.pitch = min(np.radians(5), max(np.radians(-5), rot[1]))
self.yaw = rot[2]
t = t[best_id].flatten()
self.x -= T[0] * constants._K_FOCUS_DISTANCE
self.y += T[1] * constants._K_FOCUS_DISTANCE
self.z = 1 + T[2]
self.z = max(0.7, min(1.3, 1 + T[2]))
T[0] *= constants._K_FOCUS_DISTANCE
T[1] *= constants._K_FOCUS_DISTANCE