from core.config import SERVER_OWNER_CALLSIGN from data.band import Band from data.sig import SIG # General software SOFTWARE_NAME = "Spothole by M0TRT" SOFTWARE_VERSION = "1.2" # HTTP headers used for spot providers that use HTTP HTTP_HEADERS = {"User-Agent": SOFTWARE_NAME + ", v" + SOFTWARE_VERSION + " (operated by " + SERVER_OWNER_CALLSIGN + ")"} HAMQTH_PRG = (SOFTWARE_NAME + " v" + SOFTWARE_VERSION + " operated by " + SERVER_OWNER_CALLSIGN).replace(" ", "_") # Special Interest Groups SIGS = [ SIG(name="POTA", description="Parks on the Air", ref_regex=r"[A-Z]{2}\-\d{4,5}"), SIG(name="SOTA", description="Summits on the Air", ref_regex=r"[A-Z0-9]{1,3}\/[A-Z]{2}\-\d{3}"), SIG(name="WWFF", description="World Wide Flora & Fauna", ref_regex=r"[A-Z0-9]{1,3}FF\-\d{4}"), SIG(name="GMA", description="Global Mountain Activity", ref_regex=r"[A-Z0-9]{1,3}\/[A-Z]{2}\-\d{3}"), SIG(name="WWBOTA", description="Worldwide Bunkers on the Air", ref_regex=r"B\/[A-Z0-9]{1,3}\-\d{3,4}"), SIG(name="HEMA", description="HuMPs Excluding Marilyns Award", ref_regex=r"[A-Z0-9]{1,3}\/[A-Z]{3}\-\d{3}"), SIG(name="IOTA", description="Islands on the Air", ref_regex=r"[A-Z]{2}\-\d{3}"), SIG(name="MOTA", description="Mills on the Air", ref_regex=r"X\d{4-6}"), SIG(name="ARLHS", description="Amateur Radio Lighthouse Society", ref_regex=r"[A-Z]{3}\-\d{3,4}"), SIG(name="ILLW", description="International Lighthouse & Lightship Weekend", ref_regex=r"[A-Z]{2}\d{4}"), SIG(name="SIOTA", description="Silos on the Air", ref_regex=r"[A-Z]{2}\-[A-Z]{3}\d"), SIG(name="WCA", description="World Castles Award", ref_regex=r"[A-Z0-9]{1,3}\-\d{5}"), SIG(name="ZLOTA", description="New Zealand on the Air", ref_regex=r"ZL[A-Z]/[A-Z]{2}\-\d{3,4}"), SIG(name="WOTA", description="Wainwrights on the Air", ref_regex=r"[A-Z]{3}-[0-9]{2}"), SIG(name="BOTA", description="Beaches on the Air"), SIG(name="KRMNPA", description="Keith Roget Memorial National Parks Award"), SIG(name="LLOTA", description="Lagos y Lagunas on the Air", ref_regex=r"[A-Z]{2}\-\d{4}"), SIG(name="WWTOTA", description="Towers on the Air", ref_regex=r"[A-Z]{2}R\-\d{4}"), SIG(name="WAB", description="Worked All Britain", ref_regex=r"[A-Z]{1,2}[0-9]{2}"), SIG(name="WAI", description="Worked All Ireland", ref_regex=r"[A-Z][0-9]{2}"), SIG(name="TOTA", description="Toilets on the Air", ref_regex=r"T\-[0-9]{2}") ] # Modes. Note "DIGI" and "DIGITAL" are also supported but are normalised into "DATA". CW_MODES = ["CW"] PHONE_MODES = ["PHONE", "SSB", "USB", "LSB", "AM", "FM", "DV", "DMR", "DSTAR", "C4FM", "M17"] DATA_MODES = ["DATA", "FT8", "FT4", "RTTY", "SSTV", "JS8", "HELL", "PSK", "OLIVIA", "PKT", "MSK144"] ALL_MODES = CW_MODES + PHONE_MODES + DATA_MODES MODE_TYPES = ["CW", "PHONE", "DATA"] # Mode aliases. Sometimes we get spots with a mode described in a different way that is effectively the same as a mode # we already know, or we want to normalise things for consistency. The lookup table for this is here. Incoming spots # that match a key in this table will be converted to the corresponding value, so only the modes above will actually be # present in the spots. MODE_ALIASES = { "RTT": "RTTY", "BPSK": "PSK", "PSK31": "PSK", "BPSK31": "PSK", "MFSK": "FSK", "MFSK32": "FSK", "DIGI": "DATA", "DIGITAL": "DATA" } # Band definitions BANDS = [ Band(name="2200m", start_freq=135700, end_freq=137800), Band(name="600m", start_freq=472000, end_freq=479000), Band(name="160m", start_freq=1800000, end_freq=2000000), Band(name="80m", start_freq=3500000, end_freq=4000000), Band(name="60m", start_freq=5250000, end_freq=5410000), Band(name="40m", start_freq=7000000, end_freq=7300000), Band(name="30m", start_freq=10100000, end_freq=10150000), Band(name="20m", start_freq=14000000, end_freq=14350000), Band(name="17m", start_freq=18068000, end_freq=18168000), Band(name="15m", start_freq=21000000, end_freq=21450000), Band(name="12m", start_freq=24890000, end_freq=24990000), Band(name="11m", start_freq=26965000, end_freq=27405000), Band(name="10m", start_freq=28000000, end_freq=29700000), Band(name="6m", start_freq=50000000, end_freq=54000000), Band(name="5m", start_freq=56000000, end_freq=60500000), Band(name="4m", start_freq=70000000, end_freq=70500000), Band(name="2m", start_freq=144000000, end_freq=148000000), Band(name="1.25m", start_freq=219000000, end_freq=225000000), Band(name="70cm", start_freq=420000000, end_freq=450000000), Band(name="23cm", start_freq=1240000000, end_freq=1325000000), Band(name="13cm", start_freq=2300000000, end_freq=2450000000), Band(name="5.8GHz", start_freq=5725000000, end_freq=5850000000), Band(name="10GHz", start_freq=10000000000, end_freq=10500000000), Band(name="24GHz", start_freq=24000000000, end_freq=24050000000), Band(name="47GHz", start_freq=47000000000, end_freq=47200000000), Band(name="76GHz", start_freq=75500000000, end_freq=81500000000)] UNKNOWN_BAND = Band(name="Unknown", start_freq=0, end_freq=0) # Continents CONTINENTS = ["EU", "NA", "SA", "AS", "AF", "OC", "AN"]