Getting the best results!

Hi @foxhunter like i said at the start of this topic i have the uputronics pre amp which has a filter built in to it. I have got the dark blue filter but currently not fitted in my set up.

That is the same setup i am using. An additional filter is not required. My reply was meant for the usage of the FA stick.

I don’t know your setup, but i am using an outdoor antenna (Vinnant 7.5dB and the Uputronics. It allows me to set the gain on a level around 30.

Finally it doesn’t matter if one step higher or lower. Everything below 5% is fine.
Simply play with the values coming from top to bottom. Once it starts reducing the range, make one step back upwards.

You will need to have each gain setting running for 24 hours. Otherwise the effects are not visible.

To identify the messages > 3dB there is an easier way instead of looking at the graphs:

If you’re really that keen to get always the optimimum, you can use the autogain feature in dump1090-fa
But it’s not necessary

1 Like

It strikes me that the rationale for limiting the receiver gain (to keep from losing nearby, saturated signals), is pretty much valid all the time - so realistically an “instantaneous gain setting” is truly optimal. As some have noted, though, the ADSB signals are such there isn’t a good way to actually adjust the gain in real-time with closed-loop feedback, so the implemented solution is trial-and-error that’s based more on observation than “laws of physics”.
People have found that “aiming for 5% >-3dBFS” gives the ‘best’ results, but I think it’s become evident from this conversation that “aiming for 5% >-3dBFS” comes with an implied consideration of “averaged over a 24 hour time period.” 5% isn’t necessarily the “instantaneously desired value”; it’s just a working solution to give a fixed answer to a variable problem.

What I’m seeing - as apparently @nglass171 is as well - is that a “5% daily average” is really a combination of a 2-3% overnight and a 7-8% midday; there’s probably almost no time in the day where the actual real-time strength is 5%.
But there’s nothing magic about 5% - not from the physics, anyway - it just happens to be the compromise target value that gives the best results if you have a fixed gain.

It seems to me the next level of this “experimentation” would be to consider the full day as made of at least a couple parts - in my case probably “day” = 7:00 - 19:59, and night = 20:00 - 6:59 and ask the question “what values give the best results if you could set the gain independently within those two windows?” - then use trial-and-error to see if results can get better.

My guess is that starting from whatever gain ends up giving the “5% over 24 hours” figure, I’d get slightly improved performance by using a lower gain during the day (when average signal strength is higher) and a higher gain at night. Would one still try to target “5%” within those two windows? I don’t know - again the 5% is just what works best for a single average - maybe it could be shown that targeting 6% during the day and 4% at night is better than trying to drive both time-average periods to 5%.

My Linux knowledge is limited, but I think one could set a cron entry to execute a script that simply changed the gain (I can’t find the bash command off-hand, but I’m pretty sure there is one) - one script to set the gain “down” that ran every day at 7:00, and a second that set the gain “up” that ran at 20:00. Or whatever times make the most sense.

At some point the fiddling ends up in the noise - I wouldn’t expect setting 24 crontabs to change every hour is going to give a measurable benefit - but I could believe that a couple time periods might give a bit more useful data than a single averaged value does.

3 Likes

 

For Raspberry Pi OS with Package install.

Will NOT work on Piaware SD Card image.

(1) Create script file to set gain at 0700 hrs:

sudo touch /home/pi/gain0700hr.sh  
sudo chmod +x /home/pi/gain0700hr.sh  
sudo nano /home/pi/gain0700hr.sh  

Copy-paste following code in file gain0700hr.sh
(In code below, instead of gain0700hr=30, use the value you want, for example gain0700hr=25)

#!/bin/bash

gain0700hr=30

sed -i '/RECEIVER_GAIN=/c\RECEIVER_GAIN='${gain0700hr} /etc/default/dump1090-fa

sed -i '/ADAPTIVE_DYNAMIC_RANGE=/c\ADAPTIVE_DYNAMIC_RANGE=no'  /etc/default/dump1090-fa

systemctl restart dump1090-fa


 

(2) Create script file to set gain at 2000 hrs:

sudo touch /home/pi/gain2000hr.sh  
sudo chmod +x /home/pi/gain2000hr.sh  
sudo nano /home/pi/gain2000hr.sh   

Copy-paste following code in file gain2000hr.sh
(In code below, instead of gain2000hr=45, use the value you want, for example gain2000hr=40)

#!/bin/bash

gain2000hr=45

sed -i '/RECEIVER_GAIN=/c\RECEIVER_GAIN='${gain2000hr} /etc/default/dump1090-fa

sed -i '/ADAPTIVE_DYNAMIC_RANGE=/c\ADAPTIVE_DYNAMIC_RANGE=no'  /etc/default/dump1090-fa

systemctl restart dump1090-fa

 

(3) Create cron entries

sudo crontab -e

no crontab for root - using an empty one

Select an editor. To change later, run ‘select-editor’.
1. /bin/nano <---- easiest
2. /usr/bin/vim.tiny
3. /bin/ed

Choose 1-3 [1]: 1

In file opened, scroll down and at bottom, copy-paste following two lines

0 07 * * *  /bin/bash /home/pi/gain0700hr.sh  
0 20 * * *  /bin/bash /home/pi/gain2000hr.sh   

(4) Reboot Pi

sudo reboot

 

1 Like

That’s because every individual feeder is different: different antennas, different elevations, different surroundings, different patterns and amounts of air traffic at different speeds and elevations. Since aircraft are constantly moving, coming and going the fine-tuning process may take several days of measure and observe, adjust slightly, then repeat as necessary.

@abcd567 as always - thanks for the scripting support. :pray:
I’m still working on getting a 5% “24hr Ave” gain value - I dropped from 60dB to 44.5dB yesterday. After ~24hours of that, I’m seeing ~10% more “messages received”, but roughly the same count of aircraft. This strikes me as reasonable - the saturated planes where I’m losing messages are nearby - they aren’t vanishing without being detected at all. Evidently I haven’t cut the gain so much that I’m losing weak distant aircraft yet.

My intention was to try dropping the gain some more - keep going until the message count stopped increasing or the aircraft count started dropping (weak distant planes no longer amplified enough) - but maybe I’ll give the two-window approach a shot - start by dropping the daytime gain until I don’t see positive changes, (and learn what % -3db value that results in), and then tweak the nighttime.

1 Like

@abcd567 What happens if I set a gain that isn’t an option from the pull down you created on the skyaware page? There seem discrete gain choices - I think (maybe?) set by the chip maker or dongle manufacturer. If I say “gain=25” what do I get? Actually 25? Closest from the list 25.4? Next highest 28.0? “no change” since it doesn’t know what to do with 25.0?

RTL-SDR dongles have the following supported gain values:
0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6 plus -10 which enables AGC. If you enter a gain value other than one of these it selects the one that’s closest to what you specified.

1 Like

The values in drop-down list are gain values supported by the chip inside the dongle. (60 and -10 are translated to AGC)

Supported gain values (29):
0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6

When you enter a gain value which is not exactly one of the supported gain values, the gain is set to the nearest supported value.

For example if you set gain as 25 or 25.0, the dongle will actually set it to nearest which is 25.4. Similarly if you set gain as 43 or 43.0 the dongle will actually set to nearest value 43.4

 

1 Like

A data point, and a question.

I have two RPi “sites” running at the moment - #1 = roof antenna, ADSB-BlueStick (filtered); #2 = small indoor antenna, RTL-SDR (no filter).

I’ve dialed #1 down to a gain of 40.2, while #2 is still at full gain (60). #1 is currently seeing 205 aircraft (max range of ~320nm), while #2 sees 34 aircraft (max range of 140nm).

Turning on the tracks and snapping a picture of what each sees “very locally”, #1 is still missing some close in tracks:

(I presume “missing”, based on the dotted lines)

tracks that #2 is picking up (because its antenna is so poor that relatively, its total gain is less, so it doesn’t saturate) :

There seems to be a roughly 1-2 mile hole around my good receiver where I’m (still) not getting signals - presumably due to saturation. My question, though, is “does this matter?” There are a couple dozen other receivers 5 to 10 miles from me, and I expect most of them will be filling in this hole (as I fill in theirs).

Presently graph1090 says I’m at 6.4% signals >-3dBFS. If I keep driving down toward 5%, I feel I risk losing distant signals out over the water where there won’t be someone else to fill in, in an effort to minimize local signal loss where there are lots of others around. Looking at signal count averages, the C172 flying “donuts” over my house for an hour is going to skew the average relative to some transpacific flight I just catch a glimpse of.

Is there any reason other than trying to avoid overhead dropouts, to reduce the gain? I’m feeling like the best action for me to work for the “greater good” might be to just push the gain back up, live with a 3-4 mile hole - counting on neighbors to fill it in - and try to get the most distance I can in the directions where there are no other receivers.

My site has an antenna setup midway between your two setups. It’s a 6-dBi antenna in the attic crawl space about a 1/2 ft below the roof. I also see that nearby planes (within about a mile) have dotted tracks. Right now my gain is set at 37.2 dB using an RTL-SDR dongle with a 27 dB RTL-SDR LNA.

I see the big difference between what you and I get is: you get about 1 million positions reported per day whereas I get about 800 k positions reported per day. So you see planes for a lot longer period than I do. An outdoor antenna is definitely better.

The 5% isn’t the optimum. So 6.4 % can be just fine, close to an airport even 10% can be acceptable. It’s an aiming point not set in stone. So you can turn the gain back on or accept the gap. You have all the close by movements covered through site number 2 so you still have all the movements recorded.

1 Like

@jimMerk2 - both sites are in my house (at the Dot on the map), so I don’t think you’re in between. :slight_smile:

I started with a RTL-SDR dongle, and a “dopey” antenna set about ceiling level, and my range was pretty poor (~150nm?). I built a version of @abcd567 's “1/4 wave with ground plane” antenna made from scrap coax cable, and placed it on a stick on my roof (attached to a weather station already mounted there), and the range jumped to ~$240nm. Then I got the ADSBExchange “blue stick” - which (I think), is basically a RTL-SDR with a notch filter around 1090MHz, and my range shot up to ~340nm.

From my experience, I’d highly recommend getting “something with a filter” - or perhaps simply a standalone filter to use with your RTL-SDR. I think even at 40+ dB gain, I’m seeing to the theoretical horizon over the ocean - so I am not sure an LNA is gaining you much (pun intended :grin:). My issue doesn’t seem to be signal strength but noise (probably from cell service in the 800-900’s MHz).

I’ll also note that I expect my position totals are highly skewed by the private planes that seem to like to come and circle endlessly over Del Mar, Solana, and Encinitas beaches. I think these are often “banner tow” planes, so they are low and slow. Perhaps you aren’t getting them from Carlsbad (they are too low for you?) but they seem fairly constant. So while I’m not near an airport, per se, the net effect is probably similar.

Yeah I meant midway capability not geographically. I realized later it could be misunderstood.

The RTL-SDR LNA I’m using is filtered to 1090 MHz.

https://www.rtl-sdr.com/new-product-rtl-sdr-blog-1090-mhz-ads-b-lna/

The question is, does this matter to you? If tracking aircraft far away is more important to you than tracking ones that are close, leave it alone. If you want to see the ones within 1-2 miles, lower your gain by one value and monitor it for 24 hours then repeat until the nearby planes are seen on receiver #1.

Since I switched to Airpsy I don’t care at all about levels. Drive it how hard I can. Dynamic range is huge compared to the normal 8 bit dongles (I have line 4 of those around, different brands),

I can see it in my stats, because I have the same antenna, feeding with a splitter a FligtFeeder (yellow one)

1 Like

Good timing for this comment @SoNic67 , reading through all of the above comments, I was wondering how an Airspy fits into all this conversation around gain. Currently in Graphs 1090 i can see my Airspy R2 sitting at 19 gain (Preamble @ 60). I cant seem to see >-3dBFS value on any of the graphs i have when using this SDR (using readsb). I was wondering if there was something i was needing to change on my setup.

Whats your gain on your airspy at?

1 Like

That is normal - it doesn’t matter what gain you set. I think it’s because readsb is running in network mode and not accessing the dongle directly.

1 Like

The recommendations would be very different anyway.
It’s not displayed.

Even when setting very high gain on the airspy, it’s hard to get signals to overdrive and drop out as they do on the SDR.

4 Likes

@jimMerk2 - ah that makes more sense - I’ll stop looking for another receiver hiding in my house. :grin:
@jaymot, getting an upgraded account was mostly what I was after. I’m not just watching my detections, I’m mooching off the crowd-sourced data, so I’d like to give back whatever is of most value to the community. My suspicion is that (given my location and set up) I offer more value to others by picking up distant signals over the ocean, than duplicating nearby private planes. However, if the more experienced on this forum think otherwise, I’d be interested to hear their thoughts.