Weather Router

Weather Router

Educational Technology - CS6460

In the summer of 2021 I took Educational Technology at Georgia Tech. The class is very open, you can choose to do a research project or a development project. Whatever you decide to focus on it must be academically research-based. Work is done under the loose guidance of an advisor and reviewed by peers weekly.

The course had several different stages. The first few weeks of the program research was done for our ideas. Once we settled on an idea we generated a project proposal. The rest of the class was spent working on our project and reviewing our peer's work.

The Project

I decided early on that I wanted to do a full-stack website, it's nice to have a usable and iterative project instead of just a prototype. I saw this an opportunity to broaden my skill set. I had done one previous project with Flask but nothing to this extent. I had also never worked with JavaScript.

The other idea that I had was a weather router for sailing. Sailing navigation is a complex problem. For long-distance sailing calculating the correct route can mean a significantly faster and safer passage. Sailors must plan their route according to their boat’s sailing characteristics and the weather forecast. Because each boat has different movement characteristics, this is obtained from onboard data recording or from a similar boat. The weather forecasts are available from a variety of meteorological sources that depict predicted wind speed and direction. Using this information there are a variety of
weather routing programs that can find the optimal route to a destination given a weather forecast for their particular boat. This makes what was a previously complex problem easily solvable. Before this sailors seeking the best route would consult the weather forecast or monthly averaged forecast known as pilot charts, and interpret it themselves. They would also rely more heavily on cruising guide books and paid meteorologists. The problem is there is a knowledge gap for many users who are using weather routing programs. Many users do not understand how to interpret the weather and how the weather routing program works. This leaves them without the needed skill to interpret weather forecasts and completely dependent on a technology they do not understand.

“While electronic navigation has proven very reliable, operators must always be proficient with the traditional navigation principles used by the electronic system, in order to validate/evaluate what is being displayed to them.”

U.S. Coast Guard ‘Navigation Standards Manual’ (2020), page 2-1

There are many weather routing applications available. These are designed to assist in the planning of a voyage and are not designed to be used as an educational simulator. I wanted to create an environment where sailors can practice their weather routing skills in a timely manner.

How it works

Serve pages on Flask.

Display a map with JavaScript using the Leaflet library.

Get weather data from NOAA from a GRIB file. Convert this to a useable form and present it as wind barbs on the map.

Read in a boat's Polar Diagram. This describes a boat's movement characteristics for a variety of wind speeds and directions.

Let users draw a route using a leaflet library package. Use the wind data, polar diagram, and route to calculate the routes' time.

Use the A-Star pathfinding algorithm to find the optimal path from the user's start and ending position.

Result

I built the project in about a month. It was extremely rewarding as I was able to combine many different interests and technology into one.

Things I learned:

JavaScipt - I had literally never written one line of JS before this. I am sure what I wrote can be improved. The asynchronous calls were the crux for me.

Heroku - This was so easy and rewarding to host my project for others to interact with. All of my peers were able to review the project. They graciously completed a survey after reviewing the project and provided some great and flattering feedback.  

Flask - This was my most complicated project to date with Flask and the first time I had to pass data asynchronously.

Requests - To get the GRIB files I had to use the requests library to pull data from NOAA.

Xarray - This was the best Python library that I found to work with the Weather Data. It is built on top of Numpy and makes working with weather data much easier.  

You can demo the weather router here.

https://weather-router.herokuapp.com/

Weather Router Training Simulator

Next Steps

The project met all of its requirments and I have debated using it to build upon. I may start over with a different non web based version in the future for several reasons.

  • The wind barb library is really inefficient. This is the reason I had to geo restrict the map area is that the browser slows down horribly otherwise. There are a few packages out there that may help.
  • Presenting the weather data in temporal format would require more JavaScript libraries which gets complicated.

There are a few reasons I would like to continue working on this project.

  • It has real-world data and can actually be useful!
  • My original intent was to use reinforcement learning to solve for the optimal path. I think this could serve as a platform for that.