fix correlation detection

scan_delay_optimize
TT 9 years ago
parent 095b250137
commit abfe237d23

12
dsp.c

@ -65,10 +65,10 @@ dsp_process(int16_t *capture, size_t length)
samp_buf[i] = smp; samp_buf[i] = smp;
int32_t s = sincos_tbl[i][0]; int32_t s = sincos_tbl[i][0];
int32_t c = sincos_tbl[i][1]; int32_t c = sincos_tbl[i][1];
samp_s += smp * s / 64; samp_s += smp * s / 16;
samp_c += smp * c / 64; samp_c += smp * c / 16;
ref_s += ref * s / 64; ref_s += ref * s / 16;
ref_c += ref * c / 64; ref_c += ref * c / 16;
#if 0 #if 0
uint32_t sc = *(uint32_t)&sincos_tbl[i]; uint32_t sc = *(uint32_t)&sincos_tbl[i];
samp_s = __SMLABB(sr, sc, samp_s); samp_s = __SMLABB(sr, sc, samp_s);
@ -91,8 +91,8 @@ calculate_gamma(float gamma[2])
float rr = rs * rs + rc * rc; float rr = rs * rs + rc * rc;
float ss = acc_samp_s; float ss = acc_samp_s;
float sc = acc_samp_c; float sc = acc_samp_c;
gamma[0] = (sc * rc + ss * rs) / rr; gamma[0] = (sc * rc + ss * rs) / rr;
gamma[1] = (sc * rs - sc * rc) / rr; gamma[1] = (ss * rc - sc * rs) / rr;
} }
void void

@ -452,7 +452,7 @@ void sweep(void)
rewind: rewind:
frequency_updated = FALSE; frequency_updated = FALSE;
delay = 5; delay = 3;
for (i = 0; i < sweep_points; i++) { for (i = 0; i < sweep_points; i++) {
set_frequency(frequencies[i]); set_frequency(frequencies[i]);

Loading…
Cancel
Save

Powered by TurnKey Linux.