kopia lustrzana https://github.com/cyoung/stratux
dest/src patch.
rodzic
fc5641cb69
commit
ada5b4ae3f
|
@ -143,23 +143,22 @@ void make_atan2_table(void) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void convert_to_phi(uint16_t *buffer, int n)
|
static void convert_to_phi(uint16_t *dest, uint16_t *src, int n) {
|
||||||
{
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
// unroll the loop. n is always > 2048, usually 36864
|
// unroll the loop. n is always > 2048, usually 36864
|
||||||
for (i = 0; i+8 <= n; i += 8) {
|
for (i = 0; i+8 <= n; i += 8) {
|
||||||
buffer[i] = iqphase[buffer[i]];
|
dest[i] = iqphase[src[i]];
|
||||||
buffer[i+1] = iqphase[buffer[i+1]];
|
dest[i+1] = iqphase[src[i+1]];
|
||||||
buffer[i+2] = iqphase[buffer[i+2]];
|
dest[i+2] = iqphase[src[i+2]];
|
||||||
buffer[i+3] = iqphase[buffer[i+3]];
|
dest[i+3] = iqphase[src[i+3]];
|
||||||
buffer[i+4] = iqphase[buffer[i+4]];
|
dest[i+4] = iqphase[src[i+4]];
|
||||||
buffer[i+5] = iqphase[buffer[i+5]];
|
dest[i+5] = iqphase[src[i+5]];
|
||||||
buffer[i+6] = iqphase[buffer[i+6]];
|
dest[i+6] = iqphase[src[i+6]];
|
||||||
buffer[i+7] = iqphase[buffer[i+7]];
|
dest[i+7] = iqphase[src[i+7]];
|
||||||
}
|
}
|
||||||
for (; i < n; ++i)
|
for (; i < n; ++i)
|
||||||
buffer[i] = iqphase[buffer[i]];
|
dest[i] = iqphase[src[i]];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void calc_power(uint16_t *samples, int len) { // sets signal_strength to scaled amplitude. 0 = no signal, 1000 = saturated receiver on all samples in measurement.
|
static void calc_power(uint16_t *samples, int len) { // sets signal_strength to scaled amplitude. 0 = no signal, 1000 = saturated receiver on all samples in measurement.
|
||||||
|
|
Ładowanie…
Reference in New Issue