Indoor Radio Coverage with Motley Keenan

This is an example of Motley-Keenan coverage

The default configuration file coverage.ini. The antenna assoaciated to each Access Point are handled in the module pylayers/antprop/antenna.py

[grid] nx = 80 ny = 40 boundary = [20,0,30,20] mode = full ; file, zone , full file = ‘points.ini’

[layout] filename = TA-Office.lay ; 0 40 0 15 ;filename = W2PTIN.lay ;filename = Lstruc.lay

[ap] 0 = {‘name’:’Gauss90’,’wstd’:’ieee80211b’,’p’:(1,12,1.2),’PtdBm’:0,’chan’:[11],’on’:True,’ant’:’Gauss’,’phideg’:90} 1 = {‘name’:’Omni’,’wstd’:’ieee80211b’,’p’:(10,2,1.2),’PtdBm’:0,’chan’:[11],’on’:True,’ant’:’Omni’,’phideg’:0} 2 = {‘name’:’Gauss75’,’wstd’:’ieee80211b’,’p’:(20,1,1.2),’PtdBm’:0,’chan’:[11],’on’:True,’ant’:’Gauss’,’phideg’:75} 3 = {‘name’:’Gauss120’,’wstd’:’ieee80211b’,’p’:(36.5,1.5,1.2),’PtdBm’:0,’chan’:[11],’on’:True,’ant’:’Gauss’,’phideg’:120} 4 = {‘name’:’Gauss180’,’wstd’:’ieee80211b’,’p’:(25,12,1.2),’PtdBm’:0,’chan’:[11],’on’:True,’ant’:’Gauss’,’phideg’:180}

[rx] temperaturek = 300 noisefactordb = 0

[show] show = True

  • ../_images/sphx_glr_plot_coverage_001.png
  • ../_images/sphx_glr_plot_coverage_002.png

Out:

Warning Unable to read graph Gr
Warning Unable to read graph Gw
[[5.44713171e-03 4.51119980e-03 1.00141868e-03 ... 1.68319894e-04
  6.82948376e-05 2.86016071e-04]
 [5.40688927e-03 4.46535422e-03 9.92615357e-04 ... 1.70132703e-04
  6.82870341e-05 2.85766673e-04]
 [5.38128668e-03 4.43240117e-03 9.87534339e-04 ... 1.72757330e-04
  6.86038765e-05 2.86638389e-04]
 ...
 [5.70655182e-03 4.62314761e-03 1.08129910e-03 ... 2.29766443e-04
  8.44816961e-05 3.38490365e-04]
 [5.81720248e-03 4.70562758e-03 1.11120508e-03 ... 2.42811071e-04
  8.85468478e-05 3.51686238e-04]
 [5.94499365e-03 4.80222400e-03 1.14576612e-03 ... 2.57644792e-04
  9.32219226e-05 3.66759852e-04]]
[[0.00033008 0.00037292 0.00145422 ... 0.00158713 0.0031234  0.00313222]
 [0.00033075 0.00037461 0.00145825 ... 0.00159817 0.00313757 0.00314413]
 [0.0003327  0.00037772 0.00146668 ... 0.00161365 0.00315821 0.00316248]
 ...
 [0.00040042 0.00046204 0.00171111 ... 0.00191641 0.003574   0.00355815]
 [0.00041681 0.00048171 0.00176764 ... 0.00198041 0.00366083 0.00364207]
 [0.00043543 0.00050398 0.00183119 ... 0.00205139 0.00375648 0.00373468]]
[[6.01755882e-03 5.02431428e-03 1.12530226e-03 ... 6.60890824e-05
  2.82143649e-04 3.30064787e-04]
 [5.98275308e-03 4.98101105e-03 1.11700325e-03 ... 6.60396914e-05
  2.81819476e-04 3.30740450e-04]
 [5.96360599e-03 4.95157309e-03 1.11278199e-03 ... 6.63055339e-05
  2.82603146e-04 3.32690436e-04]
 ...
 [6.38587731e-03 5.21222119e-03 1.22838282e-03 ... 8.13237829e-05
  3.33126333e-04 4.00403226e-04]
 [6.51559573e-03 5.30966447e-03 1.26327235e-03 ... 8.52039991e-05
  3.46052304e-04 4.16787101e-04]
 [6.66432891e-03 5.42287468e-03 1.30343410e-03 ... 8.96702176e-05
  3.60825176e-04 4.35407208e-04]]
[[0.00037655 0.0014781  0.0016221  ... 0.00313359 0.00312887 0.00095133]
 [0.00037833 0.00148269 0.00163021 ... 0.00314386 0.00313621 0.00095355]
 [0.00038155 0.00149176 0.00164319 ... 0.00316056 0.00314994 0.00095833]
 ...
 [0.00046732 0.00174429 0.00194563 ... 0.00354151 0.0035043  0.00109707]
 [0.00048727 0.00180232 0.00201286 ... 0.00362329 0.00358221 0.0011287 ]
 [0.00050986 0.0018675  0.00208807 ... 0.00371367 0.00366854 0.00116406]]
[[0.02363159 0.0056202  0.00451639 ... 0.00097996 0.00116328 0.00133965]
 [0.0234356  0.00558145 0.00447056 ... 0.00097449 0.001161   0.00134104]
 [0.02328313 0.00555765 0.00443764 ... 0.00097219 0.00116234 0.00134652]
 ...
 [0.02361812 0.00591112 0.00462902 ... 0.00107335 0.00131415 0.00155298]
 [0.02385781 0.0060274  0.00471164 ... 0.00110277 0.00135334 0.00160245]
 [0.02414335 0.00616139 0.00480839 ... 0.00113657 0.00139789 0.00165828]]
[[0.00528616 0.00581653 0.00630045 ... 0.00309932 0.00307251 0.00304005]
 [0.00528459 0.00582691 0.00632218 ... 0.00310053 0.00307006 0.00303392]
 [0.00529503 0.00585034 0.00635792 ... 0.00310806 0.00307387 0.003034  ]
 ...
 [0.00584216 0.00654654 0.00719486 ... 0.00340667 0.00333921 0.00326599]
 [0.0059751  0.00670503 0.00737733 ... 0.00347645 0.00340414 0.00332608]
 [0.00612446 0.00688182 0.00757981 ... 0.00355429 0.00347693 0.00339382]]
[[0.02624342 0.00631412 0.00513254 ... 0.00116323 0.0013576  0.00540125]
 [0.02607716 0.00628271 0.00508993 ... 0.00116095 0.00135939 0.0054022 ]
 [0.02595673 0.00626747 0.00506139 ... 0.00116229 0.00136533 0.00541539]
 ...
 [0.02665765 0.00674453 0.00533793 ... 0.00131407 0.0015776  0.00599416]
 [0.0269602  0.00688473 0.00543867 ... 0.00135325 0.00162816 0.00613254]
 [0.02731316 0.00704492 0.00555553 ... 0.0013978  0.00168518 0.00628775]]
[[0.00597404 0.00648978 0.0069489  ... 0.00299371 0.00294764 0.00289848]
 [0.00598809 0.00651596 0.00698566 ... 0.00298307 0.00293307 0.00288015]
 [0.00601548 0.00655653 0.00703776 ... 0.00297859 0.00292463 0.00286792]
 ...
 [0.00675715 0.00744881 0.00806244 ... 0.00317005 0.00308109 0.00299107]
 [0.0069234  0.0076407  0.00827683 ... 0.00322427 0.00313025 0.00303543]
 [0.0071085  0.00785325 0.00851347 ... 0.00328589 0.00318661 0.0030868 ]]
[[0.02921111 0.02522633 0.00586835 ... 0.00137963 0.00554066 0.00616214]
 [0.02908796 0.02504752 0.00583197 ... 0.00138192 0.00554473 0.0061806 ]
 [0.02901327 0.02491364 0.00581098 ... 0.00138841 0.00556129 0.00621278]
 ...
 [0.03020437 0.02546447 0.0062067  ... 0.00160789 0.00617892 0.00700917]
 [0.03058756 0.02574161 0.00633127 ... 0.00165979 0.00632397 0.00718474]
 [0.03102634 0.02606738 0.00647437 ... 0.00171827 0.00648635 0.00737984]]
[[0.0067123  0.02495923 0.02629546 ... 0.00874565 0.00275418 0.00269424]
 [0.00674365 0.02502421 0.02638864 ... 0.00867566 0.00272658 0.0026634 ]
 [0.00678987 0.02512546 0.02651974 ... 0.00861918 0.00270504 0.00263861]
 ...
 [0.0077468  0.02731723 0.02901469 ... 0.00865072 0.00274708 0.00265256]
 [0.00794967 0.02777733 0.02952137 ... 0.0087161  0.0027798  0.00268125]
 [0.00817398 0.02828254 0.03007523 ... 0.0087957  0.00281904 0.00271629]]
[[0.03256254 0.02852612 0.02391584 ... 0.00571277 0.00639013 0.00697645]
 [0.03249858 0.02839216 0.02372265 ... 0.00572075 0.00641395 0.0070138 ]
 [0.03248621 0.02830606 0.02357323 ... 0.00574155 0.00645196 0.00706655]
 ...
 [0.03431944 0.02937697 0.02394465 ... 0.00640786 0.00731496 0.00809885]
 [0.03480499 0.02974065 0.02419077 ... 0.00656125 0.00750186 0.00831454]
 [0.03535202 0.03015873 0.02448322 ... 0.00673257 0.0077091  0.00855257]]
[[0.02587397 0.02720006 0.02826188 ... 0.00256779 0.00250308 0.00714237]
 [0.02595856 0.02730999 0.02838695 ... 0.00253104 0.00246376 0.00703381]
 [0.02608056 0.02745894 0.02855226 ... 0.00250035 0.00243052 0.00693886]
 ...
 [0.0284826  0.03013809 0.03140638 ... 0.00246348 0.00237164 0.00664505]
 [0.02897499 0.03067324 0.03196896 ... 0.00248487 0.00238983 0.00666518]
 [0.02951392 0.03125682 0.03258121 ... 0.00251228 0.00241389 0.00669803]]
[[0.12772012 0.03232973 0.02762095 ... 0.00667107 0.02528377 0.02691624]
 [0.12726504 0.03226129 0.02747346 ... 0.00670145 0.02535578 0.02702115]
 [0.12691444 0.03224422 0.02737302 ... 0.0067466  0.02546448 0.02716475]
 ...
 [0.12798899 0.03402969 0.02829133 ... 0.00769138 0.02773155 0.02978836]
 [0.12862311 0.03450772 0.02863003 ... 0.0078922  0.02820322 0.0303149 ]
 [0.12937149 0.03504682 0.02902154 ... 0.00811431 0.02872051 0.0308895 ]]
[[0.0281867  0.02914664 0.02984527 ... 0.00646171 0.00621056 0.00597624]
 [0.02831091 0.02927737 0.02997138 ... 0.00634653 0.00609442 0.00585995]
 [0.02847527 0.02944923 0.03013916 ... 0.00624491 0.00599178 0.00575707]
 ...
 [0.03131886 0.03238541 0.03305782 ... 0.00588748 0.00562119 0.00537921]
 [0.03187976 0.0329617  0.03363327 ... 0.00589749 0.00562866 0.00538486]
 [0.03249027 0.03358838 0.03425929 ... 0.00591958 0.00564795 0.0054021 ]]
[[0.14146672 0.12890321 0.03201506 ... 0.02650569 0.02808201 0.02921814]
 [0.14130448 0.1284718  0.03194064 ... 0.02660287 0.02820492 0.02934885]
 [0.14125005 0.12814507 0.03191729 ... 0.02673824 0.02836788 0.02952075]
 ...
 [0.14482355 0.12942031 0.03363877 ... 0.02927704 0.03119609 0.03245919]
 [0.14578798 0.13008102 0.03410671 ... 0.02979049 0.03175456 0.03303597]
 [0.14687101 0.1308564  0.03463515 ... 0.03035142 0.03236252 0.03366316]]
[[0.02999525 0.10200368 0.10190862 ... 0.03151579 0.01177204 0.02936155]
 [0.03011844 0.10217465 0.10201747 ... 0.03106107 0.01156074 0.0289306 ]
 [0.03028337 0.10241532 0.1021958  ... 0.03065426 0.01137393 0.02854679]
 ...
 [0.03318092 0.10687309 0.10614769 ... 0.02904328 0.01069676 0.02708578]
 [0.03375375 0.1077503  0.10696093 ... 0.02904077 0.01070954 0.02709752]
 [0.03437711 0.10869927 0.10784584 ... 0.02908189 0.01074366 0.02715192]]
[[0.15536118 0.14486547 0.13052911 ... 0.02931821 0.03018613 0.10204466]
 [0.15551049 0.14477948 0.13013068 ... 0.02944873 0.03030399 0.10218405]
 [0.15577285 0.14480243 0.12983725 ... 0.02962052 0.03046369 0.10239303]
 ...
 [0.16204905 0.14903303 0.13139257 ... 0.03256068 0.03332016 0.10659338]
 [0.16337012 0.15008418 0.13209038 ... 0.03313793 0.03388769 0.10743797]
 [0.16481338 0.1512549  0.13290339 ... 0.03376565 0.03450564 0.10835424]]
[[0.10139339 0.09997496 0.09803439 ... 0.02520415 0.02444305 0.02375501]
 [0.10144211 0.09991619 0.09786271 ... 0.02485033 0.02410862 0.02343979]
 [0.10156014 0.09992667 0.0977606  ... 0.02454062 0.0238175  0.0231671 ]
 ...
 [0.10502529 0.1025327  0.09948049 ... 0.0235675  0.02296826 0.02244133]
 [0.10577745 0.10317822 0.1000175  ... 0.02362846 0.02304219 0.02252837]
 [0.10660135 0.10389583 0.10062726 ... 0.02372992 0.02315622 0.02265515]]
[[0.16772415 0.16058846 0.14949372 ... 0.10168411 0.09999918 0.09744405]
 [0.16809143 0.16084522 0.1495121  ... 0.10176169 0.09994138 0.09724144]
 [0.16857689 0.1612173  0.14964112 ... 0.10190866 0.09995282 0.09710858]
 ...
 [0.17678229 0.16843815 0.1547757  ... 0.10560687 0.1025664  0.09858872]
 [0.17835739 0.16988378 0.15594614 ... 0.1063882  0.10321284 0.09909661]
 [0.18005632 0.17145261 0.15723739 ... 0.10724122 0.10393136 0.09967747]]
[[0.09440672 0.09115845 0.08788389 ... 0.04138279 0.03991779 0.03860831]
 [0.09406638 0.09069684 0.08732172 ... 0.04112878 0.03969797 0.03841977]
 [0.09379698 0.09030788 0.0868342  ... 0.04094312 0.03954524 0.03829714]
 ...
 [0.09422643 0.08983613 0.08563429 ... 0.04189243 0.04072378 0.03968601]
 [0.0946081  0.09011128 0.08582463 ... 0.04232108 0.04117842 0.04016469]
 [0.09506391 0.09046184 0.08609154 ... 0.04282184 0.04170498 0.04071515]]
[[0.58246177 0.17276113 0.16706039 ... 0.09189613 0.0873252  0.08296378]
 [0.5824071  0.1731251  0.16741989 ... 0.09145912 0.0867471  0.08228638]
 [0.58235492 0.17360832 0.16789732 ... 0.09109435 0.08624403 0.08168677]
 ...
 [0.58204437 0.18181439 0.17603242 ... 0.09080324 0.08493037 0.07967828]
 [0.58202064 0.18338929 0.17759831 ... 0.09109958 0.08510754 0.07977586]
 [0.58200056 0.1850874  0.17928801 ... 0.09147106 0.08536148 0.07995141]]
[[0.07898276 0.07544967 0.43567419 ... 0.05442813 0.05413986 0.05385719]
 [0.07824373 0.07467999 0.43404358 ... 0.05443153 0.05417361 0.05391866]
 [0.07758479 0.07399201 0.43254929 ... 0.05450654 0.05427894 0.05405172]
 ...
 [0.07516106 0.07137328 0.42570574 ... 0.05774955 0.05777182 0.05777416]
 [0.07521173 0.07140219 0.42550555 ... 0.05850011 0.05855555 0.05858852]
 [0.07534108 0.07151005 0.42545284 ... 0.05933201 0.05942128 0.0594855 ]]
[[0.52484145 0.55187246 0.57435038 ... 0.41710921 0.39650346 0.37952784]
 [0.52369547 0.55115659 0.57410164 ... 0.4155505  0.39509422 0.37829837]
 [0.52260274 0.55046857 0.57386177 ... 0.41414232 0.39384934 0.37724299]
 ...
 [0.51607651 0.54617906 0.57234124 ... 0.40844628 0.38989952 0.37511791]
 [0.51556755 0.54581686 0.57220946 ... 0.40844144 0.39016253 0.37564415]
 [0.51513177 0.54549723 0.57209216 ... 0.40859467 0.3905938  0.37634599]]
[[0.36557553 0.35408921 0.34459505 ... 0.02406603 0.02393635 0.02381959]
 [0.36453404 0.35323154 0.34391077 ... 0.02429441 0.02416957 0.0240572 ]
 [0.36367349 0.35255974 0.34341592 ... 0.02457667 0.02445663 0.02434862]
 ...
 [0.36332722 0.35388452 0.34627832 ... 0.02900334 0.0289238  0.02885276]
 [0.36410145 0.35488704 0.34748831 ... 0.02986775 0.02979405 0.02972836]
 [0.36505681 0.35607502 0.3488873  ... 0.03081271 0.03074516 0.03068509]]
[[0.36729165 0.39260824 0.42748443 ... 0.29760317 0.29445965 0.29212381]
 [0.366225   0.39123564 0.42587826 ... 0.29816198 0.295136   0.29289206]
 [0.36533851 0.39002977 0.42441487 ... 0.29892448 0.29601711 0.29386593]
 ...
 [0.3647591  0.38646708 0.41802812 ... 0.31242896 0.31052192 0.30915395]
 [0.36550116 0.38678697 0.41790881 ... 0.31505287 0.31327872 0.3120149 ]
 [0.36642371 0.38727688 0.41794183 ... 0.31788662 0.3162473  0.31508915]]
[[0.29034238 0.28895345 0.28784986 ... 0.02218406 0.02218249 0.02218106]
 [0.29118363 0.28985352 0.28879794 ... 0.022488   0.0224865  0.02248513]
 [0.29223118 0.29096046 0.28995337 ... 0.02284558 0.02284415 0.02284285]
 ...
 [0.3081421  0.30737385 0.30677733 ... 0.02792834 0.02792753 0.02792679]
 [0.31108595 0.31038461 0.30984281 ... 0.02888993 0.02888922 0.02888857]
 [0.31424432 0.31361089 0.3131246  ... 0.02993747 0.02993686 0.0299363 ]]
[[0.28190704 0.28225049 0.28280088 ... 0.05172051 0.05023576 0.048703  ]
 [0.2831366  0.28346258 0.28398532 ... 0.05191412 0.05045033 0.04891888]
 [0.28457645 0.28488476 0.28537954 ... 0.05217914 0.05073545 0.04920404]
 ...
 [0.30381523 0.30397322 0.30423017 ... 0.05699243 0.05569021 0.05411981]
 [0.30720303 0.30734092 0.30756609 ... 0.05795277 0.05666737 0.05508806]
 [0.31081187 0.31092938 0.31112231 ... 0.05899901 0.05773058 0.05614165]]
[[0.28922782 0.28800512 0.28703321 ... 0.02335313 0.02327387 0.02320234]
 [0.29011612 0.28894637 0.28801759 ... 0.0236087  0.02353256 0.02346387]
 [0.2912112  0.29009491 0.28920969 ... 0.02391797 0.02384493 0.02377905]
 ...
 [0.3075241  0.30686048 0.30634434 ... 0.02857481 0.02852857 0.02848711]
 [0.31052148 0.30991818 0.30945123 ... 0.02947269 0.0294304  0.02939254]
 [0.31373417 0.31319207 0.31277505 ... 0.03045288 0.03041474 0.03038068]]
[[0.16580552 0.16607676 0.16796651 ... 0.0664833  0.02748489 0.02771123]
 [0.1645964  0.16488692 0.16693866 ... 0.06575826 0.02708865 0.02733292]
 [0.16351893 0.16382821 0.16603813 ... 0.06511559 0.02673827 0.02699991]
 ...
 [0.15961593 0.16005993 0.16342    ... 0.06285011 0.02549965 0.02588929]
 [0.15971547 0.16017478 0.16366704 ... 0.06291972 0.02553409 0.02593939]
 [0.15994542 0.16041979 0.16404222 ... 0.06306738 0.02561025 0.02603132]]
[[0.02749852 0.02793523 0.02839279 ... 0.03136623 0.03129987 0.03120109]
 [0.02716275 0.0276348  0.02813219 ... 0.03139868 0.03135018 0.03126692]
 [0.02687099 0.02737757 0.02791402 ... 0.03147294 0.03144237 0.03137471]
 ...
 [0.02605941 0.02682786 0.02766507 ... 0.03361923 0.03373959 0.03380296]
 [0.02614494 0.02694612 0.02782128 ... 0.03409136 0.03423207 0.03431313]
 [0.0262723  0.02710657 0.02802011 ... 0.03461175 0.03477327 0.03487241]]
[[0.1737348  0.17537591 0.09112956 ... 0.05635054 0.0574929  0.05878032]
 [0.17336535 0.17530673 0.09137663 ... 0.05613508 0.05716317 0.05834765]
 [0.17311444 0.17535528 0.09174657 ... 0.05599242 0.05690768 0.05799098]
 ...
 [0.17541278 0.18001931 0.09930538 ... 0.05748296 0.05752012 0.05783321]
 [0.1762443  0.18114269 0.1008586  ... 0.05800603 0.05793287 0.05815133]
 [0.17719821 0.18238748 0.10255666 ... 0.05860702 0.0584226  0.05854607]]
[[0.06023872 0.06187136 0.06366666 ... 0.02867984 0.0289052  0.02912083]
 [0.05971627 0.06127302 0.06300641 ... 0.028448   0.0286954  0.0289332 ]
 [0.05927168 0.06075425 0.06242715 ... 0.02825815 0.02852731 0.02878704]
 ...
 [0.05845678 0.05939264 0.06062368 ... 0.02822968 0.02867012 0.02910382]
 [0.05869578 0.05956697 0.06074649 ... 0.0284139  0.02887627 0.02933238]
 [0.05901144 0.05981824 0.06094667 ... 0.02864111 0.02912572 0.02960455]]
Coverage in 1.00 seconds

from pylayers.antprop.coverage import *
import matplotlib.pyplot as plt
import time
import pdb
C = Coverage()
C.L._filename
C.tx = np.array((39,1))
start = time.time()
C.dap[0]['on']=False
C.dap[1]['on']=False
C.dap[2]['on']=False
C.dap[3]['on']=True
C.dap[4]['on']=False
C.cover()
finish = time.time()
C.show(figsize=(16,9),typ='pr',vmin=-120,vmax=-40)
C.show(figsize=(16,9),typ='egd')
#print 'Tx position: ',C.tx
print('Coverage in %1.2f seconds' % (finish-start))
plt.show()

Total running time of the script: ( 0 minutes 3.769 seconds)

Gallery generated by Sphinx-Gallery