## Example 1, Page No 129¶

In [22]:
import math;

# Variable Declaration

# d = lamda/2
theta_d = 5                            # angle blw los and perpendicular bisector of line joining two antennas

# Calculations

#PD  = (2*%pi/lamda)*(d*sin(theta));
#PD  = (2*%pi/lamda)*(lamda/2*sin(theta));
theta_r   = theta_d*(math.pi/180)
PD_r      = (2*math.pi)*((math.sin(theta_r))/2);   # phase difference in radians
PD_d      = PD_r*(180/math.pi);               # phase difference in radians

# Result
print 'Phase difference b/w two echo signals is %0.2f'%(PD_d),'degrees'," OR  %0.2f " %PD_r,'radians';

Phase difference b/w two echo signals is 15.69 degrees  OR  0.27  radians


## Example 2, Page No 130¶

In [41]:
# import math

# Variable Declaration
F         = 1*10**9;       # operating frequency of monopulse radar in Hz
Vo        = float(3*10**8);       # velocity of EM wave in m/s
theta_d   = 10             # angle blw los and perpendicular bisector of line joining two antennas
PD_d      = 20;            # phase difference in degrees

# Calculations
lamda = Vo/F              # wavelength in m
# PD  = (2*%pi/lamda)*(d*sin(theta));
theta_r   = theta_d*(math.pi/180)   # degree to radian conversion
PD_r      = PD_d*(math.pi/180)      # degree to radian conversion
d         = (PD_r*lamda)/(2*math.pi*math.sin(theta_r));

# Output
print 'Spacing between the antennas is %0.2f'%(d*100),'Cms';

Spacing between the antennas is 9.60 Cms