Fix DXCC spot colouring — ADIF parsing and mode inference#670
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Further testing with different logbook providers (QRZ, etc.) uncovered several issues:
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.
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.
SSB not mapped to PHONE (DxccColorProvider.cpp) normaliseMode handled USB/LSB but not SSB as an explicit mode string. Added to the PHONE group.
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.