1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "links": [
12 "LoRa SF12 at 868 MHz, 14 dBm, 2 dBi antennas, 15 km, rural, gateway height 30 m, node height 2 m",
13 "5.8 GHz point-to-point, 10 km, 23 dBm, 30 dBi dishes both ends, 1 dB cable loss each end, sensitivity -80 dBm, tower height 25 m, 99.99% availability at 40.4, -3.7",
14 "12 GHz GEO downlink, EIRP 52 dBW, 0.6 m dish, elevation 30°, at 51.5, -0.1, 99.9%, 27 MHz bandwidth, noise figure 1 dB, Eb/N0 6 dB at 40 Mbps",
15 "900 MHz, 30 W, base station 50 m, mobile 1.5 m, 8 km, urban, 15 dBi tx antenna, 0 dBi rx antenna, sensitivity -104 dBm",
16 {
17 "title": "Office Wi-Fi",
18 "frequency": "2.4 GHz",
19 "distance": "30 m",
20 "txPower": "20 dBm",
21 "antennaGain": 3,
22 "model": "log-distance",
23 "pathLossExponent": 3,
24 "otherLosses": "6 dB",
25 "sensitivity": "-82 dBm"
26 }
27 ]
28};
29
30
31const run = await client.actor("jumblemog/rf-link-budget-calculator").call(input);
32
33
34console.log('Results from dataset');
35console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
36const { items } = await client.dataset(run.defaultDatasetId).listItems();
37items.forEach((item) => {
38 console.dir(item);
39});
40
41