{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter No 10 - Propagation of radio waves"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example10.1 PageNo 412"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Field strength will reduce by 5.23 dBs\n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "from math import sqrt, log10\n",
    "#Given\n",
    "Pt1=100#Radiated power\n",
    "Pt2=30# Reduced Power \n",
    "r=1#assume distance to be unity for easeof calculation\n",
    "E1=300*sqrt(100)/r\n",
    "E2=300*sqrt(30)/r\n",
    "E=20*log10((E2/E1))# Reduction in field strength in dBs\n",
    "print 'Field strength will reduce by %0.2f dBs'%(-E)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example10.2 PageNo 413"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The field strength at distance 20km is 190.53 uV/m\n"
     ]
    }
   ],
   "source": [
    "#Given\n",
    "P=3#Transmitter power\n",
    "ht=100# Antenna height\n",
    "G=5#Antenna gain\n",
    "d=20e3#distance\n",
    "lamda=1\n",
    "hr=1#assumed\n",
    "E=((88*G*ht*hr*P**0.5)/(lamda*d**2))#field strength\n",
    "print 'The field strength at distance 20km is %0.2f uV/m'%(E*1e6)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example10.3 PageNo 413"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Direct ray coverage is possible over 63.03 km\n"
     ]
    }
   ],
   "source": [
    "from math import sqrt\n",
    "#Given\n",
    "ht=152.5\n",
    "hr=9.15 # Antenna height\n",
    "d=4100*(sqrt(ht)+sqrt(hr)) #distance\n",
    "print 'Direct ray coverage is possible over %0.2f km'%(d*1e-3)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example10.4 PageNo 414"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Max possible distance for efective point to point\n",
      " communication is 514.48 km\n"
     ]
    }
   ],
   "source": [
    "from math import sqrt\n",
    "#Given\n",
    "#b\n",
    "ht=3e3\n",
    "hr=5e3 # Antenna height\n",
    "d=4100*(sqrt(ht)+sqrt(hr))#distance\n",
    "print 'Max possible distance for efective point to point\\n communication is %0.2f km'%(d*1e-3)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
