Merge remote-tracking branch 'origin/feature-performance-analysis' into feature-performance-analysis

This commit is contained in:
Леонид Титов 2024-12-06 11:11:06 +03:00
commit c6276f01c4

View File

@ -204,8 +204,10 @@ class OptTimeCalculator(AutoConfigClass):
self.allTimes["tmovement"] = T
def calcFirstClose(self, T : float, s : float) -> tuple[float, float]:
v0q = min(sqrt(2 * self.a_max_1 * s), self.v_max_1)
v0 = min(v0q, sqrt(1/(self.k_hardness_1*self.mass_1))* self.Ftogrow)
t1 = T - sqrt(max(0, T**2 - 2 * s / self.a_max_1))
t1 = min(t1, self.v_max_1 / self.a_max_1)
t1 = min(t1, v0 / self.a_max_1)
t2 = sqrt(max(0, T**2 - 2 * s / self.a_max_1))
return t1, t2