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 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.
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.
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.
- Fork it!
- Create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -am ‘Add some feature’
- Push to the branch: git push origin my-new-feature
- Submit a pull request
Unit Tests
Unit tests are built on mocha and chai the Javascript unit testing framework, and you can run tests via npm test
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | /* Unit Tests for Attenuation By Atmospheric Gases Built on: mocha and chai Tests for frequency ranges from 0 to 350 Ghz */ var should = require('chai').should(), module = require('../index'), GetAirAttenuation = module.GetAirAttenuation; describe('54', function() { it('30', function() { GetAirAttenuation(30, 13, 1000).should.be.closeTo(0.0207, 1e-3); }); }); describe('60', function() { it('60', function() { GetAirAttenuation(60, 13, 1000).should.be.closeTo(15.097, 1e-3); }); }); describe('62', function() { it('61', function() { GetAirAttenuation(61, 13, 1000).should.be.closeTo(14.7173, 1e-3); }); }); describe('66', function() { it('65', function() { GetAirAttenuation(65, 13, 1000).should.be.closeTo(3.7769, 1e-3); }); }); describe('120', function() { it('100', function() { GetAirAttenuation(100, 13, 1000).should.be.closeTo(0.0252, 1e-3); }); }); describe('350', function() { it('200', function() { GetAirAttenuation(200, 13, 1000).should.be.closeTo(0.0101, 1e-3); }); }); |
/* Unit Tests for Attenuation By Atmospheric Gases Built on: mocha and chai Tests for frequency ranges from 0 to 350 Ghz */ var should = require('chai').should(), module = require('../index'), GetAirAttenuation = module.GetAirAttenuation; describe('54', function() { it('30', function() { GetAirAttenuation(30, 13, 1000).should.be.closeTo(0.0207, 1e-3); }); }); describe('60', function() { it('60', function() { GetAirAttenuation(60, 13, 1000).should.be.closeTo(15.097, 1e-3); }); }); describe('62', function() { it('61', function() { GetAirAttenuation(61, 13, 1000).should.be.closeTo(14.7173, 1e-3); }); }); describe('66', function() { it('65', function() { GetAirAttenuation(65, 13, 1000).should.be.closeTo(3.7769, 1e-3); }); }); describe('120', function() { it('100', function() { GetAirAttenuation(100, 13, 1000).should.be.closeTo(0.0252, 1e-3); }); }); describe('350', function() { it('200', function() { GetAirAttenuation(200, 13, 1000).should.be.closeTo(0.0101, 1e-3); }); });
Samples
1 2 3 4 5 | var GetAirAttenuation = require('attenuationbyatmosphericgases').GetAirAttenuation; let freq = 60; // 60 GHz let temperature = 20; // 20 degree let pressure = 1000; // hpa console.log(GetAirAttenuation(freq, temperature, pressure)); |
var GetAirAttenuation = require('attenuationbyatmosphericgases').GetAirAttenuation; let freq = 60; // 60 GHz let temperature = 20; // 20 degree let pressure = 1000; // hpa console.log(GetAirAttenuation(freq, temperature, pressure));
This gives 14.200501629257202 (dB loss per km).
Supported Frequency ranges
This library supports from 0 to 350 GHz.
Roadmap
Currently, this release (init version) only supports the air (oxygen) absorption. The next version will support water vapour.
600 words Last Post: Interview Questions for Wireless Software EngineerNext Post: Adding Water Vapour Attenuation to NPM Library `AttenuationByAtmosphericGases`