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

Allow non-integer frequency error correction #56

Open
kerel-fs opened this issue Apr 27, 2021 · 1 comment
Open

Allow non-integer frequency error correction #56

kerel-fs opened this issue Apr 27, 2021 · 1 comment

Comments

@kerel-fs
Copy link

💡 Feature request
Allow non-integer frequency corrections via SoapyRTLSDR::setFrequencyCorrection(const int direction, const size_t channel, const double value) and properly handle them. As librtlsdr supports integer ppm corrections only, this would either require modifying the library or applying the frequency correction in SoapyRTLSDR itself.

🎯 Goal
We are using soapysdr via gr-soapy in the SatNOGS satellite ground stations. A user-provided parameter SATNOGS_PPM_ERROR is passed from the gnuradio flowgraph via gr-soapy to the Soapy Frequency Correction API, to correct for freq errors (e.g. -1 ppm for -1.220 ppm or -3 ppm for -2.675 ppm). A 0.5ppm error at 440Mhz is 0.22 kHz. In some cases even an offset of 0.5 kHz made it difficult to decode some signals (issue tracked at satnogs-client-ansible#90).

Allowing non-integer corrections like -1.220 ppm will reduce the residual error to 0.001 ppm / 0.4 Hz@440MHz, which is small enough.

📖 Related issues

As the support of Frequency Error Correction via the Soapy Frontend Correction API is limited to only a few devices (RTL-SDR & SDRPlay afaik), maybe this can be handled in SoapySDR itself. See pothosware/SoapySDR#291

CC. @janvgils

@zuckschwerdt
Copy link
Member

regarding #291 you meant that the other way around: implement hardware specific correction in each module, right?
The calculation in librtlsdr looks simple and could use the improved precision if we could apply it there. It's also used via rtlsdr_get_xtal_freq(), not sure if that's linear?

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