This is the VERY EARLY stages of the code required to support a Weather Balloon launch to "nearspace"(approximately 100,000 feet/30km.) The plan is to do real-time tracking and take HD video (and photos?) during the flight.
Note: We are a very long way from this stuff being ready.
We are not certainly not the first to do this, but that doesn't make taking a picture of the curvature of earth and the blackness of space with your own camera any less cool.
The code is in several parts:
-
The flight computer. An Arduino will talk to the onboard GPS, then write the output over serial to a wireless modem. Future plans to extend this to data from other sensors (barometric pressure, inside/outside temperature, etc.).
-
The Consumer. This is a ruby program running locally on a laptop in the chase vehicle. The laptop is connected to the other end of the wireless serial modem. The consumer reads the GPS fixes from the serial port and then inserts them into a local Mongo database (and eventually a MongoDB instance in the cloud).
-
The Server. A Sinatra webserver written that runs both locally in the chase vehicle and in the cloud for the world to see. It talks to the database and presents the Balloon path in a variety of (hopefully) interesting ways.
- KML: An auto-updating KML feed that opens in Google Earth. This will be cool for real-time tracking on the ground and for those following along on the web. This can also be loaded into Google Maps, which we'll use on the site.
- Web: A page that presents a mission control display. It will probably get its data via AJAX using...
- JSON: A feed of the balloon progress.
-
The Queue (not yet implemented): A message queue using RabbitMQ. Because the chase vehicle might not always have mobile coverage, we will add RabbitMQ to sit between the consumer and the two Mongo databases. That way, the server database can catch up and get all balloon fixes that is misses while we're offline.
There is also the minor matter of a balloon, helium, enclosure, communications, back up tracker, camera, parachutes, etc.
Do run everything, you'll need:
-
An Arduino and a GPS. For now, we're using an old Duemilanove and an EM-406, but that is just for testing, we haven't yet decided on the real equipment. You can buy everything you need at SparkFun or Little Bird Electronics.
-
You'll need the Arduino SDK to run the above.
-
Set up a symlink between the Arduino synthetic usb serial port and the one that the "consumer" is looking for:
/dev/cuaa0
. Note, this symlink doesn't appear to persist after a restart. On my machine create it using:sudo ln -s /dev/tty.usbserial-A8008HDy /dev/cuaa0
You are using homebrew, right?
brew install mongodb
# and follow the instructions...
You'll need Ruby 1.9.2 (don't remember why), so install that (probably with rvm), then:
# Assuming your Arduino/GPS are plugged in...
# In one shell, fire up the consumer to start populating the db
cd consumer
bundle install
bundle exec ruby balloon_consumber.rb
# In another shell, fire up the server
cd ../server
bundle install
rake
# visit http://0.0.0.0:3000 to view 'mission control'
# visit http://0.0.0.0:3000/kubrick.kml to view progress in Google Earth, which should auto-update every 5 seconds.
Lots of people have done this before, a few links for inspiration:
- Photos + Blog Post: Adventures in High Altitude Ballooning, a launch out of Melbourne
- Video: Homemade Spacecraft, by the Brooklyn Space Program
- Video: Near Space Balloon Flight, shot with HD HERO cameras from GoPro by Kevin Macko
- SpaceBits, very detailed writeup
- Balloon v1, launch from way back in 2002.
- Apteryx, High Altitude Balloon
- SPOC-1, Space Payload Onboard Camera
- BEAR: Balloon Experiments with Amateur Radio. Lots of info and photos here.
- HALO: High ALtitude Object, videos, photos, and a blog post
- The Icarus Project, tons of resources here
So far it is @philoye, @benaskins and @jonbartettuk