Aircraft Tracking – It’s a team effort

Not sure how many noticed, but Gary left me a nice helpful comment on my last airplane tracking blog….. Game changer…..

I was all excited and convinced that I had found the way forward in being able to tread more lightly on the networks that I install a tracker behind.
As you may recall, I was using a thing called VPN to make a private network of trackers.

Gary made two points, firstly, that the data may not flow through… In this case, I was fine. We had tested that aspect, and it was working.
The second point was that if the home network that I was putting the tracker into had the same address range as my home, we may have trouble… Sure enough…..
All this time, I had been testing from work to my house, they are different addresses. When I tested it on the same address range… yeah, not so happy.

Enter my other buddy Dan. He taught me a ton about Linux. He did not give me a fish, he taught me how to fish! It was tough love at the time, but wow am I grateful for it now!
So, I dusted off some rusty brain cells and started to look for another Linux based solution.
Somewhere along the road, Dan and I looked at streaming video. Turns out that Linux is not just good at streaming video, but also information streams.
We quickly found a command call ‘netcat’.
And just like that it’s up and running.

The command is nc 127.0.0.1 30005 -c "nc thebaldgeek.net 10005"
Breaking it down, we get a network connection to the Pi and pick up the airplane data stream on port 30005 and then open a command shell for the other netcat connection to my web address on port 10005.

This actually works out really well as the main problem I was having with the VPN was that each connection got a random IP address from my VPN server and so I could not (easily) keep track of which Pi was which IP address (and thus it mixed up the aircraft locations – I had to manually fix each one).
Now, I can make each Pi have it’s own inbound port and it will always be the same.

Dan also taught me about how to do jobs on a time schedule. It’s called Cron.
So we have set up a job to start the stream as soon as the Pi starts and then every hour after that. (Thus automatically fixing any disconnects).

So. At the end of the day, thanks to a global team effort, we got there.
I will pack up this Pi and install it at my co-workers house here in Temecula, he lives over the road from the local airport. I want to put a tracker at his place so we can pick up ground and low altitude air traffic data from the local general aviation flights.
It’s going to be very cool

Thanks guys, could not have done it without yas.