diff --git a/scripts/interfer.gd b/scripts/interfer.gd index 01c7f527..b43601c5 100644 --- a/scripts/interfer.gd +++ b/scripts/interfer.gd @@ -260,7 +260,8 @@ func on_th_aoa_update(threats: Dictionary, ecms: Dictionary, unit_instance) -> v if not gos_flag: # Составляется список запретных секторов работы if (thr.proto in gos_protocols) and thr.fflags.proto: var fs_arr: Array = [] - prd.find_fs_index(thr.aoa, thr.freq, fs_arr) + var th_aoa = fposmod(thr.aoa - course, 360) + prd.find_fs_index(th_aoa, thr.freq, fs_arr) if fs_arr.size(): for item in fs_arr: var nmfs = prd.FS_PRD[item][1] @@ -270,9 +271,7 @@ func on_th_aoa_update(threats: Dictionary, ecms: Dictionary, unit_instance) -> v if thrs[ecm_i] == th_id: var ecm = ecms[ecm_i] ecm.params['freq'] = thr.freq - ecm.kni = thr.aoa - course - if ecm.kni < 0: - ecm.kni += 360 + ecm.kni = fposmod(thr.aoa - course, 360) call_ecm_proc(ecm) if ecm.nmfs in gos_nmfs: interfer_off(ecm, unit_instance) @@ -299,7 +298,8 @@ func on_th_aoa_update(threats: Dictionary, ecms: Dictionary, unit_instance) -> v if auto_enabled: for thr in threats.values(): var fs_arr: Array = [] - prd.find_fs_index(thr.aoa, thr.freq, fs_arr) + var th_aoa = fposmod(thr.aoa - course, 360) + prd.find_fs_index(th_aoa, thr.freq, fs_arr) if fs_arr.size(): var need_continue = false for item in fs_arr: