From 4363129da5df8670e4e39036a729d3199d9f7985 Mon Sep 17 00:00:00 2001 From: proto17 Date: Tue, 12 Apr 2022 21:24:27 -0400 Subject: [PATCH] Updated Home (markdown) --- Home.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Home.md b/Home.md index 2bde1ac..c2d22c5 100644 --- a/Home.md +++ b/Home.md @@ -109,4 +109,30 @@ Now, click and drag until you have highlighted the entire signal (going over is ![image](https://user-images.githubusercontent.com/4240543/162875953-c1e8f633-24cf-408e-8aac-4ad4b1891646.png) -You now know when the burst starts in the collect, and for how long it stays active. This will be used in later steps to extract just the samples that you care about. \ No newline at end of file +You now know when the burst starts in the collect, and for how long it stays active. This will be used in later steps to extract just the samples that you care about. + + +# Burst Extraction +Now that you have an idea of when the bursts starts in time and how long it stays up, the samples that make up that time period can be extracted and analyzed further. + +What follows will be MATLAB code, but should work fine in Octave as well. + +First you need a way to read the samples into MATLAB. To the best of my knowledge there is no simple read_complex_samples function in MATLAB. But, there is an Octave function provided by GNU Radio that works fine in MATLAB [4]. I have my own version [5] that I used for this work. + +So, regardless of which method you want to use to read in samples, you first need to figure out what the `sample` offset is given the `time` offset you figured out from earlier. + +Continuing from the example above, the file was recorded at 30.72 MSPS (2x oversampled), so just multiply the sampling rate by the time offset to determine the sample offset. Do the same to determine how many samples the signal is active for. This means: + +``` +sample_rate = 30.72e6; + +start_time = 2.722209; +burst_duration = 0.00080729; + +start_time_samples = int(start_time * sample_rate); +burst_duration_samples = int(burst_duration * sample_rate); +``` + + +[4] https://github.com/gnuradio/gnuradio/blob/main/gr-utils/octave/read_complex_binary.m +[5] https://github.com/proto17/dji_droneid/blob/main/matlab/read_complex_floats.m \ No newline at end of file