As the crow flies - hot air balloon trajectory prediction

A few years back, I tried embarking on a quest to make a weather balloon trajectory predictor because it sounded difficult and I clearly had too much free time. The biggest challenge was finding weather data for different locations in the flight path, a need fulfilled strangely well by weather model data processed for weather predictions. Wind prediction data for most altitudes was ‘readily available’ via their complicated GrADS interface and trying to get a minimum viable interface was the extent of my interest. Very little of it worked properly, but it was fun to see a line on a map that changed based on the day saying where a balloon and its payload could land.

Fast forward to 2015, and I realized that this altitude code probably had more merit than just telling me where a weather balloon would go so I decided to put some time into the GrADS interface and work on making it more accurate and reliable, since the render times were unpredictable and a large part of the tool was just figuring out how to get to the most recent dataset based on what wasn’t available.

I finally am confident enough in its reliability and its ability to pinpoint a location, so I released my Grads library on NPM last week! Check it out!. It allows you to access many different weather prediction variables for any location on the planet. The biggest missing piece is the ability to choose the time for the prediction data.

So enough introduction! Here’s a proof of concept. Another silly balloon trajectory predictor! But this time it’s for hot air balloons. I have also been working on a little project called grads-queryable which caches data better and allows quick references to the cache so predictors run more quickly (I made a request for every location and altitude in my first trajectory predictor so it took like 5 minutes to run, this one only needs like 1-2 minutes).

The following map estimates a 1hr balloon flight at 1km/2km/3km/4km/5km. It is using the NOAA RAP weather model, which is apparently “aviation grade”. Are these realistic altitudes? Nah, but more lines are fun.

Here’s an interactive link

Try it!

I have a demo available in the repo! Here are some steps (sorry about the hard commit reference, but I’m terrible at changing things sometimes but it works fine at that point):

  1. git clone git@github.com:kylehotchkiss/grads-queryable.git
  2. git checkout f557e4531419e843f6baa44528fa4fa89439e7cd
  3. npm i
  4. Change up some variables in demo.js (note: you’ll need to change coordinates in two places, and the second one is reversed because Geojson)
  5. node demo.js
  6. A map should come up in your browser with some flight paths.