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

Automatic Gain Control #53

Open
Taxom opened this issue Jan 11, 2023 · 13 comments
Open

Automatic Gain Control #53

Taxom opened this issue Jan 11, 2023 · 13 comments
Labels
enhancement New feature or request

Comments

@Taxom
Copy link

Taxom commented Jan 11, 2023

Hi Jasper! Is it possible to implement the Automatic Gain Control (ADAPTIVE_DYNAMIC_RANGE and ADAPTIVE_BURST) by type of what is implemented in DUMP1090-FA?

Thank you so much for the work!

@jvde-github
Copy link
Owner

jvde-github commented Jan 11, 2023

Hi, I am not familiar with this software and implementation so definitely worthwhile to look into. I also saw recently this snippet: https://www.rtl-sdr.com/tag/automatic-gain-control/. Worthwhile to look into and great suggestion.

At the same time I am trying to create plots in the webpart to help calibrate the dongles. The PPM graphs are reasonably useful to calibrate frequency. The gain plot is rubbish and needs work.

I will definitely look into this. Thanks for the reference.

@Taxom
Copy link
Author

Taxom commented Jan 11, 2023

@jvde-github
Copy link
Owner

Thank you

@Taxom
Copy link
Author

Taxom commented Jan 11, 2023

It works very well for taking ADSB and since the types of signals and the conditions of reception are similar, in theory it should also work well with AIS.
Screenshot 2023-01-11 at 14-51-08 graphs1090 Performance Graphs

@jvde-github
Copy link
Owner

Good pictures to illustrate the approach. Need some time but will have a look.

@Taxom
Copy link
Author

Taxom commented Jan 11, 2023

I also noticed something strange, immediately after the Ais-Catcher restart, there is a reception of distant and weak signals, but then they stop. AGC is turned off. Here are my settings:
-d 00000162 -v 10 -M DT -gr RTLAGC off TUNER 38 -a 100K -s 1536k -p -1 -o 4 -u 127.0.0.1 10111

@Taxom
Copy link
Author

Taxom commented Jan 11, 2023

9min after restart ais-catcher

Screenshot 2023-01-11 at 15-55-55 AIS-catcher MaxPi_AIS

@Taxom
Copy link
Author

Taxom commented Jan 11, 2023

30min after restart ais-catcher
These are not ships, but basic stations and navigation buoys, so that the signal level from them should be approximately constant.
Screenshot 2023-01-11 at 16-16-52 AIS-catcher MaxPi_AIS

@jvde-github
Copy link
Owner

Is there a way to structurally test and repeat this, e.g. by recording a signal using rtl-sdr? I don't necessarily see anything from the two tables.

@Taxom
Copy link
Author

Taxom commented Jan 11, 2023

I noticed this in the process of setting gain. It’s just that every time I change the gain level, I received a reception of weak signals, but after a short time they disappeared. I again changed of gain level and the situation was repeated, then I noticed that just restarting the Ais-Catcher is the same thing.
I will still experiment with this and let you know how stable it is.

@jvde-github
Copy link
Owner

jvde-github commented Jan 14, 2023

Please keep me posted. I have tested the decoder many times by running a file with a weak signal in an infinite loop and the decoding quality does not deteriorate in all my tests. This is also not expected as there is virtually no memory in this system.

The other culprit might be how we interface with the dongle. But if I run rtl_sdr and pipe the input into AIS-catcher the results will not change.

However, the effect you described I have seen as well in the past. Not in my current setup but I saw in a different system. Perhaps more accurate to say that I suspected it. I have given up trying to understand what was going on. For what system are you observing this?

I have seen other weird things. For example, when the processor load on my RPi increases the message rate drops.
I have recorded 30 seconds at 162 MHz and increased the processor load after 15 secons. You see that this has an impact on the RTL-SDR signal:
image

This is the CPU Frequency at the same time:
image

Understanding and optimizing reception is very difficult, at least for me. In general I did observe better results for a Mini PC than the RPi and suspected it was the hardware and not software related.

I look forward to further insights if you find out more.

@ROSTOCHE
Copy link

The software works very well with an RSP1A.
The only problem encountered is with a passenger Ro/Ro and therefore equipped with an A transponder.
I only see it very rarely, whereas other boats equipped in the same way and located just alongside are perfectly seen.
I've tried different values ​​at the LNAstate level with no noticeable change.
At the level of the table of tables I have seen twelve boats...
Is there a number limit for displayed boats?
Thanks in advance for the responses.

@jvde-github
Copy link
Owner

jvde-github commented Jan 20, 2023

There is no limit to the number of vessels displayed. I have ran it with Norwegian coastal data as input (~3000 vessels) to stress test and it still works then. So must be something else.

Are you missing the vessel in the webclient or also in the UDP output?

I find it difficult to say anything sensible. Is it one particular vessel? If you do capture the signal occasionally might be worthwhile to have a look at the signal level and drift in the output (-M DT -o 3 or -o 5) and compare that against the nearby vessels that you do receive. And start from there.

Worst case you might wat to run it with a simple FM decoder:

AIS-catcher -m 0 

This decoder receives less messages than the default one but less sensitive for frequency drift in a signal. You might also try to see if you can use a simple RTL-SDR dongle if you have happen to have that at hand.

@jvde-github jvde-github added the enhancement New feature or request label Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants