from math import sqrt
#given data :
H=500 #in km
n=0.8 #in m
f_muf=10 #in MHz
f_muf=f_muf*10**6 #in Hz
f=10 #in MHz
f=f*10**6 #in Hz
# Formula : n=sqrt(1-81*N/f**2)
Nmax=(1-n**2)*f**2/81 #in Hz
fc=9*sqrt(Nmax) #in Hz
Dskip=2*H*sqrt((f_muf/fc)**2-1) #in Km
print "Assuming the earth is flat the range = %0.2f km" %Dskip
#Note : Answer in the book is wrong.
#given data :
n=0.8 #in m
H=500 #in km
a=6370 #in km
D=1349.07 #in Km
f_muf=10 #in MHz
f_muf=f_muf*10**6 #in Hz
f=10 #in MHz
f=f*10**6 #in Hz
# Formula : n=sqrt(1-81*N/f**2)
Nmax=(1-n**2)*f**2/81 #in Hz
fc=9*sqrt(Nmax) #in Hz
# Formula : f_muf/fc=sqrt(D**2/(4*(H+D**2/(8*a))))+1
D1=2*(H+D**2/(8*a))*sqrt((f_muf/fc)**2-1) #in Km
Dskip=2*H*sqrt((f_muf/fc)**2-1) #in Km
print "Assuming the earth is curved the ground range = %0.2f km"% D1
# Answer wrong in the textbook.
from math import sqrt
#given data :
Nmax=2.48*10**6 #in cm**-3
Nmax=2.48*10**6*10**-6 #in m**-3
fc=9*sqrt(Nmax) #in MHz
print "Critical frequency = %0.2f MHz " %fc
from math import sqrt
#given data :
H=200 #in Km
D=4000 #in Km
fc=5 #in MHz
f_muf=fc*sqrt(1+(D/(2*H))**2) #in MHz
print "MUF for the given path = %0.2f MHz " %f_muf
#Note : Answer in the book is wrong.
from math import sqrt
#given data :
#For F1 layer :
print "For F1 layer :"
Nmax=2.3*10**6 #in cm**3
Nmax=2.3*10**6*10**-6 #in m**3
fc=9*sqrt(Nmax) #in MHz
print "Critical frequency = %0.2f MHz " %fc
#For F2 layer :
print "For F2 layer :"
Nmax=3.5*10**6 #in cm**3
Nmax=3.5*10**6*10**-6 #in m**3
fc=9*sqrt(Nmax) #in MHz
print "Critical frequency = %0.2f MHz" %fc
#For F3 layer :
print "For F3 layer :"
Nmax=1.7*10**6 #in cm**3
Nmax=1.7*10**6*10**-6 #in m**3
fc=9*sqrt(Nmax) #in MHz
print "Critical frequency = %0.2f MHz " %fc
from math import sqrt
#given data :
n=0.7 #refractive index
N=400 #in cm**-3
#Formula : n=sqrt(1-81*N/f**2)
f=sqrt(81*N/(1-n**2)) #in KHz
print "Frequency of wave propagation = %0.2f kHz" %f
#Note : Unit of Answer in the book is MHz. It is written by mistake. It is accurately calculated by scilab in KHz.
from math import sqrt
#given data :
HT=169.0 #in meter
HR=20.0 #in meter
d=4.12*(sqrt(HT)+sqrt(HR)) #in Km
print "Maximum distance = %0.2f km " %d
r_dash=(4/3)*6370/1000 #in Km
RadioHorizon=sqrt(2*r_dash*HT) #in Km
print "Radio Horizon = %0.2f km " %RadioHorizon
# Answe wrong in thetextbook.
from math import tan , pi, asin, cos
H=200 #in Km
Beta=20 #in Degree
a=6370 #in Km
D_flat=2*H/tan(Beta*pi/180) #in Km
print "If earth assumed to be flat transmission path distance = %0.2f km" %D_flat
D_curved=2*a*(90*pi/180-Beta*pi/180)-asin(a*cos(Beta*pi/180)/(a+H))
print "If earth assumed to be curved transmission path distance = %0.2f "%D_curved
# Answe wrong in thetextbook.
from math import acos
#given data :
R=6370 #in Km
hm=400 #in Km
#Formula : d=2*R*Q=2*R*acos(R/(R+hm))
d=2*R*acos(R/(R+hm)) #in Km
print "Maximum Range in a single range transmission = %0.2f km " %d
# Answe wrong in thetextbook.
from math import sqrt
#given data :
n=0.6 #refractive index
N=4.23*10**4 #in m**-3
#Formula : n=sqrt(1-81*N/f**2)
f=sqrt(81*N/(1-n**2)) #in Hz
print "Frequency of wave propagation = %0.3f kHz" %(f/1000)
from math import sqrt
#given data :
n=0.8 #refractive index
N=500 #in cm**-3
#Formula : n=sqrt(1-81*N/f**2)
f=sqrt(81*N/(1-n**2)) #in KHz
print "Frequency of wave propagation = %0.2f kHz" %f