From fa827ea5360795c4dc6dc491e66144d5c3a8cb94 Mon Sep 17 00:00:00 2001 From: drowe67 Date: Sun, 22 Jun 2014 06:18:14 +0000 Subject: [PATCH] brought modem bck to life git-svn-id: https://svn.code.sf.net/p/freetel/code@1704 01035d8c-6547-0410-b346-abe4f91aad63 --- codec2-dev/src/fdmdv.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/codec2-dev/src/fdmdv.c b/codec2-dev/src/fdmdv.c index 757da9b5..6c664f79 100644 --- a/codec2-dev/src/fdmdv.c +++ b/codec2-dev/src/fdmdv.c @@ -106,7 +106,7 @@ static COMP cadd(COMP a, COMP b) static float cabsolute(COMP a) { - return sqrt(a.real*a.real + a.imag*a.imag); + return sqrt(pow(a.real, 2.0) + pow(a.imag, 2.0)); } /*---------------------------------------------------------------------------*\ @@ -644,15 +644,13 @@ void lpf_peak_pick(float *foff, float *max, COMP pilot_baseband[], for(i=0; ipilot_baseband1[j] = cmult(rx_fdm[i], cconj(pilot[i])); + f->pilot_baseband1[j] = cmult(rx_fdm[i], cconj(pilot[i])); f->pilot_baseband2[j] = cmult(rx_fdm[i], cconj(prev_pilot[i])); } @@ -1019,10 +1017,8 @@ float qpsk_to_bits(int rx_bits[], int *sync_bit, int Nc, COMP phase_difference[] leads to sensible scatter plots */ for(c=0; c