not1mm 24.9.8__py3-none-any.whl → 24.9.10__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
not1mm/__main__.py CHANGED
@@ -1936,7 +1936,15 @@ class MainWindow(QtWidgets.QMainWindow):
1936
1936
  " "
1937
1937
  )[:19]
1938
1938
  self.contact["Call"] = self.callsign.text()
1939
- if self.contact.get("Mode") not in ("FT8", "FT4", "RTTY"):
1939
+ if self.contact.get("Mode") not in (
1940
+ "FT8",
1941
+ "FT4",
1942
+ "RTTY",
1943
+ "PSK31",
1944
+ "FSK441",
1945
+ "MSK144",
1946
+ "JT65",
1947
+ ):
1940
1948
  self.contact["Freq"] = round(
1941
1949
  float(self.radio_state.get("vfoa", 0.0)) / 1000, 2
1942
1950
  )
@@ -307,6 +307,16 @@
307
307
  <string>ICWC MST</string>
308
308
  </property>
309
309
  </item>
310
+ <item>
311
+ <property name="text">
312
+ <string>IARU FIELDDAY R1 CW</string>
313
+ </property>
314
+ </item>
315
+ <item>
316
+ <property name="text">
317
+ <string>IARU FIELDDAY R1 SSB</string>
318
+ </property>
319
+ </item>
310
320
  <item>
311
321
  <property name="text">
312
322
  <string>IARU HF</string>
@@ -364,9 +374,26 @@
364
374
  <property name="accessibleName">
365
375
  <string>Start of contest Date and U T C Time</string>
366
376
  </property>
377
+ <property name="dateTime">
378
+ <datetime>
379
+ <hour>8</hour>
380
+ <minute>0</minute>
381
+ <second>0</second>
382
+ <year>2024</year>
383
+ <month>1</month>
384
+ <day>1</day>
385
+ </datetime>
386
+ </property>
387
+ <property name="date">
388
+ <date>
389
+ <year>2024</year>
390
+ <month>1</month>
391
+ <day>1</day>
392
+ </date>
393
+ </property>
367
394
  <property name="time">
368
395
  <time>
369
- <hour>0</hour>
396
+ <hour>8</hour>
370
397
  <minute>0</minute>
371
398
  <second>0</second>
372
399
  </time>
not1mm/lib/database.py CHANGED
@@ -725,6 +725,34 @@ class DataBase:
725
725
  logger.debug("%s", exception)
726
726
  return {}
727
727
 
728
+ def fetch_dxcc_exists(self, dxcc) -> dict:
729
+ """returns the dict dxcc_count of dxcc existing in current contest."""
730
+ try:
731
+ with sqlite3.connect(self.database) as conn:
732
+ conn.row_factory = self.row_factory
733
+ cursor = conn.cursor()
734
+ cursor.execute(
735
+ f"select count(*) as dxcc_count from dxlog where CountryPrefix = '{dxcc}' and ContestNR = {self.current_contest};"
736
+ )
737
+ return cursor.fetchone()
738
+ except sqlite3.OperationalError as exception:
739
+ logger.debug("%s", exception)
740
+ return {}
741
+
742
+ def fetch_dxcc_exists_before_me(self, dxcc, time_stamp) -> dict:
743
+ """returns the dict dxcc_count of dxcc existing in current contest."""
744
+ try:
745
+ with sqlite3.connect(self.database) as conn:
746
+ conn.row_factory = self.row_factory
747
+ cursor = conn.cursor()
748
+ cursor.execute(
749
+ f"select count(*) as dxcc_count from dxlog where TS < '{time_stamp}' and CountryPrefix = '{dxcc}' and ContestNR = {self.current_contest};"
750
+ )
751
+ return cursor.fetchone()
752
+ except sqlite3.OperationalError as exception:
753
+ logger.debug("%s", exception)
754
+ return {}
755
+
728
756
  def fetch_wpx_exists(self, wpx) -> dict:
729
757
  """returns a dict key of wpx_count"""
730
758
  try:
not1mm/lib/version.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """It's the version"""
2
2
 
3
- __version__ = "24.9.8"
3
+ __version__ = "24.9.10"
@@ -43,11 +43,13 @@ import logging
43
43
  from pathlib import Path
44
44
  from PyQt6 import QtWidgets
45
45
 
46
+ from not1mm.lib.ham_utility import get_logged_band
46
47
  from not1mm.lib.plugin_common import gen_adif, get_points
47
48
  from not1mm.lib.version import __version__
48
49
 
49
50
  logger = logging.getLogger(__name__)
50
51
 
52
+ ALTEREGO = None
51
53
  EXCHANGE_HINT = "4-character grid square"
52
54
 
53
55
  name = "ARRL VHF JAN"
@@ -58,6 +60,7 @@ columns = [
58
60
  "YYYY-MM-DD HH:MM:SS",
59
61
  "Call",
60
62
  "Freq",
63
+ "Mode",
61
64
  "SentNr",
62
65
  "RcvNr",
63
66
  "PTS",
@@ -376,9 +379,21 @@ def cabrillo(self):
376
379
  for contact in log:
377
380
  the_date_and_time = contact.get("TS", "")
378
381
  themode = contact.get("Mode", "")
379
- if themode == "LSB" or themode == "USB":
382
+ if themode in ("LSB", "USB", "FM", "AM"):
380
383
  themode = "PH"
381
- frequency = str(int(contact.get("Freq", "0"))).rjust(5)
384
+ if themode in (
385
+ "FT8",
386
+ "FT4",
387
+ "RTTY",
388
+ "PSK31",
389
+ "FSK441",
390
+ "MSK144",
391
+ "JT65",
392
+ ):
393
+ themode = "DG"
394
+ freq = int(contact.get("Freq", "0")) / 1000
395
+
396
+ frequency = str(int(freq)).rjust(4)
382
397
 
383
398
  loggeddate = the_date_and_time[:10]
384
399
  loggedtime = the_date_and_time[11:13] + the_date_and_time[14:16]
@@ -403,3 +418,91 @@ def cabrillo(self):
403
418
 
404
419
  def recalculate_mults(self):
405
420
  """Recalculates multipliers after change in logged qso."""
421
+
422
+
423
+ def set_self(the_outie):
424
+ """..."""
425
+ globals()["ALTEREGO"] = the_outie
426
+
427
+
428
+ def ft8_handler(the_packet: dict):
429
+ """Process FT8 QSO packets
430
+ FT8
431
+ {
432
+ 'CALL': 'KE0OG',
433
+ 'GRIDSQUARE': 'DM10AT',
434
+ 'MODE': 'FT8',
435
+ 'RST_SENT': '',
436
+ 'RST_RCVD': '',
437
+ 'QSO_DATE': '20210329',
438
+ 'TIME_ON': '183213',
439
+ 'QSO_DATE_OFF': '20210329',
440
+ 'TIME_OFF': '183213',
441
+ 'BAND': '20M',
442
+ 'FREQ': '14.074754',
443
+ 'STATION_CALLSIGN': 'K6GTE',
444
+ 'MY_GRIDSQUARE': 'DM13AT',
445
+ 'CONTEST_ID': 'ARRL-FIELD-DAY',
446
+ 'SRX_STRING': '1D UT',
447
+ 'CLASS': '1D',
448
+ 'ARRL_SECT': 'UT'
449
+ }
450
+ FlDigi
451
+ {
452
+ 'FREQ': '7.029500',
453
+ 'CALL': 'DL2DSL',
454
+ 'MODE': 'RTTY',
455
+ 'NAME': 'BOB',
456
+ 'QSO_DATE': '20240904',
457
+ 'QSO_DATE_OFF': '20240904',
458
+ 'TIME_OFF': '212825',
459
+ 'TIME_ON': '212800',
460
+ 'RST_RCVD': '599',
461
+ 'RST_SENT': '599',
462
+ 'BAND': '40M',
463
+ 'COUNTRY': 'FED. REP. OF GERMANY',
464
+ 'CQZ': '14',
465
+ 'STX': '000',
466
+ 'STX_STRING': '1D ORG',
467
+ 'CLASS': '1D',
468
+ 'ARRL_SECT': 'DX',
469
+ 'TX_PWR': '0',
470
+ 'OPERATOR': 'K6GTE',
471
+ 'STATION_CALLSIGN': 'K6GTE',
472
+ 'MY_GRIDSQUARE': 'DM13AT',
473
+ 'MY_CITY': 'ANAHEIM, CA',
474
+ 'MY_STATE': 'CA'
475
+ }
476
+
477
+ """
478
+ logger.debug(f"{the_packet=}")
479
+ print(f"{the_packet=}\n")
480
+ print(f"{ALTEREGO.contact=}\n")
481
+ if ALTEREGO is not None:
482
+ ALTEREGO.callsign.setText(the_packet.get("CALL"))
483
+ ALTEREGO.contact["Call"] = the_packet.get("CALL", "")
484
+ ALTEREGO.contact["SNT"] = ALTEREGO.sent.text()
485
+ ALTEREGO.contact["RCV"] = ALTEREGO.receive.text()
486
+ my_grid = the_packet.get("MY_GRIDSQUARE", "")
487
+ if my_grid:
488
+ if len(my_grid) > 4:
489
+ my_grid = my_grid[:4]
490
+ their_grid = the_packet.get("GRIDSQUARE", "")
491
+ if their_grid:
492
+ if len(their_grid) > 4:
493
+ their_grid = their_grid[:4]
494
+ ALTEREGO.contact["NR"] = their_grid
495
+ # ALTEREGO.contact["Sect"] = the_packet.get("ARRL_SECT", "ERR")
496
+ ALTEREGO.contact["Mode"] = the_packet.get("MODE", "ERR")
497
+ ALTEREGO.contact["Freq"] = round(float(the_packet.get("FREQ", "0.0")) * 1000, 2)
498
+ ALTEREGO.contact["QSXFreq"] = round(
499
+ float(the_packet.get("FREQ", "0.0")) * 1000, 2
500
+ )
501
+ ALTEREGO.contact["Band"] = get_logged_band(
502
+ str(int(float(the_packet.get("FREQ", "0.0")) * 1000000))
503
+ )
504
+ logger.debug(f"{ALTEREGO.contact=}")
505
+ print(f"{ALTEREGO.contact=}\n")
506
+ ALTEREGO.other_1.setText(my_grid)
507
+ ALTEREGO.other_2.setText(their_grid)
508
+ ALTEREGO.save_contact()
@@ -11,11 +11,13 @@ import logging
11
11
  from pathlib import Path
12
12
  from PyQt6 import QtWidgets
13
13
 
14
+ from not1mm.lib.ham_utility import get_logged_band
14
15
  from not1mm.lib.plugin_common import gen_adif, get_points
15
16
  from not1mm.lib.version import __version__
16
17
 
17
18
  logger = logging.getLogger(__name__)
18
19
 
20
+ ALTEREGO = None
19
21
  EXCHANGE_HINT = "4-character grid square"
20
22
 
21
23
  name = "ARRL VHF JUN"
@@ -26,6 +28,7 @@ columns = [
26
28
  "YYYY-MM-DD HH:MM:SS",
27
29
  "Call",
28
30
  "Freq",
31
+ "Mode",
29
32
  "SentNr",
30
33
  "RcvNr",
31
34
  "PTS",
@@ -344,9 +347,21 @@ def cabrillo(self):
344
347
  for contact in log:
345
348
  the_date_and_time = contact.get("TS", "")
346
349
  themode = contact.get("Mode", "")
347
- if themode == "LSB" or themode == "USB":
350
+ if themode in ("LSB", "USB", "FM", "AM"):
348
351
  themode = "PH"
349
- frequency = str(int(contact.get("Freq", "0"))).rjust(5)
352
+ if themode in (
353
+ "FT8",
354
+ "FT4",
355
+ "RTTY",
356
+ "PSK31",
357
+ "FSK441",
358
+ "MSK144",
359
+ "JT65",
360
+ ):
361
+ themode = "DG"
362
+ freq = int(contact.get("Freq", "0")) / 1000
363
+
364
+ frequency = str(int(freq)).rjust(4)
350
365
 
351
366
  loggeddate = the_date_and_time[:10]
352
367
  loggedtime = the_date_and_time[11:13] + the_date_and_time[14:16]
@@ -371,3 +386,91 @@ def cabrillo(self):
371
386
 
372
387
  def recalculate_mults(self):
373
388
  """Recalculates multipliers after change in logged qso."""
389
+
390
+
391
+ def set_self(the_outie):
392
+ """..."""
393
+ globals()["ALTEREGO"] = the_outie
394
+
395
+
396
+ def ft8_handler(the_packet: dict):
397
+ """Process FT8 QSO packets
398
+ FT8
399
+ {
400
+ 'CALL': 'KE0OG',
401
+ 'GRIDSQUARE': 'DM10AT',
402
+ 'MODE': 'FT8',
403
+ 'RST_SENT': '',
404
+ 'RST_RCVD': '',
405
+ 'QSO_DATE': '20210329',
406
+ 'TIME_ON': '183213',
407
+ 'QSO_DATE_OFF': '20210329',
408
+ 'TIME_OFF': '183213',
409
+ 'BAND': '20M',
410
+ 'FREQ': '14.074754',
411
+ 'STATION_CALLSIGN': 'K6GTE',
412
+ 'MY_GRIDSQUARE': 'DM13AT',
413
+ 'CONTEST_ID': 'ARRL-FIELD-DAY',
414
+ 'SRX_STRING': '1D UT',
415
+ 'CLASS': '1D',
416
+ 'ARRL_SECT': 'UT'
417
+ }
418
+ FlDigi
419
+ {
420
+ 'FREQ': '7.029500',
421
+ 'CALL': 'DL2DSL',
422
+ 'MODE': 'RTTY',
423
+ 'NAME': 'BOB',
424
+ 'QSO_DATE': '20240904',
425
+ 'QSO_DATE_OFF': '20240904',
426
+ 'TIME_OFF': '212825',
427
+ 'TIME_ON': '212800',
428
+ 'RST_RCVD': '599',
429
+ 'RST_SENT': '599',
430
+ 'BAND': '40M',
431
+ 'COUNTRY': 'FED. REP. OF GERMANY',
432
+ 'CQZ': '14',
433
+ 'STX': '000',
434
+ 'STX_STRING': '1D ORG',
435
+ 'CLASS': '1D',
436
+ 'ARRL_SECT': 'DX',
437
+ 'TX_PWR': '0',
438
+ 'OPERATOR': 'K6GTE',
439
+ 'STATION_CALLSIGN': 'K6GTE',
440
+ 'MY_GRIDSQUARE': 'DM13AT',
441
+ 'MY_CITY': 'ANAHEIM, CA',
442
+ 'MY_STATE': 'CA'
443
+ }
444
+
445
+ """
446
+ logger.debug(f"{the_packet=}")
447
+ print(f"{the_packet=}\n")
448
+ print(f"{ALTEREGO.contact=}\n")
449
+ if ALTEREGO is not None:
450
+ ALTEREGO.callsign.setText(the_packet.get("CALL"))
451
+ ALTEREGO.contact["Call"] = the_packet.get("CALL", "")
452
+ ALTEREGO.contact["SNT"] = ALTEREGO.sent.text()
453
+ ALTEREGO.contact["RCV"] = ALTEREGO.receive.text()
454
+ my_grid = the_packet.get("MY_GRIDSQUARE", "")
455
+ if my_grid:
456
+ if len(my_grid) > 4:
457
+ my_grid = my_grid[:4]
458
+ their_grid = the_packet.get("GRIDSQUARE", "")
459
+ if their_grid:
460
+ if len(their_grid) > 4:
461
+ their_grid = their_grid[:4]
462
+ ALTEREGO.contact["NR"] = their_grid
463
+ # ALTEREGO.contact["Sect"] = the_packet.get("ARRL_SECT", "ERR")
464
+ ALTEREGO.contact["Mode"] = the_packet.get("MODE", "ERR")
465
+ ALTEREGO.contact["Freq"] = round(float(the_packet.get("FREQ", "0.0")) * 1000, 2)
466
+ ALTEREGO.contact["QSXFreq"] = round(
467
+ float(the_packet.get("FREQ", "0.0")) * 1000, 2
468
+ )
469
+ ALTEREGO.contact["Band"] = get_logged_band(
470
+ str(int(float(the_packet.get("FREQ", "0.0")) * 1000000))
471
+ )
472
+ logger.debug(f"{ALTEREGO.contact=}")
473
+ print(f"{ALTEREGO.contact=}\n")
474
+ ALTEREGO.other_1.setText(my_grid)
475
+ ALTEREGO.other_2.setText(their_grid)
476
+ ALTEREGO.save_contact()
@@ -11,11 +11,13 @@ import logging
11
11
  from pathlib import Path
12
12
  from PyQt6 import QtWidgets
13
13
 
14
+ from not1mm.lib.ham_utility import get_logged_band
14
15
  from not1mm.lib.plugin_common import gen_adif, get_points
15
16
  from not1mm.lib.version import __version__
16
17
 
17
18
  logger = logging.getLogger(__name__)
18
19
 
20
+ ALTEREGO = None
19
21
  EXCHANGE_HINT = "4-character grid square"
20
22
 
21
23
  name = "ARRL VHF SEP"
@@ -26,6 +28,7 @@ columns = [
26
28
  "YYYY-MM-DD HH:MM:SS",
27
29
  "Call",
28
30
  "Freq",
31
+ "Mode",
29
32
  "SentNr",
30
33
  "RcvNr",
31
34
  "PTS",
@@ -344,9 +347,21 @@ def cabrillo(self):
344
347
  for contact in log:
345
348
  the_date_and_time = contact.get("TS", "")
346
349
  themode = contact.get("Mode", "")
347
- if themode == "LSB" or themode == "USB":
350
+ if themode in ("LSB", "USB", "FM", "AM"):
348
351
  themode = "PH"
349
- frequency = str(int(contact.get("Freq", "0"))).rjust(5)
352
+ if themode in (
353
+ "FT8",
354
+ "FT4",
355
+ "RTTY",
356
+ "PSK31",
357
+ "FSK441",
358
+ "MSK144",
359
+ "JT65",
360
+ ):
361
+ themode = "DG"
362
+ freq = int(contact.get("Freq", "0")) / 1000
363
+
364
+ frequency = str(int(freq)).rjust(4)
350
365
 
351
366
  loggeddate = the_date_and_time[:10]
352
367
  loggedtime = the_date_and_time[11:13] + the_date_and_time[14:16]
@@ -371,3 +386,91 @@ def cabrillo(self):
371
386
 
372
387
  def recalculate_mults(self):
373
388
  """Recalculates multipliers after change in logged qso."""
389
+
390
+
391
+ def set_self(the_outie):
392
+ """..."""
393
+ globals()["ALTEREGO"] = the_outie
394
+
395
+
396
+ def ft8_handler(the_packet: dict):
397
+ """Process FT8 QSO packets
398
+ FT8
399
+ {
400
+ 'CALL': 'KE0OG',
401
+ 'GRIDSQUARE': 'DM10AT',
402
+ 'MODE': 'FT8',
403
+ 'RST_SENT': '',
404
+ 'RST_RCVD': '',
405
+ 'QSO_DATE': '20210329',
406
+ 'TIME_ON': '183213',
407
+ 'QSO_DATE_OFF': '20210329',
408
+ 'TIME_OFF': '183213',
409
+ 'BAND': '20M',
410
+ 'FREQ': '14.074754',
411
+ 'STATION_CALLSIGN': 'K6GTE',
412
+ 'MY_GRIDSQUARE': 'DM13AT',
413
+ 'CONTEST_ID': 'ARRL-FIELD-DAY',
414
+ 'SRX_STRING': '1D UT',
415
+ 'CLASS': '1D',
416
+ 'ARRL_SECT': 'UT'
417
+ }
418
+ FlDigi
419
+ {
420
+ 'FREQ': '7.029500',
421
+ 'CALL': 'DL2DSL',
422
+ 'MODE': 'RTTY',
423
+ 'NAME': 'BOB',
424
+ 'QSO_DATE': '20240904',
425
+ 'QSO_DATE_OFF': '20240904',
426
+ 'TIME_OFF': '212825',
427
+ 'TIME_ON': '212800',
428
+ 'RST_RCVD': '599',
429
+ 'RST_SENT': '599',
430
+ 'BAND': '40M',
431
+ 'COUNTRY': 'FED. REP. OF GERMANY',
432
+ 'CQZ': '14',
433
+ 'STX': '000',
434
+ 'STX_STRING': '1D ORG',
435
+ 'CLASS': '1D',
436
+ 'ARRL_SECT': 'DX',
437
+ 'TX_PWR': '0',
438
+ 'OPERATOR': 'K6GTE',
439
+ 'STATION_CALLSIGN': 'K6GTE',
440
+ 'MY_GRIDSQUARE': 'DM13AT',
441
+ 'MY_CITY': 'ANAHEIM, CA',
442
+ 'MY_STATE': 'CA'
443
+ }
444
+
445
+ """
446
+ logger.debug(f"{the_packet=}")
447
+ print(f"{the_packet=}\n")
448
+ print(f"{ALTEREGO.contact=}\n")
449
+ if ALTEREGO is not None:
450
+ ALTEREGO.callsign.setText(the_packet.get("CALL"))
451
+ ALTEREGO.contact["Call"] = the_packet.get("CALL", "")
452
+ ALTEREGO.contact["SNT"] = ALTEREGO.sent.text()
453
+ ALTEREGO.contact["RCV"] = ALTEREGO.receive.text()
454
+ my_grid = the_packet.get("MY_GRIDSQUARE", "")
455
+ if my_grid:
456
+ if len(my_grid) > 4:
457
+ my_grid = my_grid[:4]
458
+ their_grid = the_packet.get("GRIDSQUARE", "")
459
+ if their_grid:
460
+ if len(their_grid) > 4:
461
+ their_grid = their_grid[:4]
462
+ ALTEREGO.contact["NR"] = their_grid
463
+ # ALTEREGO.contact["Sect"] = the_packet.get("ARRL_SECT", "ERR")
464
+ ALTEREGO.contact["Mode"] = the_packet.get("MODE", "ERR")
465
+ ALTEREGO.contact["Freq"] = round(float(the_packet.get("FREQ", "0.0")) * 1000, 2)
466
+ ALTEREGO.contact["QSXFreq"] = round(
467
+ float(the_packet.get("FREQ", "0.0")) * 1000, 2
468
+ )
469
+ ALTEREGO.contact["Band"] = get_logged_band(
470
+ str(int(float(the_packet.get("FREQ", "0.0")) * 1000000))
471
+ )
472
+ logger.debug(f"{ALTEREGO.contact=}")
473
+ print(f"{ALTEREGO.contact=}\n")
474
+ ALTEREGO.other_1.setText(my_grid)
475
+ ALTEREGO.other_2.setText(their_grid)
476
+ ALTEREGO.save_contact()