GoBalloon: Gophers at 100,000 Feet
http://github.com/chrissnell/GoBalloon
Chris Snell
Seattle Go Programmers Meetup
23 Oct 2014
Slide 2
Slide 2 text
This Chris guy.
• Live + work in Tacoma, WA
• Lead the Technical Operations
team @ San Francisco-based
Revinate (we’re SaaS for hotel
industry)
• 20 years working w/ Linux
systems
• 1 year writing Go
• My blerg:
http://output.chrissnell.com
Slide 3
Slide 3 text
Balloons?
• Reach 100,000+ Feet
(near-space)
• Carry up to a 12 lb. payload *
• High-altitude photography
• Wide-area communications
Slide 4
Slide 4 text
The view from 100,000 feet.
Slide 5
Slide 5 text
Is this legal?
• Yes, with a few stipulations.
• < 6 lbs (single payload)
• < 12 lbs (double payload)
• 50+ lb test rope
• Radar-reflective device
• Cut-down device
• NOTAM
Communications
• APRS over 2-meter ham
radio
• 500mW radio
• J-pole antenna made from
300Ω twin-lead TV cable
• Relayed to interwebs by a
network of volunteer
ground stations
Radio footprint at 95,000’:
800 miles in diameter!
Slide 10
Slide 10 text
APRS
Amateur Position Reporting System
• A protocol and a network
• 1200bps modem over 2m
radio
• Built on top of AX.25
(Layer 2 protocol)
• Position+Altitude
• Telemetry
• 1:1 messaging
Slide 11
Slide 11 text
APRS ↔ Internet
• Digipeaters
• Mountaintops/Towers
• iGates
• Somewhere with Internet
access (typically, a home)
• APRS-IS
• aprs.fi
The First Iteration
• Written in Perl
• One big loop
• Poor handling of
unexpected blocking
• Used a lot of CPU (=
battery)
• Perl has excellent and very
mature APRS library
Slide 15
Slide 15 text
The Second Iteration
• Written in Go!
• My first real Go project
• ~3000 lines of code
• Flight processes handled in
separate goroutines
• Very efficient on low-
powered SBC
• Little/no pre-existing APRS
library support
Slide 16
Slide 16 text
Computers are hard.
• Had to implement AX.25 and
APRS libraries
• AX.25 is ancient
• APRS protocol is insane
• 32 years of development
• Mostly backwards-compatible
• Wants to be everything to everybody
• Sacrifices simplicity for efficiency
• See http://www.aprs.org/doc/
APRS101.PDF
Slide 17
Slide 17 text
What I’ve built so far.
• APRS library that decodes/
encodes (most) APRS packets
• APRS controller - tx/rx position
reports, cutdown command
• GPS integration
• Burst detection w/ strobe
+buzzer activation
• Geospatial calculations (Great
Circle Distance, etc)
• Chase console
Slide 18
Slide 18 text
ʕ◔ϖ◔ʔ GopherTrak
http://github.com/chrissnell/gophertrak
• Chase console for all
chasers and home viewers
• Leverages termbox-go
• Track the balloon
• Monitor telemetry
• Track other chasers
• Issue cutdown command*
• Send messages to other
chasers*
* Not yet complete
Slide 19
Slide 19 text
Next Steps
• Assemble the balloon
• Write proper test code
• Real-world testing
• Race condition detection
• Launch the damned thing