normalize phasor after each step

okay, i never had run robot36 for a long time so never had any issues
with it. but when letting it run for a few hours, the magnitude of that
phasor has drifted too far.
This commit is contained in:
Ahmet Inan 2014-11-26 13:06:29 +01:00
parent d8eeba3aed
commit b0ad979240

2
ddc.c
View file

@ -28,7 +28,7 @@ void do_ddc(struct ddc *ddc, float *input, complex float *output)
output[k] = ddc->osc * sum;
ddc->osc *= ddc->d;
// ddc->osc /= cabsf(ddc->osc); // not really needed
ddc->osc /= cabsf(ddc->osc);
}
}
struct ddc *alloc_ddc(int L, int M, float carrier, float bw, float rate, int taps, float (*window)(float, float, float), float a)