From 9e5ce0cc3b699b95736c56e53cea151c57e376c8 Mon Sep 17 00:00:00 2001 From: ha7ilm Date: Sat, 13 Dec 2014 23:46:41 +0100 Subject: [PATCH] fix parameter naming mistake: rolloff -> transition_bw --- README.md | 2 +- libcsdr.c | 4 ++-- libcsdr.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 33a8485..c306814 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Usage by example - We want to listen to one radio station, but input signal contains multiple stations, and its bandwidth is too large for sending it directly to the FM demodulator. - We shift the signal to the center frequency of the station we want to receive: `-0.085*2400000 = -204000`, so basically we will listen to the radio station centered at 89504000 Hz. -- We decimate the signal by a factor of 10. The rolloff for the FIR filter used for decimation will be 10% of total bandwidth (as of parameter 0.05 is 10% of 0.5). Hamming window will be used for windowed FIR filter design. +- We decimate the signal by a factor of 10. The transition bandwidth of the FIR filter used for decimation will be 10% of total bandwidth (as of parameter 0.05 is 10% of 0.5). Hamming window will be used for windowed FIR filter design. Sample rates look like this: diff --git a/libcsdr.c b/libcsdr.c index 4080307..7d6e449 100644 --- a/libcsdr.c +++ b/libcsdr.c @@ -165,9 +165,9 @@ void firdes_bandpass_c(complexf *output, int length, float lowcut, float highcut } } -int firdes_filter_len(float rolloff) +int firdes_filter_len(float transition_bw) { - int result=4.0/rolloff; + int result=4.0/transition_bw; if (result%2==0) result++; //number of symmetric FIR filter taps should be odd return result; } diff --git a/libcsdr.h b/libcsdr.h index 9898be2..a66d72b 100644 --- a/libcsdr.h +++ b/libcsdr.h @@ -86,7 +86,7 @@ float firdes_wkernel_hamming(float input); float firdes_wkernel_boxcar(float input); window_t firdes_get_window_from_string(char* input); char* firdes_get_string_from_window(window_t window); -int firdes_filter_len(float rolloff); +int firdes_filter_len(float transition_bw); //demodulators complexf fmdemod_quadri_cf(complexf* input, float* output, int input_size, float *temp, complexf last_sample);