{"id":24,"date":"2018-01-20T01:59:28","date_gmt":"2018-01-20T01:59:28","guid":{"rendered":"https:\/\/propagationtools.com\/wireless\/?p=24"},"modified":"2018-01-21T23:48:28","modified_gmt":"2018-01-21T23:48:28","slug":"npm-javascript-to-compute-attenuation-by-atmospheric-gases-itu-r-p-676-9","status":"publish","type":"post","link":"https:\/\/propagationtools.com\/wireless\/npm-javascript-to-compute-attenuation-by-atmospheric-gases-itu-r-p-676-9\/","title":{"rendered":"NPM Javascript to compute Attenuation By Atmospheric Gases ( ITU-R P.676-9)"},"content":{"rendered":"\n<div id=\"fb-root\"><\/div>\n<script>(function(d, s, id) {\n  var js, fjs = d.getElementsByTagName(s)[0];\n  if (d.getElementById(id)) return;\n  js = d.createElement(s); js.id = id;\n  js.src = \"\/\/connect.facebook.net\/en_GB\/sdk.js#xfbml=1&version=v2.6&appId=857807644244147\";\n  fjs.parentNode.insertBefore(js, fjs);\n}(document, 'script', 'facebook-jssdk'));<\/script>\n\n<div class=\"fb-like\" data-href=\"https:\/\/propagationtools.com\/wireless\/wp-json\/wp\/v2\/posts\/24\" data-layout=\"button_count\" data-action=\"like\" data-show-faces=\"false\" data-share=\"false\"><\/div><BR\/><div class='wp_content'><p><a rel=\"nofollow\" target=\"blank\" href=\"https:\/\/www.itu.int\/dms_pubrec\/itu-r\/rec\/p\/R-REC-P.676-9-201202-S!!PDF-E.pdf\">ITU-R P.676-9<\/a> is proposed by International Telecommunication Union that recommends the Attenuation by atmospheric gases which are influenced by frequency, temperature and atmospheric pressure (unit of hpa).<\/p>\n<p>In case of temperature is not known, the mean temperature can be used, where this can be found in document <a rel=\"nofollow\" target=\"blank\" href=\"https:\/\/www.itu.int\/dms_pubrec\/itu-r\/rec\/p\/R-REC-P.1510-1-201706-I!!PDF-E.pdf\">ITU-R P.1510<\/a>.<\/p>\n<p>In <a  href=\"https:\/\/propagationtools.com\/wireless\/building-significant-factors-affect-5g-propagation-modelling\/\">here<\/a>, we know that the high frequency radiowave is highly impacted by oxygen absorption and water vapour. From the below represented figure , it is estimated that at 60 GHz, the dB\/km attenuation is around 15.<\/p>\n<div id=\"attachment_8\" style=\"width: 441px\" class=\"wp-caption alignnone\"><a  href=\"https:\/\/propagationtools.com\/wireless\/wp-content\/uploads\/2017\/05\/mmwave-propagation-oxygen-absorption.jpg\"><img  title=\"mmwave-propagation-oxygen-absorption NPM Javascript to compute Attenuation By Atmospheric Gases ( ITU-R P.676-9) 5G Attenuation \" loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-8\" src=\"https:\/\/propagationtools.com\/wireless\/wp-content\/uploads\/2017\/05\/mmwave-propagation-oxygen-absorption.jpg\"  alt=\"mmwave-propagation-oxygen-absorption NPM Javascript to compute Attenuation By Atmospheric Gases ( ITU-R P.676-9) 5G Attenuation \"  width=\"431\" height=\"252\" class=\"size-full wp-image-8\" srcset=\"https:\/\/propagationtools.com\/wireless\/wp-content\/uploads\/2017\/05\/mmwave-propagation-oxygen-absorption.jpg 431w, https:\/\/propagationtools.com\/wireless\/wp-content\/uploads\/2017\/05\/mmwave-propagation-oxygen-absorption-300x175.jpg 300w\" sizes=\"auto, (max-width: 431px) 100vw, 431px\" \/><\/a><p id=\"caption-attachment-8\" class=\"wp-caption-text\">Atmospheric absorption of millimeter waves<\/p><\/div>\n<p>As you can see, the attenuation consists of several mathematically curves fitting from measurement, and this project is to provide a method to compute the dB\/km (Attenuation By Atmospheric Gases) given the frequency, temperature and atmospheric pressure.<\/p>\n<h3>Technology Stack<\/h3>\n<p>The library is built on Javascript and made public on NPM: <a rel=\"nofollow\" target=\"blank\" href=\"https:\/\/www.npmjs.com\/package\/attenuationbyatmosphericgases\">https:\/\/www.npmjs.com\/package\/attenuationbyatmosphericgases<\/a><\/p>\n<h3>Github<\/h3>\n<p><a rel=\"nofollow\" target=\"blank\" href=\"https:\/\/github.com\/DoctorLai\/AttenuationByAtmosphericGases\">https:\/\/github.com\/DoctorLai\/AttenuationByAtmosphericGases<\/a><br \/>\nContributions are welcome.<\/p>\n<ul>\n<li>Fork it!<\/li>\n<li>Create your feature branch: git checkout -b my-new-feature<\/li>\n<li>Commit your changes: git commit -am &#8216;Add some feature&#8217;<\/li>\n<li>Push to the branch: git push origin my-new-feature<\/li>\n<li>Submit a pull request<\/li>\n<\/ul>\n<h3>Unit Tests<\/h3>\n<p>Unit tests are built on <a rel=\"nofollow\" target=\"blank\" href=\"https:\/\/mochajs.org\/\">mocha and chai<\/a> the Javascript unit testing framework, and you can run tests via <em>npm test<\/em><\/p>\n<pre lang=js>\r\n\/*\r\n  Unit Tests for Attenuation By Atmospheric Gases\r\n  Built on: mocha and chai\r\n  Tests for frequency ranges from 0 to 350 Ghz\r\n*\/\r\n\r\nvar should = require('chai').should(),\r\n    module = require('..\/index'),\r\n    GetAirAttenuation = module.GetAirAttenuation;\r\n\r\ndescribe('54', function() {\r\n  it('30', function() {\r\n    GetAirAttenuation(30, 13, 1000).should.be.closeTo(0.0207, 1e-3);\r\n  }); \r\n});\r\n\r\ndescribe('60', function() {\r\n  it('60', function() {\r\n    GetAirAttenuation(60, 13, 1000).should.be.closeTo(15.097, 1e-3);\r\n  }); \r\n});\r\n\r\ndescribe('62', function() {\r\n  it('61', function() {\r\n    GetAirAttenuation(61, 13, 1000).should.be.closeTo(14.7173, 1e-3);\r\n  }); \r\n});\r\n\r\ndescribe('66', function() {\r\n  it('65', function() {\r\n    GetAirAttenuation(65, 13, 1000).should.be.closeTo(3.7769, 1e-3);\r\n  }); \r\n});\r\n\r\ndescribe('120', function() {\r\n  it('100', function() {\r\n    GetAirAttenuation(100, 13, 1000).should.be.closeTo(0.0252, 1e-3);\r\n  }); \r\n});\r\n\r\ndescribe('350', function() {\r\n  it('200', function() {\r\n    GetAirAttenuation(200, 13, 1000).should.be.closeTo(0.0101, 1e-3);\r\n  }); \r\n});\r\n<\/pre>\n<div id=\"attachment_25\" style=\"width: 667px\" class=\"wp-caption alignnone\"><a  href=\"https:\/\/propagationtools.com\/wireless\/wp-content\/uploads\/2018\/01\/npm-test.jpg\"><img  title=\"npm-test NPM Javascript to compute Attenuation By Atmospheric Gases ( ITU-R P.676-9) 5G Attenuation \" loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-25\" src=\"https:\/\/propagationtools.com\/wireless\/wp-content\/uploads\/2018\/01\/npm-test.jpg\"  alt=\"npm-test NPM Javascript to compute Attenuation By Atmospheric Gases ( ITU-R P.676-9) 5G Attenuation \"  width=\"657\" height=\"472\" class=\"size-full wp-image-25\" srcset=\"https:\/\/propagationtools.com\/wireless\/wp-content\/uploads\/2018\/01\/npm-test.jpg 657w, https:\/\/propagationtools.com\/wireless\/wp-content\/uploads\/2018\/01\/npm-test-300x216.jpg 300w, https:\/\/propagationtools.com\/wireless\/wp-content\/uploads\/2018\/01\/npm-test-100x72.jpg 100w, https:\/\/propagationtools.com\/wireless\/wp-content\/uploads\/2018\/01\/npm-test-200x144.jpg 200w, https:\/\/propagationtools.com\/wireless\/wp-content\/uploads\/2018\/01\/npm-test-400x287.jpg 400w, https:\/\/propagationtools.com\/wireless\/wp-content\/uploads\/2018\/01\/npm-test-500x359.jpg 500w, https:\/\/propagationtools.com\/wireless\/wp-content\/uploads\/2018\/01\/npm-test-600x431.jpg 600w\" sizes=\"auto, (max-width: 657px) 100vw, 657px\" \/><\/a><p id=\"caption-attachment-25\" class=\"wp-caption-text\">npm-test<\/p><\/div>\n<h3>Samples<\/h3>\n<pre lang=js>\r\nvar GetAirAttenuation = require('attenuationbyatmosphericgases').GetAirAttenuation;\r\nlet freq = 60; \/\/ 60 GHz\r\nlet temperature = 20; \/\/ 20 degree\r\nlet pressure = 1000; \/\/ hpa\r\nconsole.log(GetAirAttenuation(freq, temperature, pressure));\r\n<\/pre>\n<p>This gives 14.200501629257202 (dB loss per km).<\/p>\n<h3>Supported Frequency ranges<\/h3>\n<p>This library supports from 0 to 350 GHz.<\/p>\n<h3>Roadmap<\/h3>\n<p>Currently, this release (init version) only supports the air (oxygen) absorption. The next version will support <a  href=\"https:\/\/propagationtools.com\/wireless\/adding-water-vapour-attenuation-to-npm-library-attenuationbyatmosphericgases\/\">water vapour<\/a>.<\/p>\n\n<div class=\"fb-like\" data-href=\"https:\/\/propagationtools.com\/wireless\/wp-json\/wp\/v2\/posts\/24\" data-layout=\"button_count\" data-action=\"like\" data-show-faces=\"false\" data-share=\"false\"><\/div>  <font color=gray>600 words<\/font> \n\n<BR\/><\/div> <div>\n<script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\n<!-- propagation blog bot -->\n<ins class=\"adsbygoogle\"\n     style=\"display:block\"\n     data-ad-client=\"ca-pub-5311181282559050\"\n     data-ad-slot=\"8425782656\"\n     data-ad-format=\"auto\"><\/ins>\n<script>\n(adsbygoogle = window.adsbygoogle || []).push({});\n<\/script><\/div><div>\n\n<\/div><div class=\"addthis_toolbox addthis_default_style addthis_32x32_style\">\n<a class=\"addthis_button_facebook\"><\/a>\n<a class=\"addthis_button_twitter\"><\/a>\n<a class=\"addthis_button_linkedin\"><\/a>\n<a class=\"addthis_button_google_plusone_share\"><\/a>\n<a class=\"addthis_button_reddit\"><\/a>\n<a class=\"addthis_button_email\"><\/a>\n<\/div><BR\/>","protected":false},"excerpt":{"rendered":"<p>ITU-R P.676-9 is proposed by International Telecommunication Union that recommends the Attenuation by atmospheric gases which are influenced by frequency, temperature and atmospheric pressure (unit of hpa). In case of temperature is not known, the mean temperature can be used, where this can be found in document ITU-R P.1510. In here, we know that the<span class=\"continue-reading\"> <a href=\"https:\/\/propagationtools.com\/wireless\/npm-javascript-to-compute-attenuation-by-atmospheric-gases-itu-r-p-676-9\/\"><B>Continue Reading<\/B> &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":8,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,36],"tags":[40,37,41,38,39],"class_list":["post-24","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-5g","category-attenuation","tag-60ghz-oxygen-absorption","tag-attenuation-by-atmospheric-gases","tag-db-km","tag-itu-r-p-676-9","tag-npm-javascript"],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/propagationtools.com\/wireless\/wp-json\/wp\/v2\/posts\/24","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/propagationtools.com\/wireless\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/propagationtools.com\/wireless\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/propagationtools.com\/wireless\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/propagationtools.com\/wireless\/wp-json\/wp\/v2\/comments?post=24"}],"version-history":[{"count":0,"href":"https:\/\/propagationtools.com\/wireless\/wp-json\/wp\/v2\/posts\/24\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/propagationtools.com\/wireless\/wp-json\/wp\/v2\/media\/8"}],"wp:attachment":[{"href":"https:\/\/propagationtools.com\/wireless\/wp-json\/wp\/v2\/media?parent=24"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/propagationtools.com\/wireless\/wp-json\/wp\/v2\/categories?post=24"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/propagationtools.com\/wireless\/wp-json\/wp\/v2\/tags?post=24"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}