mirror of
https://github.com/PranshulGG/WeatherMaster.git
synced 2026-10-22 02:52:37 -05:00
fix: MeteoFranceCondition mapping to WeatherCondition
The fix is based on the official icons corresponding to each code, and also on my own experience using both WeatherMaster and MeteoFrance official app
This commit is contained in:
1 parent
3104cbd6f2
commit
d4aff5cbc4
2 files changed
+53
-14
No files matched your search
+15
-14
@@ -17,15 +17,11 @@ object MeteoFranceConditionMap {
|
||||
startsWith("p33") ||
|
||||
startsWith("p34") -> WeatherCondition.CLEAR_SKY // TODO: SHOULD BE WIND
|
||||
|
||||
startsWith("p31") -> WeatherCondition.NO_CONDITION_FOUND // What is this? (I have no idea either)
|
||||
startsWith("p26") ||
|
||||
startsWith("p27") ||
|
||||
startsWith("p28") ||
|
||||
startsWith("p29") -> WeatherCondition.THUNDERSTORM
|
||||
startsWith("p23") ||
|
||||
startsWith("p31") -> WeatherCondition.HEAVY_SNOW
|
||||
|
||||
startsWith("p21") ||
|
||||
startsWith("p22") ||
|
||||
startsWith("p23") -> WeatherCondition.SNOW
|
||||
startsWith("p22") -> WeatherCondition.LIGHT_SNOW
|
||||
|
||||
startsWith("p19") ||
|
||||
startsWith("p20") -> WeatherCondition.SNOW // TODO: SHOULD BE HAIL
|
||||
@@ -36,26 +32,31 @@ object MeteoFranceConditionMap {
|
||||
startsWith("p16") ||
|
||||
startsWith("p24") ||
|
||||
startsWith("p25") ||
|
||||
startsWith("p26") ||
|
||||
startsWith("p27") ||
|
||||
startsWith("p28") ||
|
||||
startsWith("p29") ||
|
||||
startsWith("p30") -> WeatherCondition.THUNDERSTORM
|
||||
|
||||
startsWith("p14") ||
|
||||
startsWith("p15") -> WeatherCondition.HEAVY_RAIN
|
||||
|
||||
startsWith("p9") ||
|
||||
startsWith("p10") ||
|
||||
startsWith("p11") ||
|
||||
startsWith("p12") ||
|
||||
startsWith("p13") ||
|
||||
startsWith("p14") ||
|
||||
startsWith("p15") -> WeatherCondition.RAIN
|
||||
startsWith("p13") -> WeatherCondition.LIGHT_RAIN
|
||||
|
||||
startsWith("p6") ||
|
||||
startsWith("p5") ||
|
||||
startsWith("p6") ||
|
||||
startsWith("p7") ||
|
||||
startsWith("p8") -> WeatherCondition.FOG_HAZE
|
||||
|
||||
startsWith("p4") ||
|
||||
startsWith("p5") -> WeatherCondition.FOG_HAZE
|
||||
|
||||
startsWith("p4") -> WeatherCondition.MOSTLY_CLEAR
|
||||
startsWith("p3") -> WeatherCondition.OVERCAST
|
||||
startsWith("p2") -> WeatherCondition.PARTLY_CLOUDY
|
||||
startsWith("p1") -> WeatherCondition.CLEAR_SKY
|
||||
|
||||
else -> WeatherCondition.NO_CONDITION_FOUND
|
||||
}
|
||||
}
|
||||
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
# Icon mappings for MeteoFrance API
|
||||
|
||||
| Icon | Preview | Plausible description (no official docs) |
|
||||
|------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------|
|
||||
| p1 |   | Sunny / clear sky |
|
||||
| p2 |   | Partly cloudy |
|
||||
| p3 |   | Very cloudy / overcast |
|
||||
| p4 |   | Mostly clear sky |
|
||||
| p5 |   | Mist |
|
||||
| p6 |   | Mist / patchy fog banks |
|
||||
| p7 |   | Fog |
|
||||
| p8 |   | Freezing fog |
|
||||
| p9 |   | Drizzle |
|
||||
| p10 |   | Light rain |
|
||||
| p11 |   | Moderate rain |
|
||||
| p12 |   | Rare/occasional showers |
|
||||
| p13 |   | Scattered rain |
|
||||
| p14 |   | Rain |
|
||||
| p15 |   | Heavy rain |
|
||||
| p16 |   | Stormy rain |
|
||||
| p17 |   | Rain and snow mixed |
|
||||
| p18 |   | Freezing rain / icy rain |
|
||||
| p19 |   | Risk of hail |
|
||||
| p20 |   | Hail showers |
|
||||
| p21 |   | A few snow flurries |
|
||||
| p22 |   | Light snow |
|
||||
| p23 |   | Heavy snow |
|
||||
| p24 |   | Risk of hail |
|
||||
| p25 |   | Risk of hail |
|
||||
| p26 |   | Risk of thunderstorms |
|
||||
| p27 |   | Risk of thunderstorms |
|
||||
| p28 |   | Thunderstorms |
|
||||
| p29 |   | Thunderstorm with hail |
|
||||
| p30 |   | Stormy showers |
|
||||
| p31 |   | Snow storm (not obvious, but written in the SVG code) |
|
||||
| p32 |   | Strong wind |
|
||||
| p33 |   | Violent wind |
|
||||
| p34 |   | Gale / windstorm |
|
||||
Reference in new issue
Block a user