adjusted UW threhold for high raw BER
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Fri, 16 Sep 2016 11:44:19 +0000 (11:44 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Fri, 16 Sep 2016 11:44:19 +0000 (11:44 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@2870 01035d8c-6547-0410-b346-abe4f91aad63

codec2-dev/src/drs232_ldpc.c

index a62e1c0e366bce95f8647d3343ac738e04451b5e..7e9ec496f5b5b541c514fa28da7615ffa441f57f 100755 (executable)
@@ -184,8 +184,8 @@ int main(int argc, char *argv[]) {
             //printf("\n");
             
             //fprintf(stderr,"UW score: %d\n", score);
-            if (score == UW_BITS) {
-                fprintf(stderr,"UW found!\n");
+            if (score >= (UW_BITS-3)) {
+                //fprintf(stderr,"UW found!\n");
                 ind = 0;
                 next_state = COLLECT_PACKET;
             }             
@@ -204,7 +204,7 @@ int main(int argc, char *argv[]) {
                    }
                    k += 8;
                }
-               printf("k: %d CodeLength: %d\n", k, CodeLength);
+               //printf("k: %d CodeLength: %d\n", k, CodeLength);
 
                /* now LDPC decode */
 
@@ -225,7 +225,8 @@ int main(int argc, char *argv[]) {
                rx_checksum = gen_crc16(packet, BYTES_PER_PACKET);
                tx_checksum = packet[BYTES_PER_PACKET] + (packet[BYTES_PER_PACKET+1] << 8);
 
-               fprintf(stderr, "tx_checksum: 0x%02x rx_checksum: 0x%02x\n", tx_checksum, rx_checksum);
+               if (rx_checksum != tx_checksum)
+                   fprintf(stderr, "tx_checksum: 0x%02x rx_checksum: 0x%02x\n", tx_checksum, rx_checksum);
 
                packets++;
                if (rx_checksum == tx_checksum) {