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
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.