From af335610005859b191b3f800f9649c617d484411 Mon Sep 17 00:00:00 2001 From: Champagne <1369741103@qq.com> Date: Fri, 20 Jun 2025 15:00:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'py/measure=5Flib.py'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- py/measure_lib.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/py/measure_lib.py b/py/measure_lib.py index 518204f..038922b 100644 --- a/py/measure_lib.py +++ b/py/measure_lib.py @@ -183,14 +183,13 @@ def vs_measurement(txt_name,position): y_bot = np.array(y_bot) x_top = np.array(x_top) y_top = np.array(y_top) + + # 拟合路沿上下直线方程 + slope_bot, intercept_bot, r2_bot = calc_slope_line.linear_regression(x_bot, y_bot) + slope_top, intercept_top, r2_top = calc_slope_line.linear_regression(x_top,y_top) except Exception as e: print(f"处理过程中发生错误: {e}") return 1,1,1,1 - - # 拟合路沿上下直线方程 - slope_bot, intercept_bot, r2_bot = calc_slope_line.linear_regression(x_bot, y_bot) - slope_top, intercept_top, r2_top = calc_slope_line.linear_regression(x_top,y_top) - # 拟合车轮垂线方程 # x_zero_xto0, y_zero_xto0 = calc_way.calc_zeros_xto0() # x_zero_xto0 = np.array(x_zero_xto0)