Skip to content

Instantly share code, notes, and snippets.

@vankxr
Created December 31, 2020 19:33
Show Gist options
  • Save vankxr/9815fbe22921ead2582fc496ee93d972 to your computer and use it in GitHub Desktop.
Save vankxr/9815fbe22921ead2582fc496ee93d972 to your computer and use it in GitHub Desktop.
QO-100 Wideband TPX link budget calculator
const c = 299792458; // Speed of light
const f = 2400e6; // Hz
const lambda = c / f;
////////
const ref_dish_diameter = 1.2; // meters
const ref_dish_efficiency = 0.5;
const ref_dish_gain_db = 10 * Math.log10(ref_dish_efficiency * Math.pow((Math.PI * ref_dish_diameter) / lambda, 2));
const ref_symbol_rate = 250e3; // symbols per second
const ref_rx_ss = 8 - 8; // dBb (dB w.r.t the beacon) as seen by the tpx (0 dBb = 8 dB MER)
const ref_pwr_w = 30; // watts
const ref_pwr_dbm = 10 * Math.log10(ref_pwr_w * 1000);
////////
const dish_diameter = 1.2; // meters
const dish_efficiency = 0.5;
const dish_gain_db = 10 * Math.log10(dish_efficiency * Math.pow((Math.PI * dish_diameter) / lambda, 2));
const symbol_rate = 250e3; // symbols per second
const rx_ss = 15 - 8; // dBb (dB w.r.t the beacon) as seen by the tpx (0 dBb = 8 dB MER)
////////
const dish_gain_delta = dish_gain_db - ref_dish_gain_db;
const symbol_rate_delta = 10 * Math.log10(symbol_rate / ref_symbol_rate);
const rx_ss_delta = rx_ss - ref_rx_ss;
const pwr_dbm = ref_pwr_dbm - dish_gain_delta + symbol_rate_delta + rx_ss_delta;
const pwr_w = Math.pow(10, pwr_dbm / 10) / 1000;
console.log("Reference TX power needed: " + ref_pwr_dbm.toFixed(5) + " dBm (" + ref_pwr_w.toFixed(5) + " W)");
console.log("Reference dish diameter: " + ref_dish_diameter + " m");
console.log("Reference dish efficiency: " + (ref_dish_efficiency * 100) + " %");
console.log("Reference dish gain: " + ref_dish_gain_db.toFixed(5) + " dB");
console.log("Reference symbol rate: " + ref_symbol_rate + " sps");
console.log("Reference RX signal strength: " + ref_rx_ss + " dB");
console.log("--------------------------------");
console.log("Target dish diameter: " + dish_diameter + " m");
console.log("Target dish efficiency: " + (dish_efficiency * 100) + " %");
console.log("Target dish gain: " + dish_gain_db.toFixed(5) + " dB");
console.log("Target symbol rate: " + symbol_rate + " sps");
console.log("Target RX signal strength: " + rx_ss + " dB");
console.log("--------------------------------");
console.log("Dish gain delta: " + dish_gain_delta.toFixed(5) + " dB");
console.log("Symbol rate delta: " + symbol_rate_delta.toFixed(5) + " dB");
console.log("RX signal strength delta: " + rx_ss_delta.toFixed(5) + " dB");
console.log("--------------------------------");
console.log("TX power needed: " + pwr_dbm.toFixed(5) + " dBm (" + pwr_w.toFixed(5) + " W)");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment