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):
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:
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:
Default contents of config file (To be modified by user after installation)
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:
(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):
The output will list Message rate (msg/s) as shown below
AIS ANTENNA I USED IS A VERTICAL DIPOLE MADE OF COAX
AIS-3.png
AIS-4.jpg
AIS-5.jpg
.
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
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
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
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
(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
(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.*'
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
.
Comment