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