FlightAware Discussions

Anyone near Heathrow, Stansted, Gatwick or Luton airports please?

If this isn’t allowed then I apologise and I do appreciate it’s a long shot.

I’d really like to have more ground traffic shown on my VRS server so if anyone is near Heathrow, Stansted, Gatwick or Luton airports and can see ground movements, would you be interested in helping me please?

All I’d need from you is a single port forwarded through your router to your Raspberry Pi and a way to contact you, either via a static IP if you have one or a free dynamic DNS service.

/edit - Or there’s a better way that I mentioned. See the next post in this thread. I can give you full instructions on how to configure your Pi so that it pushes data to me. That means you don’t need to open a port and don’t need to set up a dynamic DNS. It’s all fully under your control.


1 Like

Note that if you configure a receiver for them as a push receiver in VRS they won’t need to open a port, they can simply send the data to you using socat, and that can be scripted to ensure it’s running automatically.

$ cat /usr/local/bin/vrsfeed
# Start ADS-B transmission if not already running
if [[ -z $(ps -ef | grep '[s]ocat.*30005') ]]; then
  socat -u TCP:localhost:30005 TCP:your.vrs.host:yourwaitingpushport &> /dev/null &

Run via pi’s crontab --> */5 * * * * /usr/local/bin/vrsfeed &> /dev/null

1 Like

Yes, that’s another option as well, thanks.

It would be better for me as it means that anyone providing me data would be in control themselves and wouldn’t have to open any ports in their router. I can provide full instructions on how to do this.

May I ask where you got your silhouettes from please? I’m using the standard 2D black and white ones; yours are much nicer.

I honestly can’t remember but I’ve zipped up the flags and silhouettes and you can grab the file here.

1 Like

Fantastic thankyou, I’ve grabbed them. I wish VRS had a way to assign a location to a logged in user. That way you could have multiple participants with each one defaulting to their own location. As it stands I have a myself and friend feeding a server but I have to default the location to somewhere, which means one or both of us has to set our location on a per-browser basis. But the location is already configured for the receivers, so it would be nice to be able to assign a configured location to a user and have that be their default location.

This won’t work if one is already feeding to adsbexhange…

root     21357  1084  0 04:01 ?        00:02:26 /usr/bin/socat -u TCP: TCP:feed.adsbexchange.com:30005

Good spot, in that case the test would have to be for the destination, ie

if [[ -z $(ps -ef | grep '[s]ocat.*your\.vrs\.host:yourwaitingpushport') ]]; then

Ewww crontab starting a script :slight_smile:

The configuration file would allow you to send the beast data anywhere.

Why use one command when an entire installation script, system service and configuration can do the job for 10x the work :slight_smile:

Yeah you are correct!

But i like to have logs in the systemd journal, so i’d make a systemd service anyway.
Also linked it because of the reduced network bandwidth someone might be interested in.

1 Like

Instead of cron job, you can run the script vrsfeed by systemd. This will allow you to start, stop, stus by systemd commands.

How to run file /usr/local/bin/vrsfeed by systemd:


sudo nano /lib/systemd/system/vrsfeed.service

Copy-paste following code:


STEP-2: Enable and start the vrsfeed.service

sudo systemctl enable vrsfeed.service
sudo systemctl start vrsfeed.service

Now you can use all systemd commands

sudo systemctl status vrsfeed
sudo systemctl restart vrsfeed
sudo systemctl stop vrsfeed
sudo systemctl start vrsfeed

sudo journalctl -u vrsfeed  --no-pager

I’ve just set up the MTG receiver to push into Essex Radar this way and I’m stunned. VRS shows the data throughput and it’s roughly 5KB/sec which I reckon will be around 80Mb data/day. That’s nothing!

Handy to know how to do this, but this is a script which checks to see if socat is running and, if not, runs it. It’s designed to be run periodically, say every 5 minutes, and that’s what crontab is doing.

So what does it mean to turn it into a service? What does it mean to “start” this script, or to “restart” it, what is a “failure”?

It feels like a service-led approach for this kind of script is not appropriate, since it’s not a continuous service and not designed to be.

Yeah, I don’t think there was anything wrong with starting it via cron and then using that to check every five minutes just to make sure it’s running. Doing it as a service seems like overkill to me. My aim here is to make this very simple for someone to do if they’re happy to share their data with me.

With the interval set to 4 as the script installs it, the position of aircraft is only updated every 2 to 3 seconds.
You can reduce that interval to 2 and probably get a position update every second.

Explaining the actual update rates for stuff … is complicated … but if you try it you’ll probably be happy with it.

(1) Well this can be achieved by adding a while loop to your script as shown below.
With a while loop added to the script, the starting method (cron or systemd) will be required to start it only at boot, and wont be required to repeat start every 5 minutes (300 seconds).

while sleep 300
 # Start ADS-B transmission if not already running 
if [[ -z $(ps -ef | grep '[s]ocat.*30005') ]]; then 
socat -u TCP:localhost:30005 TCP:your.vrs.host:yourwaitingpushport &> /dev/null & 

To stop the cron job, one has to edit crontab and comment out relevant line, then reboot the Pi. It is much easier to start and stop by systemd commands which neither require editing nor reboot. If someone wants to disable the sctipt, simply issue following command:

sudo systemctl disable vrsfeed

(2) That said, if bandwidth is a concern, then @wiedehopf’s method is the way to go.

Well yes but now it’s getting silly. The whole point of the vrsfeed script is to test for, and restart, socat on a per-feed basis. This is because socat will exit if the connection is interrupted. It doesn’t make sense for vrsfeed to run continuously. If anything it is socat which is the service element and that’s what should be ‘servicifed’. Turning vrsfeed itself into a service, and then adding a while and sleep construct to hack around its unsuitability as a service, is just really nasty.

Your comments about cron are correct generally (although a reboot isn’t needed), but again consider why someone would use vrsfeed. Like dump1090 itself, it’s not a function which would need to be turned off and on all the time; most of the time it simply ticks along checking that socat is running. If for some reason socat does need to be interrupted now and again, one can simply rename vrsfeed and pkill socat, do whatever needs doing and rename vrsfeed back when ready. If there was a need to do this a lot I’d still rather edit the vrsfeed script to use a lock file and manage it via that rather than hack it into a service.

As for bandwidth, reduced bandwidth is useful for a remote site running a cellular data plan, for example, but it’s nothing to do with whether a service is the way to go. The execution aspect is divorced from the function aspect. And using external installation scripts for these mods has its own pitfalls – it’s something else to have to trust and track and hope that it’s behaving and it’s difficult to implement offline if a baseline build is desired, and it can make system management more difficult as there’s now external scripting out of your control influencing your environment. It’s got its place but for simpler requirements the risks and costs outweight the benefits in my admin experience.

Anyway, with all that in mind.

Back to the original question - Is there anyone near any of the main London Airports who can see ground traffic who would be prepared to help Essex Radar by giving me a feed of their data please?


1 Like