Finally time for an attempt to get the scoring/multipliers right for the King of Spain CW contest. The evening before the contest.

I have the rules from https://concursos.ure.es/en/s-m-el-rey-de-espana-cw/bases/

I started thinking there is one set of multipliers for all the URE contests but there are subtle differences!

I used the plugin method and I based it on the ukeidx.py and hadx.py plugins. Python is not my primary programming language!

Attached:

rules/eakingofspain
rules/eakingofspain.py

I will go into the contest with these. As the URE concursos organizers are usually quite fast with the scoring I can validate my scoring when they get back to me and I will update accordingly.

Please test and good luck in the contest!

Koos van den Hout PE4KH

--
PE4KH amateur radio station
https://pe4kh.idefix.net/
"""
https://concursos.ure.es/en/s-m-el-rey-de-espana-cw/bases/

Multipliers: The Multipliers, on each band, are the same for both EA and DX stations and are as follows:

– The EADX-100 entities.

– The Spanish provinces (52).

– Special station His Majesty The King of Spain (EF0F) will pass the abbreviation (SMR)

"""

EA_DXCCS = ['EA', 'EA6', 'EA8', 'EA9']
EA_PROVINCES = ['AV', 'BU', 'C', 'LE', 'LO', 'LU', 'O', 'OU', 'P', 'PO', 'S',
    'SA', 'SG', 'SO', 'VA', 'ZA', 'BI', 'HU', 'NA', 'SS', 'TE', 'VI', 'Z',
    'B', 'GI', 'L', 'T', 'BA', 'CC', 'CR', 'CU', 'GU', 'M', 'TO', 'A', 'AB',
    'CS', 'MU', 'V', 'IB', 'AL', 'CA', 'CO', 'GR', 'H', 'J', 'MA', 'SE', 'GC',
    'TF', 'CE', 'ML', 'SMR']

def check_exchange(qso):
    dxcc = tlf.get_dxcc(qso.call)

    if dxcc.main_prefix in EA_DXCCS:
        exchange = qso.exchange.strip()
        if exchange in EA_PROVINCES:
            mult = f'{dxcc.main_prefix}/{exchange}'
        else:
            mult = ''   # invalid county
    else:
        mult = dxcc.main_prefix

    return {'mult1_value': mult}

########################
# General contest mode #
########################
#
CONTEST=eakingofspain
LOGFILE=eakingofspain.log
CONTEST_MODE
CABRILLO=UNIVERSAL

# scoring for DX station

MY_COUNTRY_POINTS=1
MY_CONTINENT_POINTS=1
DX_POINTS=1
COUNTRY_LIST_POINTS=3
COUNTRYLIST=EA,EA6,EA8,EA9
GENERIC_MULT=BAND

#
##################################
#                                #
#  Messages F1= to F12=          #
#  Message CQ_TU_MSG=            #
#  Message S&P_TU_MSG=           #
#                                #
#  % = call                      #
#  @ = hiscall                   #
#  # = serial                    #
#  [ = RST                       #
#  + = increase cw speed         #
#  - = decrease cw speed         #
#                                #
##################################
#
F1=CQ EA TEST % %
F2=@ DE %
F3=@ 5NN #
F4=TU 
F5= @
F6=%
F7=@ SRI QSO B4 GL
F8=AGN
F9= ?
F10= QRZ?
F11= PSE K
F12=TEST % %
#
CQ_TU_MSG=TU % 
S&P_TU_MSG=TU UR 5NN #
#
#ALT_0=
#ALT_1=
#ALT_2=
#ALT_3=
#ALT_4=
#ALT_5=
#ALT_6=
#ALT_7=
#ALT_8=
#ALT_9=
#
#SEND_DE
#
####### END #####################

Reply via email to