Difference between revisions of "How to setup Virtual Radar Server and pingStation for offline use"

From steamWiki
Jump to: navigation, search
(Install Virtual Radar Server)
Line 62: Line 62:
 
#Click the '''X''' to exit the Edit screen
 
#Click the '''X''' to exit the Edit screen
 
#Scroll to the top of the ''Options'' page and click '''Save'''
 
#Scroll to the top of the ''Options'' page and click '''Save'''
 +
 +
=Target your Local OSM Tile Server=
 +
#First you'll need to have a local Open Street Maps Tile Server.  You can follow my [[Creating How to Setup an Open Street Map Tile Server under Ubuntu 18.04 in a Proxmox Container|How To]] to make your own.  I'm going to assume that it is locally available at http://map.
 +
#log in to your Virtual Radar Server
 +
##Run ''su - virtradar''
 +
##Run ''nano /home/virtradar/.local/share/VirtualRadar/TileServerSettings-Custom.json'' and fill in the file with
 +
<nowiki>
 +
[
 +
  {
 +
    "MapProvider": "Leaflet",
 +
    "DisplayOrder": 1,
 +
    "Name": "Local OSM Tile Server",
 +
    "Url": "http://map/osm/{z}/{x}/{y}.png",
 +
    "Attribution": "http://map/",
 +
    "Subdomains": null,
 +
    "Version": null,
 +
    "MinZoom": null,
 +
    "MaxZoom": 19,
 +
    "ZoomOffset": null,
 +
    "MinNativeZoom": null,
 +
    "MaxNativeZoom": null,
 +
    "ZoomReverse": false,
 +
    "DetectRetina": false,
 +
    "ClassName": null,
 +
    "ExpandoOptions": [],
 +
 +
    /* New settings from version 2.4.5 onwards: */
 +
    "ErrorTileUrl": null,
 +
    "IsTms": false,
 +
    "IsLayer": false,
 +
    "DefaultBrightness": 70,
 +
    "DefaultOpacity": 100
 +
  }
 +
]</nowiki>
 +
##exit
 +
##Run ''sudo systemctl restart virtualradar''
 +
#Visit ''http://MYSERVER:8080/VirtualRadar/WebAdmin/Settings.html'' and login as ''admin/PASSWORD''
 +
##Click '''Options''' on the left
 +
##Under '''Map Providers''' click the '''Map provider:''' drop down menu and select "* Local OSM Tile Server"
 +
##Hit the '''Save''' button at the top
  
 
=Setup Debian 9 to start VirtualRadar on Boot=
 
=Setup Debian 9 to start VirtualRadar on Boot=

Revision as of 08:17, 4 July 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.

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.

Prereqs

  1. Log in to your Debian 9 server as a user capable of running the "sudo" command
  2. Run "sudo adduser virtradar"
  3. Run "sudo apt update"
  4. Run "sudo apt upgrade"
  5. 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).

  1. Run "sudo rm /var/www/html/index.html"
  2. 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>
  1. Run "sudo mkdir /var/www/html/admin"
  2. 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.

  1. visit http://pingstation-abcd (where abcd are the last 4 digits of your pingStation's MAC Address
  2. set Output Formats: to TCP Compressed VR
  3. set TCP Push IP Address or Hostname: to MYSERVER
  4. set TCP Port: to 30003
  5. click Update

Install Virtual Radar Server

  1. Run "su virtradar"
  2. Run "cd ~"
  3. Run "mkdir VirtualRadar"
  4. Run "cd VirtualRadar"
  5. Run "wget http://www.virtualradarserver.co.uk/Files/Preview/V3/VirtualRadar.tar.gz"
  6. Run "tar -xvzf VirtualRadar.tar.gz"
  7. Run "rm VirtualRadar.tar.gz"
  8. Run "wget http://www.virtualradarserver.co.uk/Files/Preview/V3/VirtualRadar.WebAdminPlugin.tar.gz"
  9. Run "tar -xvzf VirtualRadar.WebAdminPlugin.tar.gz"
  10. Run "rm VirtualRadar.WebAdminPlugin.tar.gz"
  11. Run "mono /home/virtradar/VirtualRadar/VirtualRadar.exe -nogui -createAdmin:admin -password:PASSWORD"
    • for subsequent runs use "mono VirtualRadar.exe -nogui"

Configure Virtual Radar Server

  1. Visit http://MYSERVER:8080/VirtualRadar/WebAdmin/Settings.html and login as admin/PASSWORD
  2. Click Receivers
  3. Click the green Edit icon for Receiver
  4. Change Name: to pingStation
  5. Change Format: to Compressed VRS
  6. Change Connection type: to Network
  7. Check Push receiver
  8. Set Port: to 30003
  9. Click the X to exit the Edit screen
  10. Scroll to the top of the Options page and click Save

Target your Local OSM Tile Server

  1. First you'll need to have a local Open Street Maps Tile Server. You can follow my How To to make your own. I'm going to assume that it is locally available at http://map.
  2. log in to your Virtual Radar Server
    1. Run su - virtradar
    2. Run nano /home/virtradar/.local/share/VirtualRadar/TileServerSettings-Custom.json and fill in the file with
[
  {
    "MapProvider": "Leaflet",
    "DisplayOrder": 1,
    "Name": "Local OSM Tile Server",
    "Url": "http://map/osm/{z}/{x}/{y}.png",
    "Attribution": "http://map/",
    "Subdomains": null,
    "Version": null,
    "MinZoom": null,
    "MaxZoom": 19,
    "ZoomOffset": null,
    "MinNativeZoom": null,
    "MaxNativeZoom": null,
    "ZoomReverse": false,
    "DetectRetina": false,
    "ClassName": null,
    "ExpandoOptions": [],

    /* New settings from version 2.4.5 onwards: */
    "ErrorTileUrl": null,
    "IsTms": false,
    "IsLayer": false,
    "DefaultBrightness": 70,
    "DefaultOpacity": 100
  }
]
    1. exit
    2. Run sudo systemctl restart virtualradar
  1. Visit http://MYSERVER:8080/VirtualRadar/WebAdmin/Settings.html and login as admin/PASSWORD
    1. Click Options on the left
    2. Under Map Providers click the Map provider: drop down menu and select "* Local OSM Tile Server"
    3. Hit the Save button at the top

Setup Debian 9 to start VirtualRadar on Boot

  1. Get back to your sudo user by running "exit"
  2. 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
  1. Run "sudo systemctl daemon-reload"
  2. Run "sudo systemctl enable virtualradar"
  3. Run "sudo systemctl start virtualradar"
  4. Run "sudo systemctl status virtualradar" to check status