Sunday, March 03, 2013

Tracking aircraft with ultra-cheap software-defined radio dongle

My fascination with airplanes goes way back, probably to the days when my grandfather was a line foreman at Convair. I would spend hours looking through a small telescope at passing aircraft, and later wound up working at Convair in the MD-11 project for a couple years (before labor union costs caused the company to go under). I still today will spend time in the yard taking pictures of birds, both living and mechanical.

I have a similar interest in radio, my dad's longtime hobby. I have many radios including a shortwave radio. Left the hobby for around 15 years, though, and only recently returned to it thanks to software-defined radio.

Airplanes and the SDR can be combined with a minimum amount of expense and give you more information than you might want to have known. This is known as "virtual radar."

 I have found it useful to see an airplane on  my computer screen and then go outside and take a picture of it if it's a plane of interest, such as a 747, DC-10, helicopter or a military craft, for instance. Logging software will track each flight for you and give you information on distance, flight altitude and speed, where the plane is going to and from and much, much more.

Here's how you set up an SDR to locate and track flights in your area. You need only a few things: a computer, a radio dongle, a good antenna and your choice of free or pay software.

Assuming you already have a computer, the first thing you'll need is the radio. It's a USB dongle originally manufactured for DVB-T digital television and FM radio and it looks something like this:

They can be white or black, doesn't matter. But make sure it's a DVB-T dongle and it MUST have the RTL2832U chipset with either the R820T or E4000 tuner. You can find a lot of them on ebay or you can buy one outright from outfits such as nooelec (an ebay store). Don't pay more than $20 for these. I have paid as little as $12 with free shipping out of China.

Now you need a decoder to pull aircraft information out of your dongle. I am using ADSB#, a freeware, open source decoder for Windows (or Linux if you know how to build the program from source). The program requires several special DLLs, follow the directions on the web site. You can also use RTL1090, which works just as well.

Aircraft owners currently are upgrading to a data-transmission standard known as ADS-B Mode S. Not all planes have it yet (about 40 percent in the USA) and not all planes give their location (about 30 percent in my logs, including pretty much none of the military, for obvious reasons). The transmissions occur at 1.090 GHz, an easy tune for the dongle. The transmissions are short bursts of data in "frames" of 56 or 112 bits that the decoder picks up from the dongle and converts to a useable text form.

Take a look at the above screen cap. You have a start/stop button to kick your dongle into gear. The port number is the software's output port, where decoded messages are sent. You can share these over the internet using ADSBHub or other internet tracking services. The decoder confidence can be adjusted depending on the quality of your antenna. The timeout is how long ADSB# keeps a plane's information before it sends its data back through the filter. The frames/sec are how many transmissions the dongle is receiving (there are a lot!). Below are the controls for the dongle, generally you want to uncheck the built in Auto Gain Controls and adjust your RF gain manually until you get a maximum frames/sec. Don't worry about the frequency correction, you don't need it with the RTLSDR.

The antenna

That 1090 MHz microwave frequency requires an antenna that can receive short wavelengths, which are only a little short of 11 inches (27.4 cm). The cheap antenna that comes with a DVB-T stick is terrible for TV, but actually works fairly well for aircraft monitoring. After a few minutes of this, you'll want a better antenna to receive more and farther away planes.

I opted for a coaxial-collinear antenna, since I had many feet of unused coax laying around. I'll not clutter this post with directions on how to build these, check the link, it's quite good.

What you do is stagger pieces of coax as shown above. The lengths are half-wavelength (5.4 inches or 130.6 mm) will vary according to your coax cable's "velocity factor." Radio signals slow down inside coax, making the wire seem like it's bigger than it really is, so it'll have to be trimmed accordingly. My coax has velocity factor of 0.80, Cheaper cable usually has a factor of 0.66. You can have as many pieces as you want but more pieces will eventually cause signal loss because of its length so anything between 8 and 12 seems ideal.

The above antenna was cobbled together in a couple hours. A few days later I went with something a little more sturdy for mounting outside. I stripped the plastic sheath and outer shield from the coax and inserted the inner dielectric and copper core into copper refrigerator tubing, which runs about $1 per foot at the local hardware store. You won't need more than three or four feet, some solder and a soldering iron for this project.

Run the completed antenna into a length of half-inch PVC and mount the antenna as high as you can and I also recommend connecting your dongle as close as you can to the antenna and use USB extension cables for long runs to your computer. High frequency signals disappear quickly through coax but not so much in the USB cable.

Now you need software that'll show you where the airplanes are! There are two excellent free plotters called Virtual Radar Server (first picture in this post above, which uses Google Maps) and ADSBScope. Both work with ADSB# and both also will transmit to the internet for sharing with your freakishly obsessed virtual flight buddies. If you want to pay for your plotter, PlanePlotter is the best and not all that expensive (I'm just ultra cheap).

Above is one of the many map options you have with ADSBScope.

What to do with all this information? Well, it's up to you, it'll all appear in logs automatically. Since I worked for a time on the McDonnell Douglas MD-11 (which unfortunately don't fly above my location) I am partial to its predecessor, the DC-10. FedEx runs those frequently out of San Diego and they fly over my location high in the mountains. When I see one on the computer screen I'll run outside and get a picture of it.

Interesting, huh? Well, mildly by itself but using Virtual Radar Server you can find out the aircraft's ID number is N361FE. Take that registration number and input it into and find out it was manufactured in 1981 as a DC-10 and refitted for FedEx in 2000 as an MD-10. Now it's more interesting.

Many people wish to track military planes. They give their ID and altitude but most times not their location. However, with internet sharing and accurate time stamps, the plane's location can be deduced via "multilateration" or "mlat." I haven't tried this because my internet connection is via satellite and thus delayed :( not to mention I don't think there's anyone within many 10s of miles of me who do this kind of stuff.

I have been logging around 1,500 flights each day from my remote mountain location in Southern California. Many planes run regular routes so this translates to something less than 2,000 aircraft since December 2012 (this is now March 2013), haven't counted it up yet.

(UPDATE: I did finally count it all up. From Dec. 12 to March 12, 90 days, I logged a little less than 110,000 flights and 10.900 aicraft)

Have fun with your cheap toy, this is only one of many things you can do with a RTLSDR dongle.  Surprising how much radio is all around you! You can also download weather pictures from passing NOAA satellites and listen to radio communications by local government such as fire, police, even tow trucks and taxi cabs!

You can upgrade your equipment, even pay many hundreds of bucks if you want dedicated airplane receivers and logging. I'm not that into it, for an investment of considerably less than 50 bucks I'm having just as much fun!


Unknown said...

How did the copper-tube version of this antenna compare to the generic insulation?

Hike of your Life said...

The generic insulation works fine but I think over time corrosion would ruin the connection if it isn't soldered. That's why I changed over to copper, it's easy to solder and that will hold the antenna together better. Some people also put shrink tubing over the connections to help hold things together. The other day high wind broke off my antenna at the base of the PVC and the antenna hung in the wind 60 mph at the top of the mast for a couple days before one of the solder joints broke loose. It was a good excuse to bring down the mast and add elements to the antenna (now there's 12). I received a flight 312 miles away over the ocean so I'd say it is fixed.