{"nbformat_minor": 0, "cells": [{"source": "# Chapter 9 : Wave Propagation", "cell_type": "markdown", "metadata": {}}, {"source": "## Example 9.1,Page Number 425", "cell_type": "markdown", "metadata": {}}, {"execution_count": 1, "cell_type": "code", "source": "from __future__ import division\nfrom math import atan,degrees,sqrt,cos,pi,sin,exp,radians\n\n#variable Declaration\n\nf = 1.7 #frequency in MHz\nf = 1.7*10**6 #frequency in Hz\nE = 0.5 #electric field in mV/m\nE = 0.5*10**(-3) # electric field in V/m\nsigma = 5*10**-5 # conductivity in mho/cm\neta = 0.5 # efficiency\nepsilon_r = 10 # relative permittivity\nc = 3*10**8 # speed of light in m/s\nlamda = c/f # wavelength in m\nd = 10 # distance in km\nd = 10*10**3 # distance in m\n\n#calculations\nDf = 1.8*10**12*(sigma/f) # dissipation factor\nb = atan((epsilon_r+1)/Df)*180/pi # phase constant in degrees\np = (pi/Df)*(d/lamda)*cos(radians(b)) # numerical distance\nA = ((2+0.3*p)/(2+p+0.6*p**2))-((sin(radians(b))*(sqrt(p/2)*(exp((-5*p)/8))))) # factor of the ground losses\n# formula: E = (A*E_not)/d\n#E_not = 300*sqrt(P_kW) # E_not is in mV/m\n#E_not = 300*sqrt(P_kW)*10**(-3) # E_not is in V/m\nP_kW = ((E*d*10**-3)/(A*300*10**-3))**2 # Power in kW and d is in km\n# formula : P = Ptx*eta\nPtx = P_kW/eta #transmitter power required in kW\n\n\n#result\nprint \"transmitter power required in W:\",round(Ptx*1000,2)\n\n#note: answer in the book is wrong.python gives Ptx = 11.49W whereas answer in the book is Ptx = 12.6W\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "transmitter power required in W: 11.49\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 9.2,Page Number 426", "cell_type": "markdown", "metadata": {}}, {"execution_count": 21, "cell_type": "code", "source": "from __future__ import division\nfrom math import sqrt,pi,radians,atan,cos,sin,exp\n\n#variable Declaration\n\nprint \"for frequency = 500kHz\"\nf1 = 500*10**3 # frequency in Hz\nc = 3*10**8 # speed of light in m/s\nlamda1 = c/f1 # wavelength in m\nd = 100 # distance in km\nd = 100*10**3 # distance in m\nPt = 100 # transmitter power in kW \neta = 50 # efficiency in percentage\neta = 0.5 # efficiency\nP_kW = Pt*eta # radiated power in kW\nE_not = 300*1.28*sqrt(P_kW) # field strength in mV/m without ground losses at 1km\n\n\n#calculations and result\n\n # for sea water earth\nepsilon_r = 81 # permittivity\nsigma = 45*10**-3 # conductivity in mho/cm\nDf = 1.8*10**12*(sigma/f1) # dissipation factor\nb = atan(radians(epsilon_r+1)/Df) # phase constant in degrees\np = (pi/Df)*(d/lamda1)*cos(radians(b)) # numerical distance\nA = ((2+0.3*p)/(2+p+0.6*p**2))-(sin(radians(b))*(sqrt(p/2)*exp((-5*p)/8))) # factor of the ground losses\nE1 = (A*E_not)/(d) # in V/m\nprint \"electric field strength for sea water earth in mV/m when f = 500kHz:\",round(E1*1000,3)\n\n# for good soil\nepsilon_r = 20 # permittivity\nsigma = 10**-4 # conductivity in mho/cm\nDf = 1.8*10**12*(sigma/f1) # dissipation factor\nb = atan(radians(epsilon_r+1)/Df) # phase constant in degrees\np = (pi/Df)*(d/lamda1)*cos(radians(b)) # numerical distance\nA = ((2+0.3*p)/(2+p+0.6*p**2))-(sin(radians(b))*(sqrt(p/2)*exp((-5*p)/8))) # factor of the ground losses\nE2 = (A*E_not)/(d) # in V/m\nprint \"electric field strength for good soil in mV/m when f = 500kHz:\",round(E2*1000,3)\n\n# for poor soil\nepsilon_r = 10 # permittivity\nsigma = 0.2*10**-4 # conductivity in mho/cm\nDf = 1.8*10**12*(sigma/f1) # dissipation factor\nb = atan(radians(epsilon_r+1)/Df) # phase constant in degrees\np = (pi/Df)*(d/lamda1)*cos(radians(b)) # numerical distance\nA = ((2+0.3*p)/(2+p+0.6*p**2))-(sin(radians(b))*(sqrt(p/2)*exp((-5*p)/8))) # factor of the ground losses\nE3 = (A*E_not)/(d) # in V/m\nprint \"electric field strength for poor soil in mV/m when f = 500kHz:\",round(E3*1000,3)\n\n# for cities,industrial areas\nepsilon_r = 5 # permittivity\nsigma = 10**-5 # conductivity in mho/cm\nDf = 1.8*10**12*(sigma/f1) # dissipation factor\nb = atan(radians(epsilon_r+1)/Df) # phase constant in degrees\np = (pi/Df)*(d/lamda1)*cos(radians(b)) # numerical distance\nA = ((2+0.3*p)/(2+p+0.6*p**2))-(sin(radians(b))*(sqrt(p/2)*exp((-5*p)/8))) # factor of the ground losses\nE4 = (A*E_not)/(d) # in V/m\nprint \"electric field strength for cities,industrial areas in mV/m when f = 500kHz:\",round(E4*1000,3)\n\n# for Rockey soil,flat sandy\nepsilon_r = 10 # permittivity\nsigma = 2*10**-3 # conductivity in mho/cm\nDf = 1.8*10**12*(sigma/f1) # dissipation factor\nb = atan(radians(epsilon_r+1)/Df) # phase constant in degrees\np = (pi/Df)*(d/lamda1)*cos(radians(b)) # numerical distance\nA = ((2+0.3*p)/(2+p+0.6*p**2))-(sin(radians(b))*(sqrt(p/2)*exp((-5*p)/8))) # factor of the ground losses\nE5 = (A*E_not)/(d) # in V/m\nprint \"electric field strength for Rockey soil,flat sandy in mV/m when f = 500kHz:\",round(E5*1000,3)\n\n# for medium hills,forestation\nepsilon_r = 13 # permittivity\nsigma = 5*10**-5 # conductivity in mho/cm\nDf = 1.8*10**12*(sigma/f1) # dissipation factor\nb = atan(radians(epsilon_r+1)/Df) # phase constant in degrees\np = (pi/Df)*(d/lamda1)*cos(radians(b)) # numerical distance\nA = ((2+0.3*p)/(2+p+0.6*p**2))-(sin(radians(b))*(sqrt(p/2)*exp((-5*p)/8))) # factor of the ground losses\nE6 = (A*E_not)/(d) # in V/m\nprint \"electric field strength for medium hills,forestation in mV/m when f = 500kHz:\",round(E6*1000,3)\n\n\n\nprint(\"for frequency = 1500kHz\")\n\nf2 = 1500 # in kHz\nf2 = 1500*10**(3) # in Hz\nlamda2 = c/f2 # in m\n # for sea water earth\nepsilon_r = 81 # permittivity\nsigma = 45*10**-3 # conductivity in mho/cm\nDf = 1.8*10**12*(sigma/f2) # dissipation factor\nb = atan(radians(epsilon_r+1)/Df) # phase constant in degrees\np = (pi/Df)*(d/lamda2)*cos(radians(b)) # numerical distance\nA = ((2+0.3*p)/(2+p+0.6*p**2))-(sin(radians(b)))*(sqrt(p/2)*exp((-5*p)/8)) # factor of the ground losses\nE1 = (A*E_not)/(d) # in V/m\nprint \"electric field strength for sea water earth in mV/m when f = 1500kHz:\",round(E1*1000,3)\n\n# for good soil\nepsilon_r = 20 # permittivity\nsigma = 10**-4 # conductivity in mho/cm\nDf = 1.8*10**12*(sigma/f2) # dissipation factor\nb = atan(radians(epsilon_r+1)/Df) # phase constant in degrees\np = (pi/Df)*(d/lamda2)*cos(radians(b)) # numerical distance\nA = ((2+0.3*p)/(2+p+0.6*p**2))-(sin(radians(b)))*(sqrt(p/2)*exp((-5*p)/8)) # factor of the ground losses\nE2 = (A*E_not)/(d) # in V/m\nprint \"electric field strength for good soil in mV/m when f = 1500kHz:\",round(E2*1000,3)\n\n# for poor soil\nepsilon_r = 10 # permittivity\nsigma = 0.2*10**-4 # conductivity in mho/cm\nDf = 1.8*10**12*(sigma/f2) # dissipation factor\nb = atan(radians(epsilon_r+1)/Df) # phase constant in degrees\np = (pi/Df)*(d/lamda2)*cos(radians(b)) # numerical distance\nA = ((2+0.3*p)/(2+p+0.6*p**2))-(sin(radians(b)))*(sqrt(p/2)*exp((-5*p)/8)) # factor of the ground losses\nE3 = (A*E_not)/(d) # in V/m\nprint \"electric field strength for poor soil in mV/m when f = 1500kHz:\",round(E3*1000,3)\n\n# for cities,industrial areas\nepsilon_r = 5 # permittivity\nsigma = 10**-5 # conductivity in mho/cm\nDf = 1.8*10**12*(sigma/f2) # dissipation factor\nb = atan(radians(epsilon_r+1)/Df) # phase constant in degrees\np = (pi/Df)*(d/lamda2)*cos(radians(b)) # numerical distance\nA = ((2+0.3*p)/(2+p+0.6*p**2))-(sin(radians(b)))*(sqrt(p/2)*exp((-5*p)/8)) # factor of the ground losses\nE4 = (A*E_not)/(d) # in V/m\nprint \"electric field strength for cities,industrial areas in mV/m when f = 1500kHz:\",round(E4*1000,3)\n\n# for Rockey soil,flat sandy\nepsilon_r = 10 # permittivity\nsigma = 2*10**-3 # conductivity in mho/cm\nDf = 1.8*10**12*(sigma/f2) # dissipation factor\nb = atan(radians(epsilon_r+1)/Df) # phase constant in degrees\np = (pi/Df)*(d/lamda2)*cos(radians(b)) # numerical distance\nA = ((2+0.3*p)/(2+p+0.6*p**2))-(sin(radians(b)))*(sqrt(p/2)*exp((-5*p)/8)) # factor of the ground losses\nE5 = (A*E_not)/(d) # in V/m\nprint \"electric field strength for Rockey soil,flat sandy in mV/m when f = 1500kHz:\",round(E5*1000,3)\n\n# for medium hills,forestation\nepsilon_r = 13 # permittivity\nsigma = 5*10**-5 # conductivity in mho/cm\nDf = 1.8*10**12*(sigma/f2) # dissipation factor\nb = atan(radians(epsilon_r+1)/Df) # phase constant in degrees\np = (pi/Df)*(d/lamda2)*cos(radians(b)) # numerical distance\nA = ((2+0.3*p)/(2+p+0.6*p**2))-(sin(radians(b))*(sqrt(p/2))*exp((-5*p)/8)) # factor of the ground losses\nE6 = (A*E_not)/(d) # in V/m\nprint \"electric field strength for medium hills,forestation in mV/m when f = 1500kHz:\",round(E6*1000,3)\n\n\n\n\n# note 1 : misprint value of sigma in part (e) when f = 500khz correct is sigma = 2*10**-3 for rockey soil\n# note 2: The ans is rounded off at the F = 1500 kHz in poor soil and Cities, industrial area.\n# note 3 : most of the answers in the book are upto one places of decimal.python calculated them upto 3 places of decimal.\n# note 4 : Several answers in the book are not correctly calculated after decimal.\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "for frequency = 500kHz\nelectric field strength for sea water earth in mV/m when f = 500kHz: 27.122\nelectric field strength for good soil in mV/m when f = 500kHz: 14.004\nelectric field strength for poor soil in mV/m when f = 500kHz: 2.769\nelectric field strength for cities,industrial areas in mV/m when f = 500kHz: 1.204\nelectric field strength for Rockey soil,flat sandy in mV/m when f = 500kHz: 26.446\nelectric field strength for medium hills,forestation in mV/m when f = 500kHz: 7.811\nfor frequency = 1500kHz\nelectric field strength for sea water earth in mV/m when f = 1500kHz: 26.874\nelectric field strength for good soil in mV/m when f = 1500kHz: 1.365\nelectric field strength for poor soil in mV/m when f = 1500kHz: 0.223\nelectric field strength for cities,industrial areas in mV/m when f = 1500kHz: 0.108\nelectric field strength for Rockey soil,flat sandy in mV/m when f = 1500kHz: 20.483\nelectric field strength for medium hills,forestation in mV/m when f = 1500kHz: 0.609\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 9.3,Page Number 432", "cell_type": "markdown", "metadata": {}}, {"execution_count": 3, "cell_type": "code", "source": "from __future__ import division\nfrom math import sqrt\n\n#variable Declaration\nHt=100 # height of transmittin antenna in feet\nHr=50 # height of receiving antenna in feet\n\n#calculation\nDmax = sqrt(2*Ht)+sqrt(2*Hr) # in miles\n\n#result\nprint \"maximum range of tropospheric transmission in miles:\",round(Dmax,3)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "maximum range of tropospheric transmission in miles: 24.142\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 9.4,Page Number 432", "cell_type": "markdown", "metadata": {}}, {"execution_count": 4, "cell_type": "code", "source": "from __future__ import division\nfrom math import sqrt\n\n#variable Declaration\nHt=80 # height of transmitting antenna in meter\n\n#calculation\nd=sqrt(17*Ht) # radio horizon distance of transmitting antenna\n\n#result\nprint \"radio horizon distance of transmitting antenna in Km\",round(d,3)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "radio horizon distance of transmitting antenna in Km 36.878\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 9.5,Page Number 433", "cell_type": "markdown", "metadata": {}}, {"execution_count": 5, "cell_type": "code", "source": "from __future__ import division\nfrom math import sqrt\n\n#variable Declaration\nHt=80 # height of transmittin antenna in meter\nHr=50 # height of receiving antenna in meter\n\n#calculation\ndmax = sqrt(17*Ht)+sqrt(17*Hr) # in miles\n\n#result\nprint \"maximum range of tropospheric transmission in Km:\",round(dmax,3)\n\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "maximum range of tropospheric transmission in Km: 66.033\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 9.6,Page Number 433", "cell_type": "markdown", "metadata": {}}, {"execution_count": 6, "cell_type": "code", "source": "from __future__ import division\nfrom math import sqrt\n\n#variable Declaration\nDmax = 80 #distance in Km\nHt = 100 # height of transmitting antenna in meter\n\n#calculations\n# formula : Dmax = sqrt(17*Ht)+sqrt(17*Hr)\nHr = ((Dmax-(sqrt(17*Ht)))**2)/17 # height of receiving antenna in m\n\n#result\nprint \"height of receiving antenna in m\",round(Hr,3)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "height of receiving antenna in m 88.414\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 9.7,Page Number 433", "cell_type": "markdown", "metadata": {}}, {"execution_count": 7, "cell_type": "code", "source": "from __future__ import division\nfrom math import sqrt\n\n#variable Declaration\nHt=300 # height of antenna in feet\nHr=100 # height of receiving antenna in feet\n\n#calculations\ndt=sqrt(2*Ht) # radio horizon distance for a transmitting antenna in miles\ndr=sqrt(2*Hr) # radio horizon distance for a transmitting antenna in miles\ndmax=dt+dr # maximum range of space wave propagation in miles\n\n\n#result\nprint \"radio horizon distance for a transmitting antenna in miles:\",round(dt,3)\nprint \"radio horizon distance for a receiving antenna in miles:\",round(dr,3)\nprint \"maximum range of space wave propagation in miles:\",round(dmax,3) \n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "radio horizon distance for a transmitting antenna in miles: 24.495\nradio horizon distance for a receiving antenna in miles: 14.142\nmaximum range of space wave propagation in miles: 38.637\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 9.8,Page Number 433", "cell_type": "markdown", "metadata": {}}, {"execution_count": 8, "cell_type": "code", "source": "from __future__ import division\nfrom math import sqrt,pi\n\n#variable Declaration\nf = 60 # in MHz\nf = 60*10**6 # in Hertz\nc = 3*10**8 # speed of light in m/s\nlamda = c/f # wavelength in meter\nPtx = 1 # transmitting power in kilo watt\nht = 50 # height of transmiting antenna in meter\nhr = 5 # height of receiving antenna in meter\nE = 80 # electric field in micro V/m\nE = 80*10**(-6) # electric field in V/m\n\n\n#calculations\nE0 = 3*137.6*sqrt(Ptx)*(8/5)*10**3 # field in mV/m at 1 meter where Ptx is in kW\nE0 = 3*137.6*sqrt(Ptx)*(8/5)*10**3*10**(-3) # field in V/m at 1 meter where Ptx is in kW\n# formula : E = (4*(pi)*ht*hr*E0)/(lambda*d**2)\nd = sqrt((4*pi*ht*hr*E0)/(lamda*E)) # range of space wave in meter\n\n#result\nprint \"range of space wave in Km:\",round(d/1000,3)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "range of space wave in Km: 72.024\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 9.9,Page Number 434", "cell_type": "markdown", "metadata": {}}, {"execution_count": 9, "cell_type": "code", "source": "from __future__ import division\nfrom math import sqrt\n\n#variable Declaration\nhd = 30 # height of duct in m\ndelta_M = 30 # unitless\n\n#calculations\nlamda_max = 2.5*hd*sqrt(delta_M*10**-6) # maximum wavelength at which duct propagation is possible\n\n#result\nprint \"maximum wavelength at which duct propagation is possible in m:\",round(lamda_max,3)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "maximum wavelength at which duct propagation is possible in m: 0.411\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 9.10,Page Number 434", "cell_type": "markdown", "metadata": {}}, {"execution_count": 10, "cell_type": "code", "source": "from __future__ import division\n\n#variable Declaration\nfc = 1.5 # critical frequency in MHz\nfc = 1.5*10**(6) # critical frequency in Hz\n\n#calculations\n# formula : fc = 9*sqrt(Nmax)\nNmax = (fc)**2/81 # electron density in electrons/m**3\n\n#result\nprint \"electron density in electrons/m**3:\",Nmax\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "electron density in electrons/m**3: 27777777777.8\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 9.11,Page Number 435", "cell_type": "markdown", "metadata": {}}, {"execution_count": 11, "cell_type": "code", "source": "from __future__ import division\nfrom math import sqrt\n\n#variable Declaration\nn = 0.92 # refrective index\nMUF = 10 # maximum usable frequency in MHz\nMUF = 10*10**6 # maximum usable frequency in Hz\nf = 10*10**6 # in Hz ordinary frequency and maximum usable frequency are same\nh = 400 # height of ray reflection point on the ionospheric layer in Km\nh = 400*10**3 # height of ray reflection point on the ionospheric layer in m\n\n#calcu;ations\n# formula :n = sqrt(1-(81*Nmax/f**2))\nNmax = (1-n**2)*f**2/81 # electron density in electrons/m**3\nfc = 9*sqrt(Nmax) # critical frequency in Hz\n# MUF = fc*sec(thetai)\n#sec(thetai) = MUF/fc\n# also, sec(thetai) = sqrt(h**2+(d**2/4))/h so on comparing,\nd = sqrt(((MUF*h/fc)**2-h**2)*4) # range in km\n\n#result\nprint \"Range in Km:\",round(d/1000,3)\n\n# note :answer in the book is 1876.59 where as in python is 1877.94 minute difference only\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "Range in Km: 1877.942\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 9.12,Page Number 435", "cell_type": "markdown", "metadata": {}}, {"execution_count": 12, "cell_type": "code", "source": "from __future__ import division\nfrom math import sqrt\n\n#variable Declaration\nf=50 # in hz\nf=50*10**3 # in KHz\nN1=400 # electron density of D layer in electrons/cm**3 \nN2=5*10**5 # electron density of E layer in electrons/cm**3 \nN3=2*10**6 # electron density of F layer in electrons/cm**3 \n\n#calculations\n# formula :n=sqrt(epsilon_r)=sqrt(1-(81*N/f**2)) # WHERE f IS IN KhZ\n# for D layer\nepsilon_r1=1-(81*N1/f**2) # relative permittivity of D layer\n# for E layer\nepsilon_r2=1-(81*N2/f**2) # relative permittivity of E layer\n# for F layer\nepsilon_r3=1-(81*N3/f**2) # relative permittivity of F layer\n\n#result\nprint \"relative permittivity of D layer:\",round(epsilon_r1,3)\nprint \"relative permittivity of E layer:\",round(epsilon_r2,4)\nprint \"relative permittivity of F layer:\",round(epsilon_r3,4)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "relative permittivity of D layer: 1.0\nrelative permittivity of E layer: 0.9838\nrelative permittivity of F layer: 0.9352\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 9.13,Page Number 436", "cell_type": "markdown", "metadata": {}}, {"execution_count": 13, "cell_type": "code", "source": "from __future__ import division\nfrom math import sqrt,radians,asin,sin,pi,degrees\n\n#variable Declaration\nf = 50 # in hz\nf = 50*10**3 # in KHz\ntheta_i = 30 # in degrees\nN = 400 # electron density of D layer in electrons/cm**3 \n\n#calculations\n# formula :n = sqrt(epsilon_r) = sqrt(1-(81*N/f**2)) # WHERE f IS IN KhZ\n# for D layer\nepsilon_r = 1-(81*N/f**2) # relative permittivity of D layer\nn = sqrt(epsilon_r) # refrective index\n# formula : nsin(theta_r) = sin(theta_i) # snell's law\ntheta_r = asin(sin(radians(theta_i/n)))*180/pi # angle of refraction in degrees\n\n#result\nprint \"angle of refraction in degrees:\",round(theta_r,3) \n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "angle of refraction in degrees: 30.0\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 9.14,Page Number 437", "cell_type": "markdown", "metadata": {}}, {"execution_count": 14, "cell_type": "code", "source": "from __future__ import division\nfrom math import sqrt\n\n#variable Declaration\nN1 = 400 # electron density of D layer in electrons/cm**3 \nN2 = 5*10**5 # electron density of E layer in electrons/cm**3 \nN3 = 2*10**6 # electron density of F layer in electrons/cm**3\n\n#calculations\n# formula : fc = 9*sqrt(N) \nfc1 = 9*sqrt(N1) # critical frequency in Khz of EM wave for D layer\nfc2 = 9*sqrt(N2) # critical frequency in MHz of EM wave for E layer\nfc3 = 9*sqrt(N3) # critical frequency in MHz of EM wave for F layer\n\n\n#result\nprint \"critical frequency of EM wave for D layer in kHz:\",round(fc1,3)\nprint \"critical frequency of EM wave for E layer in Mhz:\",round(fc2/10**3,3)\nprint \"critical frequency of EM wave for F layer in Mhz:\",round(fc3/10**3,3)\n\n\n\n#note: the value of fc3 in book is equal to 12.8MHz but the correct is 12.72MHz.\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "critical frequency of EM wave for D layer in kHz: 180.0\ncritical frequency of EM wave for E layer in Mhz: 6.364\ncritical frequency of EM wave for F layer in Mhz: 12.728\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 9.15,Page Number 437", "cell_type": "markdown", "metadata": {}}, {"execution_count": 15, "cell_type": "code", "source": "from __future__ import division\nfrom math import sqrt\n\n#variable Declaration\nNmax = 1.3*10**6 # maximum electron density in electrons/cm**3\n\n#calculations\n# formula : fc = 9*sqrt(Nmax)\nfc_khz = 9*sqrt(Nmax) # critical frequency in Khz\n\n#result\nprint \"critical frequency in Mhz:\",round(fc_khz/1000,3)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "critical frequency in Mhz: 10.262\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 9.16,Page Number 437", "cell_type": "markdown", "metadata": {}}, {"execution_count": 16, "cell_type": "code", "source": "from __future__ import division\nfrom math import sqrt\n\n#variable Declaration\nd = 2600 # distance between the points in Km\nd = 2600*10**3 # distance between the points in m\nfc = 4 # critical frequency in MHz\nfc = 4*10**6 # critical frequency in Hz\nh = 200 # height of ionospheric layer in km\nh = 200*10**3 # height of ionospheric layer in m\n\n\n#calculations\nMUF = fc*sqrt(1+(d/(2*h))**2) # maximum usable frequency (this step is Misprinted in the book)\n\n#result\nprint \"maximum usable frequency in MHz:\",round(MUF/10**6,3)\n\n\n\n#note: Answer in the book is wrong.\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "maximum usable frequency in MHz: 26.306\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 9.17,Page Number 438", "cell_type": "markdown", "metadata": {}}, {"execution_count": 17, "cell_type": "code", "source": "from __future__ import division\nfrom math import sqrt\n\n#variable Declaration\nN = 400 # electron density in electrons/cm**3\nn = 0.5 # refrective index\n\n#calculations\n# formula : n = sqrt(1-(81*N/f**2)) \nf = sqrt(81*N/(1-n**2)) # frequency in kHz\n\n#result\nprint \"frequency of propagating wave in kHz:\",round(f,3)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "frequency of propagating wave in kHz: 207.846\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 9.18,Page Number 438", "cell_type": "markdown", "metadata": {}}, {"execution_count": 18, "cell_type": "code", "source": "from __future__ import division\nfrom math import sqrt\n\n#variable Declaration\nHt = 60 # height of transmitting antenna in meter\nHr = 6 # height of receiving antenna in meter\n\n#calculations\nd= sqrt(17*Ht)+sqrt(17*Hr) # in Km\n\n#result\nprint \"range of line of sight in Km:\",round(d,3)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "range of line of sight in Km: 42.037\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Example 9.19,Page Number 438", "cell_type": "markdown", "metadata": {}}, {"execution_count": 19, "cell_type": "code", "source": "from __future__ import division\nfrom math import sqrt,asin,atan,pi\n\n#variable Declaration\nd=500 # distance between transmitter and receiver in km\nh=70 # height of D layer in km\n\n#calculations\ntheta_c = asin(h/(sqrt(h**2+(d**2/4))))*180/pi # critical angle in degrees\n\n#result\nprint \"critical angle of propagation in degrees:\",round(theta_c,3)\n\n\n\n#it can also be calculated from\ntheta_c = atan((2*h/d))*180/pi # critical angle in degrees\nprint \"critical angle of propagation in degrees by method 2:\",round(theta_c,3)\n", "outputs": [{"output_type": "stream", "name": "stdout", "text": "critical angle of propagation in degrees: 15.642\ncritical angle of propagation in degrees by method 2: 15.642\n"}], "metadata": {"collapsed": false, "trusted": true}}], "nbformat": 4, "metadata": {"kernelspec": {"display_name": "Python 2", "name": "python2", "language": "python"}, "language_info": {"mimetype": "text/x-python", "nbconvert_exporter": "python", "version": "2.7.8", "name": "python", "file_extension": ".py", "pygments_lexer": "ipython2", "codemirror_mode": {"version": 2, "name": "ipython"}}}}