fix: 修正保护角计算公式

This commit is contained in:
dmy
2026-03-04 11:13:16 +08:00
parent 3498650f5f
commit 18fc8fcb0e

12
main.py
View File

@@ -145,18 +145,12 @@ def run_egm(para: Parameter, animation=None) -> dict:
rg_y = gc_y[phase_conductor_foo + 2] rg_y = gc_y[phase_conductor_foo + 2]
else: else:
rg_type = "g" rg_type = "g"
# TODO 保护角公式可能有问题,后面改 # 使用实际高度(考虑弧垂)计算保护角
shield_angle_at_avg_height = ( shield_angle_at_avg_height = (
math.atan( math.atan2(rc_x - rs_x, rs_y - rc_y)
(rc_x - rs_x)
/ (
(h_arm[0] - string_g_len - h_arm[phase_conductor_foo + 1])
+ string_c_len
)
)
* 180 * 180
/ math.pi / math.pi
) # 挂点处保护角 )
logger.info(f"地线保护角{shield_angle_at_avg_height:.2f}°") logger.info(f"地线保护角{shield_angle_at_avg_height:.2f}°")
logger.debug(f"最低相防护标识{rg_type}g表示地面c表示下导线") logger.debug(f"最低相防护标识{rg_type}g表示地面c表示下导线")
rated_voltage = para.rated_voltage rated_voltage = para.rated_voltage