Difference between revisions of "How to setup Virtual Radar Server and pingStation for offline use"
| Line 7: | Line 7: | ||
In my case I needed to be able to run the entire thing offline and had access to a pretty expensive [https://uavionix.com/products/pingstation/ uAvionix pingStation]. So in this article, we'll be using Virtual Radar Server, a pingStation, a Debian 9 server, and a local [https://www.openstreetmap.org Open Street Map] tile server. | In my case I needed to be able to run the entire thing offline and had access to a pretty expensive [https://uavionix.com/products/pingstation/ uAvionix pingStation]. So in this article, we'll be using Virtual Radar Server, a pingStation, a Debian 9 server, and a local [https://www.openstreetmap.org Open Street Map] tile server. | ||
| + | |||
| + | =Prereqs= | ||
| + | #Log in to your Debian 9 server as a user capable of running the "sudo" command | ||
| + | #Run "sudo adduser virtradar" | ||
| + | #Run "sudo apt update" | ||
| + | #Run "sudo apt upgrade" | ||
| + | #Run "sudo apt install apache2 mono-complete" | ||
| + | #*Note: If you're setting this up on an [https://en.wikipedia.org/wiki/LXC LXC] container you'll get an error with ''avahi-daemon'' and ''libnss-mdns:amd64''. This is OK. For our uses, this won't cause any problems. | ||
| + | |||
| + | =Setup Apache2 HTML Forwards= | ||
| + | The following actions will allow your users to visit ''http://MYSERVER'' and ''http://MYSERVER/admin'' to visit the main site and the admin site (respectivley). | ||
| + | #Run "sudo rm /var/www/html/index.html" | ||
| + | #Run "sudo nano /var/www/html/index.html" and enter the following | ||
| + | <nowiki><head> | ||
| + | <meta http-equiv="refresh" content="0; url=http://MYSERVER:8080/VirtualRadar" /> | ||
| + | </head></nowiki> | ||
| + | #Run "sudo mkdir /var/www/html/admin" | ||
| + | #Run "sudo nano /var/www/html/admin/index.html" and enter the following | ||
| + | <nowiki><head> | ||
| + | <meta http-equiv="refresh" content="0; url=http://MYSERVER:8080/VirtualRadar/WebAdmin" /> | ||
| + | </head></nowiki> | ||
| + | |||
| + | =Setup pingStation= | ||
| + | These steps are specific to the uAvionix pingStation. Other ADS-B receivers will setup slightly differently. | ||
| + | #visit ''http://pingstation-abcd'' (where ''abcd'' are the last 4 digits of your pingStation's [https://en.wikipedia.org/wiki/MAC_address MAC Address] | ||
| + | #set '''Output Formats:''' to ''TCP Compressed VR'' | ||
| + | #set '''TCP Push IP Address or Hostname:''' to ''MYSERVER'' | ||
| + | #set '''TCP Port:''' to ''30003'' | ||
| + | #click '''Update''' | ||
| + | |||
| + | =Install Virtual Radar Server= | ||
| + | #Run "su virtradar" | ||
| + | #Run "cd ~" | ||
| + | #Run "mkdir VirtualRadar" | ||
| + | #Run "cd VirtualRadar" | ||
| + | #Run "wget http://www.virtualradarserver.co.uk/Files/Preview/V3/VirtualRadar.tar.gz" | ||
| + | #Run "tar -xvzf VirtualRadar.tar.gz" | ||
| + | #Run "rm VirtualRadar.tar.gz" | ||
| + | #Run "wget http://www.virtualradarserver.co.uk/Files/Preview/V3/VirtualRadar.WebAdminPlugin.tar.gz" | ||
| + | #Run "tar -xvzf VirtualRadar.WebAdminPlugin.tar.gz" | ||
| + | #Run "rm VirtualRadar.WebAdminPlugin.tar.gz" | ||
| + | #Run "wget http://www.virtualradarserver.co.uk/Files/Preview/V3/VirtualRadar.TileServerCachePlugin.tar.gz" | ||
| + | #Run "tar -xvzf VirtualRadar.TileServerCachePlugin.tar.gz" | ||
| + | #Run "rm VirtualRadar.TileServerCachePlugin.tar.gz" | ||
| + | #Run "mono /home/virtradar/VirtualRadar/VirtualRadar.exe -nogui -createAdmin:admin -password:PASSWORD" | ||
| + | #*for subsequent runs use "mono VirtualRadar.exe -nogui" | ||
| + | |||
| + | =Configure Virtual Radar Server= | ||
| + | #Visit ''http://MYSERVER:8080/VirtualRadar/WebAdmin/Settings.html'' and login as ''admin/PASSWORD'' | ||
| + | #Click '''Receivers''' | ||
| + | #Click the green '''Edit''' icon for ''Receiver'' | ||
| + | #Change '''Name:''' to ''pingStation'' | ||
| + | #Change '''Format:''' to ''Compressed VRS'' | ||
| + | #Change '''Connection type:''' to ''Network'' | ||
| + | #Check '''Push receiver''' | ||
| + | #Set '''Port:''' to ''30003'' | ||
| + | #Click the '''X''' to exit the Edit screen | ||
| + | #Scroll to the top of the ''Options'' page and click '''Save''' | ||
| + | |||
| + | =Setup Debian 9 to start VirtualRadar on Boot= | ||
| + | #Get back to your ''sudo'' user by running "exit" | ||
| + | #Run "sudo nano /etc/systemd/system/virtualradar.service" and fill with | ||
| + | <nowiki>Description=Virtual Radar Server ADS-B Plotter | ||
| + | |||
| + | Wants=network.target | ||
| + | After=syslog.target network-online.target | ||
| + | |||
| + | [Service] | ||
| + | Type=simple | ||
| + | ExecStart=/usr/bin/mono /home/virtradar/VirtualRadar/VirtualRadar.exe -nogui | ||
| + | Restart=on-failure | ||
| + | RestartSec=10 | ||
| + | KillMode=process | ||
| + | User=virtradar | ||
| + | Group=virtradar | ||
| + | |||
| + | [Install] | ||
| + | WantedBy=multi-user.target</nowiki> | ||
| + | #Run "sudo systemctl daemon-reload" | ||
| + | #Run "sudo systemctl enable virtualradar" | ||
| + | #Run "sudo systemctl start virtualradar" | ||
| + | #Run "sudo systemctl status virtualradar" to check status | ||
Revision as of 19:45, 27 June 2019
Virtual Radar Server allows you to host your own, web based, ADS-B plotter. It will provide a webpage showing the location of, and information on, aircraft that are transmitting ADS-B messages. These messages, of course, have to be received. Luckily this can be accomplished cheaply and easily. Check out some of the following links.
- https://www.adsbreceiver.net/
- https://pimylifeup.com/raspberry-pi-ads-b-receiver/
- https://swling.com/blog/2017/03/making-a-flightaware-ads-b-feeder-with-a-raspberry-pi-3-and-rtl-sdr-dongle/
- https://uavionix.com/products/pingstation/
In my case I needed to be able to run the entire thing offline and had access to a pretty expensive uAvionix pingStation. So in this article, we'll be using Virtual Radar Server, a pingStation, a Debian 9 server, and a local Open Street Map tile server.
Contents
Prereqs
- Log in to your Debian 9 server as a user capable of running the "sudo" command
- Run "sudo adduser virtradar"
- Run "sudo apt update"
- Run "sudo apt upgrade"
- Run "sudo apt install apache2 mono-complete"
- Note: If you're setting this up on an LXC container you'll get an error with avahi-daemon and libnss-mdns:amd64. This is OK. For our uses, this won't cause any problems.
Setup Apache2 HTML Forwards
The following actions will allow your users to visit http://MYSERVER and http://MYSERVER/admin to visit the main site and the admin site (respectivley).
- Run "sudo rm /var/www/html/index.html"
- Run "sudo nano /var/www/html/index.html" and enter the following
<head>
<meta http-equiv="refresh" content="0; url=http://MYSERVER:8080/VirtualRadar" />
</head>
- Run "sudo mkdir /var/www/html/admin"
- Run "sudo nano /var/www/html/admin/index.html" and enter the following
<head>
<meta http-equiv="refresh" content="0; url=http://MYSERVER:8080/VirtualRadar/WebAdmin" />
</head>
Setup pingStation
These steps are specific to the uAvionix pingStation. Other ADS-B receivers will setup slightly differently.
- visit http://pingstation-abcd (where abcd are the last 4 digits of your pingStation's MAC Address
- set Output Formats: to TCP Compressed VR
- set TCP Push IP Address or Hostname: to MYSERVER
- set TCP Port: to 30003
- click Update
Install Virtual Radar Server
- Run "su virtradar"
- Run "cd ~"
- Run "mkdir VirtualRadar"
- Run "cd VirtualRadar"
- Run "wget http://www.virtualradarserver.co.uk/Files/Preview/V3/VirtualRadar.tar.gz"
- Run "tar -xvzf VirtualRadar.tar.gz"
- Run "rm VirtualRadar.tar.gz"
- Run "wget http://www.virtualradarserver.co.uk/Files/Preview/V3/VirtualRadar.WebAdminPlugin.tar.gz"
- Run "tar -xvzf VirtualRadar.WebAdminPlugin.tar.gz"
- Run "rm VirtualRadar.WebAdminPlugin.tar.gz"
- Run "wget http://www.virtualradarserver.co.uk/Files/Preview/V3/VirtualRadar.TileServerCachePlugin.tar.gz"
- Run "tar -xvzf VirtualRadar.TileServerCachePlugin.tar.gz"
- Run "rm VirtualRadar.TileServerCachePlugin.tar.gz"
- Run "mono /home/virtradar/VirtualRadar/VirtualRadar.exe -nogui -createAdmin:admin -password:PASSWORD"
- for subsequent runs use "mono VirtualRadar.exe -nogui"
Configure Virtual Radar Server
- Visit http://MYSERVER:8080/VirtualRadar/WebAdmin/Settings.html and login as admin/PASSWORD
- Click Receivers
- Click the green Edit icon for Receiver
- Change Name: to pingStation
- Change Format: to Compressed VRS
- Change Connection type: to Network
- Check Push receiver
- Set Port: to 30003
- Click the X to exit the Edit screen
- Scroll to the top of the Options page and click Save
Setup Debian 9 to start VirtualRadar on Boot
- Get back to your sudo user by running "exit"
- Run "sudo nano /etc/systemd/system/virtualradar.service" and fill with
Description=Virtual Radar Server ADS-B Plotter Wants=network.target After=syslog.target network-online.target [Service] Type=simple ExecStart=/usr/bin/mono /home/virtradar/VirtualRadar/VirtualRadar.exe -nogui Restart=on-failure RestartSec=10 KillMode=process User=virtradar Group=virtradar [Install] WantedBy=multi-user.target
- Run "sudo systemctl daemon-reload"
- Run "sudo systemctl enable virtualradar"
- Run "sudo systemctl start virtualradar"
- Run "sudo systemctl status virtualradar" to check status