Page 1 of 12 12311 ... LastLast
Results 1 to 10 of 120

Thread: How to Install dump1090-mutability_1.15~dev on RPi

  1. #1
    Captain abcd567's Avatar
    Join Date
    Sep 2013
    Location
    Toronto CYYZ
    Posts
    2,835

    How to Install dump1090-mutability_1.15~dev on RPi

    .
    Last update: July 17, 2019



    The "dump1090-mutability_1.15~dev" is development version of dump1090-mutability, and has many additional functionality. It is preferred & installed by lot of users. However there is no .deb package available for installation, and one has to built it from the source code.
    EDIT: .deb packge added, see METHOD-1

    NOTE:
    (1) The dump1090-mutability_1.15~dev is NOT compatible with Pi24 img and Piaware img

    (2) Even if you are using a DVB-T USB Stick, in FR24 settings, DO NOT choose Receiver "DVB-T", as this will downgrade dump1090-mutability from ver 1.15~dev to ver 1.14. Choose Receiver ModeS Beast (USB/Network)



    TO HAVE A TROUBLE FREE INSTALLATION, IT IS REQUIRED TO MAKE A FRESH INSTALL, AS SHOWN BELOW:
    (a) Format microSD Card
    (b) Write Raspbian Image.
    (c) Install dump1090-mutability (Steps 1 to 10).
    (d) Install data feeders FR24, Flightaware, & Planefinder (Steps 11, 12, & 13).

    It is important that first dump1090-mutability is installed, and data feeders are installed after dump1090-mutability has been installed.

    METHOD-1:
    Install pre-built package of dump1090-mutability_1.15~dev on RPi/Raspbian (STRETCH & BUSTER)

    Code:
    sudo bash -c "$(wget -O - https://raw.githubusercontent.com/abcd567a/dump1090/master/install_dump1090_mut_1.15.sh)"

    Alternative for Raspbian BUSTER
    Code:
    sudo apt-get update 
    sudo apt-get install lighttpd 
    sudo apt-get install dump1090-mutability 
    sudo lighty-enable-mod dump1090


    METHOD-2:
    Build dump1090-mutability_1.15~dev from source


    STEP (1): UPDATE THE SYSTEM & INSTALL PRE REQUISIT PACKAGES (needed to build, and needed to fulfill dependencies)
    Code:
    sudo apt update 
    
    sudo apt install -y build-essential debhelper rtl-sdr libusb-1.0-0-dev 
    
    sudo apt install -y git lighttpd pkg-config fakeroot curl cron 
    
    
    wget -O ~/librtlsdr0_0.5.3-11+b2_armhf.deb "http://ftp.us.debian.org/debian/pool/main/r/rtl-sdr/librtlsdr0_0.5.3-11+b2_armhf.deb"  
    
    sudo dpkg -i librtlsdr0_0.5.3-11+b2_armhf.deb
    
    
    wget -O ~/librtlsdr-dev_0.5.3-11+b2_armhf.deb "http://ftp.us.debian.org/debian/pool/main/r/rtl-sdr/librtlsdr-dev_0.5.3-11+b2_armhf.deb"  
    
    sudo dpkg -i librtlsdr-dev_0.5.3-11+b2_armhf.deb


    STEP (2): DOWNLOAD SOURCE FILES TO YOUR RPi
    Code:
    sudo mkdir ~/build-dump-mut
    cd ~/build-dump-mut
    sudo git clone -b "unmaintained" https://github.com/mutability/dump1090.git

    STEP (3): BUILD THE DUMP1090-MUTABILITY PACKAGE
    Note: This is a lengthy process, and seems to freez at several occasions. Please be patient.
    Code:
    cd ~/build-dump-mut/dump1090
    sudo dpkg-buildpackage -b

    STEP (4): INSTALL THE DUMP1090-MUTABILITY PACKAGE
    Code:
    cd ~/build-dump-mut
    sudo dpkg -i dump1090-mutability_1.15~dev_*.deb

    STEP (5): UPDATE librtlsdr0 and librtlsdr-dev
    Code:
    sudo apt install librtlsdr0 librtlsdr-dev

    STEP (6): DUMP1090-MUTABILITY POST INSTALLATION CONFIGURATION
    Code:
    sudo dpkg-reconfigure dump1090-mutability
    For most settings, accept default settings by pressing "Enter".
    For following settings, enter values as shown:
    (a) RTL-SDR dongle to use: 0
    (b) Your receiver's Latitude (in decimal format): xx.xxxx
    (c) Your receiver's Longitude (in decimal format): yy.yyyy
    (d) Interface address to bind to (blank for all interfaces): remove default 127.0.0.1 and leave blank.

    For advance users:Alternatively, you can change the settings by editing the configuration file shown below:
    Code:
    sudo nano /etc/default/dump1090-mutability
    #after making changes, save file (Ctrl+o) and exit (Ctrl+x)
    
    #Restart
    sudo systemctl restart dump1090-mutability
    BUG FIX:
    The map in browser will show following:





    Give following commands to remove this bug

    Code:
    sudo wget -O /etc/udev/rules.d/rtl-sdr.rules "https://raw.githubusercontent.com/osmocom/rtl-sdr/master/rtl-sdr.rules" 
    
    sudo reboot
    STEP (7): ADD TERRAIN LIMIT RINGS
    Dump1090-mutability v1.15~dev can display terrain limit rings using data obtained from the website http://www.heywhatsthat.com.[/FONT]
    (a) First you have to generate a panorama for your location. To do this, follow the steps in first post of the following thread:

    What is the Maximum Range I can Get?


    (b) Once your panorama is generated, look near the top left of your newly created panorama page. You will see URL of your panorama there. The URL will be http://www.heywhatsthat.com/?view=XXXXXXXX where XXXXXXXX is the ID for your panorama.

    See screenshot below.





    (c) Use following command to download the generated panorama's JSON file "upintheair.json" to your RPi, and save it in the folder "/usr/share/dump1090-mutability/html"
    (replace XXXXXXXX in the command below by your panorama's ID).

    Code:
    sudo wget -O /usr/share/dump1090-mutability/html/upintheair.json "http://www.heywhatsthat.com/api/upintheair.json?id=XXXXXXXX&refraction=0.25&alts=12192"
    You can create as many rings as you want by adding elevations (in meters) at the end of URL given in the wget command above after "&alts=", separated by commas.

    10,000 ft = 3048 m
    20,000 ft = 6096 m
    25,000 ft = 7620 m
    30,000 ft = 9144 m
    40,000 ft = 12192 m

    Hence if you want to add all the 5 elevation rings noted above, the string at the end of wget URL will become "&alts=3048,6096,7620,9144,12192"

    To keep map un-cluttered, I have used only 2 rings in the wget command above. i.e. the 10,000 feet (3048 meters), and 40,000 feet (12192 meters).
    Important:
    Use altitude in meters in the wget URL above.
    Do NOT use feet.



    (d) RESTART dump1090-mutability
    Code:
    sudo /etc/init.d/dump1090-mutability restart
    STEP (8) VIEW MAP
    To view map, type following address in your browser:
    http://<ip address of your RPi on your LAN>/dump1090/gmap.html





    STEP (9): RANGE CIRCLES - Kms or nm
    Range Circle default unit is nm (metric=false).
    To change to km, change "metric=false" to "metric=true"
    Press ctrl+w, type Metric = false , then press Enter key. The cursor will jump to Metric = false; change false to true as shown in red.
    Metric = true;
    Attached Images Attached Images
    Last edited by abcd567; 2019-09-27 at 05:43.

  2. #2
    Captain abcd567's Avatar
    Join Date
    Sep 2013
    Location
    Toronto CYYZ
    Posts
    2,835
    STEP (10): INSTALLATION OF FR24 DATA FEEDER:
    Install FR24 feeder from instructions on this page: https://www.flightradar24.com/raspberry-pi using command
    Code:
    sudo bash -c "$(wget -O - http://repo.feed.flightradar24.com/install_fr24_rpi.sh)"
    During above command, it will present a signup wizard, asking for email, sharing key, latitude, longitude, antenna height etc.

    After sign-in details, it will ask choice for receiver configuration. ENTER VALUES SHOWN IN RED BELOW

    Even if you are using a DVB-T USB Stick, when doing "Receiver selection", do NOT choose receiver "1 - DVBT Stick (USB)", as this will downgrade your dump1090-mutability from ver 1.15 to ver 1.14
    Choose receiver " 4 - ModeS Beast (USB/Network)"


    Step 4.1 - Receiver selection:
    1 - DVBT Stick (USB)
    -----------------------------------------------------
    2 - SBS1/SBS1er (USB/Network)
    3 - SBS3 (USB/Network)
    4 - ModeS Beast (USB/Network)
    5 - AVR Compatible (DVBT over network, etc)
    6 - microADSB (USB/Network)
    7 - SBSx via Basestation (localhost:30006)
    Enter your receiver type (1-7)$: 4


    Step 4.2 - Please select connection type:
    1 - Network connection
    2 - USB directly to this computer
    Enter your connection type (1-2)$: 1


    Step 4.3A - Please enter your receiver's IP address/hostname
    $: 127.0.0.1

    Step 4.3B - Please enter your receiver's data port number
    $: 30005


    Step 5.1 - Would you like to enable RAW data feed on port 30002 (yes/no)$:no

    Step 5.2 - Would you like to enable Basestation data feed on port 30003 (yes/no)$:no

    Step 6A - Please select desired logfile mode:
    0 - Disabled
    1 - 48 hour, 24h rotation
    2 - 72 hour, 24h rotation
    Select logfile mode (0-2)$:0

    Step 6B - Please enter desired logfile path (/var/log):
    $:/var/log


    Post Install configuration/Re-configuration of FR24 feeder
    The FR24 Feeder can be configured on the page http://<IP of RPi>:8754/settings.html. The "Receiver" and "Host/IP" setting should be "ModeS Beast(TCP), 127.0.0.1:30005" as shown in screenshots below.

    FR24 settings - External dump1090 - BEAST-TCP.png

    Re-configuration can also be done through SSH
    Code:
    ~ $ sudo fr24feed --reconfigure
    #after reconfiguration
    ~$ sudo service fr24feed restart
    .
    .

    STEP (11): INSTALLATION OF FLIGHTAWARE DATA FEEDER:
    http://flightaware.com/adsb/piaware/install (STEP 2 ONLY)

    .

    STEP (12): INSTALLATION OF PLANEFINDER DATA FEEDER:
    http://forum.planefinder.net/threads...241/#post-2451

    COLORING RANGE CIRCLES ALTERNATE RED/BLUE dump1090-mutability version 1.15~dev

    Code:
    #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 following line:

    if (SiteCircles) {

    Make changes as shown in red below, save the file and exit the editor.
    Reload the Browser to see map with colored circles.

    Code:
        if (SiteCircles) {
                            var circleColor = ['#FF0000', '#0000FF'];
                            for (var i=0; i < SiteCirclesDistances.length; ++i) {
                            var circleStyle = new ol.style.Style({
                                    fill: null,
                                    stroke: new ol.style.Stroke({
                                            //color: '#000000',
                                            color: circleColor[i%2],
                                            lineDash: [3, 3],  //add this line only if you want dashed circles
                                            width: 1
                                    })
                            });
    
                            //for (var i=0; i < SiteCirclesDistances.length; ++i) {
                                    var distance = SiteCirclesDistances[i] * 1000.0;
                                    if (!Metric) {
                                            distance *= 1.852;
                                    }
    
                                    var circle = make_geodesic_circle(SitePosition, distance, 360);
                                    circle.transform('EPSG:4326', 'EPSG:3857');
                                    var feature = new ol.Feature(circle);
                                    feature.setStyle(circleStyle);
                                    StaticFeatures.push(feature);
                            }
                    }
    Last edited by Oblivian; 2019-07-18 at 04:50.

  3. #3
    Passenger
    Join Date
    May 2016
    Location
    Long Island, New York, USA
    Posts
    1
    Sorry for the late response.
    So after reboot lighttpd did not run as it did before. Checking the status shows that its running and normal.
    Reinstalled and still had no success in getting the pages to load.
    Ran the configuration for dump1090 and added --net --net-http-port 8080.
    Works now.

    DUMP1090 85 231.jpg

  4. #4
    Captain abcd567's Avatar
    Join Date
    Sep 2013
    Location
    Toronto CYYZ
    Posts
    2,835
    READ & SET GAIN FROM BROWSER / DUMP1090 MAP

    Last Updated: 20th July, 2018

    This method is for dump1090-mutability ver 1.15~dev.

    It will NOT work for PI24 / dump1090-mutability ver 1.14 ("Receiver=DVBT" setting)


    OPTION-1: INDEPENDENT



    OPTION-2: EMBEDDED IN MAP





    STEP-1: Only Step-1 is different for Jessie, Stretch, and Buster, rest is same.

    JESSIE
    Code:
    sudo apt update   
    sudo apt install php5-cgi

    STRETCH
    Code:
    sudo apt update   
    sudo apt install php7.0-cgi
    BUSTER
    Code:
    sudo apt update   
    sudo apt install php7.3-cgi

    STEP-2:
    Code:
    sudo lighty-enable-mod fastcgi-php   
    sudo /etc/init.d/lighttpd force-reload

    STEP-3:
    Create a new file gain.php containing gain button, drop-down list of gains & current gain display.

    3.1 - Create a new file gain.php in folder /usr/share/dump1090-mutability/html
    Code:
    sudo nano /usr/share/dump1090-mutability/html/gain.php
    3.2 - Copy-paste following code in newly created blank file gain.php

    NOTE:Code is larger than displayed. Scroll Right and Scroll Down to see these in full.
    Code:
    <html>
     <form id="myform" action="gain.php" method="post" />
     <div><font color=#ff0000 face="'Helvetica Neue', Helvetica, Arial, sans-serif">Current Gain: <?php system('cat /usr/local/sbin/gain/currentgain');?> </font></div>
     <select name="gain" id="gain">
       <option value=-10>-10</option>
       <option value=49.6>49.6</option>
       <option value=48.0>48.0</option>
       <option value=44.5>44.5</option>
       <option value=43.9>43.9</option>
       <option value=43.4>43.4</option>
       <option value=42.1>42.1</option>
       <option value=40.2>40.2</option>
       <option value=38.6>38.6</option>
       <option value=37.2>37.2</option>
       <option value=36.4>36.4</option>
       <option value=33.8>33.8</option>
       <option value=32.8>32.8</option>
       <option value=29.7>29.7</option>
       <option value=28.0>28.0</option>
       <option value=25.4>25.4</option>
       <option value=22.9>22.9</option>
       <option value=20.7>20.7</option>
       <option value=19.7>19.7</option>
       <option value=16.6>16.6</option>
     </select>
     <input type="submit" value="Set Gain" style="color:#ffffff;background-color:#00A0E2;border-color:#00B0F0;" />
     </form>
    </html>
    
    <?php
    function setgain(){
    $gain="{$_POST['gain']}";
    system("echo $gain > /usr/local/sbin/gain/newgain");
    sleep(5);
    header("Refresh:0");
    }
    
    if ("{$_POST['gain']}"){
    setgain();
    }
    
    ?>
    
    
    <!------ END ------>
    Save (Ctrl+o) and Close (Ctrl+x)


    STEP-4:
    Create Gain Changing Script

    4.1 - Create new directory
    Code:
    sudo mkdir /usr/local/sbin/gain
    4.2 - Create a new blank script file setgain.sh inside this new directory


    Code:
    sudo touch /usr/local/sbin/gain/setgain.sh

    4.3 - Open file setgain.sh to edit
    Code:
    sudo nano /usr/local/sbin/gain/setgain.sh
    4.4 - Copy-paste following code in file setgain.sh
    Note:
    The code in file setgain.sh was originally written by abcd567, but due to a security issue, it has been re-written by wiedehopf.


    NOTE:Code is larger than displayed. Scroll Right and Scroll Down to see these in full.
    Code:
    #!/bin/bash
    
    # redirect all output and errors of this script to a log file
    exec &>/usr/local/sbin/gain/log
    
    # file that anyone can write to in order to set a new gain
    fifo=/usr/local/sbin/gain/newgain
    
    # remove $fifo so we are sure we can create our named pipe
    rm -f $fifo
    
    # create the named pipe with write access for everyone
    mkfifo -m 666 $fifo
    
    # read current gain and store in file currentgain
    # script in gain.php will read gain value stored in currentgain and
    # will display it on map as "Current Gain"
    sed -n 's/\GAIN=//p' /etc/default/dump1090-mutability > /usr/local/sbin/gain/currentgain
    
    
    
    while sleep 1
    do
            if ! [[ -r $fifo ]] || ! [[ -p $fifo ]]
    
            # exit the loop/script if $fifo is not readable or not a named pipe
            then break
            fi
    
    
            # read one line from the named pipe, remove all characters but numbers, dot, minus and newline and store it in $line
            read line < <(tr -cd  '.\-0123456789\n' < $fifo)
    
            #set new gain
            sed -i '/GAIN=.*/c\GAIN='$line /etc/default/dump1090-mutability
    
            #restart dump1090-mutability to implement new gain value
            systemctl restart dump1090-mutability
    
            # read updated gain and store in file currentgain
            sed -n 's/\GAIN=//p' /etc/default/dump1090-mutability > /usr/local/sbin/gain/currentgain
    
            # script in gain.php will read the updated gain and display it on map
    
    done
    
    #
    #
    Save (Ctrl+o) and Close (Ctrl+x) the file.


    STEP-5:
    Add entry in cron to run script setgain.sh at boot
    Code:
    sudo crontab -e 
     
    #If you are using crontab for first time, it will ask which editor to use
    #Choose "nano", as it is the easiest to use
    
    #Scroll down and ADD following line at the end
    
    @reboot /bin/bash /usr/local/sbin/gain/setgain.sh
    Save (Ctrl+o) and Close (Ctrl+x)


    STEP-6:
    Run and Test.

    6.1 - Reboot Pi for cron to run the script setgain.sh at startup.

    6.2 - After Pi has rebooted, go to page IP-of-PI/dump1090/gain.php and check gain setting add-on appears as shown in FIRST screenshot above.

    The value show in Red at browser load or re-load is your current gain value.

    If you want to change it, click open drop-down menu, select the desired gain and click "Set Gain" button. After about 5 seconds, the Current Gain (red) will be updated.

    If you want to verify that gain has actually changed, give following command. The output of this command will show the actual value of gain used.
    Code:
    sudo systemctl status dump1090-mutability -l
    You can also check current gain by following command
    Code:
    cat /etc/default/dump1090-mutability


    ADDITIONAL STEP IF YOU WANT TO EMBED SETGAIN BUTTON IN DUMP1090-MUTABILITY MAP


    STEP-7:
    Edit file gmap.html and add code to embed newly created file gain.php (the file gain.php contains "Set Gain" button & drop-down menu).

    7.1 - BEFORE EDITING, make its backup copy. This will enable you to revert in case something goes wrong.
    Code:
    cd /usr/share/dump1090-mutability/html/
    sudo cp gmap.html gmap.html.orig
    
    #Check to ensure back-up copy has been created by giving ls command
    
    ls
    
    #The output should contain both gmap.html and gmap.html.orig
    
    config.js    formatter.js   markers.js        style.css
    coolclock    gain.php       ol3               test
    db           gmap.html.orig  planeObject.js    upintheair.json
    dbloader.js  gmap.html      registrations.js
    flags.js     jquery         script.js
    flags-tiny   layers.js      spinny.gif

    7.2 - Open the file gmap.html for editing

    Code:
    cd /usr/share/dump1090-mutability/html/  
    sudo nano gmap.html

    7.3 - Press Ctrl+w then type sudo_buttons then press Enter key.
    The cursor will jump to line `<div id="sudo_buttons">`, as shown below
    Code:
                                    </div> <!-- timestamps -->
    
                                    <div id="sudo_buttons">
                                            <table style="width: 100%">
                                                    <tr>
                                                            <td style="width: 150px; text-align: center;" class="pointer">
                                                                    [ <span onclick="resetMap();">Reset Map</span> ]
                                                            </td>
                                                    </tr>
                                            </table>
    
                                    </div> <!-- sudo_buttons -->

    7.4 - Just above line <div id="sudo_buttons">, insert following 3 lines
    Code:
    <div id="GAIN" style="text-align:center;width:175px;height:65px;">   
    <iframe src=gain.php style="border:0;width:175px;height:65px;"></iframe>   
    </div> <!----- GAIN --->
    After insertion of 3 lines, the code will be like shown below:
    Code:
                                    </div> <!-- timestamps -->
    
    <div id="GAIN" style="text-align:center;width:175px;height:65px;">   
    <iframe src=gain.php style="border:0;width:175px;height:65px;"></iframe>   
    </div> <!----- GAIN --->   
    
    
                                    <div id="sudo_buttons">
                                            <table style="width: 100%">
                                                    <tr>
                                                            <td style="width: 150px; text-align: center;" class="pointer">
                                                                    [ <span onclick="resetMap();">Reset Map</span> ]
                                                            </td>
                                                    </tr>
                                            </table>
    
                                    </div> <!-- sudo_buttons -->
    Save (Ctrl+o) and Close (Ctrl+x)


    7.5 - Go to page IP-of-PI/dump1090/gmap.html and check gain setting add-on appears as shown in screenshot above. If button does not show, clear cache and reload browser Ctrl+F5

    The value show in Red at browser load or re-load is your current gain value.

    If you want to change it, click open drop-down menu, select the desired gain and click "Set Gain" button. After about 5 seconds, the Current Gain (red) will be updated.
    Last edited by abcd567; 2019-07-21 at 22:35.

  5. #5
    Captain abcd567's Avatar
    Join Date
    Sep 2013
    Location
    Toronto CYYZ
    Posts
    2,835
    How-to Add "Received Signal Strength Indicator" (RSSI) Column in Aircraft Table of dump1090-mutability ver 1.15~dev

    Posted on: October 14, 2018

    A glance on RSSI Colums will show what are strengths of signals from different planes.
    This will help in determining if Gain Setting of dongle is to be lowered or increased.


    Contributors:
    @evangelyul
    @wiedehopf
    @abcd567





    STEP-1
    Code:
    #Move into folder containing file to be edited
    cd /usr/share/dump1090-mutability/html/
    
    #First make a backup copy before attempting modifications
    #The backup will enable you to revert if something goes wrong
    sudo cp  gmap.html  gmap.html.bak
    
    #Now edit the file and make modifications
    sudo nano gmap.html

    Press Ctrl+w keys, type onclick="sortBy then Press Enter key.
    The cursor will jump to relevant block of code.
    ADD 2 lines shown below in RED (copy-paste these)

    Code:
              <thead style="background-color: #BBBBBB; cursor: pointer;">
                          <tr>
                                    <td id="icao" onclick="sortByICAO();">ICAO</td>
                                    <td id="flag" onclick="sortByCountry()"><!-- column for flag image --></t$
                                    <td id="flight" onclick="sortByFlight();">Flight</td>
                                    <td id="squawk" onclick="sortBySquawk();" style="text-align: right">Squaw$
                                    <td id="altitude" onclick="sortByAltitude();" style="text-align: right">A$
                                    <td id="speed" onclick="sortBySpeed();" style="text-align: right">Speed</$
                                    <td id="distance" onclick="sortByDistance();" style="text-align: right">D$
                                    <td id="track" onclick="sortByTrack();" style="text-align: right">Track</$
                                    <td id="msgs" onclick="sortByMsgs();" style="text-align: right">Msgs</td>
                                    <td id="seen" onclick="sortBySeen();" style="text-align: right">Age</td>
                                    <td id="rssi" onclick="sortByRSSI();" style="text-align: right">RSSI</td>
    
                           </tr>
              </thead>
              <tbody>
                            <tr id="plane_row_template" class="plane_table_row hidden">
                                      <td>ICAO</td>
                                      <td><img style="width: 20px; height=12px" src="about:blank" alt="Flag"></$
                                      <td>FLIGHT</td>
                                      <td style="text-align: right">SQUAWK</td>
                                      <td style="text-align: right">ALTITUDE</td>
                                      <td style="text-align: right">SPEED</td>
                                      <td style="text-align: right">DISTANCE</td>
                                      <td style="text-align: right">TRACK</td>
                                      <td style="text-align: right">MSGS</td>
                                      <td style="text-align: right">SEEN</td>
                                      <td style="text-align: right">RSSI</td>
                            </tr>
              </tbody>




    STEP-2

    2.1 - Prepration
    Code:
    #Move into folder containing file to be edited
    cd /usr/share/dump1090-mutability/html/
    
    #First make a backup copy before attempting modifications
    #The backup will enable you to revert if something goes wrong
    sudo cp  script.js  script.js.bak
    
    #Now edit the file and make modifications
    sudo nano script.js
    2.2 - Add RSSI Column
    Press Ctrl+W keys, type tableplane.tr.cells then press Enter Key
    The cursor will jump to relevant block of code.
    ADD line shown in RED (copy-paste it)

    Code:
                            // ICAO doesn't change
                            tableplane.tr.cells[2].textContent = (tableplane.flight !== null ? tableplane.flight : "");
                            tableplane.tr.cells[3].textContent = (tableplane.squawk !== null ? tableplane.squawk : "");
                            tableplane.tr.cells[4].textContent = format_altitude_brief(tableplane.altitude, tableplane.vert_rate);
                            tableplane.tr.cells[5].textContent = format_speed_brief(tableplane.speed);
                            tableplane.tr.cells[6].textContent = format_distance_brief(tableplane.sitedist);
                            tableplane.tr.cells[7].textContent = format_track_brief(tableplane.track);
                            tableplane.tr.cells[8].textContent = tableplane.messages;
                            tableplane.tr.cells[9].textContent = tableplane.seen.toFixed(0);
                            tableplane.tr.className = classes;
                            tableplane.tr.cells[10].textContent = tableplane.rssi.toFixed(1); 
    2.3 - Add sort functionality to RSSI column (clicking on the title of the RSSI column will sort it "highest to lowest"/"lowest to highest" values. Thanks to @thutson for this.

    Press Ctrl+W keys, type function sortBy then press Enter Key
    The cursor will jump to relevant block of code.
    ADD line shown in RED (copy-paste it)

    Code:
    function sortByICAO()     { sortBy('icao',    compareAlpha,   function(x) { return x.icao; }); }
    function sortByFlight()   { sortBy('flight',  compareAlpha,   function(x) { return x.flight; }); }
    function sortBySquawk()   { sortBy('squawk',  compareAlpha,   function(x) { return x.squawk; }); }
    function sortByAltitude() { sortBy('altitude',compareNumeric, function(x) { return (x.altitude == "ground" ? -1e9 : x.altitude); }); }
    function sortBySpeed()    { sortBy('speed',   compareNumeric, function(x) { return x.speed; }); }
    function sortByDistance() { sortBy('sitedist',compareNumeric, function(x) { return x.sitedist; }); }
    function sortByTrack()    { sortBy('track',   compareNumeric, function(x) { return x.track; }); }
    function sortByMsgs()     { sortBy('msgs',    compareNumeric, function(x) { return x.messages; }); }
    function sortBySeen()     { sortBy('seen',    compareNumeric, function(x) { return x.seen; }); }
    function sortByCountry()  { sortBy('country', compareAlpha,   function(x) { return x.icaorange.country; }); }
    function sortByRSSI()     { sortBy('rssi',    compareNumeric, function(x) { return x.rssi; }); }
    STEP-3
    Code:
    #Move into folder containing file to be edited
    cd /usr/share/dump1090-mutability/html/
    
    #First make a backup copy before attempting modifications
    #The backup will enable you to revert if something goes wrong
    sudo cp  style.css  style.css.bak
    
    #Now edit the file and make modifications
    sudo nano style.css
    Counting from top:

    Line 6:
    change 420 to 460

    Line 7:
    This line is blank. Do nothing here.

    Line 8:
    (a) change 410 to 450
    (b) change -410 to -455

    Code:
    html, body {
        margin: 0; padding: 0; background-color: #ffffff; font-family: Tahoma, Sans-Serif;
        font-size: 10pt; overflow: auto; height: 100%;
    }
    div#map_container     { float: left; width: 100%; height: 100%; }
    div#map_canvas        { height: 100%; margin-right: 460px; }
    
    div#sidebar_container { float: left; width: 450px; margin-left: -455px; height: 100%; overflow: auto; }
    STEP-4
    Go to dump1090 Map
    IP-of-Pi/dump1090/gmap.html

    Clear Browser cache (Ctrl+Shift+Delete), the Reload Browser (Ctrl+F5)
    The RSSI Column will show on extreme-right of the Map page/Aircraft Table.
    Last edited by abcd567; 2019-07-21 at 22:31.

  6. #6
    Passenger
    Join Date
    Jun 2016
    Posts
    7
    Excellent tutorial - i think the terrain limit rings and funky coloured planes are justification alone to install this.

    Backup / Image your current SD Card first using something like Apple Pi-Baker.

    Many Thanks

  7. #7
    Captain abcd567's Avatar
    Join Date
    Sep 2013
    Location
    Toronto CYYZ
    Posts
    2,835
    @Sam26K
    Piaware feeds MLAT data to port 30104.
    Check settings of dump1090 mutability. By default it has setting of "Ports for Beast-format input connections" as 30004,30104.

    Use command below to check, and add 30104 if not already there:
    Code:
    sudo dpkg-reconfigure dump1090-mutability
    Reboot for new setting to take effect. Reload/refresh the gmap page.

    Also configure your Piaware data feeder to feed MLAT input to port 30104, and to make port 30106 available for feeding MLAT to VRS in case you want to display piawre's MLAT planes on VRS. This is done using port 30106 (ext_basestation,listen,30106)

    Code:
    #Configuration command
    ~ $ sudo piaware-config -mlatResultsFormat "beast,connect,localhost:30104  ext_basestation,listen,30106"
    
    #Check if configuration has actually taken place
    ~ $ sudo piaware-config -show
    
    #Above command will show contents of piaware config file '/root/.piaware' as follows:
    mlatResultsFormat {beast,connect,localhost:30104  ext_basestation,listen,30106}
    password xxxxxxxx
    user xxxxxxxx
    
    #Now restart piaware so that new configuration starts operating
    ~ $ sudo piaware-config -restart
    
    #Above command will give following output:
    invoking: /etc/init.d/piaware restart
    [ ok ] Restarting piaware (via systemctl): piaware.service.
    
    #Now reboot RPi
    ~ $ sudo reboot
    Last edited by abcd567; 2016-07-27 at 17:17.

  8. #8
    Captain abcd567's Avatar
    Join Date
    Sep 2013
    Location
    Toronto CYYZ
    Posts
    2,835
    Quote Originally Posted by nick223 View Post
    I'm using wheezy is that the issue?
    Thanks to Oliver Jowett (writer of dump1090-mutability), whom I consulted yesterday, and he promptly confirmed following:

    "Means that there is no packaged version of librtlsdr installed. Wheezy does not provide one. You need to build a package (not just install from source) or use the one I provide from repo.mutability.co.uk"

    In view of above reply, please run following additional commands to download & install package for librtlsdr-dev on Wheezy:
    Code:
    wget https://github.com/mutability/librtlsdr/releases/download/v0.5.4_git-1/librtlsdr0_0.5.4.git-1_armhf.deb
    wget https://github.com/mutability/librtlsdr/releases/download/v0.5.4_git-1/librtlsdr-dev_0.5.4.git-1_armhf.deb
    sudo dpkg -i librtlsdr0_0.5.4.git-1_armhf.deb
    sudo dpkg -i librtlsdr-dev_0.5.4.git-1_armhf.deb
    Now try again step 5:
    Code:
    cd ~/install-dump/dump1090
    sudo dpkg-buildpackage -b
    Last edited by abcd567; 2016-07-27 at 20:25.

  9. #9
    Passenger
    Join Date
    Jul 2016
    Location
    T-EHAM154
    Posts
    4
    Hello,

    I'm from the Netherlands and new to this forum. Got my fr24 feeder up and running since July 19th but then saw some need things one can display with the dump1090-mutability package. For the last few days I've been experimenting and this afternoon I formatted my Pi2 SD card and re-installed everything (in the recommended order this time, first the mutability package with the heywhatsthat key and later I installed FR24Feeder from bash.

    But I'm not completely satisfied

    I find my gmap page a bit dull, and I mean in a way that other enthusiasts have a very need page with nice rings, but also a heatmap, range and so on.
    For example this user from Utrecht (NL)

    Screen Shot 2016-07-29 at 18.39.32.jpg

    What do I have to do to have that sort of gadgets on my dump1090 map page?
    Now, mine looks like this (don't look at the range too much, I will move the antenna to a better position when I'm done configuring.

    Screen Shot 2016-07-29 at 18.50.44.jpg

    Can anyone help me with the things I have to do to see more 'gadgets'?

    Thanks in advance.

  10. #10
    Captain abcd567's Avatar
    Join Date
    Sep 2013
    Location
    Toronto CYYZ
    Posts
    2,835
    @ paulus0031

    (1) To improve the dull map
    Recent changes in Google's policy resulted that dump1090-mutability has switched to OpenStreet Map. However you can add road map layer by following method:

    First obtain an API Key from Bing Maps (free of charge for "basic key")
    https://www.bingmapsportal.com/

    now edit the file config.js
    Code:
    sudo nano /usr/share/dump1090-mutability/html/config.js
    #Press Ctrl+w keys, and type BingMapsAPIKey and press enter key. 
    #The cursor will jump to line BingMapsAPIKey= null.
    You will see following in the opened file config.js
    .........
    .........
    // Provide a Bing Maps API key here to enable the Bing imagery layer.
    // You can obtain a free key (with usage limits) at
    // https://www.bingmapsportal.com/ (you need a "basic key")
    //
    // Be sure to quote your key:
    // BingMapsAPIKey = "your key here";
    //
    BingMapsAPIKey = null;
    .........
    .........
    Replace null above by your API key with " at start and end of key.
    It will look like:
    BingMapsAPIKey = "abcdefghijklmnopq";


    Now reload map in your browser. Click the settings blue square at top right on map and select "Bing Roads". The map will improve from dull to nearly like Google Map.

    dump1090 settings button.png....dump1090 Bing Road Layer.png....dump1090 with Bing Road Layer.jpg



    (1) For heat map, please see this video:
    https://www.youtube.com/watch?v=Qz4XSFRjLTI
    .
    Last edited by abcd567; 2016-07-31 at 04:39.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •