Hi,
A couple weeks ago I had posted an item on how to tweak the flightaware version of dump1090 to enable the following features:
- Hover with the mouse over a plane icon to display all available flight information, such as position, altitude, speed, direction, distance, etc.
- Planes colored by altitude. Each color is referring to a specific altitude zone.
- Added a map legend which tells what color is which altitude zone.
It was not really perfect. It only works with metric values.
Shortly after that I started to use the mutability version of dump1090. And now I have added the above mentioned enhancements to the dump1090-mutability. I use version dump1090-mutability (1.14). Here is how it looks like:
I have added an section to the /usr/share/dump1090-mutability/html/config.js where you can change the settings:
// -- Display aircrafts in color depending on their altitude
Display_Altitude_In_Color = true; // true or false
// Number of altitude zones displayed
NumberOfAltitudeZones = 24;
// Maximum altitude in meters of feet (depending on 'Metric' setting).
MaxAltitude = 11999;
In this file you can also configure:
- your latitude/longitude position of your antenna.
- whether you want to use Metric values.
- the distance circles.
- the title name of your dump1090 webpage.
To use my tweaks take the following staps:
- backup the *.js, ***.html **en *.css files in /usr/share/dump1090-mutability/html directory.
- download the new files from my dropbox.
- reload your browser.
(In case anything goes wrong: Just copy the backup files to the original directory.)
Down here I will explain the installation (a bit of a big word of it) step by step:
- create a backup directory:
pi@ted1090-4 ~ $ cd /usr/share/dump1090-mutability/html/
pi@ted1090-4 /usr/share/dump1090-mutability/html $ sudo mkdir backup
- Copy the *.js, ***.html **en *.css files in /usr/share/dump1090-mutability/html to the backup directory:
pi@ted1090-4 /usr/share/dump1090-mutability/html $ sudo cp *.js backup/
pi@ted1090-4 /usr/share/dump1090-mutability/html $ sudo cp *.html backup/
pi@ted1090-4 /usr/share/dump1090-mutability/html $ sudo cp *.css backup/
- Check if your backupfiles are created succesfully:
pi@ted1090-4 /usr/share/dump1090-mutability/html $ ls -l backup/
total 68
-rw-r--r-- 1 root root 1692 Aug 11 21:19 config.js
-rw-r--r-- 1 root root 10375 Aug 11 21:19 gmap.html
-rw-r--r-- 1 root root 15742 Aug 11 21:19 planeObject.js
-rw-r--r-- 1 root root 31251 Aug 11 21:19 script.js
-rw-r--r-- 1 root root 1920 Aug 11 21:19 style.css
- Download the new files from my dropbox (you can copy/past all lines at once to the commandline in the /usr/share/dump1090-mutability/html directory):
sudo wget -O colored_altitude_zones.js https://www.dropbox.com/s/ut23yc8q4h3w2ey/colored_altitude_zones.js?dl=0
sudo wget -O config.js https://www.dropbox.com/s/q1br3tb2mw1ktut/config.js?dl=0
sudo wget -O gmap.html https://www.dropbox.com/s/izbluia1vjw549g/gmap.html?dl=0
sudo wget -O planeObject.js https://www.dropbox.com/s/2yk9d40v85yevhx/planeObject.js?dl=0
sudo wget -O script.js https://www.dropbox.com/s/2aqdmrag1sy8psp/script.js?dl=0
sudo wget -O style.css https://www.dropbox.com/s/olisbfsvu9evwxs/style.css?dl=0
- Check if all files are downloaded succesfully:
pi@ted1090-1 /usr/share/dump1090-mutability/html $ ls -l *.css *.html *.js
-rw-r--r-- 1 root root 1464 Aug 11 20:45 colored_altitude_zones.js
-rw-r--r-- 1 root root 1963 Aug 11 20:46 config.js
-rw-r--r-- 1 root root 10496 Aug 11 20:46 gmap.html
-rw-r--r-- 1 root root 17940 Aug 11 21:12 planeObject.js
-rw-r--r-- 1 root root 31455 Aug 11 20:47 script.js
-rw-r--r-- 1 root root 2094 Aug 11 20:48 style.css
- Edit your config.js file with your own settings:
pi@ted1090-1 /usr/share/dump1090-mutability/html $ sudo nano config.js
- Refresh your browser (twice):** ](http://)/dump1090**
Now you should see colored planes!
I hope you like it
Something went wrong? Just copy the backup files back:
pi@ted1090-1 /usr/share/dump1090-mutability/html $ sudo cp backup/* .
And refresh your browser (twice). It should work again like before.
Are you curious what changes I have made to the files? Compare the backup files with the new files. For example:
pi@ted1090-1 /usr/share/dump1090-mutability/html $ sudo diff planeObject.js backup/planeObject.js