FlightAware Discussions

Thoughts on optimizing gain

I get the impression with lots of GA and airports somewhat nearby, US numbers are just very different.

1 Like

I’ve been reading through the threads and contemplating playing with my AGC but I’m uncertain if it is the right thing to do in my situation. Not unexpectedly there are some differing opinions based on what I’ve read.

I live in a busy area with a couple of commercial airports, several GA and a military base in addition to overflights. I don’t want to compromise range because at the limits of my range there are some interesting…things. I don’t mind missing some very close messages if needed to gain range but of course improving overall reception would be a “good thing”.

I’ve included a range graph from today from the FA stats. Started off with widespread fog today and the closest METAR now states a ceiling of 2500’ AGL with clouds start at 1400’. At the moment there are zero training flights at the closest GA airport which is highly unusual. I listened in to the tower frequency and there is nothing going on. The weather isn’t that bad so it must be one of those random circumstances.

Happily open to advice and comments.Thanks.

Isn’t AGC “automatic gain control” and enabled if selcted “-10” or “AGC” in the settings? In this case i would expect that there’s not much option to “play with”.

I don’t have such an environment, next larger airport is approx 30 miles away. But reducing the gain gives me a better position rate without losing the range.

As wiedehopf said, could be a difference in US area.

Yes, that was a typo. I am currently set to -10 so using AGC. I meant I was considering playing with my gain control manually.

1 Like

Some/most don’t agree, but disabling AGC is worth trying. Simply change the gain manually to 48 or 49.6, and see what happens.

Sometimes, depending on the exact installation, there are improvements with lower gain.

1 Like

The setting --gain AGC translates to --gain -10, which pushes the gain to about 55 dB, where it gets stuck and remains there throughout, no automatic gain control.

--gain max sets gain to maximum available in settings i.e. to 49.6 dB

I did not know about this. I thought both meant 55 dB.

@abcd567, I thought I was done with this. Back to testing now with both max and AGC. :wink:

Edit1: Are you sure? I just changed it to -10 and it shows max.

Edit2: Tried AGC, it does not accept it. It says not a valid value for that key.

In PiAware 4.8.0 if I have rtlsdr-gain set to max in piaware-config.txt I get stronger readings than if I change it to 49.6. That’s consistent with what I understood which is that max, agc and -10 are identical.

That was my understanding as well, and the changes I just tried seem to confirm that.

The gain settings are also not linear

chaning from -10 (which is 55) to 49.6 does have a much bigger impact than changing from 49.6 to 43.4 which is almost the same difference of approx 6

Or dump1090-fa does more with setting -10 than only switching to 55

This is for Piaware SD card image.

Have you tried the max, agc, and -10 with:

  • dump1090-fa package install on Raspbian image.
  • dump1090-mutability package install on Raspbian image

Good point, no I haven’t. I only use the SD card image. If the gain values really do mean different things on the package install that’s worth knowing.

rtlsdr-gain is only used on sdcard images; setting it on a package install will do absolutely nothing. You need to specify a gain value in /etc/default/dump1090-fa. dump1090-fa itself does not understand anything other than numeric gain values, it is the glue scripts included on sdcard images only that do the translation.

Is it the case that on SD card images -10 and max means the absolute maximum (above 49.6) and that on package installs -10 means the same as above while max now means 49.6? And that in both cases a value of ‘agc’ has been deprecated?

While waiting for my filter to arrive I decided to try tweaking the gain on my current setup (FA blue dongle, FA antenna). Originally I was using the default -10 aka AGC aka max. Today I did a
sudo piaware-config rtlsdr-gain 49.6
to set my gain and restarted PiAware and dump1090-fa. Before this change the awk script was reporting 19% strong messages (the past few days it has been slightly above 20%). The gain change made an immediate difference in the strong messages received. After soaking an hour I’m now getting around 4.5%. Attached are a couple of 2 hour charts that show the change. I added arrows but, yeah, it’s pretty obvious without them.

There is a spike on the tracks seen chart but I think that was just a transient related to restarting the services with the new gain. After the spike there doesn’t seem to be a huge change (given the constant changes in flights). The median dBFS dropped from around -10 to -20 with a corresponding drop in the weakest (no change to the peak). The only other chart that showed a noticeable change was CPU utilization which looks to have dropped 5pp.

I can’t say whether the gain change will have made things better or not - it’s a rainy day so comparisons to the recent past aren’t indicative. I am mostly interested in aircraft identified at range which is always highly variable. But I thought I’d share if in case anyone has a comment or might find it interesting.

Ignore the 7 day average line as I only installed the graph package a few days ago.
tracks signal level


no. package installs use whatever numeric gain you specify as a dump1090 option in /etc/default. dump1090 does not understand “max” as a gain.

I can’t remember if it was ever supported in the past, but it’s not supported now.

1 Like

Screenshot below for dump1090-mutability EB_VERSION, instaslled by sudo apt install dump1090-mutability on Armbian Buster.

I have dump1090-mutability ver 1.15~dev package install (built from source code) on one of my spare microSD cards. Tonight I will boot my Pi with it and check it also.


Monitor it for at least 24 hours.
That’s what i did on several settings between 38.6 and 49.6 .
With that i found that 40.2 is the best value for range, positions reported and messages > -3dBFS

You might need to keep an eye also on the positions reported (to be found also in the section ADS-B Maxima). For me it improved to peaks up to 65 which is not the case with a higher gain.

Thanks, I’ll watch that. Today it is down slightly but I think that trend started before I changed the gain. My Max and Peak range don’t seem to have suffered so far.

Brilliant thanks for clarifying @obj.