Close

GPS - MK1 Balloon

A project log for High Altitude Weather Balloon

Design and build hardware and software required to launch a fully functional weather balloon

Jonathan BuchananJonathan Buchanan 07/22/2016 at 00:450 Comments

The most important component of any weather balloon: the GPS. Adafruit's offer of a decently cheap, power efficient, yet powerful GPS module caught my eye.

I used a gpsd daemon along with a complementary python library to read the data from it.

Since I used a usb cable to connect to the GPS, it was naturally given an entry under

/dev/ttyUSB*
The problem being that I had a usb 3g dongle as well as 2 usb webcams also being randomly assigned a number after USB depending on how udev was feeling. And worse, I'd observed the data dongle sometimes changed itself depending on what mode it was operating in.

To account for this I made a udev rules file that symlinked the GPS's actual device (based on its lsusb entry) to

/dev/ttyUSBgps

This seemed to be all well and good, I could start gpsd, point it to that custom device and be sure it was the right one. Unfortunately, due to the dynamics of the 3g dongle mentioned above, the entry for the GPS could sometimes change after boot, and gpsd was not happy to have its device changed from out from under it.

The solution, I admit, was not very tidy, but it worked. In the code I simply had the script restart the gpsd daemon with the new device (still symlinked to ttyUSBgps).

Discussions