FlightAware Discussions

Gain question (searched, could not find answer)

I’ve got the FlightAware Pro Stick Plus (Blue dongle) and am trying to squeeze as much out of it as I can. Pretty happy so far.

With the default gain settings (-10 / AGC) I get about 15% of messages received as ‘strong’ messages, when I’ve read it’s recommend to adjust the gain and play with it until you can get it down to about 5% of messages received as ‘strong’ messages. Is this still correct to this date?

Trouble is, after lots of trial and error, the best I can get is about 1% of messages as ‘strong’ messages when adjusting the gain setting manually. I’ve tried everything from 10-999, with the ‘sweet spot’ seeming to be about 200-400 which produces about 1% of messages received as strong.

Practically any other settings have less than 1%.

I’ve looked and I can’t seem to find out, but is there a command I can issue to check what the ‘current’ gain is set to when using Automatic Gain Control? I’m not sure what the dongle is operating at when it’s set to auto to get rates of 15% of traffic listed as strong signals. Knowing that number, at the time, would allow me to have a better place to start at for experimenting.

pi@raspberrypi:~ $ awk "$(cat /run/dump1090*/stats.json| grep total | sed 's/.*accepted":\[\([0-9]*\).*strong_signals":\([0-9]*\).*/BEGIN {printf "\\nPercentage of strong messages: %.3f \\n" , \2 * 100 \/ \1}/')"
Percentage of strong messages: 0.990

That’s about as best as I can get when manually modifying /etc/default/dump1090-fa

You can tell when I’ve adjusted it over the last couple days, only to set it back to the default.

The valid gain values are
-10 for AGC (which is often practically a gain of about 55)
0 to 49

Other values are not valid gain values.

Might just be optimal for you to run it on AGC, you can fine tune the values between 49 and 55 sadly.

(If you need to run the prostick plus on AGC it points to your antenna being suboptimal)

Anyway you should only reduce gain from AGC if you want to see local traffic and can’t see it currently.
It’s described in the thread you were reading, no percentage is optimal, you need to understand it or just optimize by trial and error.

1 Like

This command will show you the current gain:

journalctl -u dump1090-fa | grep rtlsdr

rtl_test can show you all supported gain values, if you want to run it you need to stop dump1090-fa first though:

root@x230 ~/dump978 # rtl_test
Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
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

Understood. I’m used to more conventional forum software and am still getting the hang of locating what I’m looking for on Discourse.

I’ll experiment more. The goal is to see more “local” traffic. I’ll keep tinkering. :slight_smile:

Just set it to 49 and check on the map if the local traffic is visible ok.

If the percentage is only 1% then, well you’ll have to live with less hits far away maybe.

can anyone advise what, in the software, forces the specific allowable gain values? it would be nice if there were more resolution (for example, 3dB steps in airspy mini is pretty large), and a strange set of steps supported in the rtl-sdr style dongles:
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 and of course -10)

too bad we can’t have finer resolution (ie 1.5dB steps or similar). as noted in N1AAE’s post, it would be nice to have some additional steps between -10 and 49.6 (and 1.5dB steps in Airspy mini)

Those values are used to change programmable hardware components.
(The gain might be implemented in stages, so let’s say 7 chained components with 4 programmable levels or something like that. Now the attenuation levels might be different depending on the component, so the steps could be irregular because of that)

So it’s not a software but hardware limitation.

Why AGC has more than manually settable gain might be a rtl-sdr driver limitation or it’s just a limitation by the producers of the hardware.
Probably it was never really meant to be used with manual gain settings.
(DVB-T works fine with AGC)

Right. It’s determined by the step size of the individual gain stages as you say.

If you ask for a gain value that’s not in the list, the driver will pick the closest gain that the hardware can actually provide.

It’s a rtl-sdr / r820t driver quirk. I’ve been meaning to revisit the rtl-sdr r820t tuner logic to clean this up for years now, but it’s never been quite urgent enough…

thanks obj and wiedehopf, great responses

‘current gain’ is what has been already pre-set by you or by the software.
as such it NEVER fluctuates between any set of values.
AGC is somewhat confusing term, actually meaning MAX, where
ADS-B is concerned.
However there can be fluctuations, thus the name AGC, if the dongle is used for
Digital TV reception (DVB-T).

is operating at …auto (~55)