Announcement

Collapse
No announcement yet.

Tweak - Add Site Circles to Map

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tweak - Add Site Circles to Map

    In Pi24 the map at ip-of-pi:8080 (ip-of-pi/dump1090/ if you have upgraded fr24feed to ver 1.0.19-5) does not show Site Marker and Site Circles
    However it is easy to add the Site Marker and Site Circles.
    Please see below Screenshot #1 (No Circles) and Screenshot #2
    (With 3 Circles at 100 nm, 150 nm and 200 nm from receiver).

    Screenshot #1 - Default Map With No Site Marker and No Site Circles
    dump1090-without circles.png


    Screenshot #2 - Tweaked Map With Site Marker and Site Circles
    dump1090+site-circles.png


    HOW TO DO IT?

    (1) SSH to Pi and make a backup copy of file config.js with name config.js.bak. This backup copy will enable you to revert in case somethong goes wrong.

    Code:
    cd /usr/lib/fr24/public_html/
    
    #If you have upgraded fr24feed to ver 1.0.19-5, don't use above command. 
    #Use following command
    cd /usr/share/dump1090-mutability/html
    
    sudo cp config.js  config.js.bak


    (2) After making backup copy, edit file "config.js"
    Code:
    cd /usr/lib/fr24/public_html/
    
    #If you have upgraded fr24feed to ver 1.0.19-5, don't use above command. 
    #Use following command
    cd /usr/share/dump1090-mutability/html
    
    sudo nano config.js
    (3) Above command will open the file "config.js". Scroll down till you see following text:

    Code:
    SiteShow    = [COLOR=#ff0000]false[/COLOR]; // true or false
    
    SiteLat     = [COLOR=#ff0000]45.0[/COLOR];
    SiteLon     = [COLOR=#ff0000]9.0[/COLOR];
    
    
    
    SiteCircles = [COLOR=#ff0000]false[/COLOR]; // true or false (Only shown if SiteShow is true)
    // In nautical miles or km (depending settings value 'Metric')
    SiteCirclesDistances = new Array(100,150,200);
    (4) Modify text in red above, so that it becomes like the green below.
    Note: Use your actual latitude and longitude in place of xx.xxx and yy.yyyy

    Code:
    SiteShow    = [COLOR=#00aa00]true[/COLOR]; // true or false
    
    SiteLat     = [COLOR=#00aa00]xx.xxxx[/COLOR];
    SiteLon     = [COLOR=#00aa00]yy.yyyy[/COLOR];
    
    
    
    SiteCircles = [COLOR=#00aa00]true[/COLOR]; // true or false (Only shown if SiteShow is true)
    // In nautical miles or km (depending settings value 'Metric')
    SiteCirclesDistances = new Array(100,150,200);
    (5) Save file (Ctrl+o), close file (Ctrl+x)
    (6) Reload Browser (Ctrl+F5). Circle will appear. If circle dont appear, clear browser cache (Ctrl+Shift+Delete), then reload browser (Ctrl+F5).
    .
    Last edited by abcd567; 2018-01-22, 08:03.

  • #2
    RINGS IN KILOMETERS:

    If you want to see circles in kms:
    Code:
    sudo nano /usr/lib/fr24/public_html/config.js
    
    #If you have upgraded fr24feed to ver 1.0.19-5, don't use above command. 
    #Use following command
    sudo nano  /usr/share/dump1090-mutability/html/config.js
    Go to following portion of code:
    Code:
    // -- Output Settings -------------------------------------
    
    
    // Show metric values
    Metric = [COLOR="#FF0000"]false[/COLOR]; // true or false
    
    // -- Map settings ----------------------------------------
    Modify text shown in red above so that it becomes like text in green below (i.e change Metric = false; to Metric = true;)

    Code:
    // -- Output Settings -------------------------------------
    // Show metric values
    
    
    Metric = [COLOR="#00AA00"]true[/COLOR]; // true or false
    
    // -- Map settings ----------------------------------------
    Save (Ctrl+o) and Close (Ctrl+x) file.
    Reload browser (Ctrl+F5)
    Last edited by abcd567; 2018-01-22, 08:03.

    Comment


    • #3
      MORE CIRCLES
      By default there are 3 circles at 100, 150, and 200 nm or km (depending upon if metric is false or true).

      If you want more circles, edit file config.js.
      Code:
      sudo nano /usr/lib/fr24/public_html/config.js
      
      #If you have upgraded fr24feed to ver 1.0.19-5, don't use above command. 
      #Use following command
      sudo nano  /usr/share/dump1090-mutability/html/config.js

      add additional circle distances in the line starting with SiteCirclesDistances.
      As an example, I have added circles at 250 and 300 as shown in green below:

      Code:
      SiteShow    = true; // true or false
      
      SiteLat     = xx.xxxx;
      SiteLon     = yy.yyyy;
      
      
      SiteCircles = true; // true or false (Only shown if SiteShow is true)
      // In nautical miles or km (depending settings value 'Metric')
      SiteCirclesDistances = new Array(100,150,200[B][color=#00AA00],250,300[/color][/B]);
      Save changes (Ctrl+o) and close file (Ctrl+x)
      Reload Browser (Ctrl+F5).
      If additional circles dont appear, clear browser cache (Ctrl+Shift+Delete) and reload Browser (Ctrl+F5)
      Last edited by abcd567; 2018-01-22, 08:02.

      Comment

      Working...
      X