john- / ham2mon

GNU Radio based SDR scanner for narrow band FM demodulation
GNU General Public License v3.0
2 stars 0 forks source link

Treatment of "demodulator.center_freq == 0" #15

Closed john- closed 6 months ago

john- commented 6 months ago

I have noticed that if detected center frequency is "0" (zero) then this line stops it from being added to a demodulator:

https://github.com/john-/ham2mon/blob/4e33653820ac1a9f144d00ff0b305ee34cd1aa70/apps/scanner.py#L302

A channel of "0" won't be added initially because self.receiver.get_demod_freqs() contains a "0" so the center_freq of "0" exists. It won't be added after all demodulators have frequencies assigned because none of the demodualtion frequencies are "0".

The code has been this way for years.

Am I missing something? Is this intentional to avoid dc spike on those receivers that have it?

john- commented 6 months ago

This is intentional....from the README:

The demodulators are parked at 0 Hz baseband when not tuned, as this provides a constant, low amplitude signal due to FM demod of LO leakage.

lordmorgul commented 6 months ago

I think that there is no easy way to identify valid signal at 0Hz, at least before without classification. It is possible that class id could be used to do that but would be cpu cycles classifying nothing all the time.

john- commented 6 months ago

Thanks for the input. I just left the code the way it was.

Closing this ticket.