import math
# Variable Declaration
f = 6; # microwave terrestrial comm link oper. freq in Ghz
D = 50; # single hop path length in miles
# mid way of path length
D1 = 25;
D2 = 25;
N = 3; # N value for third fresnal zone
# calculations
F1 = 72.2*((D1*D2)/float((D*f)))**0.5; # first fresnel zone
F3 = F1*math.sqrt(N); # Third fresnal zone
# Result
print'First Fresnel zone distance = %3.1f feet\n'%F1,'Third Fresnel zone distance = %3.1f feet\n'%F3;
import math
# Variable Declaration
f = 4.5; # microwave terrestrial comm link oper. freq in Ghz
D = 40; # single hop path length in miles
hant = 200; # antenna ht. above surface of earth
# from fig
D1 = 5;
D2 = 35;
K = 1; # for normal case
# calculations
F1 = 72.2*((D1*D2)/float((D*f)))**0.5; # first fresnel zone
# computing curvature 'h' of earth at a distance of 10 miles from Transmitter if given by (D1*D2)/(1.5*K)
h = (D1*D2)/float((1.5*K)); # curvature of earth in feet
PLabove = hant - h; # path line is PLabove feet above surface of earth
hmaxtol = PLabove - F1; # max tolerable height in feet
# Result
print'Maximum tolerable height of obstacle above surface of earth = %3.2f feet'%hmaxtol;
import math
# Variable Declaration
f = 4.5; # microwave terrestrial comm link oper. freq in Ghz
D = 40; # single hop path length in miles
hant = 200; # antenna ht. above surface of earth
# from fig
D1 = 5;
D2 = 35;
K = 2/float(3); # K-factor
# calculations
F1 = 72.2*((D1*D2)/float((D*f)))**0.5; # first fresnel zone
# computing curvature 'h' of earth at a distance of 10 miles from Transmitter if given by (D1*D2)/(1.5*K)
h = (D1*D2)/float((1.5*K)); # curvature of earth in feet
PLabove = hant - h; # path line is PLabove feet above surface of earth
if PLabove < F1:
print'Available clearance above the surface of earth = %d feet'%PLabove,'\nRequired first fresnal zone clearance = %3.1f feet'%F1,'So it would be obstructed';
import math
# Variable Declaration
UF = 2*10**-4; # unavailability factor
# Calculations
outrage_t = UF*8760; # outrage time in hours per year
# Result
print'Outrage time = %3.3f hours per year'%outrage_t;
import math
# variable Declaration
PL = 50; # path length in miles from fig
FM = 40; # fade margin in dB
P_fm_ex = 7*10**-5; # prob. of fade margin getting exceeding
P_fm_ex_50db = 6*10**-6; # prob. of fade margin getting exceeding for fade margin 50dB
p_fig_30m_40db = 2*10**-5; # prob fig for patl length of 30miles and fade margin 40dB
# Calculations
impr_prob_a = P_fm_ex/float(P_fm_ex_50db); # improvement in prob. of fade margin for a
impr_prob_b = P_fm_ex/float(p_fig_30m_40db); # improvement in prob. of fade margin for b
# Result
print'(a):\n Improvement in probability of fade margin = %3.1f\n'%impr_prob_a,'(b):\n Improvement in probability of fade margin = %3.1f\n'%impr_prob_b;
import math
# Given data
UF_sh = 0.01; # unavail. factor for single hop
IF_SD = 100; # improvement factor due to space diversity
# Calculations
UF_4hl = 4* UF_sh/float(100); # unavail. factor for 4 hop link and conv from %
UF = UF_sh/float((100*IF_SD)); # unavail. factor for single hop link if it employs space diversity
# Output
print'unavail. factor for 4 hop link = %3.4f\n'%UF_4hl,'unavail. factor for single hop link if it employs space diversity = %3.0e'%UF;
import math
# Variable Declaration
f = 3.5; # operating freq. of microwave link in Ghz
D = 30; # single hop path length in miles
a = 1; # roughness
b = 0.5; # humid climate
F = 40; # fade margin in dB
# Calculations
U = a*b*2.5*10**-6 *f*D**3 *10**(-F/10); # unavailability factor
U1 = U*525600; # unavailabilty factor in minutes per year
U4 = U1*4; # unavailabilty factor for 4-hop link
# Result
print'Outage Time = %3.1f minutes per year'%U4;
import math
# Given data
# D2 = 2*D1 # path length is doubled
# F2 = F1+10; # fade margin is increased by 10dB
# f2 = 1.25f1 # frequency operation increased by 25 %
#(U1/U2) = (f1* D1**3 * 10**(-F1/10))/ (f1* D1**3 * 10**(-F1/10))
# sub above values
#(U1/U2) = (f1* D1**3 * 10**(-F1/10)) / (1.25*f1*8*D1**3*10**(-F1/10)*10**-1) = 1
print'Unavailability Factor remains unaltered';
import math
# given data
print'The improvement factor is proportional to square of antenna spacing.Therefore,it will increase by a factor of 4\nConsequently,the unavailability factor and hence the outrage time will also reduce by a factor of 4';
import math
# Given data
DFM = 40; # dispersive fade margin
FFM = 30; # flat fade margin
# Calculations
CFM = -10*math.log10(10**(-FFM/float(10)) + 10**(-DFM/float(10)));
# Output
print'Composite Fade Margin = %3.2f dB\n'%CFM;
print'minus sign is wrongly printed in Textbook';
import math
# Variable Declaration
DFM1 = 50; # dispersive fade margin
FFM = 30; # flat fade margin
DFM2 = 40; # dispersive fade margin
# Calculations
CFM1 = -10*math.log10(10**(-FFM/float(10)) + 10**(-DFM1/float(10)));
CFM2 = -10*math.log10(10**(-FFM/float(10)) + 10**(-DFM2/float(10)));
d_CFM = CFM1 -CFM2;
# Result
print'CFM increases by %3.2f dB for a 10 dB increase in DFM which is very Marginal'%d_CFM;
import math
# Variable Declaration
f = 23; # operating freq. of microwave link in Ghz
D = 10; # single hop path length in miles
a = 1; # topographic factor
b = 0.5; # climatic factor
DFM = 40; # dispersive fade margin
FFM = 30; # flat fade margin
# Calculations
CFM = -10*math.log10(10**(-FFM/float(10)) + 10**(-DFM/float(10))); # composite fade margin
U = a*b*2.5*10**-6 *f*D**3 *10**(-CFM/float(10)); # unavailability factor
U1 = U*525600; # outrage time in min per year
# Result
print'Outrage time = %3.2f minutes per year'%U1;
import math
# Variable Declaration
MTBF2 = 20000; # microwave Tx output MTBF figure
MTBF3 = 60000; # power amplifier portion of MTBF
# Calculations
MTBF1 = (MTBF2*MTBF3)/float((MTBF3-MTBF2));
impr = MTBF1-MTBF2 # improvement in MTBF if power amplifier not used
# Result
print'Improvement in MTBF of transmitter if power amplifier is not used = %d hours'%impr;