<!-- Author: Eric Wagner -->
<!-- Company: WiFiNerd -->
<!-- Copyright©: Copyright © 2004 Eric Wagner All rights reserved. -->

function mWtodBm(n) {
return Math.round((Math.log(n) / Math.LN10) * 10)
}

function dBmtomW(n) {
return Math.round(Math.pow(10,n/10))
}

function dBmtoW(n) {
return Math.round(Math.pow(10,(n-30)/10) * 1000) / 1000
}

function EIRPWcalc(power,gain,loss) {
return Math.round((power/1000) * Math.pow(10,(gain-loss)/10) * 1000) / 1000
}

function EIRPmWcalc(power,gain,loss) {
return Math.round((power/1000) * Math.pow(10,(gain-loss)/10) * 1000)
}
