{
 "metadata": {
  "name": "",
  "signature": "sha256:887dc8fe96ce5749275f69e533e7f68525ad7b355888b111befa3adaae8219e6"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter14 - Ground wave propagation"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex-14.10.2, pg-356"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "ht=100  #feet\n",
      "hr=50  #feet\n",
      "d=1.4142*((ht)**1.0/2+(hr)**1.0/2)  #miles\n",
      "print \"Radio horizon is \", round(d,2),\" miles\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Radio horizon is  106.06  miles\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex-14.6.2, pg-359"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "f=150  #MHz\n",
      "c=3*10**8  #m/s\n",
      "GT=1.64  #dB\n",
      "PT=20  #W\n",
      "d=50  #km\n",
      "l=c/(f*10**6)  #m\n",
      "E=(30*GT*PT)**1.0/2/(d*1000)  #V/m\n",
      "le=l/math.pi  #m\n",
      "Voc=E*le  #V/m\n",
      "Voc*=10**6 #uV\n",
      "print \"Open circuit voltage is \",round(Voc,2),\" uV\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Open circuit voltage is  6264.34  uV\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex-14.10.6, pg-364"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "P=35  #W\n",
      "ht=45  #m\n",
      "hr=25  #m\n",
      "f=90  #MHz\n",
      "c=3*10**8  #m/s\n",
      "d=4.12*((ht)**1.0/2+(hr)**1.0/2)  #km\n",
      "print  \"Distance of line of sight communication is \", round(d,2),\" km\"\n",
      "l=c/(f*10**6)  #m\n",
      "ER=88*(P)**1.0/2*ht*hr/(l*(d*1000)**2)  #V/m\n",
      "ER*=10**6  #uV/m\n",
      "print \"Field strength is \",round(ER,2),\" uV/m\"  \n",
      "#Answer is wrong in the textbook."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Distance of line of sight communication is  144.2  km\n",
        "Field strength is  27.77  uV/m\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex-14.10.5, pg-368"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "ht=100  #m\n",
      "d=4.12*(ht)**1.0/2  #km\n",
      "print \"Horizon distance is \",round(d,2),\" km\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Horizon distance is  206.0  km\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex-14.6.1(i), pg-372"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "d=36000.0  #km\n",
      "f=4000.0  #MHz\n",
      "GT=20.0  #dB\n",
      "GR=40.0  #dB\n",
      "PT=200.0  #W\n",
      "PT_dB=10*math.log10(PT)  #dB\n",
      "Ls=32.44+20*math.log10(f)+20*math.log10(d)  #dB\n",
      "PR_dB=PT_dB+GT+GR-Ls  #dB\n",
      "PR=10**(PR_dB/10)  #W\n",
      "PR*=10**12  # pW\n",
      "print \"Received power is \",round(PR,2),\" pW\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Received power is  5.5  pW\n"
       ]
      }
     ],
     "prompt_number": 21
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex-14.10.1, pg-375\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "ht=100.0  #m\n",
      "hr=100  #m\n",
      "d=3.57*(ht**1.0/2+hr**1.0/2)  #km\n",
      "print \"Range of space wave propagation is \",round(d,2),\" km\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Range of space wave propagation is  357.0  km\n"
       ]
      }
     ],
     "prompt_number": 22
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex-14.10.4, pg-379"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "ht=100  #m\n",
      "d=80  #km\n",
      "hr=(d/4.12-ht**1.0/2)**2  #m\n",
      "print \"Required height of receiving antenna is \",round(hr,2),\" meter\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Required height of receiving antenna is  935.29  meter\n"
       ]
      }
     ],
     "prompt_number": 23
    }
   ],
   "metadata": {}
  }
 ]
}