BPSK:
constellation_bpsk::constellation_bpsk() { d_constellation.resize(2); d_constellation[0] = gr_complex(-1, 0); d_constellation[1] = gr_complex(1, 0); d_rotational_symmetry = 2; d_dimensionality = 1; calc_arity(); }
QPSK:
constellation_qpsk::constellation_qpsk() { d_constellation.resize(4); // Gray-coded 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); /* 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); */ d_pre_diff_code.resize(4); d_pre_diff_code[0] = 0x0; d_pre_diff_code[1] = 0x2; d_pre_diff_code[2] = 0x3; d_pre_diff_code[3] = 0x1; d_rotational_symmetry = 4; d_dimensionality = 1; calc_arity(); }
DQPSK:
constellation_dqpsk::constellation_dqpsk() { // This constellation is not gray coded, which allows // us to use differential encodings (through diff_encode and // 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; d_pre_diff_code[2] = 0x3; d_pre_diff_code[3] = 0x2; d_apply_pre_diff_code = true; d_rotational_symmetry = 4; d_dimensionality = 1; calc_arity(); }
时间: 2024-12-27 01:35:08