Skip to content

Fix/propagation solar index display 2#871

Merged
ceotjoe merged 2 commits intoaccius:Stagingfrom
ceotjoe:fix/propagation-solar-index-display
Apr 3, 2026
Merged

Fix/propagation solar index display 2#871
ceotjoe merged 2 commits intoaccius:Stagingfrom
ceotjoe:fix/propagation-solar-index-display

Conversation

@ceotjoe
Copy link
Copy Markdown
Collaborator

@ceotjoe ceotjoe commented Apr 3, 2026

What does this PR do?

@accius I needed to revisit this, it was not completely resolved with the former PR. Now it looks better, from my perspective.

Summary

Follow-up fixes to the propagation/solar-index display, addressing two remaining issues found after the initial PR #865 was merged.

  • Kp forecast chart showed week-old observations instead of predictionsnoaa-planetary-k-index-forecast.json bundles ~7 days of past observed values together with ~3 days of future predictions in one array (81 entries total, 62 of them in the past). The server was forwarding all of them; SolarPanel.slice(0, 8) therefore rendered only stale March observations. Server now filters to time_tag > now before sending so the client receives only actual future predictions.

  • Band conditions panel footer showed inconsistent SFI and K — The SFI • K line in the panel footer was reading from solarData, which comes from an independent getSolarData() NOAA fetch with its own 15-minute cache. The band condition ratings (GOOD/FAIR/POOR) above it are driven by N0NBH data, so the two sources routinely disagreed. Added solarFlux and kIndex to the useBandConditions extras (already fetched from N0NBH) and updated PropagationPanel to prefer those values in the footer, with fallback to solarData when N0NBH data is unavailable.

Changed files

File Change
server/routes/space-weather.js Filter Kp forecast to future entries only
src/hooks/useBandConditions.js Expose solarFlux and kIndex from N0NBH in extras
src/components/PropagationPanel.jsx Footer uses N0NBH SFI/K instead of solarData

Test plan

  • Confirm the Kp forecast bar chart in the Solar Indices panel shows upcoming predictions, not past observations
  • Confirm the SFI • K line in the Band Conditions panel footer matches the N0NBH values shown on hamqsl.com
  • Confirm footer falls back gracefully to NOAA values when N0NBH data is unavailable (e.g. on first load before N0NBH has responded)

ceotjoe and others added 2 commits April 3, 2026 17:28
…tions

The noaa-planetary-k-index-forecast.json endpoint returns a mix of past
observed values and future predictions in one array (roughly 7 days of
history followed by 3 days of forecast).  Without filtering, the server
was forwarding all 81 entries; SolarPanel.slice(0, 8) therefore showed
only week-old observations rather than upcoming predictions.

Filter forecast rows to time_tag > now before sending so the client
receives only future predictions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The band conditions (GOOD/FAIR/POOR) are calculated from N0NBH data, but
the SFI and K footer line was reading from solarData which comes from an
independent getSolarData() NOAA fetch.  These two sources can diverge,
making the displayed indices inconsistent with the conditions shown above.

Expose solarFlux and kIndex from useBandConditions extras (already
fetched from N0NBH) and prefer those values in the PropagationPanel
footer, falling back to solarData only when N0NBH data is unavailable.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ceotjoe ceotjoe requested a review from accius April 3, 2026 15:45
@ceotjoe ceotjoe merged commit 6f684bc into accius:Staging Apr 3, 2026
4 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.

1 participant