Fix/propagation solar index display 2#871
Merged
ceotjoe merged 2 commits intoaccius:Stagingfrom Apr 3, 2026
Merged
Conversation
…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>
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.
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 predictions —
noaa-planetary-k-index-forecast.jsonbundles ~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 totime_tag > nowbefore sending so the client receives only actual future predictions.Band conditions panel footer showed inconsistent SFI and K — The
SFI • Kline in the panel footer was reading fromsolarData, which comes from an independentgetSolarData()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. AddedsolarFluxandkIndexto theuseBandConditionsextras (already fetched from N0NBH) and updatedPropagationPanelto prefer those values in the footer, with fallback tosolarDatawhen N0NBH data is unavailable.Changed files
server/routes/space-weather.jssrc/hooks/useBandConditions.jssolarFluxandkIndexfrom N0NBH in extrassrc/components/PropagationPanel.jsxsolarDataTest plan
SFI • Kline in the Band Conditions panel footer matches the N0NBH values shown on hamqsl.com