aprs-parser
Version:
JavaScript library for parsing APRS packets
21 lines (14 loc) • 398 B
JavaScript
;
const base = require('./PHG_DFS_base.js');
function PHG() {
base.call(this);
this.powerWatts = 0;
}
PHG.prototype = Object.create(base.prototype);
PHG.prototype.constructor = PHG;
PHG.prototype.setPowerCode = function(code) {
if(code >= 10 || code < 0)
throw new Error('Illegal power code');
this.powerWatts = Math.pow(code, 2);
};
module.exports = PHG;