setViewMode(v => v === 'bars' ? 'chart' : 'bars')}>
+
+ 📡 VOACAP DE-DX
+
+ {viewMode === 'bars' ? '▦ bars' : '▤ chart'} • click to toggle
- {/* Solar Conditions Summary */}
-
-
-
SFI
-
{solarData.sfi}
-
-
-
SSN
-
{solarData.ssn}
-
-
-
K
+ {viewMode === 'chart' ? (
+ /* VOACAP Heat Map Chart View */
+
+ {/* Heat map grid */}
= 4 ? '#ff4444' : solarData.kIndex >= 3 ? '#ffcc00' : '#00ff88',
- fontWeight: 'bold'
- }}>{solarData.kIndex}
-
-
-
- {/* Band Predictions */}
-
-
- BAND
- RELIABILITY
- STATUS
-
-
- {currentBands.slice(0, 8).map((band, idx) => (
-
+ {bands.map((band, bandIdx) => (
+
+ {/* Band label */}
+
+ {band.replace('m', '')}
+
+ {/* 24 hour cells */}
+ {Array.from({ length: 24 }, (_, hour) => {
+ const bandData = hourlyPredictions?.[band];
+ const hourData = bandData?.find(h => h.hour === hour);
+ const rel = hourData?.reliability || 0;
+ return (
+
+ );
+ })}
+
+ ))}
+
+
+ {/* Hour labels */}
+
+
UTC
+ {[0, '', '', 3, '', '', 6, '', '', 9, '', '', 12, '', '', 15, '', '', 18, '', '', 21, '', ''].map((h, i) => (
+
{h}
+ ))}
+
+
+ {/* Legend & Info */}
+
+
+
+ {Math.round(distance/1000)}Kkm, SSN={solarData.ssn}
+
+
+
+ ) : (
+ /* Bar Chart View */
+
+ {/* Solar quick stats */}
+
- = 50 ? 'var(--color-primary)' : 'var(--text-muted)'
+ SFI {solarData.sfi}
+ SSN {solarData.ssn}
+ K = 4 ? '#ff4444' : '#00ff88' }}>{solarData.kIndex}
+
+
+ {currentBands.slice(0, 8).map((band, idx) => (
+
- {band.band}
-
-
-
-
-
= 50 ? 'var(--accent-green)' : 'var(--text-muted)'
+ }}>
+ {band.band}
+
+
+
50 ? '#000' : 'var(--text-muted)'
+ color: getStatusColor(band.status)
}}>
{band.reliability}%
-
- {band.status}
-
-
- ))}
+ ))}
+
+ )}
+
+ );
+ };
+
+ // ============================================
+ // SOLAR IMAGE COMPONENT
+ // ============================================
+ const SolarImage = () => {
+ const [imageType, setImageType] = useState('0193'); // AIA 193 (corona)
+
+ // SDO/AIA image types
+ const imageTypes = {
+ '0193': { name: 'AIA 193Ã…', desc: 'Corona' },
+ '0304': { name: 'AIA 304Ã…', desc: 'Chromosphere' },
+ '0171': { name: 'AIA 171Ã…', desc: 'Quiet Corona' },
+ '0094': { name: 'AIA 94Ã…', desc: 'Flaring' },
+ 'HMIIC': { name: 'HMI Int', desc: 'Visible' }
+ };
+
+ // SDO images update every ~15 minutes
+ const timestamp = Math.floor(Date.now() / 900000) * 900000; // Round to 15 min
+ const imageUrl = `https://sdo.gsfc.nasa.gov/assets/img/latest/latest_256_${imageType}.jpg?t=${timestamp}`;
+
+ return (
+
+
+ ☀ SOLAR
+
+
+
+

{
+ e.target.style.display = 'none';
+ }}
+ />
-
- {/* Footer */}
- Predictions at {String(currentHour).padStart(2, '0')}:00 UTC • Based on current solar conditions
+ SDO/AIA • Live from NASA
);
@@ -2246,10 +2383,10 @@
{/* Band Conditions - Compact with color coding */}
-