Updated Home (markdown)

master
proto17 2022-04-12 21:24:27 -04:00
rodzic 8f60699fdd
commit 4363129da5
1 zmienionych plików z 27 dodań i 1 usunięć

28
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.
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