Ver Fonte

激光测量v2.6.1,正对测量,前后缘计算桨距角阶段性终版。修改半径计算,由计算测量点到叶轮圆锥顶点距离,变为计算测量点到主轴距离

wei_lai há 3 meses atrás
pai
commit
e348f5f763
2 ficheiros alterados com 4 adições e 27 exclusões
  1. 2 14
      data_analyse_origin.py
  2. 2 13
      data_clean.py

+ 2 - 14
data_analyse_origin.py

@@ -949,20 +949,8 @@ def radius_cal(border_rows, meas_angle, cen_dist, cen_angle, angle_main, angle_r
     """
 
     aero_dist = (pd.concat([df['distance'] for df in border_rows]).mean())
-    cen_x = np.cos(np.deg2rad(cen_angle)) * cen_dist
-    cen_y = np.sin(np.deg2rad(cen_angle)) * cen_dist
-    aero_x = np.cos(np.deg2rad(meas_angle)) * aero_dist
-    aero_y = np.sin(np.deg2rad(meas_angle)) * aero_dist
-    theta_4 = np.tan(np.pi - np.deg2rad(angle_main))
-    theta_5 = np.tan(np.pi/2 - np.deg2rad(angle_main) - np.deg2rad(angle_rotate))
-
-    if theta_5 > 1000:
-        radius = np.abs((cen_y - aero_y) - theta_4 * (cen_x - aero_x))
-        print("轴向倾角与锥角相近,叶片垂直于地面")
-
-    else:
-        radius = (np.abs((theta_4 * (cen_x - aero_x) - (cen_y - aero_y))/(theta_4 - theta_5))
-                  * ((1 + theta_5 ** 2) ** 0.5))
+    radius = np.abs(aero_dist * np.sin(np.deg2rad(meas_angle - angle_main))
+                    - cen_dist * np.sin(np.deg2rad(cen_angle - angle_main)))
     print('测量点旋转半径:' + str(radius))
 
     return radius

+ 2 - 13
data_clean.py

@@ -709,19 +709,8 @@ def coordinate_normalize(tip_border_rows: List[pd.DataFrame], tip_angle):
 def radius_cal(border_rows, meas_angle, cen_dist, cen_angle, angle_main, angle_rotate):
 
     aero_dist = (pd.concat([df['distance'] for df in border_rows]).mean())
-    cen_x = np.cos(np.deg2rad(cen_angle)) * cen_dist
-    cen_y = np.sin(np.deg2rad(cen_angle)) * cen_dist
-    aero_x = np.cos(np.deg2rad(meas_angle)) * aero_dist
-    aero_y = np.sin(np.deg2rad(meas_angle)) * aero_dist
-    theta_4 = np.tan(np.pi - np.deg2rad(angle_main))
-    theta_5 = np.tan(np.pi / 2 - np.deg2rad(angle_main) - np.deg2rad(angle_rotate))
-
-    if theta_5 > 1000:
-        radius = np.abs((cen_y - aero_y) - theta_4 * (cen_x - aero_x))
-
-    else:
-        radius = (np.abs((theta_4 * (cen_x - aero_x) - (cen_y - aero_y)) / (theta_4 - theta_5))
-                  * (1 + theta_5 ** 2) ** 0.5)
+    radius = np.abs(aero_dist * np.sin(np.deg2rad(meas_angle - angle_main))
+                    - cen_dist * np.sin(np.deg2rad(cen_angle - angle_main)))
     return radius