Weather Data for Sonnenwagen Aachen e.V.

This project was carried out as part of the TechLabs “Digital Shaper Program” in Aachen (Winter Term 2020).

Abstract

This was a project in cooperation with the initiative Sonnewagen Aachen e.V., who are building a solar car to participate in races all over the world. For their task, it is important that they can retrieve and process wind and sun data as precisely as possible. Without precise up-to-date information about the weather or sun data, they won’t be able to optimize their performance to the fullest, and this is exactly the task of this project.

Figure 1: The Sonnenwagen Team with their solar car © Sonnenwagen Aachen e.V.

Introduction

The solar car is powered by solar energy, that is, by the sun and can be affected both positively and negatively by cloud coverage and wind. Since you can not only rely on the current weather conditions in the races they participate in, but they also need an accurate weather forecast for the next hours as well as for several days. The task was thus defined: Create a unique layout that contains all relevant data while being easily readable and the most important information is well presented.

Method

Communication with Sonnenwagen and Layout One of the most important tasks in this project was the communication with the Sonnenwagen team, so that clear agreements could be clarified and thus a satisfaction on both sides could be guaranteed. To make this possible, the TechLabs team came up with a sketch of the final layout for the weather data display and presented it to the Sonnenwagen team. After some adjustments and arrangements, the final layout was ready. In order to design an interface that is as interactive as possible, the Dash framework was used. Dash is a framework that converts python scripts into an intuitive point & click appearance, so that the handling is simplified. This is necessary in this project, because it is used by the Sonnenwagen team in their races and therefore an easy handling is necessary.

Figure 2: Layout of the interactive weather data app.

Data

API is the short form for Application Programming Interface, which is a software intermediary that allows to have interaction between two applications. In our project, the API which is used is called UBIMET that needs an authentication for its documentation namely username and password. This information has acquired by Sonnenwagen team and there was certain time limit to have had access to the documentation and to retrieve the data in JSON format. To get access to the data from this API, one needs documentation which has the information like importing packages, how to create session object for the requests, how to get and set request to this API. This information will help to get the data as and when required for the location. Sonnenwagen team provided the locations in terms of latitude and longitudes in a CSV file. The main idea was to get the data by attaching the CSV file in a code so even if any changes made in the CSV file, the main code would access the file and retrieve the data without hard coding. This will help Sonnenwagen team to work faster on the track and save time. The API provides the data for the said locations for current, 90 minutes, 3 days and 10 days interval. It has the information for the parameters such as surface radiation, sun altitude, wind direction, wind speed, cloud coverage and more. This informative data will be used in graphs and layout to give an idea about the weather conditions for the said forecast and it will be used by Sonnenwagen team for navigating their driving strategy.

Layout and creating the graphs

To keep the point of clarity it was decided to create 2 different graphs in which the sun data including the cloud cover and the wind data should be displayed.

Layout The layout is the essence of the project. It is the interface that would contain the graphs and the various inputs that can update the graphs. We decided to build on the Bootstrap framework to make the web page responsive and able to adapt to any display size. As the Sonnenwagen team is usually on the sunny side of the planet, we found out after a bit of research that a high contrast color scheme with a black background is commonly used to ensure high visibility even in the brightest conditions. The different functionalities of the layout are made as minimalist and straight to the point as possible. The checkboxes are grouped according to their use and they directly affect the graphs as explained in the following section. Room was also given for further implementations of functions that will prove helpful in the races.

Sun data The important solar data are displayed in a graph that regenerates depending on the selection. In the upper part of the layout, as depicted in Figure 2, the options in the upper area are available as checkboxes. On the left you can see the coordinates that can be selected to get the forecast for each location. Time is plotted on the x-axis of the graph, and the units of each solar parameter and cloud coverage are plotted on the y-axis.

Wind data The wind indicators and the precipitation are displayed in a single graph. The user has the option of displaying one or more indicators for one location or one indicator for several locations. An implemented callback ensures that multiple indicators and locations cannot be selected at the same time. Each change of the selection of indicators and locations triggers a callback, which generates a new graph. The graph is created in the file ‘windprecgraph.py’ using the libary plotly.graph_objects. The x-axis shows the time span contained in the selected weather forecast. The graph consists of two y-axes. Wind speed and wind gusts can be displayed on one axis. The other axis shows the precipitation. In addition, it is important for Sonnenwagen team to know from which direction the wind is coming. The user can choose whether the wind direction should be displayed absolutely or in the direction of driving. In both cases the wind direction is symbolized by thin lines, which start from a thick horizontal line (root-line). A line pointing upwards from the root line stands for a southerly wind direction or tailwind. The length of the lines varies depending on the wind strength.

Project Results

Outcome After getting every part of the project together and making sure that the dashboard is working smoothly, we go to the final layout which is shown in Figure 2. We hope that we achieved to meet the expectations of the Sonnenwagen team even though we had to let go of some features due to their complexity and time contraints.

Problems Along the road we faced multiple problems and challenges. The most prominent one was that we were not a part of the Sonnenwagen team and therefore had to understand how they work and how the data would help them. And the other main problem was working with Dash and Plotly since it was a new concept and we basically had no prior Web development knowledge.

Conclusion and Outlook

We all agreed that this was a unique ride to each one of us. We learned more things than what we were expecting. We got to work in a team with different backgrounds and expertise levels. We want to thank the Techlabs team for this oppurtunity and we look forward to overcoming new challenges.

Possibility to improve The dashboard is currently tied to work only in the World Solar Challenge which takes place in Australia in a 3000 kilometer long track from Darwin all the way to Adelaide. However the team also participate in races from all over the world. So an improvement could be made here to make it more adaptable to different coordinates. This might not be a big problem since we made sure to write the source code easy to read and explained every step in it, so naturally scalability won’t be an issue for the team who will take over the project.

Team

  • Anabel Mernitz
  • Lukas Sassen
  • Shubham Gorde
  • Karim Siala
  • Anja Schnepf

Mentor

  • Jöran Rixen

TechLabs Aachen e.V. reserves the right not to be responsible for the topicality, correctness, completeness or quality of the information provided. All references are made to the best of the authors’ knowledge and belief. If, contrary to expectation, a violation of copyright law should occur, please contact journey.ac@techlabs.org so that the corresponding item can be removed.

Learn Data Science, AI, Web Development by means of our pioneering Digital Shaper program that combines online learning, projects and community — Free for You!!