import math
#given
P_HPA=600.0
TFL_dB=1.5
G_dB_ES=50.0
RFL_dB=1
GTR_dB_SAT =-8
FSL_dB=200
AML_dB=0.5
PL_dB=0.5
AA_dB=1
#Determination of carrier to noise ratio
P_dB_HPA=10*math.log10(P_HPA/1)
EIRP_dB=P_dB_HPA -TFL_dB+G_dB_ES
TPL_dB=FSL_dB+AML_dB+PL_dB+AA_dB
CNoR_dB=EIRP_dB -TPL_dB -RFL_dB+GTR_dB_SAT+228.6
CNoR_dB=round(CNoR_dB,2)
print 'The carrier to noise ratio in dB is',CNoR_dB
import math
from math import pi
f=14*10**9
BO_dB=10
GTR_dB_SAT=3
RFL_dB=1
phi_dB=-98
c=3*10**8
#Determination of carrier to noise ratio
wav=c/f
x=0.00003654067 #x=((wav**2)/(4*pi))
Ao_dB=10*math.log10(x)
CNo_dB=phi_dB -BO_dB+GTR_dB_SAT -RFL_dB+Ao_dB+228.6
CNo_dB=round(CNo_dB,2)
print 'The carrier to noise ratio is',CNo_dB
import math
CNo_dB_U=88
CNo_dB_D=78
NoC_U=10**(-CNo_dB_U/10)
NoC_D=10**(-CNo_dB_D/10)
NoC=NoC_U+NoC_D
CNo_dB=10*math.log10(1/NoC)
CNo_dB=round(CNo_dB,2)
print 'The overall carrier to noise ratio is',CNo_dB
import math
#given
Eb_N0=9.6 #ratio expessed in dB
Rb=1.544*10**6 #bit rate expessed in bps
#The bit rate in dB relative to 1bps is
R_dB_b=10*math.log10(Rb)
#The required CN0 ratio is
CNo_db=Eb_N0+R_dB_b
CNo_db=round(CNo_db,2)
print 'The ratio C/No is',CNo_db