diff options
Diffstat (limited to 'gr-digital/lib')
-rw-r--r-- | gr-digital/lib/constellation.cc | 4 | ||||
-rw-r--r-- | gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.cc | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/gr-digital/lib/constellation.cc b/gr-digital/lib/constellation.cc index bd75bc648b..0aff0aaecc 100644 --- a/gr-digital/lib/constellation.cc +++ b/gr-digital/lib/constellation.cc @@ -575,7 +575,7 @@ constellation_psk::~constellation_psk() {} unsigned int constellation_psk::get_sector(const gr_complex* sample) { float phase = arg(*sample); - float width = GR_M_TWOPI / n_sectors; + float width = (2.0 * GR_M_PI) / n_sectors; int sector = floor(phase / width + 0.5); if (sector < 0) sector += n_sectors; @@ -584,7 +584,7 @@ unsigned int constellation_psk::get_sector(const gr_complex* sample) unsigned int constellation_psk::calc_sector_value(unsigned int sector) { - float phase = sector * GR_M_TWOPI / n_sectors; + float phase = sector * (2.0 * GR_M_PI) / n_sectors; gr_complex sector_center = gr_complex(cos(phase), sin(phase)); unsigned int closest_point = get_closest_point(§or_center); return closest_point; diff --git a/gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.cc b/gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.cc index 77de7f4ced..ca2f0aa9d3 100644 --- a/gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.cc +++ b/gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.cc @@ -128,7 +128,7 @@ int ofdm_frame_equalizer_vcvc_impl::work(int noutput_items, gr_complex phase_correction; for (int i = 0; i < frame_len; i++) { phase_correction = - gr_expj(-GR_M_TWOPI * carrier_offset * d_cp_len / d_fft_len * (i + 1)); + gr_expj(-(2.0 * GR_M_PI) * carrier_offset * d_cp_len / d_fft_len * (i + 1)); for (int k = 0; k < d_fft_len; k++) { out[i * d_fft_len + k] *= phase_correction; } @@ -141,7 +141,7 @@ int ofdm_frame_equalizer_vcvc_impl::work(int noutput_items, // Update the channel state regarding the frequency offset phase_correction = - gr_expj(GR_M_TWOPI * carrier_offset * d_cp_len / d_fft_len * frame_len); + gr_expj((2.0 * GR_M_PI) * carrier_offset * d_cp_len / d_fft_len * frame_len); for (int k = 0; k < d_fft_len; k++) { d_channel_state[k] *= phase_correction; } |