{"id":26,"date":"2018-01-21T23:48:13","date_gmt":"2018-01-21T23:48:13","guid":{"rendered":"https:\/\/propagationtools.com\/wireless\/?p=26"},"modified":"2018-01-21T23:48:13","modified_gmt":"2018-01-21T23:48:13","slug":"adding-water-vapour-attenuation-to-npm-library-attenuationbyatmosphericgases","status":"publish","type":"post","link":"https:\/\/propagationtools.com\/wireless\/adding-water-vapour-attenuation-to-npm-library-attenuationbyatmosphericgases\/","title":{"rendered":"Adding Water Vapour Attenuation to NPM Library `AttenuationByAtmosphericGases`"},"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\/26\" data-layout=\"button_count\" data-action=\"like\" data-show-faces=\"false\" data-share=\"false\"><\/div><BR\/><div class='wp_content'><p>Previously, in <a  href=\"https:\/\/propagationtools.com\/wireless\/npm-javascript-to-compute-attenuation-by-atmospheric-gases-itu-r-p-676-9\/\">NPM Javascript<\/a> to compute Attenuation By Atmospheric Gases ( ITU-R P.676-9), the Javascript Library is published on NPM that computes the attenuation (unit of dB loss per km) given the frequency, temperature and the atmospheric pressure (unit of hPa).<\/p>\n<p>with the latest commits to the package <a rel=\"nofollow\" target=\"blank\" href=\"https:\/\/www.npmjs.com\/package\/attenuationbyatmosphericgases\">AttenuationByAtmosphericGases<\/a> version 2.0.0, the library allows also computing the attenuation for water vapour.<\/p>\n<p>As referenced in Page 15 of <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>, the water vapour attenuation regarding to frequency of the radiowave, temperature, atmospheric pressure (unit of hPa) and the water-vapour density (unit of g\/m3) is given in the following formula:<\/p>\n<div id=\"attachment_27\" style=\"width: 619px\" class=\"wp-caption alignnone\"><a  href=\"https:\/\/propagationtools.com\/wireless\/wp-content\/uploads\/2018\/01\/compute-water-vapour-attenuation-formula.jpg\"><img  title=\"compute-water-vapour-attenuation-formula Adding Water Vapour Attenuation to NPM Library `AttenuationByAtmosphericGases` 5G Attenuation \" loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-27\" src=\"https:\/\/propagationtools.com\/wireless\/wp-content\/uploads\/2018\/01\/compute-water-vapour-attenuation-formula.jpg\"  alt=\"compute-water-vapour-attenuation-formula Adding Water Vapour Attenuation to NPM Library `AttenuationByAtmosphericGases` 5G Attenuation \"  width=\"609\" height=\"475\" class=\"size-full wp-image-27\" srcset=\"https:\/\/propagationtools.com\/wireless\/wp-content\/uploads\/2018\/01\/compute-water-vapour-attenuation-formula.jpg 609w, https:\/\/propagationtools.com\/wireless\/wp-content\/uploads\/2018\/01\/compute-water-vapour-attenuation-formula-300x234.jpg 300w, https:\/\/propagationtools.com\/wireless\/wp-content\/uploads\/2018\/01\/compute-water-vapour-attenuation-formula-100x78.jpg 100w, https:\/\/propagationtools.com\/wireless\/wp-content\/uploads\/2018\/01\/compute-water-vapour-attenuation-formula-200x156.jpg 200w, https:\/\/propagationtools.com\/wireless\/wp-content\/uploads\/2018\/01\/compute-water-vapour-attenuation-formula-400x312.jpg 400w, https:\/\/propagationtools.com\/wireless\/wp-content\/uploads\/2018\/01\/compute-water-vapour-attenuation-formula-500x390.jpg 500w, https:\/\/propagationtools.com\/wireless\/wp-content\/uploads\/2018\/01\/compute-water-vapour-attenuation-formula-600x468.jpg 600w\" sizes=\"auto, (max-width: 609px) 100vw, 609px\" \/><\/a><p id=\"caption-attachment-27\" class=\"wp-caption-text\">compute-water-vapour-attenuation-formula<\/p><\/div>\n<p>Example:<\/p>\n<pre lang=js>\r\nvar GetWaterAttenuation = require('attenuationbyatmosphericgases').GetWaterAttenuation;\r\nlet frequency = 10;\r\nlet temperature = 15;\r\nlet pressure = 1013; \/\/ hpa\r\nlet density = 7.5; \/\/ g\/m3\r\nconsole.log(GetWaterAttenuation(frequency, temperature, pressure, density));\r\n<\/pre>\n<p>Frequency ranges: This library supports from 0 to 350 GHz.<\/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>Contributions are welcome: <a rel=\"nofollow\" target=\"blank\" href=\"https:\/\/github.com\/DoctorLai\/AttenuationByAtmosphericGases\">https:\/\/github.com\/DoctorLai\/AttenuationByAtmosphericGases<\/a><\/p>\n<ol>\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<\/ol>\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\ndescribe('water', function() {\r\n  it('water', function() {\r\n    GetWaterAttenuation(10, 15, 1013, 7.5).should.be.closeTo(0.28112047608612034, 1e-3);\r\n  }); \r\n});\r\n<\/pre>\n\n<div class=\"fb-like\" data-href=\"https:\/\/propagationtools.com\/wireless\/wp-json\/wp\/v2\/posts\/26\" data-layout=\"button_count\" data-action=\"like\" data-show-faces=\"false\" data-share=\"false\"><\/div>  <font color=gray>382 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>Previously, in NPM Javascript to compute Attenuation By Atmospheric Gases ( ITU-R P.676-9), the Javascript Library is published on NPM that computes the attenuation (unit of dB loss per km) given the frequency, temperature and the atmospheric pressure (unit of hPa). with the latest commits to the package AttenuationByAtmosphericGases version 2.0.0, the library allows also<span class=\"continue-reading\"> <a href=\"https:\/\/propagationtools.com\/wireless\/adding-water-vapour-attenuation-to-npm-library-attenuationbyatmosphericgases\/\"><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":[37,44,43,42],"class_list":["post-26","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-5g","category-attenuation","tag-attenuation-by-atmospheric-gases","tag-db-per-km","tag-ultra-high-frequency","tag-water-vapour-attenuation"],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/propagationtools.com\/wireless\/wp-json\/wp\/v2\/posts\/26","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=26"}],"version-history":[{"count":0,"href":"https:\/\/propagationtools.com\/wireless\/wp-json\/wp\/v2\/posts\/26\/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=26"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/propagationtools.com\/wireless\/wp-json\/wp\/v2\/categories?post=26"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/propagationtools.com\/wireless\/wp-json\/wp\/v2\/tags?post=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}