-
Notifications
You must be signed in to change notification settings - Fork 2
Weather data
Open weather data provides data on both current weather and forecasts based on location. This data is needed for calculations regarding solar irradiation and WBGT.
This information can be fetched from Open Weather Map through their API providing only the user's location like the following example:
http://api.openweathermap.org/data/2.5/weather?lat=<userLatitude>&lon=<userLongitude>s&appid=<developerAppID>
The data received in response is formatted as a JSON object from which it is possible to extract the needed information as described in the documentation section below, where it is also possible to see examples of the received data type.
The different parameters needed, and fetched from OWM, is listed below and will be discussed in more detail separately:
-
Solar Irradiation
- fog
- rain
- cloud fraction
- cloud type
-
WBGT calculations (based on results from solar irradiation calculations)
- pressure
- humidity
- wind speed
When calculating solar irradiation it is needed to know whether it is raining. The documentation on weather conditions provides a full overview of the different weather conditions available specifying whether it is raining. These can all be inferred using the weather ID, weather.id.
At the moment, the following weather ID's have been chosen as indicators of rain:
- 200, 201, 202, 230, 231, 232
- 3xx
- 5xx
- 615, 616
For the full overview, follow the link to the documentation of all Open Weather Map weather conditions below.
Using the same weater.id as above, one can infer whether it is foggy. At the moment, the following weather ID's have been chosen as indicators of fog:
- 701 (mist), 714 (fog)
The amount of clouds is given as a percentage and given as a part of the received JSON object under the tag clouds.all.
On a clear day, the cloudiness would be 0 whereas a fully cloud-covered sky is 100.
An indicator for the type of cloud, which gives an idea of which atmospheric layer the clouds are a a part of.
Tag: wind.speed
Wind speed given in SI-unit m/s
Tag: main.pressure
The atmospheric pressure given in SI-units ATM.
Tag: main.humidity
Relative humidity as a percentage.
Links to online documentation from Open Weather Map and description of the data fetched from the OWM API.
| Webpage title and link | Description | Comment |
|---|---|---|
| API doc - current weather | Current weather information at user's location | |
| API doc - 3 hour forecast | Full 5-day forecast every 3 hour at users location | |
| Doc - weather conditions | All weather conditions provided by Open Weather Map |
In the app, the data is currently visualized as below:

Above the location, description of weather, humidity, wind speed, cloudiness and a visualization of the weather is shown. All of this information, including the image, is extracted from Open Weather Map's JSON response object from using their API.
- DashboardFragment.java https://github.com/frksteenhoff/ClimApp/blob/master/ClimApp/app/src/main/java/com/example/android/climapp/dashboard/DashboardFragment.java
- SolarRad.java (parameters for object only) https://github.com/frksteenhoff/ClimApp/blob/master/ClimApp/app/src/main/java/com/example/android/climapp/wbgt/SolarRad.java
- WBGT.java (parameters for object only) https://github.com/frksteenhoff/ClimApp/blob/master/ClimApp/app/src/main/java/com/example/android/climapp/wbgt/WBGT.java

- Recommended Alert Limit
- Weather data
- Shared preferences
- Translation procedure
- Prediction of indoor temperature
Testing
Server/database/API
User information
- Acclimatization
- Activity level
- Age
- Age onboarding
- Gender
- Height value
- Unit
- Weight
- Wet Bulb Globe Temperature (WBGT)
Flow controls