added formulas

This commit is contained in:
2026-06-26 11:21:49 +03:00
parent d707e310dc
commit 70828f693e
6 changed files with 750 additions and 2 deletions
Binary file not shown.
Binary file not shown.
+8 -2
View File
@@ -47,6 +47,9 @@ def link_budget(request: LinkBudgetRequest, db: Session | None = None) -> LinkBu
)
atmospheric_db = atmospheric_loss_between(tx, rx, freq_hz)
active_diffraction_db = diffraction_db
active_atmospheric_db = atmospheric_db
if request.model == "manual":
propagation_db = 0.0
elif request.model == "itm":
@@ -70,6 +73,7 @@ def link_budget(request: LinkBudgetRequest, db: Session | None = None) -> LinkBu
request.frequency_mhz,
).fspl_db
)
active_diffraction_db = propagation_db
elif request.model == "p452":
propagation_db = (
p452_loss(
@@ -91,6 +95,8 @@ def link_budget(request: LinkBudgetRequest, db: Session | None = None) -> LinkBu
request.frequency_mhz,
).fspl_db
)
active_diffraction_db = propagation_db
active_atmospheric_db = 0.0
else:
raise NotImplementedError(f"{request.model} link model is not supported")
@@ -102,9 +108,9 @@ def link_budget(request: LinkBudgetRequest, db: Session | None = None) -> LinkBu
rx_gain_dbi=request.rx.gain_dbi,
sensitivity_dbm=request.rx.sensitivity_dbm,
frequency_mhz=request.frequency_mhz,
diffraction_db=diffraction_db + propagation_db,
diffraction_db=active_diffraction_db,
vegetation_db=vegetation_db,
atmospheric_db=atmospheric_db,
atmospheric_db=active_atmospheric_db,
fresnel_clear=los_result.los_clear,
)
geometric_obstructions = [