TWEAK-1: RANGE CIRCLES
(1) INCREASING NUMBER OF RANGE CIRCLES
By default, there are 3 circles at 100, 150 & 200 nm.
If you want to add more circles, go to following line in “config.js” and add numbers as shown in red.
sudo nano /usr/share/dump1090-mutability/html/config.js
Press Ctrl+w and type SiteCircleDistances and press Enter key.
The cursor will jump to line below. Add additional circles as shown ib red
SiteCirclesDistances = new Array(50,100,150,200,250,300);
NOTE:
If you have installed dump1090-mutability using JProchazka’s Script, the Cicle diameter will be in km instead of nm due to a bug.
Remove this bug as follows:
sudo nano /usr/share/dump1090-mutability/html/config.js
In file config.js, scroll down till you find a line
Metric=“false;”
Remove quotes " " (but don’t remove the ; semi colon), so the line becomes
Metric=false;
Save the file config.js, and restart dump1090-mutability
sudo systemctl restart dump1090-mutability
Now clear cache of your browser, and reload/refresh the map in your browser, and you will see the range rings in nautical miles.
(2) COLORING RANGE CIRCLES ALTERNATE RED/BLUE dump1090-fa version 3.5.0
#enter the html folder
cd /usr/share/dump1090-fa/html/
#make a copy of script.js by the name script_orig.js before modifications.
#this way you will have a backup copy in case somrthing goes wrong.
sudo cp script.js script_orig.js
#open file script.js for editing
sudo nano script.js
The last command above will open the file “script.js” for editing
Press Ctrl+w, then type circleStyle , then press Enter key. The cursor will jump to the line:
var circleStyle = function(distance) {
Make changes as shown in red below, save the file and exit the editor.
Reload the Browser to see map with colored circles.
NOTE:
Forum is blocking me to post the code. Code below is a screenshot of Word file. Download the Word file containing code to facilitate copy-paste.
Click here to Download: ColorCircles-dump1090-fa.docx
https://s20.postimg.org/qhl9lg2t9/Color_Circle-dump-fa.png
(3) COLORING RANGE CIRCLES ALTERNATE RED/BLUE dump1090-mutability version 1.15~dev
#enter the html folder
cd /usr/share/dump1090-mutability/html/
#make a copy of script.js by the name script_orig.js before modifications.
#this way you will have a backup copy in case somrthing goes wrong.
sudo cp script.js script_orig.js
#open file script.js for editing
sudo nano script.js
The last command above will open the file “script.js” for editing
Press Ctrl+w, then type siteCircle, then press Enter key. The cursor will jump to siteCircle.
Make changes as shown in red below, save the file and exit the editor.
Reload the Browser to see map with colored circles.
NOTE:
Forum is blocking me to post the code. Code below is a screenshot of Word file. Download the Word file containing code to facilitate copy-paste.
Click here to Download: ColorCircles-dump1090-mut.docx
https://s20.postimg.org/cel3hvccd/Color_Circles.png