import math
# Variables
H = 10.**6; #meter
# Calculations and Results
v = 20*10**6/math.sqrt(H+6.4*10**6); #m/s
print 'a)velocity , v = %i m/s'%(v);
R = 6.4*10**6; #data rate in bits per second
C = 2*math.pi*(H+R); #circumference in m
print ' b)circumference , C = %i m'%(C); #raunded value of C shown in book solution
T = C/v;
print ' c)The period is , T = %.2f seconds or %.2f minutes'%(T,T/60);
import math
# Variables
L = 37; #latitude in degree
R = 6400.;
H = 36000.; #from the text
# Calculations
del1 = math.atan(R*math.sin(L*math.pi/180)/(H+R*(1-math.cos(L*math.pi/180)))) #Declination angle
# Results
print 'The ange is %.2f degree'%(del1*180/math.pi);
import math
# Variables
c = 3.*10**8; #speed of light in m/s
f = 3.7*10**9; #Hz
# Calculations and Results
lembda = c/f; #m
print 'The wave length is %.4f cm '%(lembda*100)
theta_3dB = 8; #degree
D = 70*lembda/theta_3dB #m
print 'The diameter is, D = %.4f m '%(D);
eta_1 = .6; #illumination efficiency
G = eta_1*(math.pi*D/lembda)**2; #gain calculation
print 'The Gain is G = %.2f '%(G)
G_dB = 10*math.log10(G); #dB gain
print 'The Gain in dB is GdB) = %.3f dB '%(G_dB)
import math
# Variables
theta_3dB = 1.6; # beamwidth in degree
eta_1 = .6; #illumination efficiency
# Calculations and Results
G = eta_1*48000/(theta_3dB)**2; #gain calculation
print 'The Gain is G = %.0f '%(G)
G_dB = 10*math.log10(G); #dB gain
print 'The Gain in dB is GdB) = %.1f dB '%(G_dB)
import math
# Variables
theta_3dB = .3; # minimum practical beamwidth in degree
eta_1 = .6; #illumination efficiency
# Calculations and Results
G = eta_1*48000/(theta_3dB)**2; #gain calculation
print 'The Gain is G = %.0f '%(G)
G_dB = 10*math.log10(G); #dB gain
print 'The Gain in dB is GdB) = %.1f dB '%(G_dB)
import math
# Variables
c = 3*10**8; #speed of light in m/s
f = 5.925*10**9; #Hz
# Calculations and Results
lembda = c/f; #m
print 'The wave length is %.3f cm '%(lembda*100)
theta_3dB = 1.6; # beamwidth degree
D = 70*lembda/theta_3dB #m
print 'The diameter is, D = %.3f m '%(D);
import math
# Variables
l = 127.-70.2; #Difference in longitude
L = 40.5 #Latitude of New York
# Calculations
d_km = 35.786*10**3*math.sqrt(1+0.42*(1-math.cos(L*math.pi/180)*math.cos(l*math.pi/180)));
# Results
print 'The distance is %.0f km '%(d_km)
import math
# Variables
PtdBW = 20.
GtdB = 55.
# Calculations and Results
EIRP_dBW = PtdBW+GtdB;
print 'The EIRP for uplink earth station is %.0f dBW '%(EIRP_dBW)
l = 91-70.2; #Difference in longitude
L = 40.5 #Latitude of New York
d_km = 35.786*10**3*math.sqrt(1+0.42*(1-math.cos(L*math.pi/180)*math.cos(l*math.pi/180)));
print 'The distance is %.0f km '%(d_km)
f = 6.125 #Uplink frequency in GHz
alfa1_dB = 20*math.log10(f)+20*math.log10(d_km)+92.44; #Path loss
print 'The path loss is %.2f dB '%(alfa1_dB)
FdB = 3; #noise figure in dB
F = 10**(FdB/10) #absolute noise figure (exact value)
Te = (F-1)*290; #Noise temperature
print 'The Noise temperature of satellite reciever is %.0f K '%(Te)
Ti = 300; #input noise temperature in K
Tsys = Ti+Te
print 'The system temperature of satellite reciever is %.0f K '%(Tsys)
G_dB = 27 #satellite reciever antwnna gain
GT = G_dB-10*math.log10(Tsys); #G/T ratio in dB
print 'The G/T ratio for satellite reciever is %.2f dB/K '%(GT)
B = 36*10**6 ;# Bandwidth in Hz
L_misc = 1.6 #atmospheric loss
CN = EIRP_dBW-alfa1_dB+GT+228.6-10*math.log10(B)-L_misc; #C/N in dB
print 'The carrier power to noise ratio at the satellite reciever is %.2f dB '%(CN)
# Value of F is rouded to 2 in the text
import math
# Variables
EIRP_dBW = 47.8; #dBW
l = 91.-90; #Difference in longitude
L = 32. #Latitude of New York
# Calculations and Results
d_km = 35.786*10**3*math.sqrt(1+0.42*(1-math.cos(L*math.pi/180)*math.cos(l*math.pi/180)));
print 'The distance is %.0f km '%(d_km)
f = 3.9 #downlink frequency in GHz
alfa1_dB = 20*math.log10(f)+20*math.log10(d_km)+92.44; #Path loss
print 'The path loss is %.2f dB '%(alfa1_dB)
F = 1.778 #absolute noise figure
Te = (F-1)*290; #Noise temperature
print 'The Noise temperature of satellite reciever is %.2f K '%(Te)
Ti = 150; #input noise temperature in K
Tsys = Ti+Te
print 'The system temperature of satellite reciever is %.2f K '%(Tsys)
G_dB = 42 #satellite reciever antwnna gain
GT = G_dB-10*math.log10(Tsys); #G/T ratio in dB
print 'The G/T ratio for satellite reciever is %.2f dB/K '%(GT)
B = 36*10**6 ;# Bandwidth in Hz
L_misc = 1 #atmospheric loss
CN = EIRP_dBW-alfa1_dB+GT+228.6-10*math.log10(B)-L_misc; #C/N in dB
print 'The carrier power to noise ratio at the satellite reciever is %.1f dB '%(CN)