Skip to content

Fix DXCC spot colouring — ADIF parsing and mode inference#670

Merged
ten9876 merged 1 commit into
aethersdr:mainfrom
M7HNF-Ian:fix/dxcc-adif-parsing
Apr 4, 2026
Merged

Fix DXCC spot colouring — ADIF parsing and mode inference#670
ten9876 merged 1 commit into
aethersdr:mainfrom
M7HNF-Ian:fix/dxcc-adif-parsing

Conversation

@M7HNF-Ian

Copy link
Copy Markdown
Contributor

Further testing with different logbook providers (QRZ, etc.) uncovered several issues:

  1. extractField static regex (AdifParser.cpp) extractField declared its QRegularExpression as static const. Because the pattern is built from the fieldName parameter, the regex was compiled once on the first call and reused for all subsequent calls regardless of field name. Fixed by removing static.

  2. Non-standard ADIF band labels (AdifParser.cpp) Some logging software writes BAND:210 instead of the ADIF-standard BAND:310M. Added a normalisation map for bare-numeric band labels.

  3. SSB not mapped to PHONE (DxccColorProvider.cpp) normaliseMode handled USB/LSB but not SSB as an explicit mode string. Added to the PHONE group.

  4. No-mode spots defaulted to DATA (DxccColorProvider.cpp) DX cluster spots rarely carry a mode field. Without one, the previous code defaulted to DATA — meaning operators with FT8-heavy logs would see most spots as Worked regardless of actual mode need. Added inferModeFromFreq() using IARU Region 1/2 band-plan segments to infer CW/DATA/PHONE from frequency when no mode is present.

Further testing with different logbook providers (QRZ, etc.) uncovered
several issues:

1. extractField static regex (AdifParser.cpp)
   extractField declared its QRegularExpression as static const. Because
   the pattern is built from the fieldName parameter, the regex was
   compiled once on the first call and reused for all subsequent calls
   regardless of field name. Fixed by removing static.

2. Non-standard ADIF band labels (AdifParser.cpp)
   Some logging software writes <BAND:2>10 instead of the ADIF-standard
   <BAND:3>10M. Added a normalisation map for bare-numeric band labels.

3. SSB not mapped to PHONE (DxccColorProvider.cpp)
   normaliseMode handled USB/LSB but not SSB as an explicit mode string.
   Added to the PHONE group.

4. No-mode spots defaulted to DATA (DxccColorProvider.cpp)
   DX cluster spots rarely carry a mode field. Without one, the previous
   code defaulted to DATA — meaning operators with FT8-heavy logs would
   see most spots as Worked regardless of actual mode need. Added
   inferModeFromFreq() using IARU Region 1/2 band-plan segments to infer
   CW/DATA/PHONE from frequency when no mode is present.
@ten9876 ten9876 enabled auto-merge (squash) April 4, 2026 16:34
@ten9876 ten9876 merged commit 72b2fb0 into aethersdr:main Apr 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants