Just now finished 3rd Tweak. Will check results ( “Messages > -3 dBFS”) tomorrow
Just now finished 3rd Tweak. Will check results ( “Messages > -3 dBFS”) tomorrow
I adjusted gain over a 13dB range (gain of about 42 to 29 dB) and found very little change in number of planes stats. Is there a way to disable the gain adjustment add-on so that adaptive gain is used? I don’t want to delete the gain adjustment code, just disable it.
sudo systemctl stop set-gain
sudo systemctl disable set-gain
Step2-Option1: For Package install of dump1090-fa on Raspberry Pi OS
sudo nano /etc/default/dump1090-fa
Scroll down and change these two lines
RECEIVER_GAIN=36.4 -> Change this figure to 60
ADAPTIVE_DYNAMIC_RANGE=no -> Change no to yes
then restart dump1090-fa
sudo systemctl restart dump1090-fa
Step2-Option2: For Piaware SD Card image
sudo piaware-config adaptive-dynamic-range yes
sudo piaware-config rtlsdr-gain 60
sudo systemctl restart piaware
sudo systemctl restart dump1090-fa
sudo systemctl enable set-gain
sudo systemctl start set-gain
Step2-Option1: For Package install of dump1090-fa on Raspberry Pi OS
sudo nano /etc/default/dump1090-fa
Scroll down and change thIs line
ADAPTIVE_DYNAMIC_RANGE=yes -> Change yes to no
then restart dump1090-fa
sudo systemctl restart dump1090-fa
Step2-Option2: For Piaware SD Card image
sudo piaware-config adaptive-dynamic-range no
sudo systemctl restart piaware
sudo systemctl restart dump1090-fa
Ok, thanks.
Later today when activity is lower, I’ll switch over to adaptive gain to see how well that works.
Which install do you have?
Since I was not aware of your system, I had to post method for both types of installs, but no problem, it will help members with any of the two types of install.
Package install of dump1090-fa and piaware. Hardware: RPi 4 model B with 2 GB ram.
Ok, I changed things so that I’m using adaptive gain, and now I remember I tried that before. What happens is the gain quickly adjusts to 42.1 dB and then just stays there. This is with a 27 dB gain LNA.
Another thing I noticed is that after set-gain is disabled, the gain adjustment control is still in the SkyAware window. But it doesn’t do anything. Probably need to change another file for it to not appear there. But it’s no big deal.
Edit: The file that needs to be changed is: /usr/share/skyaware/html/index.html
Just replace it with the backup file : index.html.orig
that was made when the set-gain add-on was installed.
sudo systemctl stop set-gain
sudo systemctl disable set-gain
sudo rm /usr/lib/systemd/system/set-gain.service
sudo rm /usr/share/skyaware/html/gain.php
sudo rm -rf /usr/local/sbin/gain
sudo lighty-disable-mod fastcgi-php
sudo service lighttpd force-reload
## Reboot Pi
sudo reboot
As you have embeded gain button in Skyaware Map by modifying file index.html
in folder /usr/share/skyaware/html/
, it is easy to remove it.
CASE-1: If you followed installation instructions and have created a backup copy index.html.orig
before starting modifications:
Copy backup file index.html.orig
over modified file index.html
by following commands:
cd /usr/share/skyaware/html/
sudo cp index.html.orig index.html
## Reload Browser (Ctrl+F5)
CASE-2: If you did not create a backup of file index.html
before modifying it.
Delete the 3 lines of code you have added to file index.html by following method:
(1) Open file index.html for editing
sudo nano /usr/share/skyaware/html/index.html
(2) Press Ctrl+W and type buttonContainer
and press Enter key.
The cursor will jump to <div class="buttonContainer">
Delete following 3 lines of code you have added just above line <div class="buttonContainer">
<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 --->
(3) Save & Close file index.html
. Go to Skyaware Map and Reload browser (Ctrl+F5).
Yeah, I’m actually not going to remove the set-gain add-on. It’s more useful than the adaptive gain capability.
By the way, you have written a lot on ADS-B software and hardware. Have you ever considered writing a book (probably an e-book) on this subject ? Course this stuff changes pretty rapidly (particularly software), so it might be a difficult task.
I appreciate it’s OT but just related to the previous comments in here about Pis being open to the outside world, this is what happened to the traffic levels after I blocked direct access to the aircraft file, half way through the 10th August.
Just as some context, tar1090 in conjunction with readsb uses a binary file to get the live aircraft data, thus you can block aircraft.json and tar1090 continues to work.
Eventually people might start scraping that as well … but no need to make it simple.
Could someone please explain the logic for targeting 5% for the “>-3dB signals”? I have graphs1090 running now for a couple hours and it’s reporting a value of ~11.5% Based on the general discussion here, it seem like I need to reduce my gain, but it’s not clear to me what the “over gain” is costing me. I’m seeing planes both flying overhead (not many, but it happens, and they are detected), and 300nm away.
Is the concern that when a plane flies overhead the signal strength is high enough that it (over) saturates the system, and that will swamp out distant signals? That strikes me as plausible, but then if the lowered gain reduces the distant signals 24/7 (not just when a plane is nearby) that seems like a net loss - so I suspect something else is the real reason.
Your argument seems logical.
Up till two days ago, all my Pi were running at “Messages > -3 dBFS” over 10%. I have now reduced gain setting, so that “Messages > -3 dBFS” are around 5%. Will watch statistics for few days to see the affect.
@abcd567 Have you seen any immediate impact to the peak range you’re getting signals from? When I swapped the RTL-SDR for the Blue Stick, the impact was evident right away - all of a sudden I was seeing much farther away. I’m not sure the reverse would be as evident, but if there were a large detrimental effect I’d suspect you could tell pretty quickly.
How much gain reduction did it take to drop the signal rate to ~5%?
YES, see today (14 Aug) vs previous 6 days. The range has increased. It may be due to reducing gain OR due to atmospheric conditions, cant say.
@abcd567 Something I noticed, if you disable and stop set-gain:
sudo systemctl disable set-gain
sudo systemctl stop set-gain
and then hit the gain button in the SkyAware window, it will hose the SkyAware window. By “hose” I mean the next time you open the SkyAware window it won’t work anymore. I could only get it working again by reboot.
By “it won’t work anymore” do you mean the gain button wont work anymore OR the Skyaware page wont work anymore?
SkyAware page won’t work anymore.
I’m going to be out of pocket for about an hour.
That is strange. The set-gain button is embedded in skyaware page without affecting any of it’s functionality. Enabling or disabling set-gain should affect only the set-gain button, not the entire skyaware page. Instead of reboot, next time try reload browser Ctrl+F5.
If problem persists, then delete 3 lines of set-gain code you have inserted in following file:
/usr/share/skyaware/html/index.html
Instead of deleting 3 lines, an easier way is to copy the original backup over the modified file by commands below:
cd /usr/share/skyaware/html/
sudo cp index.html.orig index.html
Reload browser Ctrl+F5
I tried restarting the browser (Ctl F5 doesn’t work , it’s a Mac keyboard). I tried Empty caches.
No big deal though. If you have stopped set-gain, don’t push the set gain button.