@mytec: iteration1 implemented

This commit is contained in:
2026-01-30 08:23:29 +02:00
parent f59e63f181
commit 6bc4357a3c
17 changed files with 566 additions and 187 deletions

View File

@@ -18,23 +18,25 @@ export function getSignalQuality(rsrp: number): SignalQuality {
return 'no-service';
}
// New color scheme: cold = weak, warm = strong
export const SIGNAL_COLORS: Record<string, string> = {
excellent: '#22c55e',
good: '#84cc16',
fair: '#eab308',
poor: '#f97316',
weak: '#ef4444',
'no-service': '#6b7280',
excellent: '#f44336', // Red (very strong)
good: '#ff9800', // Orange (strong)
fair: '#ffeb3b', // Yellow (acceptable)
poor: '#4caf50', // Green (weak)
weak: '#00bcd4', // Cyan (very weak)
'no-service': '#0d47a1', // Dark Blue (no coverage)
} as const;
export function getRSRPColor(rsrp: number): string {
return SIGNAL_COLORS[getSignalQuality(rsrp)] ?? '#6b7280';
return SIGNAL_COLORS[getSignalQuality(rsrp)] ?? '#0d47a1';
}
export const RSRP_LEGEND = [
{ label: 'Excellent', range: '> -70 dBm', color: SIGNAL_COLORS.excellent, min: -70 },
{ label: 'Good', range: '-70 to -85 dBm', color: SIGNAL_COLORS.good, min: -85 },
{ label: 'Fair', range: '-85 to -100 dBm', color: SIGNAL_COLORS.fair, min: -100 },
{ label: 'Poor', range: '-100 to -110 dBm', color: SIGNAL_COLORS.poor, min: -110 },
{ label: 'Weak', range: '-110 to -120 dBm', color: SIGNAL_COLORS.weak, min: -120 },
{ label: 'Excellent', range: '> -70 dBm', color: '#f44336', description: 'Very strong signal', min: -70 },
{ label: 'Good', range: '-70 to -85 dBm', color: '#ff9800', description: 'Strong signal', min: -85 },
{ label: 'Fair', range: '-85 to -100 dBm', color: '#ffeb3b', description: 'Acceptable signal', min: -100 },
{ label: 'Poor', range: '-100 to -110 dBm', color: '#4caf50', description: 'Weak signal', min: -110 },
{ label: 'Weak', range: '-110 to -120 dBm', color: '#00bcd4', description: 'Very weak signal', min: -120 },
{ label: 'No Service', range: '< -120 dBm', color: '#0d47a1', description: 'No coverage', min: -140 },
] as const;