Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions rules/iaruhf/iaruhf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
##############################
#
# The custom multiplier list should be stored in the tlf working directory
CONTEST=iaru-hf
CONTEST=iaruhf
LOGFILE=iaruhf.log
CONTEST_MODE

Expand All @@ -36,12 +36,11 @@ RECALL_MULTS
# HQ stations and IARU officials
INITIAL_EXCHANGE=iaruhf.txt

# It can get the points incorrect if your neighbour country is in the same ITU zone.
# Switched from ITUMULT to WYSIWYG_MULTIBAND to get the HQ multipliers correctly.
# TODO convert scoring to a python plugin
MY_COUNTRY_POINTS=1
MY_CONTINENT_POINTS=3
DX_POINTS=5

# Scoring:
# (handled by iaruhf.py)


WYSIWYG_MULTIBAND
#ITUMULT
Expand Down
44 changes: 44 additions & 0 deletions rules/iaruhf/iaruhf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
"""
IARU HF World Championship
https://www.arrl.org/iaru-hf-world-championship
"""

MY_ITU_ZONE = None
MY_CONTINENT = None

IARU_EXCHANGES = ['IARU', 'AC', 'R1', 'R2', 'R3']

def init(cfg):
dxcc = tlf.get_dxcc(tlf.MY_CALL)
global MY_ITU_ZONE
MY_ITU_ZONE = dxcc.itu_zone
global MY_CONTINENT
MY_CONTINENT = dxcc.continent

"""
5. Scoring
5.1 QSO points:
5.1.1 Contacts within your own ITU zone count one (1) point.
5.1.2 Contacts with an IARU HQ or IARU official station count one (1) point.
5.1.3 Contacts with a station in the same ITU zone
but on a different continent count one (1) point.
5.1.4 Contacts within your continent but in a different ITU zone
count three (3) points.
5.1.5 Contacts with a different continent and ITU zone count five (5) points.
"""
def score(qso):
dxcc = tlf.get_dxcc(qso.call)
xchg = qso.exchange.strip()

if dxcc.itu_zone == MY_ITU_ZONE: # 5.1.1 and 5.1.3
points = 1
elif xchg in IARU_EXCHANGES: # 5.1.2
points = 1
else:
if dxcc.continent == MY_CONTINENT: # 5.1.4 and 5.1.5
points = 3
else:
points = 5

return points

1 change: 1 addition & 0 deletions test/rules/iaruhf/iaruhf.log
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
20SSB 17-Jul-26 17:47 0005 DA0HQ 59 59 DARC DARC 3
20SSB 17-Jul-26 17:49 0006 DL9XXX 59 59 28 3
20SSB 17-Jul-26 17:52 0007 N0X 59 59 8 8 5
40CW 17-Jul-26 17:54 0008 9M2IR 599 599 R3 R3 1
1 change: 1 addition & 0 deletions test/rules/iaruhf/rules/iaruhf.py