Task description
In this task variant, you will create a command line based weather information utility for showing the local weather. This variant utilizes multiple libraries and has you look into the XML format.
Data source
You must use weather data provided by the local weather service. While the (first) English link has the overview of the information available, the two later Estonian links go into details. If you need help with translating some part of it, contact us!
- https://www.ilmateenistus.ee/teenused/ilmainfo/?lang=en
- https://www.ilmateenistus.ee/teenused/ilmainfo/eesti-vaatlusandmed-xml/
- https://www.ilmateenistus.ee/teenused/ilmainfo/eesti-prognoos-xml/
Pay attention to the license terms – what conditions are set for using the data!
Requirements for the libraries
- Weather data must be downloaded using the libcurl library (https://curl.se/libcurl/)
- Weather data must be parsed using libxml2 library (https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home)
- You can additionally use C POSIX, GNU C and ncurses library as needed to build the main logic for your program.
Requirements for the standards and environment
The program must be written in the C programming language. You are permitted to use the C90 and C99 standards. Upon an agreement, you can also use newer standards such as C11, C17 or C23.
In addition to using the standard C libraries, you are allowed to use C POSIX, GNU C and ncurses libraries and the task-specific libraries (libcurl and libxml2). Any libraries outside of this must be agreed upon separately.
Your program will be compiled and tested in a Linux environment, equivalent to the one in the lab computers (e.g. OpenSUSE SLED-15 SP5 or Ubuntu Linux 24.04 or later, using GCC-13 compiler). The software does not need to be compatible with other operating systems such as Windows or MacOS.
Requirements
- Weather data must be automatically downloaded as needed, but not more than once per hour.
- When executed, the program must automatically show current weather information for the user’s chosen favorite locations.
- If the user has not set any favorite locations, weather information for “Tallinn-Harku”, “Tartu-Tõravere” and “Narva” will be shown.
- Program must allow the user to add and remove favorite locations. Any changes to favorites must be persistent (e.g. if user adds a favorite location, the weather information for it must be shown every time the program is executed until the user removes it. User’s input must be validated.
- For every location, the program must show
- Station name, phenomenon, precipitation, air pressure, humidity, temperature, wind speed and maximum wind speed
- A link to the location of the weather station in one of the following provides (OpenStreetMap, Google Maps or Bing Maps).
- Program must also show the temperature forecast for Estonia (min and max temperature for both day and night) for all the days available in the forecast file.
- The behavior of the program is up to you – whether this is a menu-program or only executes actions based on the command line switches. The user experience of the final product however must make sense for the use case of quickly taking a look at what the weather is outside.
- Program must adhere to the data usage requirements set for datasets!
- The code and structure of the solution must adhere to common practices for programs written in C programming language
- Project must be compiled using a Makefile you provide. The code division must make sense for the solution.
Documentation
- Title page
- Declaration of originality
- List of abbreviations and terms (can be omitted if not present)
- Table of contents
- List of figures and tables (can be omitted if not present)
- Detailed description of the solution (no walls of text!)
- A brief description of what the program does.
- Program workflow – In what order are things done? (Do not go into details! At max, half a page!)
- Special situation / error handling
- Description of issue
- What’s the status of it – did you solve it, work around it, is it still present in the code
- If it was mitigated, how did you mitigate it.
- How-to guide for using your program. Describe all options that can be used regarding command line arguments.
- Screen capture(s) of the program
- Screenshots can be added as an appendix or embedded within the write up of the solution – in this case you can extend the length by the amount of pictures.
- Summary
- Write a few sentences about your approach to the task and progression during it
- Write a few sentences about the task itself and the complexity of it
- If possible, give an estimate on the workload
- Would you recommend using this task in the future? Would you change anything about it and if so, what?
- Additional comments, emotions, thoughts
- List of references (can be omitted if not present)
- Everything that wasn’t covered within the subject and that you didn’t create on your own.
- This includes help from a friend or a colleague: https://libraryguides.vu.edu.au/ieeereferencing/personalcommunication
- If you used AI tools (i.e. ChatGPT), they must also be referenced
- All references must be precise. References such as stackoverflow.com or google.com are meaningless. It must be directly to the page where you got the information from.
Note: Function documentation also a part of the documentation requirement, which must be written into the code. For every function, detail its purpose, parameters, requirements for parameters, return value and possible side effects.
Submitting your task
The supervisor for this task is Carmen Raun (Mattermost: @rauncarmen).
Submitting of the homework is in two stages:
- Upload your solution to Moodle: https://moodle.taltech.ee/mod/assign/view.php?id=339483
- Write a message to the task supervisor using their preferred method of contact to let them know that the solution has been uploaded. It’s also recommended to include the solution in the message!
You need to submit two files:
- The documentation (pdf document)
- Your project, as a .zip archive (source files, Makefile. If necessary, data and configuration files).
The supervisor can ask for an on-site defense of the solution.