diff options
Diffstat (limited to 'AlignSample.cpp')
-rw-r--r-- | AlignSample.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/AlignSample.cpp b/AlignSample.cpp index 50b818e..4f5a8eb 100644 --- a/AlignSample.cpp +++ b/AlignSample.cpp @@ -186,7 +186,7 @@ CorrelationResult AlignSample::crosscorrelate(size_t len) tx_fft_plan.execute(); for (size_t i = 0; i < len; i++) { - ifft_in[i] = rx_fft_out[i] * std::conj(tx_fft_out[i]); + ifft_in[i] = tx_fft_out[i] * std::conj(rx_fft_out[i]); } ifft_plan.execute(); @@ -195,18 +195,6 @@ CorrelationResult AlignSample::crosscorrelate(size_t len) result.correlation[i] = ifft_out[i]; } -#if 0 - // Calculate correlation - for (size_t offset = 0; offset < max_offset; offset++) { - complexf xcorr(0, 0); - - for (size_t i = 0; i < len; i++) { - xcorr += rxsamps[i]/rx_power_f * std::conj(txsamps[i+offset])/tx_power_f; - } - result.correlation[offset] = xcorr; - } -#endif - return result; } |