rf-exposure-calculator
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "rf-exposure-calculator", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "RF Exposure Calculator for HAM Radio", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
RF Exposure Calculator | ||
---------------------- | ||
```js | ||
import { RFExposureCalculator } from 'rf-exposure-calculator'; | ||
const calculator = new RFExposureCalculator(); | ||
const results = calculator.calculateRFExposure( | ||
10, // Power in Watts | ||
1, // [0-1]: Mode Duty Cycle | ||
{ // TX Duty Cycle | ||
tx: 2, // Time spent transmitting | ||
rx: 3 // Time spent listening | ||
}, | ||
1.3, // Antenna gain in dBi | ||
7.200, // Operating frequency | ||
true, // `true` for a controlled environment, `false` for uncontrolled | ||
true // Whether or not to include the effects of ground reflection | ||
); | ||
``` | ||
```json | ||
{ | ||
"max_allowed_power_density": 17.3611, | ||
"min_safe_distance_in_feet": 0.2919 | ||
} | ||
``` |
@@ -14,3 +14,2 @@ export class RFExposureCalculator { | ||
const Gf = includeGroundReflectionEffects ? 0.64 : 0.25; | ||
const Pwr = 1000.0 * powerInWatts * modeDutyCycle * this.timeAveragePercent(txDutyCycle.tx, txDutyCycle.rx, controlledEnvironment ? 6 : 30); | ||
@@ -83,3 +82,3 @@ const Eirp = Pwr * Math.pow(10, antennaGainInDbi / 10); // EIRP in milliwatts, adjusting for antenna gain | ||
if (txMinutes >= interval) { | ||
// Edge Case: `txMinutes` is longer than the `interval`. AKA: Transmitting 100% of the time. | ||
// `txMinutes` is longer than the `interval`. Transmitting 100% of the time. | ||
return 1.0; | ||
@@ -89,3 +88,3 @@ } | ||
if (cycle >= interval) { | ||
// One full cycle is longer than the interval. AKA: What percent of the interval is spent transmitting? | ||
// One full cycle is longer than the interval. | ||
return (txMinutes / interval); | ||
@@ -92,0 +91,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4343
29