Hi,

I've implemented a FM deviation measurement mode in rtl_fm. It's turned on using the -D command line switch.

        [-D [tone freq]] Print the deviation of an FM signal.
            If given without a tone frequency, the whole bandwidth
            is used in the measurement. This include a lot of noise on
            weak signals so the measurement will not be so good.
            If a deviation measurement is done on a single tone the
            tone frequency should be given to improve the accuracy
            of the estimate.

If measuring on the whole bandwidth a simple min/max measurement is done on the demodulated signal and the deviation is determined from the difference. This work ok for very strong signals but just a little bit of noise will mess up the estimate. This mode can be used to get an approximate estimate for a voice signal for example.

If a tone frequency is given then the Goertzel single bin DFT algorithm is used to find out the amplitude of the tone. This is much better since all noise outside of the binwidth (100Hz) will be removed.

The patch is attached to this mail (sm0svx-print_deviation.patch.gz). I have also attached a patch that is a combination of my previous patch and the print_deviation patch (sm0svx-combined.patch.gz). I did this since the two patches conflict with each other in quite a few places. Hopefully this will make it easier for the maintainer to merge.

The code is also available on GitHub but I didn't create a pull request since that does not seem to be the way you want to work with patches. Tell me if you want me to create a pull request after all.

    https://github.com/sm0svx/librtlsdr/tree/print_deviation
    https://github.com/sm0svx/librtlsdr/tree/sm0svx

Regards,
Tobias

Attachment: sm0svx-combined.patch.gz
Description: application/gzip

Attachment: sm0svx-print_deviation.patch.gz
Description: application/gzip

Reply via email to