Support RSGB contests

This commit is contained in:
Ian Renton
2026-09-05 09:00:32 +01:00
parent d3d1d20821
commit d6e53c14e9
32 changed files with 256 additions and 98 deletions
+6 -10
View File
@@ -103,9 +103,9 @@ class Spot:
# General QSO info
# Reported mode, such as SSB, PHONE, CW, FT8...
mode: Mode = Mode.UNKNOWN
mode: Mode | None = None
# Inferred mode "family".
mode_type: ModeType = ModeType.UNKNOWN
mode_type: ModeType | None = None
# Source of the mode information.
mode_source: ModeSource = ModeSource.NONE
# Frequency, in Hz
@@ -239,21 +239,17 @@ class Spot:
self.band = band.name
# Mode from comments or bandplan
if not self.mode:
self.mode = Mode.UNKNOWN
if self.mode != Mode.UNKNOWN:
if self.mode:
self.mode_source = ModeSource.SPOT
if self.comment and self.mode == Mode.UNKNOWN:
if self.comment and not self.mode:
self.mode = infer_mode_from_comment(self.comment)
self.mode_source = ModeSource.COMMENT
if self.freq and self.mode == Mode.UNKNOWN:
if self.freq and not self.mode:
self.mode = infer_mode_from_frequency(self.freq)
self.mode_source = ModeSource.BANDPLAN
# Mode type from mode
if not self.mode_type:
self.mode_type = ModeType.UNKNOWN
if self.mode != Mode.UNKNOWN and self.mode_type == ModeType.UNKNOWN:
if self.mode and not self.mode_type:
self.mode_type = infer_mode_type_from_mode(self.mode)
# If we have a latitude or grid at this point, it can only have been provided by the spot itself