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)