You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+51Lines changed: 51 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -173,6 +173,56 @@ In that model:
173
173
174
174
The current implementation does not include that settings page or persistence layer yet. It is a presentation-only improvement that makes the displayed unit match the phone setting without introducing additional app configuration UI.
175
175
176
+
## Current Weather Metrics
177
+
178
+
The forecast header now shows a compact current-conditions summary in addition to the icon and temperature. The added values are:
179
+
180
+
- wind speed in `km/h`
181
+
- humidity as a percentage
182
+
- precipitation as a percentage
183
+
184
+
These values are derived from the first forecast entry returned by OpenWeather, which is the same entry the app already uses as the source of truth for the current primary condition and current displayed temperature.
185
+
186
+
### OpenWeather Fields Used
187
+
188
+
The app now reads the following additional fields from the OpenWeather 5-day / 3-hour forecast response:
189
+
190
+
-`main.humidity`
191
+
-`wind.speed`
192
+
-`pop`
193
+
194
+
How they are presented in the UI:
195
+
196
+
-`main.humidity` -> displayed directly as `Humidity`
197
+
-`wind.speed` -> converted from meters per second into kilometers per hour and displayed as `Wind`
198
+
-`pop` -> converted into a percentage and displayed as `Precip`
199
+
200
+
### Important Note About Precipitation
201
+
202
+
The precipitation value currently shown in the app is **not** rainfall volume.
203
+
204
+
It is OpenWeather's `pop` field, which represents the **probability of precipitation** for that forecast entry. In practical terms:
205
+
206
+
-`20%` means a 20% chance of precipitation
207
+
- it does **not** mean 20 mm of rain
208
+
209
+
If the app later needs actual precipitation amount, that would require additional handling for fields such as:
210
+
211
+
-`rain.3h`
212
+
-`snow.3h`
213
+
214
+
Those are separate from precipitation probability and should be treated as different weather metrics in the UI.
215
+
216
+
### Current Limitation
217
+
218
+
The current metrics row is intentionally lightweight:
219
+
220
+
- it uses only the first/current forecast entry
221
+
- it does not yet expose gusts, visibility, pressure, or actual rain/snow volume
222
+
- precipitation is currently shown as chance-of-precipitation only
223
+
224
+
This is a good lightweight summary for the current header, but a production-grade weather app would likely expand this into a dedicated details surface or conditions panel.
225
+
176
226
## Configuration
177
227
178
228
The current testing configuration is defined in [AppConfiguration.swift](/Users/blessingmabunda/Documents/WeatherApp/WeatherApp/App/AppConfiguration.swift).
0 commit comments