{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 21: Communication Systems"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1, Page 606"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "Npe=6*10**10#Npe=peak electron concentration for the E layer in m**-3\n",
      "Npf=10**12#Npf=peak electron concentration for the F layer in m**-3\n",
      "\n",
      "#Calculations&Results\n",
      "fCE=9*math.sqrt(Npe)#fCE=critical frequency for the E layer\n",
      "print \"Critical frequency for the E layer is = %.1f MHz\"%(fCE/10**6)\n",
      "fCF=9*math.sqrt(Npf)#fCF=critical frequency for the F layer\n",
      "print \"Critical frequency for the F layer is = %.f MHz\"%(fCF/10**6)\n",
      "R=6400.#R=radius of the earth in km\n",
      "He=110.#He=height of the E layer above the earth surface in km\n",
      "ime=math.degrees(math.asin(R/(R+He)))#ime=angle corresponding to maximum frequency fmE for E layer in degrees\n",
      "fmE=fCE*1./math.cos(ime*math.pi/180)#fmE=maximum frequency reflected from the E layer\n",
      "print \"The maximum frequency reflected from the E layer is = %.1f MHz\"%(fmE/10**6)\n",
      "Hf=250.#Hf=height of the F layer above the earth surface in km\n",
      "imf=math.degrees(math.asin(R/(R+Hf)))#imf=angle corresponding to maximum frequency fmF for F layer in degrees\n",
      "fmF=fCF*(1./math.cos(imf*math.pi/180))#fmF=maximum frequency reflected from the F layer\n",
      "print \"The maximum frequency reflected from the F layer is = %.1f MHz\"%(fmF/10**6)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Critical frequency for the E layer is = 2.2 MHz\n",
        "Critical frequency for the F layer is = 9 MHz\n",
        "The maximum frequency reflected from the E layer is = 12.0 MHz\n",
        "The maximum frequency reflected from the F layer is = 33.1 MHz\n"
       ]
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2, Page 607"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "R=6400.#R=radius of the earth in km\n",
      "He=110.#He=height of the E layer above the earth surface in km\n",
      "\n",
      "#Calculations\n",
      "ime=math.asin(R/(R+He))#ime=angle corresponding to maximum frequency fmE for E layer in radian\n",
      "o=(math.pi/2)-ime#o=angle made by the incident ray at the centre of the earth in degrees\n",
      "L=2*o*R#L=maximum distance between the transmitting and the receiving points on the earth surface for single hop transmission of the radiowave reflected from the E layer\n",
      "\n",
      "#Result\n",
      "print \"The maximum distance for single hop transmission is = %.f km\"%L\n",
      "#Answer given in textbook is 2459 km which is incorrect as it is actually around 2356 km."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The maximum distance for single hop transmission is = 2356 km\n"
       ]
      }
     ],
     "prompt_number": 25
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3, Page 607"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "#fc=9*sqrt(Np)\n",
      "fc=3.*10**6#fc=critical frequency in Hz\n",
      "\n",
      "#Calculations\n",
      "Np=(fc**2)/81#Np=electron concentration at the reflecting point\n",
      "#h=height of the reflecting point from the bottom of the layer\n",
      "#Np=(5*10**10)+(10**9*h)....(given)\n",
      "h=(Np-(5*10**10))/10**9\n",
      "H=100#H=height above the surface of the earth in km\n",
      "\n",
      "#Result\n",
      "print \"The required height above the ground is = %.f km\"%(h+H)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The required height above the ground is = 161 km\n"
       ]
      }
     ],
     "prompt_number": 27
    }
   ],
   "metadata": {}
  }
 ]
}