diff options
author | Tom Rondeau <trondeau@vt.edu> | 2011-08-29 17:58:25 -0400 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2011-08-29 17:58:25 -0400 |
commit | 5784b0c53c6d19b7a74f82e57c816beecd8b5edb (patch) | |
tree | 79567afdc96134ab564b64ca32b6d6a0765cd088 /gr-digital/lib/digital_constellation.cc | |
parent | f94ceff1f608bd5d1c67e3ff662fb2c659e61aa8 (diff) |
digital: fixing qa code to test new dqpsk; a few minor formatting changes.
Diffstat (limited to 'gr-digital/lib/digital_constellation.cc')
-rw-r--r-- | gr-digital/lib/digital_constellation.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gr-digital/lib/digital_constellation.cc b/gr-digital/lib/digital_constellation.cc index ed6d32bcb0..3dfc70273d 100644 --- a/gr-digital/lib/digital_constellation.cc +++ b/gr-digital/lib/digital_constellation.cc @@ -463,12 +463,16 @@ digital_make_constellation_dqpsk() digital_constellation_dqpsk::digital_constellation_dqpsk () { + // This constellation is not gray coded, which allows + // us to use differential encodings (through gr_diff_encode and + // gr_diff_decode) on the symbols. d_constellation.resize(4); d_constellation[0] = gr_complex(+SQRT_TWO, +SQRT_TWO); d_constellation[1] = gr_complex(-SQRT_TWO, +SQRT_TWO); d_constellation[2] = gr_complex(-SQRT_TWO, -SQRT_TWO); d_constellation[3] = gr_complex(+SQRT_TWO, -SQRT_TWO); + // Use this mapping to convert to gray code before diff enc. d_pre_diff_code.resize(4); d_pre_diff_code[0] = 0x0; d_pre_diff_code[1] = 0x1; @@ -481,10 +485,12 @@ digital_constellation_dqpsk::digital_constellation_dqpsk () calc_arity(); } -#include <cstdio> unsigned int digital_constellation_dqpsk::decision_maker(const gr_complex *sample) { + // Slower deicison maker as we can't slice along one axis. + // Maybe there's a better way to do this, still. + bool a = real(*sample) > 0; bool b = imag(*sample) > 0; if(a) { |