diff options
author | Martin Braun | 2010-12-10 17:30:01 +0100 |
---|---|---|
committer | Martin Braun | 2010-12-10 17:30:01 +0100 |
commit | b12498643aa5c11a35a484925c565a7a9e746f75 (patch) | |
tree | 10fd20ef85be944814b16a75ef2c855965913513 /gnuradio-core/src/lib | |
parent | 67e6c7e9a9420f2fc5ee14cee862412aad24b89f (diff) | |
download | gnuradio-b12498643aa5c11a35a484925c565a7a9e746f75.tar.gz gnuradio-b12498643aa5c11a35a484925c565a7a9e746f75.tar.bz2 gnuradio-b12498643aa5c11a35a484925c565a7a9e746f75.zip |
fixed: FM sensitivity and calling gr_cpm::phase_response() through SWIG
Diffstat (limited to 'gnuradio-core/src/lib')
-rw-r--r-- | gnuradio-core/src/lib/general/gr_cpm.cc | 3 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_cpm.h | 4 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_cpm.i | 2 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/qa_gr_cpm.cc | 2 | ||||
-rw-r--r-- | gnuradio-core/src/lib/hier/gr_cpmmod_bc.cc | 2 |
5 files changed, 5 insertions, 8 deletions
diff --git a/gnuradio-core/src/lib/general/gr_cpm.cc b/gnuradio-core/src/lib/general/gr_cpm.cc index f2d032a22..a00526b52 100644 --- a/gnuradio-core/src/lib/general/gr_cpm.cc +++ b/gnuradio-core/src/lib/general/gr_cpm.cc @@ -28,6 +28,9 @@ #include <cfloat> #include <gr_cpm.h> +#ifndef M_TWOPI +# define M_TWOPI (2*M_PI) +#endif //! Normalised sinc function, sinc(x)=sin(pi*x)/pi*x inline double diff --git a/gnuradio-core/src/lib/general/gr_cpm.h b/gnuradio-core/src/lib/general/gr_cpm.h index 09598024a..cae6fe313 100644 --- a/gnuradio-core/src/lib/general/gr_cpm.h +++ b/gnuradio-core/src/lib/general/gr_cpm.h @@ -24,10 +24,6 @@ #include <vector> -#ifndef M_TWOPI -# define M_TWOPI (2*M_PI) -#endif - class gr_cpm { public: diff --git a/gnuradio-core/src/lib/general/gr_cpm.i b/gnuradio-core/src/lib/general/gr_cpm.i index 7145f5edd..f01aba34e 100644 --- a/gnuradio-core/src/lib/general/gr_cpm.i +++ b/gnuradio-core/src/lib/general/gr_cpm.i @@ -34,7 +34,7 @@ class gr_cpm GENERIC = 999 }; - std::vector<float> + static std::vector<float> phase_response(cpm_type type, unsigned samples_per_sym, unsigned L, double beta=0.3); }; diff --git a/gnuradio-core/src/lib/general/qa_gr_cpm.cc b/gnuradio-core/src/lib/general/qa_gr_cpm.cc index ae391c48c..cc32d1117 100644 --- a/gnuradio-core/src/lib/general/qa_gr_cpm.cc +++ b/gnuradio-core/src/lib/general/qa_gr_cpm.cc @@ -135,8 +135,6 @@ qa_gr_cpm::t5 () sum += taps[i]; } - // Need to cut this guy some slack; in theory, sum only equals one for - // L => infinity CPPUNIT_ASSERT_DOUBLES_EQUAL(sum, 1.0, DELTA); } diff --git a/gnuradio-core/src/lib/hier/gr_cpmmod_bc.cc b/gnuradio-core/src/lib/hier/gr_cpmmod_bc.cc index d14deee34..24c25e22f 100644 --- a/gnuradio-core/src/lib/hier/gr_cpmmod_bc.cc +++ b/gnuradio-core/src/lib/hier/gr_cpmmod_bc.cc @@ -42,7 +42,7 @@ gr_cpmmod_bc::gr_cpmmod_bc(gr_cpm::cpm_type type, float h, unsigned samples_per_ d_taps(gr_cpm::phase_response(type, samples_per_sym, L, beta)), d_char_to_float(gr_make_char_to_float()), d_pulse_shaper(gr_make_interp_fir_filter_fff(samples_per_sym, d_taps)), - d_fm(gr_make_frequency_modulator_fc(M_TWOPI * h / samples_per_sym)) + d_fm(gr_make_frequency_modulator_fc(M_PI * h)) { switch (type) { case gr_cpm::LRC: |