#!/usr/bin/env perl # Attenuation calculator for Times Microwave LMR series coax # A service of Green Bay Professional Packet Radio, www.dct.com/~multiplx print "\n\n\t\tAttenuation calculator for Times Microwave LMR series coax\n\n"; while (!m/^([0-9.]+)(k|K|m|M|g|G|h|H+)$/) { print "\nk = kilohertz\n". "m = megahertz\n". "g = gigahertz\n\n". "Enter the frequency [value][unit]: "; chomp($_ = ); } if (m/^([0-9.]+)(k|K|m|M|g|G|h|H+)$/) { $frq = $1; $unit = $2; } if ($unit =~ /k/i) { # kHz to MHz $frq = $frq / 1000; } elsif ($unit =~ /m/i) { # MHz to MHz $frq = $frq; } elsif ($unit =~ /g/i) { # GHz MHz $frq = $frq * 1000; } undef $_; while (!m/^([0-9.]+)(cm|CM|m|M|in|IN|ft|FT+)$/) { print "\ncm = centimeters\n". "m = meters\n". "in = inches\n". "ft = feet\n\n". "Enter the length [value][unit]: "; chomp($_ = ); } if (m/^([0-9.]+)(cm|CM|m|M|in|IN|ft|FT+)$/) { $len = $1; $unit = $2; } if ($unit =~ /cm/i) { # cm to ft $len = $len / 30.48; } elsif ($unit eq "m" or $unit eq "M") { # m to ft $len = $len / 0.3048; } elsif ($unit =~ /in/i) { # in to ft $len = $len / 12; } elsif ($unit =~ /ft/i) { # ft to ft $len = $len; } while (!$type) { print "100\n". "195\n". "200\n". "240\n". "300\n". "400\n". "500\n". "600\n". "900\n". "1200\n". "1700\n\n". "Enter cable type (LMR-???): "; chomp($type = ); $type =~ tr/0-9//csd; } if ($type eq 100) { # LMR-100 $imp = "50 ohms"; $min_bend = "0.25 in (6.4 mm)"; $weight = "0.015 lbs/ft (0.02 kG/m)"; $lbs = 0.015; $cutoff = "90 GHz"; $vel = "66%"; $peakpwr = "0.6 kW"; $cap = "30.8 pF/ft (101.1 pF/m)"; $ind = "0.077 uH/ft (0.25 uH/m)"; $att = (0.70914 * sqrt $frq) + (0.00174 * $frq); } elsif ($type eq 195) { # LMR-195 $imp = "50 ohms"; $min_bend = "0.5 in (12.7 mm)"; $weight = "0.021 lbs/ft (0.03 kG/m)"; $lbs = 0.021; $cutoff = "41 GHz"; $vel = "80%"; $peakpwr = "2.5 kW"; $cap = "24.3 pF/ft (79.70 pF/m)"; $ind = "0.064 uH/ft (0.21 uH/m)"; $att = (0.35686 * sqrt $frq) + (0.00047 * $frq); } elsif ($type eq 200) { # LMR-200 $imp = "50 ohms"; $min_bend = "0.5 in (12.7 mm)"; $weight = "0.022 lbs/ft (0.03 kG/m)"; $lbs = 0.022; $cutoff = "39 GHz"; $vel = "83%"; $peakpwr = "2.5 kW"; $cap = "24.5 pF/ft (80.4 pF/m)"; $ind = "0.061 uH/ft (0.20 uH/m)"; $att = (0.32090 * sqrt $frq) + (0.00033 * $frq) } elsif ($type eq 240) { # LMR-240 $imp = "50 ohms"; $min_bend = "0.75 in (19.1 mm)"; $weight = "0.034 lbs/ft (0.05 kG/m)"; $lbs = 0.034; $cutoff = "31 GHz"; $vel = "84%"; $peakpwr = "5.6 kW"; $cap = "24.2 pF/ft (79.4 pF/m)"; $ind = "0.060 uH/ft (0.20 uH/m)"; $att = (0.24208 * sqrt $frq) + (0.00033 * $frq) } elsif ($type eq 300) { # LMR-300 $imp = "50 ohms"; $min_bend = "0.88 in (22.2 mm)"; $weight = "0.055 lbs/ft (0.08 kG/m)"; $lbs = 0.055; $cutoff = "24.5 GHz"; $vel = "85%"; $peakpwr = "10 kW"; $cap = "24.1 pF/ft (79.1 pF/m)"; $ind = "0.060 uH/ft (0.20 uH/m)"; $att = (0.19193 * sqrt $frq) + (0.00033 * $frq) } elsif ($type eq 400) { # LMR-400 $imp = "50 ohms"; $min_bend = "1.0 in (24.5 mm)"; $weight = "0.068 lbs/ft (0.10 kG/m)"; $lbs = 0.068; $cutoff = "16.2 GHz"; $vel = "85%"; $peakpwr = "16 kW"; $cap = "23.9 pF/ft (78.4 pF/m)"; $ind = "0.060 uH/ft (0.20 uH/m)"; $att = (0.12229 * sqrt $frq) + (0.00026 * $frq); } elsif ($type eq 500) { # LMR-500 $imp = "50 ohms"; $min_bend = "1.3 in (31.8 mm)"; $weight = "0.097 lbs/ft (0.14 kG/m)"; $lbs = 0.097; $cutoff = "12.6 GHz"; $vel = "86%"; $peakpwr = "22 kW"; $cap = "23.6 pF/ft (77.4 pF/m)"; $ind = "0.059 uH/ft (0.19 uH/m)"; $att = (0.09659 * sqrt $frq) + (0.00026 * $frq); } elsif ($type eq 600) { # LMR-600 $imp = "50 ohms"; $min_bend = "1.5 in (38.1 mm)"; $weight = "0.131 lbs/ft (0.20 kG/m)"; $lbs = 0.131; $cutoff = "10.3 GHz"; $vel = "87%"; $peakpwr = "40 kW"; $cap = "23.4 pF/ft (76.8 pF/m)"; $ind = "0.058 uH/ft (0.16 uH/m)"; $att = (0.07555 * sqrt $frq) + (0.00026 * $frq); } elsif ($type eq 900) { # LMR-900 $imp = "50 ohms"; $min_bend = "3.0 in (76.2 mm)"; $weight = "0.266 lbs/ft (0.40 kG/m)"; $lbs = 0.266; $cutoff = "6.9 GHz"; $vel = "87%"; $peakpwr = "62 kW"; $cap = "23.4 pF/ft (76.8 pF/m)"; $ind = "0.058 uH/ft (0.19 uH/m)"; $att = (0.05177 * sqrt $frq) + (0.00016 * $frq); } elsif ($type eq 1200) { # LMR-1200 $imp = "50 ohms"; $min_bend = "6.5 in (165.1 mm)"; $weight = "0.448 lbs/ft (0.67 kG/m)"; $lbs = 0.448; $cutoff = "5.2 GHz"; $vel = "88%"; $peakpwr = "90 kW"; $cap = "23.1 pF/ft (75.8 pF/m)"; $ind = "0.056 uH/ft (0.18 uH/m)"; $att = (0.03737 * sqrt $frq) + (0.00016 * $frq); } elsif ($type eq 1700) { # LMR-1700 $imp = "50 ohms"; $min_bend = "13.5 in (342.9 mm)"; $weight = "0.736 lbs/ft (1.10 kG/m)"; $lbs = 0.736; $cutoff = "3.6 GHz"; $vel = "89%"; $peakpwr = "202 kW"; $cap = "22.8 pF/ft (74.8 pF/m)"; $ind = "0.057 uH/ft (0.19 uH/m)"; $att = (0.02646 * sqrt $frq) + (0.00016 * $frq); } else { # LMR-400 print "\n$type not valid, using default cable (LMR-400)\n"; $type = 400; $imp = "50 ohms"; $min_bend = "1.0 in (24.5 mm)"; $weight = "0.068 lbs/ft (0.10 kG/m)"; $lbs = 0.068; $cutoff = "16.2 GHz"; $vel = "85%"; $peakpwr = "16 kW"; $cap = "23.9 pF/ft (78.4 pF/m)"; $ind = "0.060 uH/ft (0.20 uH/m)"; $att = (0.12229 * sqrt $frq) + (0.00026 * $frq); } $att_ft = $att / 100; print "\n\nLMR-$type Specifications:\n\n". " Minimum bend radius : $min_bend\n". " Impendance : $imp\n". " Weight : $weight\n". " Cutoff frequency : $cutoff\n". " Velocity factor : $vel\n". " Peak power : $peakpwr\n". " Capacitance : $cap\n". " Inductance : $ind\n"; printf " Total cable weight : %.3f pounds (%.3f kG)\n\n", $len * $lbs, ($len * $lbs) * 0.45359237; print " Frequency : $frq MHz\n"; printf " Attenuation : %.3f dB / foot (%.3f dB / meter)\n", $att_ft, $att_ft * 0.3048; printf " Total attenuation : %.4f dB over %.3f feet (%.3f meters)\n\n", $len * $att_ft, $len, $len * 0.3048;