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

Permit frequency shorthand of "M" (e.g. 90.9M instead of 90900000) #50

Closed
classicjazz opened this issue Aug 20, 2017 · 5 comments
Closed

Comments

@classicjazz
Copy link

In rtl_fm, you can specify a frequency of 90.9M instead of writing out all the zeros like 90900000.

In nrsc5, if you specify a frequency of 90.9M, it will do auto gain control but not play anything.

I have tried a number of stations with the same result. Unless I am missing something...

@argilo
Copy link
Collaborator

argilo commented Aug 21, 2017

nrsc5 doesn't support that, but I think it would be a useful feature. I'll put it in the next time I'm working on the project.

@classicjazz
Copy link
Author

Thank you.

Some additional testing...

If I ask RTL_FM to tune 90.1M, it consistently tunes 90371000 Hz, not 90100000 Hz. 90100000 Hz works fine for nrsc5 but 90371000 Hz results in

Tuning to the radio station: 90.3 Mhz HD1 16:36:56 INFO main.c:183: [0] Generic RTL2832U OEM Playing: - [file] Reading from stdin... Found Rafael Micro R820T tuner Exact sample rate is: 1488375.071248 Hz 16:36:57 INFO main.c:63: Gain: 0.0 dB, CNR: -16.127131 dB 16:36:57 INFO main.c:63: Gain: 0.9 dB, CNR: -18.021013 dB 16:36:57 INFO main.c:63: Gain: 1.4 dB, CNR: -18.603493 dB 16:36:57 INFO main.c:63: Gain: 2.7 dB, CNR: -19.879759 dB 16:36:57 DEBUG main.c:67: Best gain: 0

Similarly with 90.9Mhz HD1 or 909000000 specified:
In RTL_FM, it tunes to 91171000 Hz instead.

@argilo
Copy link
Collaborator

argilo commented Aug 22, 2017

I suspect that's just because rtl_fm is using offset tuning to keep the signal of interest away from the noise spike around 0 Hz.

nrsc5 doesn't have that problem because the noise spike is in the analog FM signal, which is filtered out anyway.

@classicjazz
Copy link
Author

Ah, makes sense. I was confused because I was looking for the exact frequency to plug in. And what worked in analog wasn't working in digital.

All the more reason to just simplify the UX and just use 90.9M or similar...

@awesie
Copy link
Contributor

awesie commented Sep 5, 2017

This is fixed in #54. Instead of a prefix, it will accept a decimal number for the frequency, and if it is less than 10,000, it will be multiplied by 1M.

@awesie awesie closed this as completed Sep 5, 2017
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

3 participants