[feature] Add A index to propagation overlay#1148
Conversation
There was a problem hiding this comment.
Thanks for adding A-index — it's a natural complement to K and SFI, and the implementation is clean. The change follows all existing patterns correctly: AppSettings (not QSettings), both GPU and software paint paths updated symmetrically, and the struct default of -1 for "not yet fetched" is consistent with the existing convention.
One thing worth flagging — cache invalidation on upgrade
loadCache() and setEnabled() now both require aIndex >= 0 before restoring or emitting cached data:
if (k >= 0 && a >= 0 && sfi > 0 && ts > 0) { // a will be -1 for pre-upgrade cacheAny existing user who upgrades will have PropForecastAIndex absent from their settings, so a reads as -1 and the entire cached forecast is silently dropped. The overlay won't appear until after the first successful network fetch post-launch. For most users this is a ~30–60 second gap at most, and the fetch runs automatically, so it's a minor UX issue — but it is a regression from the current behaviour where the overlay appears immediately.
If you want to preserve the instant-on behaviour through the upgrade, a straightforward fix is to treat a missing a as "old cache format, accept it anyway" by initialising it to 0 (a valid A-index) when the key is absent:
int a = s.contains("PropForecastAIndex")
? s.value("PropForecastAIndex").toInt()
: 0; // treat absent key as A=0 (valid, won't block restore)Or simply document the one-time miss as acceptable — either way is fine, just wanted to make sure it was a deliberate choice.
Everything else looks good:
- XML tag
<aindex>matches the HamQSL solar feed element name toInt()fallback to 0 on a malformed element is safe —A0is a valid value and the pattern is consistent with K/SFI parsing- All three
setPropForecastcall sites inMainWindow.cppare updated showPropguard in both render paths is consistent- No out-of-scope files touched
Again, nice clean contribution — thank you @jensenpat!
What changed
This extends the existing HF propagation conditions overlay in the panadapter to include the current A index alongside the existing K index and Solar Flux Index.
The overlay now displays:
K<n> A<n> SFI <n>with the A index positioned between K and SFI in both rendering paths.
Why this changed
The panadapter already exposes useful propagation context with K index and SFI, but it was missing the A index, which is another commonly used indicator for current geomagnetic conditions.
Adding it makes the propagation label more complete without changing the overall UI pattern.
Implementation details
aIndextoPropForecast<aindex>from the existing HamQSL solar XML feedAppSettingsalongside K, SFI, and timestampMainWindowplumbing so all panadapters receive the new three-value forecast stateK, thenA, thenSFIUser impact
Users who enable
View > Propagation Conditionswill now see the current A index directly in the panadapter overlay, between the K index and SFI.Validation
mainbase in a dedicated worktreecmake -B build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfocmake --build build -j8👨🏼💻 Generated with OpenAI Codex (GPT-5.3 Pro) and tested by @jensenpat