Announcement

Collapse
No announcement yet.

Howto Run ADS-B Receiver + AIS Receiver on Same RPi

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

  • Howto Run ADS-B Receiver + AIS Receiver on Same RPi

    Running ADS-B Receiver + AIS Receiver on Same RPi

    ADS-B : Aircrafts Tracking at 1090MHz (using DVB-T Dongle)

    ​​​​AIS: Ship and Vessel Tracking at 162MHz (using DVB-T Dongle)

    I am running following on RPi model 4 (1 GB ram):
    • RaspberryPi OS Lite Bullseye
    • AIS-catcher (receiver+decoder+feeder software) - How to install AIS-Catcher
    • AIS Dispatcher for local map at ip-of-pi:8181 (NOTE - Dec 29, 2022): This item is no more required, as AIS-Catcher's latest version itself provides Web Interface with Local Map at ip-of-pi:8383) CLICK HERE
    • dump1090-fa
    • fr24feed
    • piaware
    • rbfeeder
    • pfclient
    • adsbexchange
    • opensky
    • modesmixer2
    • graphs1090
    I had to serialize dongles by following commands:
    Code:
    sudo apt install rtl-sdr
    
    sudo systemctl stop piaware dump1090-fa aiscatcher
    
    ## SERIALIZED ONE DONGLE AT A TIME
    ## REMOVED ALL OTHER DONGLES WHEN GIVING FOLLOWING COMMAND
    
    rtl_eeprom -s [desired_serial_number]


    Used serial numbers as follows:
    00001090 for dump1090
    00000162 for AIS-catcher
    Also set serial number 00001090 in file /etc/default/dump1090-fa by following command:
    Code:
    sudo sed -i 's/^RECEIVER_SERIAL=.*/RECEIVER_SERIAL=00001090/' /etc/default/dump1090-fa
    Port 8080 Conflict:
    This item is no more required as AIS-Dispatcher is no more required to be installed.
    The AIS-Catcher itself now provided web server with map at ip-of-pi:8383


    To clear conflict between Skyaware map and AIS Dispatcher map, I changed port number from 8080 to 8181 in following file of AIS Dispatcher:

    /home/ais/etc/aiscontrol.cfg

    PPM CORRECTION
    AIS-catcher tunes in on a frequency of 162 MHz. However, due to deviations in the internal oscillator of RTL-SDR devices, the actual frequency can be slightly off which will result in no or poor reception of AIS signals. It is therefore important to provide the program with the necessary correction in parts-per-million (ppm) to offset this deviation where needed. For optimal reception ensure you determine the necessary correction, and provide as input via the -p switch on the command line.
    I am using a $10 Generic DVB-T (Black) WITHOUT TCXO. The PPM is much higher than it is for costlier dongles which have TCXO correction.
    Here is how I determined the value of PPM to be used in file aisctacher.cfg :
    (1) Installed test software
    sudo apt install rtl-sdr
    (2) Determined the device index of the dongle for AIS-catcher by following command
    rtl_test -t
    (3) In my case the device index was 1.
    I used following command to determine ppm
    rtl_test -d 1 -p60
    (4) Waited until the cumulative error value (in PPM) remains more-or-less the same for three consecutive minutes. Note the last cumulative error value (in PPM) and use it in config of AIS-catcher. I am using 34 (-p 34) in my config. Your value may be different


    AIS-1.png

    CLICK ON SCREENSHOT TO SEE LARGER SIZE

    AIS-2.png


    NOTE:
    If you are using a cheap DVB-T dongle that suffers from thermal drift (i.e. the required PPM correction drifts when the dongle is getting warmer), you could consider to use the option -o AFC_WIDE on or switch to a FM decoding model which is less sensitive for frequency offsets (-m 0). The frequency correction applied by the default decoding model can be made visible with the switch -M D so you can inspect.


    AIS-CATCHER CONFIGURATION

    Location of Config file:

    Code:
    /usr/share/aiscatcher/aiscatcher.conf
    Default contents of config file (To be modified by user after installation)

    Code:
    -d 00000162
    -v 10
    -M DT
    -gr TUNER 38.6 RTLAGC off
    -s 2304k
    -p 3
    -o 4
    -u 127.0.0.1 10110
    -N 8383
    AFTER INSTALLATION IS COMPLETED, PLEASE DO FOLLOWING:

    (1) If on RPi you have installed AIS Dispatcher or OpenCPN,
    it should be configured to use UDP Port 10110, IP 127.0.0.1 OR 0.0.0.0

    (2) Open file aiscatcher.conf by following command:
    sudo nano /usr/share/aiscatcher/aiscatcher.conf

    (3) In above file:
    (a) Change 00000162 in "-d 00000162" to actual Serial Number of AIS dongle
    (b) Change 3 in "-p 3" to the actual ppm correction figure of dongle
    (c) Change 38.6 in "-gr TUNER 38.6 RTLAGC off" to desired Gain of dongle
    (d) Add following line and replace xx.xxx and yy.yyy by actual values:
    -N STATION MyStation LAT xx.xxx LON yy.yyy
    (e) For each Site you want to feed AIS data, add a new line as follows:
    -u [URL or IP of Site] [Port Number of Site]
    (f) Save (Ctrl+o) and Close (Ctrl+x) file aiscatcher.conf




    (4) REBOOT RPi


    (5) See the Web Interface (Map etc) at
    IP-of-PI:8383

    (6) Command to see Status sudo systemctl status aiscatcher
    (7) Command to Restart sudo systemctl restart aiscatcher
    (8) Command to Stop sudo systemctl stop aiscatcher




    MONITORING EFFECT OF CHANGING PPM AND GAIN SETTING:
    Use Following Command to output Message Rate (msg/s):

    Code:
    sudo journalctl -u aiscatcher -n 150 | grep -o 'received.*'
    The output will list Message rate (msg/s) as shown below

    Code:
    abcd@debian11:~$ sudo journalctl -u aiscatcher -n 150 | grep -o 'received.*'
    [sudo] password for abcd:
    received: 18 msgs, total: 29068 msgs, rate: 1.79842 msg/s
    received: 16 msgs, total: 29084 msgs, rate: 1.59828 msg/s
    received: 11 msgs, total: 29095 msgs, rate: 1.09998 msg/s
    received: 19 msgs, total: 29114 msgs, rate: 1.89349 msg/s
    received: 13 msgs, total: 29127 msgs, rate: 1.29908 msg/s
    received: 17 msgs, total: 29144 msgs, rate: 1.69453 msg/s
    received: 17 msgs, total: 29161 msgs, rate: 1.69257 msg/s
    received: 13 msgs, total: 29174 msgs, rate: 1.29538 msg/s
    received: 18 msgs, total: 29192 msgs, rate: 1.79458 msg/s


    AIS ANTENNA I USED IS A VERTICAL DIPOLE MADE OF COAX


    AIS-3.png



    AIS-4.jpg




    AIS-5.jpg



    .
    Last edited by abcd567; 2022-12-31, 06:50.

  • #2
    .
    October 20, 2022 - Ships Tracked by AIS-catcher installed on RPi, Located North of Lake Ontario, Near Toronto, Canada

    .



    AIS-6.png


    AIS-7.png

    Comment


    • #3
      I have first built a 1/2 wavelength Dipole (1/4 + 1/4 wavelength = 46cm + 46 cm), taped to window glass.

      Now I have built a free-standing !/4 wavelength Monopole (46 cm) with horizontal ground plane, which I could move to different locations in my apartment to find optimum location.

      Also, I have installed AIS-catcher and AIS-Dispatcher on Thin Client HP520, which already had Debian11 amd64, dump1090-fa and piaware (both built from source code right on Thin Client).

      20221022_195413.jpg


      20221023_100225.jpg


      20221022_195551.jpg


      .

      AIS-catcher-Map.jpg





      Screenshot_20221022-202952.jpg







      .
      Last edited by abcd567; 2022-11-05, 17:08.

      Comment


      • #4
        Command to install AIS Catcher on Linux Computers: RaspberryPI OS / Debian amd64 x86_64

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

        Announcement / Instructions by above installation script when it completes the installation

        AIS-catcher-Comletion-Announcement-rev2.png

        Comment


        • #5
          How To View AIS-Catcher Logs:

          https://github.com/abcd567a/install-aiscatcher#logs


          .

          Comment


          • #6
            Script modified today. Same Script will do all the following:
            (1) Fresh Install
            (2) Upgrade
            (3) Reinstall


            The script will build and install latest version of AIS-catcher

            https://github.com/abcd567a/install-...ster/README.md



            If Upgrading or Reinstalling, following fresh default config file will be generated
            /usr/share/aiscatcher/aiscatcher.conf

            The existing config file will be saved as
            /usr/share/aiscatcher/aiscatcher.conf.old


            If you want, you can replace default config file by your saved config file using following commands:


            Code:
            cd /usr/share/aiscatcher
            
            sudo cp aiscatcher.conf.old aiscatcher.conf
            
            sudo systemctl restart aiscatcher
            Announcement at completion by current updated script:


            Click on Screenshot to See Larger Size


            AIS-catcher-Comletion-Announcement-rev3.png
            Last edited by abcd567; 2023-01-05, 00:41.

            Comment


            • #7
              Thanks for sharing the how to guides, I really appreciate it.

              My ADS-B feeder is currently offline (unable to boot) and I planed to reinstall it along with AIS tracker/feeder. But I'm unsure about the result.

              My house is located around 20km from the coast line (Indian ocean) and AFAIK there's no nearby vessel/ships during my humble observation.

              Comment


              • #8
                How to Feed aprs.fi from existing RPi / AIS-catcher


                (1) SIGN-UP
                https://aprs.fi/signup/

                (2) Note down Callsign or nickname & AIS password
                https://aprs.fi/account/



                Click on Screenshot to See Larger Size

                aprs.fi-account.png


                (3) The aprs.fi feeding is on HTTP post. This requires compiling AIS-catcher with libcurl4-openssl-dev and zlib1g-dev installed. The AIS-catcher installed before today (Sept 13, 2023) do NOT have these packages installed. I have today modified the installation script, so that it now installs these two packages before compiling the AIS-catcher binary.

                If you have installed AIS-catcher before today (Sept 13, 2023), then please again run the installation script (copied below for your ease). It will re-install AIS-catcher after re-compiling it with support of these additional packages:


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

                (4) After re-installing AIS-catcher, open file aiscatcher.conf

                Code:
                sudo nano /usr/share/aiscatcher/aiscatcher.conf
                Add following line in above file:

                Code:
                -H [URL]http://aprs.fi/jsonais/post/[/URL][AIS password] ID [Callsign] PROTOCOL aprs INTERVAL 30
                In above new line, replace [AIS password] and [Callsign] by the values copied from your arps.fi/account/ page.

                Save file

                Restart AIS-catcher

                Code:
                sudo systemctl restart aiscatcher
                Check status & Log

                Code:
                sudo systemctl status aiscatcher
                
                sudo journalctl -u aiscatcher -e
                
                sudo journalctl -u aiscatcher | grep HTTP
                (5) Go to following site to locate your station in the list. It will be displayed by your Nickname / Callsign in your account

                https://aprs.fi/page/ais_sites



                Click on Screenshot to See Larger Size

                aprs.fi-stations.png



                (6) Live Map

                https://aprs.fi/



                Click on Screenshot to See Larger Size

                aprs.fi-map.png




                .
                Last edited by abcd567; 2023-09-14, 12:54.

                Comment

                Working...
                X