Flight path visualizations from ADSB data

The streaking is due to buildings, actually. I’m in the city, so it turns out 100 story buildings downtown, as well as 15-50 story residential towers, can block out good parts of the skyline. Those long sunburts roughly correspond to “holes” in the surrounding cityscape, such as where I can see clear to Lake Michigan.

I put the scripts up here now, as they have been cleaned up and tweaked a bit. It now uses a better map projection, and should be more generic as far as what data file it can take in. It still expects SBS input format, but should be easy enough to make it also accept a 3 column set of Lat, Lon, and Altitude. Pull requests definitely welcome.

github.com/toofishes/plot1090

Does the data available on port 30003 include MLAT positions? If not, where can I get those positions?

30303 according to BartJr’s post earlier, using nc to capture the traffic. Script could also be modified to take in two input files and plot them in different colors, for purposes of doing ADS-B + MLAT, or seeing how two sites overlap in coverage, etc.

Nope. I get nothing from that port. Oh, wait. I guess you have to first configure it to send to that port:

sudo piaware-config -mlatResultsFormat “beast,connect,localhost:30004 basestation,listen,30303”

Is that what that does?

P.S. Here is information about using these features. I guess I should have looked here first.

Oops, the default piaware dump1090 beast input port is actually 30104, I shouldn’t have written 30004. If you set it to 30004 you might not see mlat planes in dump1090.

To answer your question, yeah, that command just adds another output on mlat-client, in basestation format, on port 30303 (you can of course pick any port)

Could that be why I’m not seeing mlat planes anymore on the web view (view live data link)? How do I undo this? Do I just execute the same command with 30104 instead? (and restart, of course)

P.S. Just tried this, and it fixed the problem.

Heatmap using matplotlib’s hist2d function


(click for larger image)



import copy
import matplotlib as mpl
import matplotlib.pyplot as plt
from math import pi, tan, log
d2r = pi/180
lat = ]
lon = ]
lon0, lon1, lat0, lat1 = (-1.75,-1.6,0.47,0.6)  #map extent in radians
imgsize = 1000

for l in open('foo.latlon'):
    a = l.strip().split(',')
    lon.append(float(a[1])*d2r)
    lat.append(log(tan(pi/4 + float(a[0])*d2r/2)))

#remove axis and border
fig = plt.figure(frameon=False, figsize=(1,(lat1-lat0)/(lon1-lon0)))
ax = fig.add_axes([0,0,1,1])
ax.axis('off')

#with a Log histogram, zero-value pixels are unpainted (white). So, copy the color map and set bad pixels to black.
cm = copy.copy(mpl.cm.get_cmap('cubehelix'))
cm.set_bad((0,0,0))

plt.hist2d(lon, lat, range=[lon0,lon1],[lat0,lat1]], bins=imgsize, norm=mpl.colors.LogNorm(), cmap=cm)

plt.savefig("foo.png",dpi=imgsize)
#plt.show()


Do you know what those 6 blobs are SE of San Antonio? I’m seeing the same thing in my data.
victorspictures.com/p302550532/h … #h7e5fd1cd

Maybe reflections of some kind? Here’s a crop of just that area (about 3 days of data):
http://victorspictures.com/img/s7/v152/p1946216252.png

If you look for MLAT flights in that area you can usually spot them during weekdays. They all have US military ICAO addresses. The few I’ve googled usually come up as Beechcraft T-6 Texan II trainers, presumably out of Randolph or Lackland AFB.

I never thought about that. That makes sense.

I never really noticed before now that each aircraft appears to get its own little practice area. Usually when I catch them on the dump1090 live map, they’re flying low enough and maneuvering so much that the MLAT paths just look like a scrambled mess. But as a scatterplot it makes for a neat pattern!

I wonder if we can also pick up the sky divers north of here. I think they’re somewhere between Austin and Waco. Probably multiple operations, but I always notice the one right off I-35 when I go to Dallas.

Just playing around with cartodb.com here are a few quick samples using about 3 hours worth of MLAT data. Note that after you have uploaded the data, you can set filters for the various fields. For example, here are heat maps based on altitude.
http://victorspictures.com/img/s3/v23/p2121037214-2.jpg
http://victorspictures.com/img/s5/v123/p2016584431-2.jpg
http://victorspictures.com/img/s11/v3/p1935157122-2.jpg
http://victorspictures.com/img/s4/v63/p2066416945-2.jpg
http://victorspictures.com/img/s2/v4/p2139460715-2.jpg

And here are maps filtered on heading. I’ll show only the most common headings, choosing by the histogram shown.
http://victorspictures.com/img/s12/v170/p2106266763-2.jpg
http://victorspictures.com/img/s3/v7/p2031641633-2.jpg
http://victorspictures.com/img/s7/v153/p2043827749-2.jpg