Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/gr-analog/lib/quadrature_demod_cf_impl.cc b/gr-analog/lib/quadrature_demod_cf_impl.cc
- index 059cc89..4c29b1b 100644
- --- a/gr-analog/lib/quadrature_demod_cf_impl.cc
- +++ b/gr-analog/lib/quadrature_demod_cf_impl.cc
- @@ -28,6 +28,7 @@
- #include <gnuradio/io_signature.h>
- #include <gnuradio/math.h>
- #include <volk/volk.h>
- +#include <math.h>
- namespace gr {
- namespace analog {
- @@ -67,7 +68,11 @@ namespace gr {
- std::vector<gr_complex> tmp(noutput_items);
- volk_32fc_x2_multiply_conjugate_32fc(&tmp[0], &in[1], &in[0], noutput_items);
- for(int i = 0; i < noutput_items; i++) {
- - out[i] = d_gain * gr::fast_atan2f(imag(tmp[i]), real(tmp[i]));
- + if((float)real(tmp[i]) != INFINITY && (float)imag(tmp[i]) != INFINITY && (float)real(tmp[i]) != -INFINITY && (float)imag(tmp[i]) != -INFINITY){
- + out[i] = d_gain * gr::fast_atan2f(imag(tmp[i]), real(tmp[i]));
- + }else{
- + out[i] = 0.0;
- + }
- }
- return noutput_items;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement