-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRadarData.m
More file actions
55 lines (48 loc) · 2.26 KB
/
Copy pathRadarData.m
File metadata and controls
55 lines (48 loc) · 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
classdef RadarData < BeamHeader
% RadarData class representing one beam's header and IQ data along with given reference data.
%
% Each instance holds the 1024-byte binary header fields parsed by
% read_raw_file, the raw complex IQ BeamData cube, and optional
% post-processing and reference fields
properties
% ------------- Raw IQ data ---------------------------------------
BeamData (:, 1024, :) double % size: (RangeBins × NFFT × InCohIntegrations)
% ---- aliases -------------
ipp_us (1,1) double % m_fIntrPulsePeriod_us
n_coh (1,1) double % m_sNumOfCohIntegrations
start_height (1,1) double % m_fWindow1StartHeight
end_height (1,1) double % m_fWindow1EndHeight
% --- Post-processing fields ---------
direction string % beam direction label (vertical/north/south/west/east)
spectra (:, 1024) double % double (RangeBins × NFFT) - averaged normalised power spectrum
denoised_spectra (:, 1024) double % double (RangeBins × NFFT) - denoised power spectrum. Its absent in read_raw_data
M0 (1, :) double
M1 (1, :) double
M2 (1, :) double
SNR (1, :) double
noise_level (1, :) double
algorithm_parameters struct % struct to store algorithm specific parameters like cost function scores
% ---- reference data ---------
ref_height (1, :) double % given height in the measurement
ref_M0 (1, :) double % refernce 0th moment
ref_M1 (1, :) double % refernce 1st moment
ref_M2 (1, :) double % refernce 2nd moment
ref_SNR (1, :) double % given SNR
ref_noise_level (1, :) double % given noise level
end
methods
function obj = RadarData(cfg)
% it first constructs beam headers and then applies rest of things
arguments
cfg = struct()
end
obj = obj@BeamHeader(cfg)
obj.ipp_us = obj.m_fIntrPulsePeriod_us;
obj.n_coh = obj.m_sNumOfCohIntegrations;
obj.start_height = obj.m_fWindow1StartHeight;
obj.end_height = obj.m_fWindow1EndHeight;
obj.direction = Data.aoz2dir(az=obj.m_fAzimuth, oz=obj.m_fOffZenith);
obj.algorithm_parameters = struct();
end
end
end