commit 90fe25cfb7ea07f52768f69bb9f85d055fad8112 Author: Lucas Schumacher Date: Tue Jul 16 00:07:45 2024 -0400 first commit diff --git a/hfdl.py b/hfdl.py new file mode 100644 index 0000000..683c20f --- /dev/null +++ b/hfdl.py @@ -0,0 +1,35 @@ +class Station: + def __init__(self, id = 0, name = "", lat = 0, lon = 0, frequencies = []): + self.id = id + self.name = name + self.lat = lat + self.lon = lon + self.frequencies = frequencies + +#https://github.com/szpajder/dumphfdl/blob/master/etc/systable.conf +version = 51 +stations = [ + Station( id = 1, name = "San Francisco, California", lat = 38.384587, lon = -121.759647, frequencies = [ 21934.0, 17919.0, 13276.0, 11327.0, 10081.0, 8927.0, 6559.0, 5508.0 ]), + Station( id = 2, name = "Molokai, Hawaii", lat = 21.184428, lon = -157.186846, frequencies = [ 21937.0, 17919.0, 13324.0, 13312.0, 13276.0, 11348.0, 11312.0, 10027.0, 8936.0, 8912.0, 6565.0, 5514.0 ]), + Station( id = 3, name = "Reykjavik, Iceland", lat = 63.847168, lon = -22.455754, frequencies = [ 17985.0, 15025.0, 11184.0, 8977.0, 6712.0, 5720.0, 3900.0 ]), + Station( id = 4, name = "Riverhead, New York", lat = 40.881922, lon = -72.63762, frequencies = [ 21931.0, 17919.0, 13276.0, 11387.0, 8912.0, 6661.0, 5652.0 ]), + Station( id = 5, name = "Auckland, New Zealand", lat = -37.015757, lon = 174.809637, frequencies = [ 17916.0, 13351.0, 10084.0, 8921.0, 6535.0, 5583.0 ]), + Station( id = 6, name = "Hat Yai, Thailand", lat = 6.937536, lon = 100.388451, frequencies = [ 21949.0, 17928.0, 13270.0, 10066.0, 8825.0, 6535.0, 5655.0 ]), + Station( id = 7, name = "Shannon, Ireland", lat = 52.744089, lon = -8.926752, frequencies = [ 11384.0, 10081.0, 8942.0, 8843.0, 6532.0, 5547.0, 3455.0, 2998.0 ]), + Station( id = 8, name = "Johannesburg, South Africa", lat = -26.129658, lon = 28.206078, frequencies = [ 21949.0, 17922.0, 13321.0, 11321.0, 8834.0, 5529.0, 4681.0, 3016.0 ]), + Station( id = 9, name = "Barrow, Alaska", lat = 71.25849, lon = -156.577447, frequencies = [ 21937.0, 21928.0, 17934.0, 17919.0, 11354.0, 10093.0, 10027.0, 8936.0, 8927.0, 6646.0, 5544.0, 5538.0, 5529.0, 4687.0, 4654.0, 3497.0, 3007.0, 2992.0, 2944.0 ]), + Station( id = 10, name = "Muan, South Korea", lat = 35.032377, lon = 126.238644, frequencies = [ 21931.0, 17958.0, 13342.0, 10060.0, 8939.0, 6619.0, 5502.0, 2941.0 ]), + Station( id = 11, name = "Albrook, Panama", lat = 9.084681, lon = -79.373969, frequencies = [ 17901.0, 13264.0, 10063.0, 8894.0, 6589.0, 5589.0 ]), + Station( id = 13, name = "Santa Cruz, Bolivia", lat = -17.671199, lon = -63.157088, frequencies = [ 21997.0, 17916.0, 13315.0, 11318.0, 8957.0, 6628.0, 4660.0 ]), + Station( id = 14, name = "Krasnoyarsk, Russia", lat = 56.152603, lon = 92.583337, frequencies = [ 21990.0, 17912.0, 13321.0, 10087.0, 8886.0, 6596.0, 5622.0 ]), + Station( id = 15, name = "Al Muharraq, Bahrain", lat = 26.273854, lon = 50.639859, frequencies = [ 21982.0, 17967.0, 13354.0, 10075.0, 8885.0, 5544.0 ]), + Station( id = 16, name = "Agana, Guam", lat = 13.488833, lon = 144.828233, frequencies = [ 21928.0, 17919.0, 13312.0, 11306.0, 8927.0, 6652.0, 5451.0 ]), + Station( id = 17, name = "Canarias, Spain", lat = 27.960945, lon = -15.405608, frequencies = [ 21955.0, 17928.0, 13303.0, 11348.0, 8948.0, 6529.0 ]) +] + +for station in stations: + name = "HFDL " + station.name.split(', ')[-1] + modulation = "USB" + bandwidth = 2700 + for freq in station.frequencies: + print(int(freq * 1000), ';', name, ';', modulation, ';', bandwidth, '; Untagged') diff --git a/rfax.py b/rfax.py new file mode 100644 index 0000000..e2dedcc --- /dev/null +++ b/rfax.py @@ -0,0 +1,45 @@ +tag = "RadioFax" + +class Rfax: + def __init__(self, khz_arr, callsign, khz_offset = -1.9): + self.freqs = khz_arr + self.name = callsign + self.offset = khz_offset + +rfaxStations = [ + Rfax([3622.5], "JMH"), + Rfax([7795], "JMH2"), + Rfax([13988.5], "JMH4"), + Rfax([3585,5857.5,7433.5,9165,13570], "HLL2"), + Rfax([4316,8467.5,12745.5,16971,17069.6,22542], "JJC"), + Rfax([16035,17430], "9VF/252"), + Rfax([4199.75,8412.5,12629.25,16826.25], "XSQ"), + Rfax([4228.0,8677.0,17146.4], "CBV"), + Rfax([4322.0,8696.0], "CBM"), + Rfax([3253.0,7710.0], "VFF"), + Rfax([7710.0,3253.0], "VFR"), + Rfax([4416,6915.1], "VCO"), + Rfax([4292.0,8456.0], "VFA"), + Rfax([2054,4298,8459,12412.5], "NOJ"), + Rfax([4346,8682,12786,17151.2,22527], "NMC"), + Rfax([4317.9,8503.9,12789.9,17146.4], "NMG"), + Rfax([4235,6340.5,9110,12750], "NMF"), + Rfax([2628, 5100,11030,13920,20469], "VMC"), + Rfax([5755,7535,10555,15615,18060], "VMW"), + Rfax([3247.4,5807,9459,13550.5,16340.1], "ZKLF"), + Rfax([9982.5,11090,16135], "KVM70"), + Rfax([4481, 8105], "SVJ4", khz_offset=0), + Rfax([5336,6445.5,7908.8], "RBW41"), + Rfax([10130], "RBW48"), + Rfax([3855], "DDH3"), + Rfax([7880], "DDK3"), + Rfax([13882.5], "DDK6"), + Rfax([2618.5,4610.0,8040.0,11086.5], "GYA"), +] + +modulation = "USB" +bandwidth = 2700 +for station in rfaxStations: + for freq in station.freqs: + freq = int((freq + station.offset) * 1000) + print(freq , ';', station.name, ';', modulation, ';', bandwidth, ';', tag) diff --git a/rptr.py b/rptr.py new file mode 100644 index 0000000..20c3a4d --- /dev/null +++ b/rptr.py @@ -0,0 +1,31 @@ +#output_tags = False +#tag = "Untagged" +output_tags = True +tag = "RepeaterBook" + +d = [] +f = open('repeaters.csv') +for line in f.readlines(): + a = line.split('\t') + d.append([a[0], a[3]]) + +lines = len(d) +print("# Total entries:", lines) + +last = d[0] +i = 1 +while i < len(d): + if last[0] == d[i][0]: + d[i][1] += last[1] + d.remove(last) + last = d[i-1] + else: + last = d[i] + i += 1 + +print("# Overlapping entries:", lines - len(d)) +if output_tags: + print(tag, "; #c0c0c0\n") +for freq, name in d: + freq = int(float(freq) * 1000000) + print(freq, ';', name, ";\tNarrow FM ;\t10000 ;\t", tag) diff --git a/rptr_inputs.py b/rptr_inputs.py new file mode 100644 index 0000000..44e84c7 --- /dev/null +++ b/rptr_inputs.py @@ -0,0 +1,58 @@ +delimiter = '\t' +#output_tags = False +#tag = "Untagged" +output_tags = True +output_outputs = True +output_inputs = True +tag = "RepeaterBook" +inputs_tag = "RepeaterBook Inputs" + +d = [] +inputs = [] +f = open('repeaters.csv') +for line in f.readlines(): + a = line.split(delimiter) + output = int(float(a[0]) * 1000000) + # Just assume MHZ. RepeaterBook proximity search 2.0 uses MHZ for all entries + #value, unit = a[1].strip().split() + offset = int(float(a[1].strip().split()[0]) * 1000000) + name = a[3] if a[3].strip() != '' else "NOCALL " + d.append([output, name]) + inputs.append([output+offset, name]) + +lines = len(d) +print("# Total entries:", lines) + +def srt_fn(element): + return element[0] +inputs.sort(key=srt_fn) + +def remove_dupes(d): + last = d[0] + i = 1 + while i < len(d): + if last[0] == d[i][0]: + if not last[1].strip() in d[i][1].split(): + d[i][1] += last[1] + d.remove(last) + else: + i += 1 + last = d[i-1] +remove_dupes(d) +remove_dupes(inputs) + +print("# Overlapping outputs:", lines - len(d)) +print("# Overlapping inputs:", lines - len(inputs)) + +if output_tags: + print(tag, "; #c0c0c0") + print(inputs_tag, "; #c0c0c0") + print("") + +if output_outputs: + for freq, name in d: + print(freq, ';', name, ";\tNarrow FM ;\t10000 ;\t", tag) + +if output_inputs: + for freq, name in inputs: + print(freq, ';', name+"input", ";\tNarrow FM ;\t10000 ;\t", inputs_tag) diff --git a/volmet.py b/volmet.py new file mode 100644 index 0000000..9aee2aa --- /dev/null +++ b/volmet.py @@ -0,0 +1,19 @@ +volmetStations = [ + ([3485, 6604, 10051, 13270 ], "United States/Canada"), + ([6754, 15034 ], "Canada"), + ([3413, 5505, 8957, 13264 ], "Western Europe"), + ([5450, 11253 ], "Central Europe"), + ([4742, 11247 ], "Eastern Europe"), + ([2863, 6679, 8828, 13282 ], "Oceania"), + ([2965, 6676, 11387 ], "South Asia/Southeast Asia"), + ([3458, 5673, 8849, 13285 ], "East Asia"), +] +tag = "VOLMET" +bw = 2700 +mod = "USB" + +for freqs, area in volmetStations: + name = "VOLMET " + area + for freq in freqs: + print(int(freq * 1000), ';', name, ';', mod, ';', bw, ';', tag) +