Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto gain issues #88

Open
VirusPilot opened this issue Mar 5, 2025 · 7 comments
Open

auto gain issues #88

VirusPilot opened this issue Mar 5, 2025 · 7 comments

Comments

@VirusPilot
Copy link

As discussed I am experimenting with auto gain - initial results are not fully convincing. Some nearby transponder signals are not triggering any gain change at all, sometimes a reduced gain won't recover although no signal is around. I have compiled a more verbose output version but this line here won't compile:

readsb/readsb.c

Line 830 in bfc4a0b

//fprintf(stderr, "%9s gain. noiseLow: %5.2f %% noiseHigh: %5.2f %% loudEvents: %4lld\n", action, noiseLowPercent, noiseHighPercent, (long long) loudEvents);
as action is not defined. Can you clarify? Are there any other debug messages that I could use? The receiver is located on top of our airport tower.

@wiedehopf
Copy link
Owner

Replace action with reason.

But this should be sufficient for debugging:
--gain=auto-verbose

Which gain setting are you using exactly?
Some SDRs might behave differently i suppose.

Reduced gain might not go back up if there is a lot of noise.
If there is a lot of noise, increased gain is unlikely to be useful.

@VirusPilot
Copy link
Author

I have been using standard gain settings for the most part but e.g. reduced loudThreshold . Still not fully understanding how all auto-gain values correspond to dBm values so that they could be adjusted based on measured values. Btw. I am using RTLSRD v3 silver sticks.

@wiedehopf
Copy link
Owner

While you could translate to dB values it would still not be intuitive.

Decreasing loudThreshold seems like the correct thing to do in your situation.

Pushed a version that has that extra debug output fixed up.

Some nearby transponder signals are not triggering any gain change at all.
Are you saying the SDR is receiving data from them? Then you really don't need to reduce gain?

@VirusPilot
Copy link
Author

I need to double check that situation where some nearby transponder signals are not triggering any gain change at all. Btw, how can I disable tuner AGC?

Just to confirm what the values are doing:

  • noiseLowThreshold: if measured value is lower then increase gain
  • noiseHighThreshold: if measured value is higher then decrease gain
  • loudThreshold: if measured value is higher then decrease gain

One more question: assuming a ~30dB dynamic range of the rtlsdr, how would this translate to the 0..255 values?

@VirusPilot
Copy link
Author

just to complement, these are the values I found to work for my setup for the time being: --gain auto-verbose,12.5,20,30,230

@wiedehopf
Copy link
Owner

tuner AGC can't be disabled as the highest gain step.
But most installs it will just switch out of that step immediately due to noise.

lowestGain is an absolute limit that autogain won't go below.

Stop asking about dB please, i already said that even if you were to calculate that it likely wouldn't make sense.

@VirusPilot
Copy link
Author

Alright, will monitor my current setting and report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants