Adding Water Vapour Attenuation to NPM Library `AttenuationByAtmosphericGases`

in utopian-io •  7 years ago  (edited)

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 computing the attenuation for water vapour.

As referenced in Page 15 of ITU-R P.676-9, 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:

image.png

The latest commits:

Example

var GetWaterAttenuation = require('attenuationbyatmosphericgases').GetWaterAttenuation;
let frequency = 10;
let temperature = 15;
let pressure = 1013; // hpa
let density = 7.5; // g/m3
console.log(GetWaterAttenuation(frequency, temperature, pressure, density));

Frequency ranges

This library supports from 0 to 350 GHz.

Technology Stack

The library is built on Javascript and made public on NPM: https://www.npmjs.com/package/attenuationbyatmosphericgases

Github

https://github.com/DoctorLai/AttenuationByAtmosphericGases
Contributions are welcome.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Unit Tests

Unit tests are built on mocha and chai the Javascript unit testing framework, and you can run tests via npm test

describe('water', function() {
  it('water', function() {
    GetWaterAttenuation(10, 15, 1013, 7.5).should.be.closeTo(0.28112047608612034, 1e-3);
  }); 
});



Posted on Utopian.io - Rewarding Open Source Contributors

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

好复杂呀,看不懂这个公式什么意思!

  ·  7 years ago 

简单来说 就是计算高频下 水蒸气对于无线电波的损耗影响, 单位是 dB 每 km.

Thank you for the contribution. It has been approved.

The content of this post seems a bit dense for those of us who are not in tune with the radio waves. It would clear the air a lot if you could explain to us, what is the typical use of this library from others in the cloud? Is this perhaps a fresh water approach to and old airy problem?

You can contact us on Discord.
[utopian-moderator]

  ·  7 years ago (edited)

Thank you. As far as I know, this is the currently the ONLY js library that provides calculations for the wireless field. Sure, you are right, I will definitely put more effort in explaining the concepts of wireless radiowave propagation in simple words.

艺术生出身的人表示这篇完全看不懂,只觉得很高大上。

  ·  7 years ago 

胡总看得懂,因为他就是学这个的。😏

他再做我老师,两个人就要决裂了。作为老师和学生,八字不合。哈哈哈。

Hey @justyy, so this allows you to calculate how much water is in the atmosphere by measuring the reduction in radiowave speed? Interesting stuff.

BTW just wanted to let you know that I nominated you take part in the Seven Day Black and White photo Challenge in my last post.

Hey @justyy I am @utopian-io. I have just upvoted you!

Achievements

  • WOW WOW WOW People loved what you did here. GREAT JOB!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x