def get_defaults_for_frequency(self, freq): freq = int(freq) result = bandplan.Band((freq, freq), repr(freq)) for shortname, details in self.plans.items(): if self._config.get_bool(shortname, "bandplan"): matches = [x for x in details[1].bands if x.contains(result)] # Add matches to defaults, favoring more specific matches. matches = sorted(matches, key=lambda x: x.width(), reverse=True) for match in matches: result.mode = match.mode or result.mode result.step_khz = match.step_khz or result.step_khz result.offset = match.offset or result.offset result.duplex = match.duplex or result.duplex result.tones = match.tones or result.tones if match.name: result.name = '/'.join((result.name or '', match.name)) # Limit ourselves to one band plan match for simplicity. # Note that if the user selects multiple band plans by editing # the config file it will work as expected (except where plans # conflict). if matches: break return result
# # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. from chirp import bandplan, bandplan_iaru_r2 SHORTNAME = "north_america" DESC = { "name": "North American Band Plan", "url": "http://www.arrl.org/band-plan" } BANDS_160M = ( bandplan.Band((1800000, 2000000), "160 Meter Band", mode="CW"), bandplan.Band((1800000, 1810000), "Digital Modes"), bandplan.Band((1843000, 2000000), "SSB, SSTV and other wideband modes"), bandplan.Band((1995000, 2000000), "Experimental"), bandplan.Band((1999000, 2000000), "Beacons"), ) BANDS_80M = ( bandplan.Band((3500000, 4000000), "80 Meter Band"), bandplan.Band((3570000, 3600000), "RTTY/Data", mode="RTTY"), bandplan.Band((3790000, 3800000), "DX window"), ) BANDS_40M = ( bandplan.Band((7000000, 7300000), "40 Meter Band"), bandplan.Band((7080000, 7125000), "RTTY/Data", mode="RTTY"),
# along with this program. If not, see <http://www.gnu.org/licenses/>. from chirp import bandplan SHORTNAME = "iaru_r1" DESC = { "name": "IARU Region 1 (Europe, Africa, Middle East and Northern Asia)", "url": "http://iaru-r1.org/index.php?option=com_content" "&view=article&id=175&Itemid=127", "updated": "General Conference Sun City 2011", } # Bands are broken up like this so that other plans can import bits. BANDS_2100M = (bandplan.Band((135700, 137800), "137khz Band", mode="CW"), ) BANDS_160M = ( bandplan.Band((1810000, 2000000), "160 Meter Band"), bandplan.Band((1810000, 1838000), "CW", mode="CW"), bandplan.Band((1838000, 1840000), "All narrow band modes"), bandplan.Band((1840000, 1843000), "All modes, digimodes", mode="RTTY"), ) BANDS_80M = ( bandplan.Band((3500000, 3800000), "80 Meter Band"), bandplan.Band((3500000, 3510000), "CW, priority for DX", mode="CW"), bandplan.Band((3510000, 3560000), "CW, contest preferred", mode="CW"), bandplan.Band((3560000, 3580000), "CW", mode="CW"), bandplan.Band((3580000, 3600000), "All narrow band modes, digimodes"), bandplan.Band((3590000, 3600000),
# along with this program. If not, see <http://www.gnu.org/licenses/>. from chirp import bandplan SHORTNAME = "iaru_r3" DESC = { "name": "IARU Region 3 (Asia Pacific)", "updated": "16 October 2009", "url": "http://www.iaru.org/uploads/1/3/0/7/13073366/r3_band_plan.pdf" } # Bands are broken up like this so that other plans can import bits. BANDS_2100M = ( bandplan.Band((135700, 137800), "137khz Band", mode="CW"), ) BANDS_160M = ( bandplan.Band((1800000, 2000000), "160 Meter Band"), bandplan.Band((1830000, 1840000), "Digimodes", mode="RTTY"), bandplan.Band((1840000, 2000000), "Phone"), ) BANDS_80M = ( bandplan.Band((3500000, 3900000), "80 Meter Band"), bandplan.Band((3500000, 3510000), "CW, priority for DX", mode="CW"), bandplan.Band((3535000, 3900000), "Phone"), bandplan.Band((3775000, 3800000), "All modes, SSB DX preferred", mode="LSB"), )
# along with this program. If not, see <http://www.gnu.org/licenses/>. from chirp import bandplan SHORTNAME = "iaru_r2" DESC = { "name": "IARU Region 2 (The Americas)", "updated": "October 8, 2010", "url": "http://www.iaru.org/uploads/1/3/0/7/13073366/r2_band_plan.pdf" } # Bands are broken up like this so that other plans can import bits. BANDS_160M = ( bandplan.Band((1800000, 2000000), "160 Meter Band"), bandplan.Band((1800000, 1810000), "Digimodes"), bandplan.Band((1810000, 1830000), "CW", mode="CW"), bandplan.Band((1830000, 1840000), "CW, priority for DX", mode="CW"), bandplan.Band((1840000, 1850000), "SSB, priority for DX", mode="LSB"), bandplan.Band((1850000, 1999000), "All modes", mode="LSB"), bandplan.Band((1999000, 2000000), "Beacons", mode="CW"), ) BANDS_80M = ( bandplan.Band((3500000, 4000000), "80 Meter Band"), bandplan.Band((3500000, 3510000), "CW, priority for DX", mode="CW"), bandplan.Band((3510000, 3560000), "CW, contest preferred", mode="CW"), bandplan.Band((3560000, 3580000), "CW", mode="CW"), bandplan.Band((3580000, 3590000), "All narrow band modes, digimodes"), bandplan.Band((3590000, 3600000), "All modes"),
SHORTNAME = "australia" DESC = { "name": "Australian Amateur Band Plan", "updated": "April 2010", "url": "http://www.wia.org.au/members/bandplans/data/documents/Australian%20Band%20Plans%20100404.pdf", } BANDS_10M = ( # bandplan.Band((28000000, 29700000), "10 Meter Band"), bandplan.Band((29520000, 29680000), "FM Simplex and Repeaters", mode="FM", step_khz=20), bandplan.Band((29620000, 29680000), "FM Repeaters", input_offset=-100000), ) BANDS_6M = ( # bandplan.Band((50000000, 54000000), "6 Meter Band"), bandplan.Band((52525000, 53975000), "FM Simplex and Repeaters", mode="FM", step_khz=25), bandplan.Band((53550000, 53975000), "FM Repeaters", input_offset=-1000000), ) BANDS_2M = ( bandplan.Band((144000000, 148000000),