From e8a11b12c76776bc680b94073bbda9b522defecb Mon Sep 17 00:00:00 2001 From: David Protzman Date: Tue, 19 Apr 2022 18:16:47 -0400 Subject: [PATCH] Added comments about the different OFDM symbol counts --- matlab/updated_scripts/extract_bursts_from_file.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/matlab/updated_scripts/extract_bursts_from_file.m b/matlab/updated_scripts/extract_bursts_from_file.m index f5e0491..f92bfea 100644 --- a/matlab/updated_scripts/extract_bursts_from_file.m +++ b/matlab/updated_scripts/extract_bursts_from_file.m @@ -35,7 +35,11 @@ function [bursts] = extract_bursts_from_file(input_path, sample_rate, frequency_ % Find all instances of the first ZC sequence indices = find_zc_indices_by_file(input_path, sample_rate, frequency_offset, correlation_threshold, chunk_size); - % Number of samples that need to be extracted. There are 9 OFDM symbols, 2 long and 7 short cyclic prefixes + % In the DJI Mini 2 there are 9 OFDM symbols: 2 long cyclic prefixes, 7 short. This isn't the case on all drones. + % For some drones there are just 8 OFDM symbols. It looks like those drones just don't send the first OFDM symbol + % that's present on the Mini 2. That symbol XOR's out to all zeros anyway, so it's not important. So, to keep + % things consistent, the logic below will always extract out 9 OFDM symbols worth of samples. In later steps the + % first OFDM symbol isn't used for anything. burst_sample_count = (padding * 2) + (long_cp_len * 2) + (short_cp_len * 7) + (fft_size * 9); freq_offset_vec = reshape(exp(freq_offset_constant * [1:burst_sample_count]), 1, []);