From 865d52d5147b167602d5fa5dc538bcec0b2ddb22 Mon Sep 17 00:00:00 2001 From: Steven Franke Date: Mon, 15 Jun 2015 01:34:32 +0000 Subject: [PATCH] More progress on signal subtraction. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5614 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/wsprd/wsprd_exp.c | 32 +++++++++++++++++++++++++------- lib/wsprd/wsprsim_utils.c | 2 +- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/lib/wsprd/wsprd_exp.c b/lib/wsprd/wsprd_exp.c index 02fb3e10b..ed7e982d2 100644 --- a/lib/wsprd/wsprd_exp.c +++ b/lib/wsprd/wsprd_exp.c @@ -334,13 +334,12 @@ void subtract_signal(double *id, double *qd, long np, int i, j, k; double pi=4.*atan(1.0),twopidt, fp; - double i0[162],q0[162]; + double i0,q0; double c0[256],s0[256]; double dphi, cdphi, sdphi; twopidt=2*pi*dt; - printf("subtract_signal f0: %f shift0: %d drift0: %f\n",f0,shift0,drift0); for (i=0; i<162; i++) { fp = f0 + ((float)drift0/2.0)*((float)i-81.0)/81.0; @@ -355,17 +354,36 @@ void subtract_signal(double *id, double *qd, long np, s0[j]=c0[j-1]*sdphi + s0[j-1]*cdphi; } - i0[i]=0.0; q0[i]=0.0; + i0=0.0; q0=0.0; for (j=0; j<256; j++) { k=shift0+i*256+j; if( (k>0) & (k0) & (k