Changeset 4641
- Timestamp:
- 02/25/07 22:07:15
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gnuradio/branches/releases/3.0/gnuradio-core/src/lib/general/gr_correlate_access_code_bb.cc
r3534 r4641 46 46 gr_make_io_signature (1, 1, sizeof(char))), 47 47 d_data_reg(0), d_flag_reg(0), d_flag_bit(0), d_mask(0), 48 d_threshold(threshold) , d_flip(0)48 d_threshold(threshold) 49 49 50 50 { … … 95 95 unsigned int t = 0; 96 96 97 t |= d_flip ^ (((d_data_reg >> 63) & 0x1) << 0);97 t |= ((d_data_reg >> 63) & 0x1) << 0; 98 98 t |= ((d_flag_reg >> 63) & 0x1) << 1; // flag bit 99 99 out[i] = t; … … 107 107 nwrong = gr_count_bits64(wrong_bits); 108 108 109 // test for access code with up to threshold errors or its compelement110 new_flag = (nwrong <= d_threshold) || (nwrong >= (64-d_threshold));109 // test for access code with up to threshold errors 110 new_flag = (nwrong <= d_threshold); 111 111 112 112 #if 0 … … 121 121 if (new_flag) { 122 122 d_flag_reg |= d_flag_bit; 123 d_flip = nwrong >= (64-d_threshold); // flip bits if this is true124 123 } 125 124 } gnuradio/branches/releases/3.0/gnuradio-core/src/lib/general/gr_correlate_access_code_bb.h
r3534 r4641 63 63 // N is the number of bits in the access code) 64 64 unsigned int d_threshold; // how many bits may be wrong in sync vector 65 unsigned int d_flip; // flip bits if 180 degress out of sync66 67 65 68 66 protected:
