miaowware / ctyparser

A CTY.DAT parser for modern amateur radio programs
https://ctyparser.miaow.io/
MIT License
4 stars 2 forks source link

Add flag for 'exact match' #44

Closed obi134 closed 3 years ago

obi134 commented 3 years ago

Description

A Flag called 'exact_match' was added. Now it can be checked, if a call needs to match exactly to apply the data.

Fixes #42

Type of change

How has this been tested?

China: 24: 44: AS: 36.00: -102.00: -8.0: BY: 3H,3H0(23)[42],=B7/BA7CK(26),=BD9BI/0(23)[42] Fed. Rep. of Germany: 14: 28: EU: 51.00: -10.00: -1.0: DL: =DR9Z/LH;

Results in: 'entity': 'Fed. Rep. of Germany', 'cq': 14, 'itu': 28, 'continent': 'EU', 'lat': 51.0, 'long': -10.0, 'tz': 1.0, 'len': 2, 'primary_pfx': 'DL', 'exact_match': False} {'entity': 'Fed. Rep. of Germany', 'cq': 14, 'itu': 28, 'continent': 'EU', 'lat': 51.0, 'long': -10.0, 'tz': 1.0, 'len': 2, 'primary_pfx': 'DL', 'exact_match': True} {'entity': 'China', 'cq': 24, 'itu': 44, 'continent': 'AS', 'lat': 36.0, 'long': -102.0, 'tz': 8.0, 'len': 2, 'primary_pfx': 'BY', 'exact_match': False} {'entity': 'China', 'cq': 24, 'itu': 44, 'continent': 'AS', 'lat': 36.0, 'long': -102.0, 'tz': 8.0, 'len': 2, 'primary_pfx': 'BY', 'exact_match': False} {'entity': 'China', 'cq': 23, 'itu': 42, 'continent': 'AS', 'lat': 36.0, 'long': -102.0, 'tz': 8.0, 'len': 2, 'primary_pfx': 'BY', 'exact_match': False} {'entity': 'China', 'cq': 26, 'itu': 44, 'continent': 'AS', 'lat': 36.0, 'long': -102.0, 'tz': 8.0, 'len': 2, 'primary_pfx': 'BY', 'exact_match': True} {'entity': 'China', 'cq': 23, 'itu': 42, 'continent': 'AS', 'lat': 36.0, 'long': -102.0, 'tz': 8.0, 'len': 2, 'primary_pfx': 'BY', 'exact_match': True}

Checklist