Giter Site home page Giter Site logo

A Scan feature? about nrsc5 HOT 10 OPEN

theori-io avatar theori-io commented on June 27, 2024
A Scan feature?

from nrsc5.

Comments (10)

 avatar commented on June 27, 2024

https://hdradio.com/stations

It's reasonably accurate. They claim I should be able to get a 6 kW (analog ERP) station 23 miles away, which is ... debatable. I can't even see the station in GQRX. But other than the subchannel info being outdated on a very few entries, it seems fine.

from nrsc5.

pclov3r avatar pclov3r commented on June 27, 2024

@ClassicFM that list is extremely inaccurate for my area at least.

from nrsc5.

 avatar commented on June 27, 2024

Sometimes it returns a list for somewhere completely different, probably due to a buggy reverse proxy. Refresh a couple times if that happens. You can also give it location access, no idea if that helps in larger metros. It looks to me like it's based on FCC and/or Arbitron 'media market' rather than any reception parameters.

It wouldn't be so bad if nrsc5 ran through 88-108 MHz and printed some basic metadata once it got a lock. Much as the HDHomeRun does for digital TV: when it locks it prints out the info gleaned from the ATSC TVCT table, like "program 3: 9.2 MeTV"

ATSC A/65 and ISO MPEG-TS are rather strict about how often things like TVCT and the PAT structure must appear, to aid in exactly this kind of application. I gather NRSC-5 is not that way, though in practice the delay might not be so intolerable.

from nrsc5.

awesie avatar awesie commented on June 27, 2024

I've experimented with this a bit in the past. The challenge is making the process fast. In general a full scan seems to take around 4 minutes in my area.

For each possible frequency we need to iterate over the different gain values and determine if the frequency likely has a station. This part needs to be as fast as possible. Once a frequency is identified as potentially having a station, we can dedicate 15 seconds or so to brute force the best gain setting and then wait for the decoder to find a valid PIDS frame.

To make the first half fast, I've experimented with using a goertzel filter to try to detect the analog FM stereo pilot. My assumption is that every HD radio station (in the real world) will have a stereo pilot signal, and that trying to detect this pilot is faster and more reliable than detecting the HD radio signal. I then paired this with the same basic algorithm we use for finding the ideal gain setting, except I skip over gain values so we only test every 10 dB of gain or so.

Honestly, in the end, I'm not sure the stereo pilot detection was useful. The digital side bands are fairly easy to detect. I also experimented with trying to use the rtlsdr's built-in AGC, but it's performance was miserable, likely due to my location downtown with lots of stations and inside of an apartment.

tl;dr how long should the scan take and how accurate does it need to be?

from nrsc5.

pclov3r avatar pclov3r commented on June 27, 2024

My assumption is that every HD radio station (in the real world) will have a stereo pilot signal

In my area there is a NPR affiliated station with HD and not running stereo for their analog signal. This might be an edge case tho.

from nrsc5.

awesie avatar awesie commented on June 27, 2024

I am moderately surprised. Does it have RBDS?

from nrsc5.

pclov3r avatar pclov3r commented on June 27, 2024

@awesie I know and yes it does.

from nrsc5.

ab1jx avatar ab1jx commented on June 27, 2024

4 minutes seems fine, it's not something I'd do often. Scanning for ATSC TV channels is probably about that long, haven't done it in over a year. Is there a possibility to make searches of different "depths" like zenmap does when it port scans? Some number on the command line. I tried the link above, even with entering a zip code it shows 6 stations which don't include one I'd already found. Something like https://www.tvfool.com/?option=com_wrapper&Itemid=29 would be better. Oh, try http://www.fmfool.com/ I think it uses something like splat so it takes terrain into account, but it doesn't show only HD. They could add that since it comes out of a database. You could use rtl_power to scan the FM band then try each for digital content.

You could maybe also use rtl_power to sample about 10 frequencies per channel then look for the blocks that are the digital information. You'd need to have a replacement for heatmap.py that analyzes the data and outputs center frequencies of the found ones. I just tried the strongest 10 stations here by fmfool and only one has usable HD.
HDRadio
Those blocks can't be that hard to spot.

from nrsc5.

ab1jx avatar ab1jx commented on June 27, 2024

Yes, I think that will work at least in areas with a low density of HDFM stations. I'm working on a program to make it more civilized, but here I ran rtl_power to get 1 data point every 5 kHz.
waqy_102 1

Here the only station I've found so far with nrsc5 is at 102.1. You can see a bunch of stuff within a short spectral distance of that frequency. I don't see many such stations, but I made this plot 8000 pixels wide to see them better.
nrs2

The actual scan took about 11 seconds.

I seem to have another station at 90.3, even though that's not divisible by 0.2. 90.2 doesn't work, or 90.4, but I'm listening to 90.3. Tcxo oscillator in this dongle so I don't think it's far off. Yes, it's WAMC. https://www.wamc.org/

from nrsc5.

ab1jx avatar ab1jx commented on June 27, 2024

OK, I put my program on Sourceforge https://sourceforge.net/projects/fmplot/

from nrsc5.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.