Page 1 of 16 12311 ... LastLast
Results 1 to 10 of 155

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,346

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

    .
    Last revision/update: August10, 2018
    Added STRETCH BUG FIX (missing file rtl-sdr.rules).

    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.

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


    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.


    Below is a step-by-step method to built & install dump1090-mutability_1.15~dev from source code, and then steps to install data feeders FR24, FA, and PF.

    STEP (1): UPDATE THE OPERATING SYSTEM
    Code:
    sudo apt-get update

    STEP (2): INSTALL PRE REQUISIT PACKAGES (needed to build, and needed to fulfill dependencies)
    Code:
    sudo apt-get install -y git
    sudo apt-get install -y build-essential
    sudo apt-get install -y debhelper
    sudo apt-get install -y rtl-sdr
    sudo apt-get install -y librtlsdr-dev
    sudo apt-get install -y libusb-1.0-0-dev
    sudo apt-get install -y pkg-config
    sudo apt-get install -y fakeroot
    sudo apt-get install -y curl
    sudo apt-get install -y cron
    sudo apt-get install -y lighttpd


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

    STEP (4): 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 (5): INSTALL THE DUMP1090-MUTABILITY PACKAGE
    Code:
    cd ~/build-dump-mut
    sudo dpkg -i dump1090-mutability_1.15~dev_*.deb

    STEP (6): CONFIGURE THE WEB SERVER
    Code:
    sudo lighty-enable-mod dump1090
    sudo /etc/init.d/lighttpd force-reload

    STEP (7): 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 dump1090-mutability
    sudo /etc/init.d/dump1090-mutability restart
    
    #alternative command to restart dump1090-mutability
    sudo service dump1090-mutability restart
    BUG FIX - RASPBIAN STRETCH:
    In Raspbian Stretch dump1090-mutability doed not provide output data.
    The map in browser (ip-of-pi/dump1090/gmap.html), will show following warning:
    "Problem fetching data from dump1090."





    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 (8): ADD TERRAIN LIMIT RINGS
    Dump1090-mutability v1.15~dev can display terrain limit rings using data obtained from the website http://www.heywhatsthat.com.

    (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 (9) VIEW MAP
    To view map, type following address in your browser:
    http://<ip address of your RPi on your LAN>/dump1090/gmap.html





    STEP (10): 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;



    STEP (11): 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

    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 either "ModeS Beast(TCP), 127.0.0.1:30005" or "AVR(TCP), 127.0.0.1:30002" as shown in screenshots below.

    Fr24feeder settings Beast(TCP) dump1090 mutability.png . Fr24feeder Settings AVR(TCP) External dump1090.png

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

    STEP (12): INSTALLATION OF FLIGHTAWARE DATA FEEDER:
    Install Flightaware feeder from instructions on this page:
    http://flightaware.com/adsb/piaware/install (STEP 2 ONLY)

    .

    STEP (13): INSTALLATION OF PLANEFINDER DATA FEEDER:
    Install Planefinder feeder from instructions on this page:
    http://forum.planefinder.net/threads...241/#post-2451
    Last edited by abcd567; 2018-10-08 at 21:22.

  2. #2
    Passenger
    Join Date
    May 2016
    Location
    Long Island, New York, USA
    Posts
    2
    Thank you for this. I followed along and I can get the website to load but I get an error:
    "Problem fetching data from dump1090.
    AJAX call failed (error: Not Found). Maybe dump1090 is no longer running?
    The displayed map data will be out of date."

    I am new to all of this and I have the stock FR software running on Pi2. Do I need to modify my FR24 Feeder Settings?
    Thanks again.

  3. #3
    Captain abcd567's Avatar
    Join Date
    Sep 2013
    Location
    Toronto CYYZ
    Posts
    2,346
    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 abcd567; 2017-07-25 at 17:12.

  4. #4
    Passenger
    Join Date
    May 2016
    Location
    Long Island, New York, USA
    Posts
    2
    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

  5. #5
    Passenger
    Join Date
    May 2016
    Location
    MMIO
    Posts
    44
    i dont see flags on mine, how can be added?

    edit: i see on your dump page, the message Pi 2 - DUMP1090

    mine is old Model B 1 so it only shows DUMP1090.

    im next to purchase some RPi3 to play with them and add more locations.
    Last edited by dedicados; 2016-05-31 at 12:38.

  6. #6
    Passenger Pasajero311's Avatar
    Join Date
    May 2016
    Posts
    2
    Hello good afternoon
    that image must be installed on the SD of ?? piaware-jessie-full-sd-card-2.1-5 or fr24-raspberry-pi-1.0.18-5

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

    POSTED ON: 10 October 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




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

    STEP-1: (JESSIE)
    Install necessary php packages

    Code:
    sudo apt update   
    sudo apt install php5-cgi   
    sudo lighty-enable-mod fastcgi-php   
    sudo /etc/init.d/lighttpd force-reload

    STEP-1: (STRETCH)
    Install necessary php packages

    Code:
    sudo apt update   
    sudo apt install php7.0-cgi   
    sudo lighty-enable-mod fastcgi-php   
    sudo /etc/init.d/lighttpd force-reload

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

    2.1 - Create a new file gain.php in folder /usr/share/dump1090-mutability/html
    Code:
    sudo nano /usr/share/dump1090-mutability/html/gain.php
    2.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-3:
    Create Gain Changing Script

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


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

    3.3 - Open file setgain.sh to edit
    Code:
    sudo nano /usr/local/sbin/gain/setgain.sh
    3.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-4:
    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-5:
    Run and Test.

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

    5.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-6:
    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).

    6.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

    6.2 - Open the file gmap.html for editing

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

    6.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 -->

    6.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)


    6.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; 2018-10-14 at 20:26.

  8. #8
    Passenger
    Join Date
    Mar 2016
    Posts
    15
    getting this error

    pi@raspberrypi:~/install-dump $ sudo dpkg -i dump1090-mutability_1.15~dev_*.deb
    dpkg: error processing archive dump1090-mutability_1.15~dev_*.deb (--install):
    cannot access archive: No such file or directory
    Errors were encountered while processing:
    dump1090-mutability_1.15~dev_*.deb

  9. #9
    Passenger
    Join Date
    Mar 2016
    Posts
    15

    help

    I tried this and my google map will no longer display? Any help is appropriated




    [QUOTE=abcd567;81873]To give different colors to different altitude rings:
    Code:
    ~ $ sudo nano  /usr/share/dump1090-mutability/html/script.js
    This will open file script.js for editing.
    Now go to line which starts with //Add terrain-limit rings, by following method:
    Press Ctrl+w, and type "Add terrain-limit" (without inverted commas) and press Enter
    The cursor will jump to line //Add terrain-limit rings.
    In the code below this line add lines shown in red, then Save (Ctrl+o) and Exit (Ctrl+x)
    Go to web browser open & refresh gmap.html pge, and range rings will appear in different colors.

  10. #10
    Captain abcd567's Avatar
    Join Date
    Sep 2013
    Location
    Toronto CYYZ
    Posts
    2,346
    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 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; 2018-11-25 at 00:16.

Posting Permissions

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