feat(tactical): add tactical line of sight API, elevation engine, dynamic step resolution, weather module and executive showcase
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
export function getWeatherDescription(code: number): { icon: string, description_ar: string, description_en: string } {
|
||||
switch (code) {
|
||||
case 0: return { icon: '☀️', description_ar: 'صافي', description_en: 'Clear' };
|
||||
case 1: return { icon: '🌤️', description_ar: 'صافي غالباً', description_en: 'Mainly clear' };
|
||||
case 2: return { icon: '⛅', description_ar: 'غائم جزئياً', description_en: 'Partly cloudy' };
|
||||
case 3: return { icon: '☁️', description_ar: 'غائم', description_en: 'Overcast' };
|
||||
case 45:
|
||||
case 48: return { icon: '🌫️', description_ar: 'ضباب', description_en: 'Fog' };
|
||||
case 51:
|
||||
case 53:
|
||||
case 55: return { icon: '🌦️', description_ar: 'رذاذ', description_en: 'Drizzle' };
|
||||
case 61: return { icon: '🌧️', description_ar: 'أمطار خفيفة', description_en: 'Light rain' };
|
||||
case 63: return { icon: '🌧️', description_ar: 'أمطار متوسطة', description_en: 'Moderate rain' };
|
||||
case 65: return { icon: '🌧️', description_ar: 'أمطار غزيرة', description_en: 'Heavy rain' };
|
||||
case 71:
|
||||
case 73:
|
||||
case 75: return { icon: '🌨️', description_ar: 'ثلوج', description_en: 'Snow' };
|
||||
case 80:
|
||||
case 81:
|
||||
case 82: return { icon: '🌧️', description_ar: 'زخات مطرية', description_en: 'Rain showers' };
|
||||
case 95: return { icon: '⛈️', description_ar: 'عاصفة رعدية', description_en: 'Thunderstorm' };
|
||||
case 96:
|
||||
case 99: return { icon: '⛈️', description_ar: 'عاصفة رعدية مع بَرَد', description_en: 'Thunderstorm with hail' };
|
||||
default: return { icon: '🌡️', description_ar: 'غير معروف', description_en: 'Unknown' };
|
||||
}
|
||||
}
|
||||
|
||||
export function getTemperatureColor(temp: number): string {
|
||||
if (temp <= 0) return '#0047AB';
|
||||
if (temp <= 10) return '#4169E1';
|
||||
if (temp <= 20) return '#32CD32';
|
||||
if (temp <= 30) return '#FFD700';
|
||||
if (temp <= 40) return '#FF8C00';
|
||||
if (temp <= 45) return '#FF4500';
|
||||
return '#DC143C';
|
||||
}
|
||||
Reference in New Issue
Block a user