From df098c3e6c468beb05e0341f324b4971786bac73 Mon Sep 17 00:00:00 2001 From: David Protzman Date: Sun, 24 Apr 2022 00:42:08 -0400 Subject: [PATCH] Fixed bug in coarse freq recovery The windows were one sample misaligned in time --- matlab/updated_scripts/process_file.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matlab/updated_scripts/process_file.m b/matlab/updated_scripts/process_file.m index f236266..86e3a4b 100644 --- a/matlab/updated_scripts/process_file.m +++ b/matlab/updated_scripts/process_file.m @@ -87,8 +87,8 @@ for burst_idx=1:size(bursts, 1) coarse_cfo_symbol_sample_offset + coarse_cfo_symbol_cyclic_prefix - 1); copy = burst(... - coarse_cfo_symbol_sample_offset + fft_size + 1:... - coarse_cfo_symbol_sample_offset + fft_size + 1 + coarse_cfo_symbol_cyclic_prefix - 1); + coarse_cfo_symbol_sample_offset + fft_size:... + coarse_cfo_symbol_sample_offset + fft_size + coarse_cfo_symbol_cyclic_prefix - 1); % Calculate the frequency offset by taking the dot product of the two copies of the cyclic prefix and dividing out % the number of samples in between each cyclic prefix sample (the FFT size)