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