Changes to ofdm.c passes all tests
authorokcsampson <okcsampson@01035d8c-6547-0410-b346-abe4f91aad63>
Sun, 18 Jun 2017 03:26:28 +0000 (03:26 +0000)
committerokcsampson <okcsampson@01035d8c-6547-0410-b346-abe4f91aad63>
Sun, 18 Jun 2017 03:26:28 +0000 (03:26 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@3210 01035d8c-6547-0410-b346-abe4f91aad63

codec2-dev/src/ofdm.c

index e8a310dd9428db1efe68dd903fc6da1511ef7ecb..f6c2e66a1236621502594bd657a6b0a2b3e1ec11 100644 (file)
@@ -512,7 +512,7 @@ void ofdm_demod(struct OFDM *ofdm, int *rx_bits, COMP *rxbuf_in) {
 
     /* previous pilot */
 
-    st = OFDM_M + OFDM_NCP + OFDM_SAMPLESPERFRAME + (-OFDM_NS) * (OFDM_M + OFDM_NCP) + ofdm->sample_point;
+    st = OFDM_M + OFDM_NCP + OFDM_SAMPLESPERFRAME + (-OFDM_NS) * (OFDM_M + OFDM_NCP) + 1 + ofdm->sample_point;
     en = st + OFDM_M;
 
     complex float work[OFDM_M];
@@ -526,7 +526,7 @@ void ofdm_demod(struct OFDM *ofdm, int *rx_bits, COMP *rxbuf_in) {
     /* pilot - this frame - pilot */
 
     for (rr = 0; rr < (OFDM_NS + 1); rr++) {
-        st = OFDM_M + OFDM_NCP + OFDM_SAMPLESPERFRAME + rr * (OFDM_M + OFDM_NCP) + ofdm->sample_point;
+        st = OFDM_M + OFDM_NCP + OFDM_SAMPLESPERFRAME + rr * (OFDM_M + OFDM_NCP) + 1 + ofdm->sample_point;
         en = st + OFDM_M;
 
         for (j = st, k = 0; j < en; j++, k++) {
@@ -538,7 +538,7 @@ void ofdm_demod(struct OFDM *ofdm, int *rx_bits, COMP *rxbuf_in) {
 
     /* next pilot */
 
-    st = OFDM_M + OFDM_NCP + OFDM_SAMPLESPERFRAME + (2 * OFDM_NS) * (OFDM_M + OFDM_NCP) + ofdm->sample_point;
+    st = OFDM_M + OFDM_NCP + OFDM_SAMPLESPERFRAME + (2 * OFDM_NS) * (OFDM_M + OFDM_NCP) + 1 + ofdm->sample_point;
     en = st + OFDM_M;
 
     for (j = st, k = 0; j < en; j++, k++) {