148 lines
3.7 KiB
Prolog
148 lines
3.7 KiB
Prolog
PRO monopulse_processing, sum, delta_az, delta_el, az_squint_rad, el_tilt_rad, theta_az, theta_el,theta_az1, sum_ph, delta_az_ph, delta_el_ph
|
|
|
|
;calib_az = -176.45*!dtor
|
|
;calib_az = -176.45*!dtor
|
|
;calib_el = 42.*!dtor
|
|
;calib_az = -3.0*!dtor
|
|
;calib_el = -4.0*!dtor
|
|
;Dati del 26-02-2021
|
|
;calib_az = (-46.45-(-45.38))*!dtor
|
|
;calib_el = (-46.45-(-41.79))*!dtor
|
|
|
|
;mismatch_az = 970./1101.
|
|
;mismatch_el = 970./875.
|
|
|
|
;Dati del 12-03-2021
|
|
calib_az = (-47.52-(-45.61))*!dtor
|
|
calib_el = (-47.52-(-40.43))*!dtor
|
|
|
|
mismatch_az = 986./1094.
|
|
mismatch_el = 986./890.
|
|
|
|
;Dati del 22-04-2021
|
|
calib_az = 2.28632 - 2.1010
|
|
calib_el = 2.15444 - 2.1010
|
|
|
|
|
|
mismatch_az = 1.;706./880.
|
|
mismatch_el = 0.83;706./560.
|
|
|
|
|
|
;Dati del 12-03-2021
|
|
calib_az = 0.
|
|
calib_el = 0.
|
|
|
|
mismatch_az = 1.
|
|
mismatch_el = 1.
|
|
|
|
|
|
|
|
mismatch_az = 1.;706./880.
|
|
mismatch_el = 0.83;706./560.
|
|
|
|
|
|
d_az = 0.1639
|
|
d_el = 0.1212
|
|
c = 299.792458
|
|
f = 10000.
|
|
lambda = c/f
|
|
j=complex(0.,1.)
|
|
|
|
|
|
sum_i = float(sum)
|
|
sum_q = imaginary(sum)
|
|
|
|
delta_az_i = float(delta_az)
|
|
delta_az_q = imaginary(delta_az)
|
|
|
|
delta_el_i = float(delta_el)
|
|
delta_el_q = imaginary(delta_el)
|
|
|
|
sum_mod = abs(sum)
|
|
delta_az_mod = abs(delta_az)
|
|
delta_el_mod = abs(delta_el)
|
|
|
|
sum_ph = atan(sum_q,sum_i)
|
|
delta_az_ph = atan(delta_az_q,delta_az_i)
|
|
delta_el_ph = atan(delta_el_q,delta_el_i)
|
|
|
|
delta_ph_s_az = delta_az_ph - sum_ph + calib_az
|
|
delta_ph_s_el = delta_el_ph - sum_ph + calib_el
|
|
|
|
;calib_az = !pi/2. - (delta_az_ph - sum_ph)
|
|
;calib_el = !pi/2. - (delta_el_ph - sum_ph)
|
|
|
|
Re_DEL_S = (mismatch_el * delta_el_mod/sum_mod) * cos(delta_ph_s_el)
|
|
Im_DEL_S = (mismatch_el * delta_el_mod/sum_mod) * sin(delta_ph_s_el)
|
|
|
|
delta_el_new = delta_el * mismatch_el * exp(j*calib_el)
|
|
v_el = atan(imaginary(delta_el_new/sum))*lambda/(!pi*d_el)
|
|
;theta_el = asin(v_el+sin(el_tilt_rad))
|
|
theta_el = v_el
|
|
|
|
|
|
delta_az_new = delta_az * mismatch_az * exp(j*calib_az)
|
|
u_az = atan(imaginary(delta_az_new/sum))*lambda/(!pi*d_az)
|
|
theta_az = u_az
|
|
|
|
;theta_az = asin(-1./cos(theta_el)*(u_az-sin(-az_squint_rad)*cos(el_tilt_rad)))
|
|
|
|
aaa = (((float(delta_el_new)*float(sum)+imaginary(delta_el_new)*imaginary(sum))/(abs(sum)^2.))*lambda/(!pi*d_az))*!radeg
|
|
;print, aaa
|
|
|
|
;print, (sum_delta_az_ph), (sum_ph-delta_el_ph)
|
|
|
|
;print, atan(imaginary(delta_az_new),float(delta_az_new))*!radeg - atan(imaginary(sum),float(sum))*!radeg
|
|
|
|
;v = atan(Im_DEL_S)*lambda/(!pi*d_el)
|
|
;theta_el = asin(v_el+sin(el_tilt_rad))
|
|
|
|
; Re_DAZ_S = (mismatch_az * delta_az_mod/sum_mod) * cos(delta_ph_s_az)
|
|
; Im_DAZ_S = (mismatch_az * delta_az_mod/sum_mod) * sin(delta_ph_s_az)
|
|
|
|
;delta_az_new = delta_az * exp(-j*calib_az)
|
|
;u_az = atan(imaginary(delta_az_new/sum))*lambda/(!pi*d_az)
|
|
;u_az = atan(imaginary(delta_az_new/sum))*lambda/(!pi*d_az)
|
|
|
|
|
|
; v = atan(Im_DEL_S)*lambda/(!pi*d_el)
|
|
; theta_el = asin(v+sin(el_tilt_rad))
|
|
|
|
;theta_az1 = asin(atan(Im_DAZ_S)*lambda/(!pi*d*cos(az_squint_rad)))
|
|
; u = atan(Im_DAZ_S)*lambda/(!pi*d_az)
|
|
; theta_az = asin(-1./cos(theta_el)*(u-sin(-az_squint_rad)*cos(el_tilt_rad)))
|
|
|
|
|
|
;;;;Processing Edimburgo
|
|
|
|
delta_az_c = delta_az * mismatch_az * exp(j*calib_az)
|
|
|
|
A_u = (sum + delta_az_c)/2.
|
|
B_u = (sum - delta_az_c)/2.
|
|
|
|
B_u_conj = conj(B_u)
|
|
|
|
phi = atan(A_u*B_u_conj, /phase)
|
|
|
|
;phi = atan(imaginary(A_u)/float(A_u)) - atan(imaginary(B_u_conj)/float(B_u_conj))
|
|
|
|
Azimuth = lambda / (2*!pi*d_az) * phi
|
|
|
|
theta_az = Azimuth
|
|
|
|
delta_el = delta_el * mismatch_el * exp(j*calib_el)
|
|
|
|
A_u = (sum + delta_el)/2.
|
|
B_u = (sum - delta_el)/2.
|
|
|
|
B_u_conj = conj(B_u)
|
|
|
|
phi = atan(A_u*B_u_conj, /phase)
|
|
|
|
;phi = atan(imaginary(A_u)/float(A_u)) - atan(imaginary(B_u_conj)/float(B_u_conj))
|
|
|
|
Elevation = lambda / (2*!pi*d_el) * phi
|
|
|
|
theta_el = Elevation
|
|
|
|
end |