IC: Fix incline computation in case of zero marging.

This commit is contained in:
Pierre-Antoine Rouby committed 2024-04-19 16:31:12 +02:00
1 parent ab1b7a2605
commit df1ac5586e
2 files changed
+4 -1

No files matched your search

+3
View File
@@ -743,7 +743,10 @@ class Reach(SQLSubModel):
incline_acc.sort() incline_acc.sort()
marge = round(len(incline_acc) * 0.1) marge = round(len(incline_acc) * 0.1)
if marge > 0:
incline_set = incline_acc[marge:-marge] incline_set = incline_acc[marge:-marge]
else:
incline_set = incline_acc
logger.debug(f"+{incline_acc}") logger.debug(f"+{incline_acc}")
logger.debug(f"-{incline_set}") logger.debug(f"-{incline_set}")
@@ -430,7 +430,7 @@ class InitialConditions(SQLSubModel):
logger.debug(f"({profile.kp}):") logger.debug(f"({profile.kp}):")
logger.debug(f" width = {width}") logger.debug(f" width = {width}")
logger.debug(f" strickler = {strickler}") logger.debug(f" strickler = {strickler}")
logger.debug(f" hieght = {height}") logger.debug(f" height = {height}")
new = Data(reach=self._reach, status=self._status) new = Data(reach=self._reach, status=self._status)
new["kp"] = profile.kp new["kp"] = profile.kp