f4exb / sdrangel

SDR Rx/Tx software for Airspy, Airspy HF+, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay and FunCube
GNU General Public License v3.0
2.93k stars 446 forks source link

ADS-B: sync threshold rework #696

Closed f4exb closed 3 years ago

f4exb commented 4 years ago

The initial change the validation of the sync sequence was entirely based on a stable noise floor and for good and bad reasons this is not always true. It happens that my tests were done in a quiet environment with only a few frames at night time and as you know air traffic is reduced globally these days...

First the bad reason for a moving noise floor: when working ADS-B at 1090 MHz you should put yourself in the situation where an out of band signal (GSM, TACAN pulses, ...) is not affecting your global gain. Good SDR practice starts with hard filtering. As ADS-B monitoring is popular it is easy to find good SMA mounted 1090 MHz band-pass filters these days.

The good reason: ADS-B is an Aloha kind of system that is every one speaks up without co-ordination and because messages are repeated there will be statistically a time when it will be clear enough to pick up the signal. This is still subject to the number of "speakers" but as you know in practice it works. Thus incoming frames may jump in and contribute to the "zero" sum significantly above the real noise floor. This is exactly what has been noticed in a busier environment and why my approach was not robust.

Now all systems generally expect a certain SNR to be able to decode a signal and ADS-B is no exception. To estimate the SNR of a particular frame we only have the sync sequence to start with and bursts are so short that we may assume that the SNR will not vary too much for the rest of the message. So if we want to put a threshold to decide if a signal is good enough we should have it in terms of SNR and SNR is signal over noise ratio.

For now this is the difference of ones and zeros powers and the purpose of this ticket is to turn it into a ratio

f4exb commented 4 years ago

I got great decodes this way mostly ~10 dB margin and always above ~4 dB. I am also going to add a RSSI reading based on the "ones" power this indication is different from correlation and can give an idea on how to set the gain(s).

f4exb commented 3 years ago

Implemented in v4.21.3