One hell of a ride - FlightAirMaps the way better VirtualRadarServer

finally with lots of help from the developer i managed to install FlightAirMaps. there were some little things (osx safari browser, needed settings in apache and php etc.) that took a while until all was running.

but now i have to say i’m deeply impressed what this application has to offer, how it looks and how it works even on older tablets.

i will report new findings here over next time - and eventually write a install howto that makes it easier for others to use this great app.

website of project: https://www.flightairmap.com

sourcecode: GitHub - Ysurac/FlightAirMap: Open source project displaying live aircrafts, ships or trackers on 2D/3D map. Browse through the data based on a particular aircraft, airline, airport, tracker or vessel to search through the database or see extensive statistics. Can use ADS-B in SBS1 format (dump1090, Radarcape,...), VRS, VA (VATSIM, IVAO whazzup.txt, phpvms,...), ACARS (acarsdec, acarsdeco2), APRS, AIS as datasource.

for those who can’t wait and want to install now - here the main things you have to be aware of:

  • you need to install all required php modules
  • in php.ini set max-execution-time from ‘30’ to ‘0’
  • activate mod-rewrite in apache webserver
  • do not use safari for install i’d recommend google crome at least for setup
  • when running daemon-spotter.php via crontab @reboot use ‘sleep 10 &&’ before calling the script
  • don’t get impatient while install you see often just a turning wheel in browser - on a raspi2 it can take up to 20 minutes until all data is written to database
  • if you do a fresh install better use stretch with php7 - because php7 is at least 3 times faster then php5
5 Likes

I have downloaded the whole zip file of it from github,but kept it…it’s very difficult to install i found.Can you lead me step by step to install it.I use chrome…it’s not a software,it’s like running server.

Could you elaborate a little more please? What is your setup. I know you’re working on a mysql data collection project and this database is one of the options (although postgres with PostGis seems more likely?). You mention a raspberry but such database engines seem a fast track to fry a pi? I’m very curious. Good topic!

@Akubra @arush87

sorry - the application is still beta status and there is no way to lead through the whole process on all the possible different systems with different setups.

here is the link to github raspbian install howto from developer - if you take care of the things i pointed out in the starting post you have a good chance to end up with a running system. Raspbian · Ysurac/FlightAirMap Wiki · GitHub

first i was just looking for a nicer way to display aircrafts on a map. flightawares skyview looks ok but has several downsides and totally fails on ipad/iphone. i tried to tell them all the bugs and issues but an email to flightaware never got a reply - and on github i found no way to post issues for dump1090-fa. virtualradarserver is a nice application - but looks somewhat aged, isn’t updated for more than a year, runs natively only on windows and all data aggregation i anyhow do with dump1090 in net-only mode and my script with mysql.

so - flightairmaps is the most advanced web-interface i’m aware of, runs perfect even on 3 year old tablets but moreover is an application with lot more capabilities (see website).

running mysql on a raspi is no big deal - what a problem could be is to write much to the sd-card. solutions here: write not too much data or use a external harddrive or install the database on a different machine or make a backup copy of your sd-card and if one time the sd-card died simply buy a new one :slight_smile:

the easiest way is to use a second raspberry - but of course you can use your actual feeder (don’t forget making a backup). the only thing you have to be aware then is that there is already a webserver (lighttpd) running on port 80 - so you have to config the needed apache to e.g. port 8080. flightairmaps at the moment does not run on lighttpd because their mod_rewrite needs differnt .htaccess rewrite rules.

have fun with install guys - aka one hell of a ride (this stands for ‘streif’ - one of the coolest ski-race-tracks Streif - One Hell of a Ride - Trailer - YouTube :slight_smile:
tom

2 Likes

Thanks Tom! Second raspberry and mysql it is. I have two pidrives (one with a USB stick and one with an external drive). That eliminates the risk of frying the SD card but it’s also incredibly slow). It might be worth giving it a try though.

yep - just give it a try. if you need some tips with php and mysql install you’ll find it over here in my howto - additional php-modules needed for flightairmap are php-xml and php-zip Dump1090 MySQL Database Script - E-Mail-Alert Lat/Lon/Alt/Hex/Flight-Filter - #23 by TomMuc

cheers

1 Like

Is this all ran off the PI or can I use my actual Win 7 powered Server to host this?

should work on windows too …

Looked at the website, saw pricing I assuming that is if they provided the hosting for you vs hosting the prgram yourself?

I see alot of stuff that does look better than VRS but for beginners I feel VRS is the easiest and best bang for the effort.

I will try my hand at getting this running. How much resource does it use up (cpu % and ram?)

it runs on a pi so it will run on every reasonable windows server …

UPDATE:

two days ago i asked the developer of FlightAirMaps to add an option for aircraft.json feed - now he did and updated to master on github with .json option. advantage: much less cpu-load for the raspi, all mlat (inclusive anonymized) displayed without need of not unproblematic tinkering mlat-forward to port 30003 etc.

in addition he maybe rewrites the .htaccess files to work with ligttpd so maybe install of secondary webserver (apache) will not be needed in future

1 Like

Great!
Waiting for your step-by-step “How To”.

1 Like

@abcd567

to be honest - i was hoping you would make a howto :blush:

raspbian stretch light → sdr/dump1090 → piaware → git/php/mysql → radar.php/flightairmaps

p.s. i could copy and pm you some snippets of my bash history as basis

ok - so here are the 100 lines to success setup flightairmaps and Dump1090 MySQL Database Script - E-Mail-Alert Lat/Lon/Alt/Hex/Flight-Filter → read my start post → look into this howto from developer → see what i did starting with a fresh raspbian stretch. if this is your fa-feeder you need to install piaware in addition. dont forget to set apache to port 8080 because lighttpd/dump1090 already uses port 80:

passwd

sudo raspi-config
sudo apt-get update
sudo apt-get upgrade

sudo apt-get install mysql-server mysql-client
sudo mysql -u root -p (leave password empty)
    update mysql.user set password=password('YOUR_DB_PASSWORD') where user='root';
    update mysql.user set plugin='' where user='root';
    flush privileges;
sudo mysql -u root -p (use password you entered above)
    CREATE DATABASE 'adsb';
    CREATE DATABASE 'flightairmap';
    USE adsb;
	CREATE TABLE `aircrafts` (
	  `id` int(11) NOT NULL AUTO_INCREMENT,
	  `date` varchar(100) COLLATE latin1_german1_ci DEFAULT NULL,
	  `now` varchar(100) COLLATE latin1_german1_ci DEFAULT NULL,
	  `hex` varchar(100) COLLATE latin1_german1_ci DEFAULT NULL,
	  `flight` varchar(100) COLLATE latin1_german1_ci DEFAULT NULL,
	  `altitude` varchar(100) COLLATE latin1_german1_ci DEFAULT NULL,
	  `lat` varchar(100) COLLATE latin1_german1_ci DEFAULT NULL,
	  `lon` varchar(100) COLLATE latin1_german1_ci DEFAULT NULL,
	  `track` varchar(100) COLLATE latin1_german1_ci DEFAULT NULL,
	  `speed` varchar(100) COLLATE latin1_german1_ci DEFAULT NULL,
	  `vert_rate` varchar(100) COLLATE latin1_german1_ci DEFAULT NULL,
	  `seen_pos` varchar(100) COLLATE latin1_german1_ci DEFAULT NULL,
	  `seen` varchar(100) COLLATE latin1_german1_ci DEFAULT NULL,
	  `rssi` varchar(100) COLLATE latin1_german1_ci DEFAULT NULL,
	  `messages` varchar(100) COLLATE latin1_german1_ci DEFAULT NULL,
	  `category` varchar(100) COLLATE latin1_german1_ci DEFAULT NULL,
	  `squawk` varchar(100) COLLATE latin1_german1_ci DEFAULT NULL,
	  `nucp` varchar(100) COLLATE latin1_german1_ci DEFAULT NULL,
	  `mlat` varchar(100) COLLATE latin1_german1_ci DEFAULT NULL,
	  `tisb` varchar(100) COLLATE latin1_german1_ci DEFAULT NULL,
	  PRIMARY KEY (`id`)
	) ENGINE=InnoDB AUTO_INCREMENT=11750 DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci;

sudo apt-get install lighttpd git socat build-essential debhelper librtlsdr-dev libusb-1.0-0-dev pkg-config tcl8.5-dev autoconf python3-dev python-virtualenv libz-dev git tclx8.4 tcllib tcl-tls itcl3 htop build-essential cmake libusb-1.0-0-dev python-imaging

mkdir dump1090-mutability
cd dump1090-mutability/
git clone https://github.com/mutability/dump1090.git
cd dump1090/
dpkg-buildpackage -b
cd ..
sudo dpkg -i dump1090-mutability_1.15~dev_armhf.deb
cd ~
sudo wget -O  /etc/udev/rules.d/rtl-sdr.rules "https://raw.githubusercontent.com/osmocom/rtl-sdr/master/rtl-sdr.rules"
git clone https://github.com/flightaware/dump1090.git
sudo cp -r dump1090/public_html  /usr/share/dump1090-mutability/public_html
cd /usr/share/dump1090-mutability
sudo mv html original-html
sudo mv public_html html
cd html
sudo mv index.html gmap.html
sudo dpkg-reconfigure dump1090-mutability
sudo lighty-enable-mod dump1090
sudo lighty-enable-mod fastcgi
sudo lighty-enable-mod fastcgi-php
sudo service lighttpd force-reload
sudo shutdown -r now

cd /var/www/html
sudo git clone --depth=1 http://github.com/ysurac/flightairmap
sudo chmod 666 flightairmap/require/settings.php
sudo chmod 777 flightairmap/install/tmp
sudo chmod 666 flightairmap/data
cd ~
git clone --depth=1 http://github.com/TomMuc1/Dump1090-MySQL-Alert-Filter.git
sudo chmod 755 Dump1090-MySQL-Alert-Filter/radar.php

sudo apt-get install apache2 apache2-mod-php7.0
sudo apt-get install php7.0-common php7.0-cgi php7.0-mysql php7.0-sqlite php7.0-curl php7.0 php7.0-xml php7.0-zip php7.0-gd
sudo nano /etc/php/7.0/apache2/php.ini
sudo nano /etc/apache2/apache2.conf
sudo a2enmod rewrite
sudo systemctl restart apache2
sudo nano /etc/apache2/sites-enabled/000-default.conf
sudo nano /etc/apache2/ports.conf
sudo systemctl restart apache2

make user settings in radar.php, run flightairmaps installer and add radar.php and daemon-spotter.php to cron (@reboot sleep 10 && …) or preferable set them up as system-services - reboot raspi - that’s it

2 Likes

@TomMuc
Great write up
Thank you, danke schoen.

great is different - but this should be an ok starting point along the line i used …

Thanks, a starting point is good for me as this subject is new to me.
I will try it this weekend when I have time to slowly and carefully do it.

Well, looks like this is all geared towards running on the Pi vs a windows base installation. I am not good with coding and what have you so looks like this project is out of my scope as I have not found any reasonable how tos and such. Looks like cool software. But looks for now VRS still decent for me.

this is just how to install on raspberry. running on windows is no big deal. install apache webserver, install php, install mysql - do the needed settings and then run flightairmaps installer from chrome browser window …

I was planning to try it this weekend, but after reading your post, I am discouraged.