Skip to content
Snippets Groups Projects
Commit bf1f35cb authored by Daniel van der Schuur's avatar Daniel van der Schuur
Browse files

Copied Matlab dir from SVN. Added readme.md

parents
No related branches found
No related tags found
No related merge requests found
Showing
with 2396 additions and 0 deletions
This diff is collapsed.
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
32767
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
This diff is collapsed.
0
-1
0
0
0
0
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-2
-2
-2
-2
-2
-2
-2
-2
-1
-1
-1
-1
-1
0
0
0
1
1
2
2
3
4
4
5
5
6
7
7
8
8
9
9
10
10
10
10
10
10
10
9
8
8
7
6
4
3
1
-1
-2
-4
-7
-9
-11
-14
-16
-19
-21
-23
-26
-28
-30
-32
-34
-35
-36
-37
-38
-38
-38
-37
-36
-34
-32
-29
-26
-22
-18
-13
-7
-1
6
13
21
29
38
47
57
67
77
87
98
109
119
130
141
152
162
172
182
192
201
209
217
224
231
237
242
246
250
252
254
255
255
254
252
250
246
242
237
231
224
217
209
201
192
182
172
162
152
141
130
119
109
98
87
77
67
57
47
38
29
21
13
6
-1
-7
-13
-18
-22
-26
-29
-32
-34
-36
-37
-38
-38
-38
-37
-36
-35
-34
-32
-30
-28
-26
-23
-21
-19
-16
-14
-11
-9
-7
-4
-2
-1
1
3
4
6
7
8
8
9
10
10
10
10
10
10
10
9
9
8
8
7
7
6
5
5
4
4
3
2
2
1
1
0
0
0
-1
-1
-1
-1
-1
-2
-2
-2
-2
-2
-2
-2
-2
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
0
0
0
0
-1
0
0
-1
0
0
0
0
0
0
0
0
0
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
0
0
0
0
0
1
1
1
1
1
2
2
2
2
3
3
3
4
4
4
5
5
5
6
6
6
7
7
7
7
8
8
8
9
9
9
9
9
10
10
10
10
10
10
10
10
10
10
10
10
10
9
9
9
9
8
8
7
7
6
6
5
5
4
3
2
2
1
0
-1
-2
-3
-4
-5
-6
-7
-8
-9
-11
-12
-13
-14
-15
-17
-18
-19
-20
-22
-23
-24
-25
-26
-27
-29
-30
-31
-32
-32
-33
-34
-35
-36
-36
-37
-37
-38
-38
-38
-38
-38
-38
-38
-37
-37
-36
-36
-35
-34
-33
-31
-30
-29
-27
-25
-23
-21
-19
-16
-14
-11
-9
-6
-2
1
4
8
11
15
19
23
27
31
36
40
45
49
54
59
64
69
74
79
85
90
95
100
106
111
117
122
127
133
138
144
149
154
159
165
170
175
180
184
189
194
198
203
207
211
215
219
222
226
229
232
235
238
241
243
245
247
249
250
252
253
254
254
255
255
255
255
254
254
253
252
250
249
247
245
243
241
238
235
232
229
226
222
219
215
211
207
203
198
194
189
184
180
175
170
165
159
154
149
144
138
133
127
122
117
111
106
100
95
90
85
79
74
69
64
59
54
49
45
40
36
31
27
23
19
15
11
8
4
1
-2
-6
-9
-11
-14
-16
-19
-21
-23
-25
-27
-29
-30
-31
-33
-34
-35
-36
-36
-37
-37
-38
-38
-38
-38
-38
-38
-38
-37
-37
-36
-36
-35
-34
-33
-32
-32
-31
-30
-29
-27
-26
-25
-24
-23
-22
-20
-19
-18
-17
-15
-14
-13
-12
-11
-9
-8
-7
-6
-5
-4
-3
-2
-1
0
1
2
2
3
4
5
5
6
6
7
7
8
8
9
9
9
9
10
10
10
10
10
10
10
10
10
10
10
10
10
9
9
9
9
9
8
8
8
7
7
7
7
6
6
6
5
5
5
4
4
4
3
3
3
2
2
2
2
1
1
1
1
1
0
0
0
0
0
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
0
0
0
0
0
0
0
0
0
-1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
-1
-1
-1
-1
-1
-1
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-1
-1
0
0
1
1
2
3
4
4
5
6
7
8
9
9
10
11
11
11
12
12
11
11
11
10
9
8
6
5
3
1
-2
-4
-7
-9
-12
-15
-18
-21
-24
-27
-29
-32
-34
-36
-37
-39
-39
-40
-39
-38
-37
-35
-32
-28
-24
-19
-13
-6
1
9
17
27
37
47
58
69
81
93
105
117
129
142
154
165
177
187
198
208
216
225
232
238
244
248
252
254
255
255
254
252
248
244
238
232
225
216
208
198
187
177
165
154
142
129
117
105
93
81
69
58
47
37
27
17
9
1
-6
-13
-19
-24
-28
-32
-35
-37
-38
-39
-40
-39
-39
-37
-36
-34
-32
-29
-27
-24
-21
-18
-15
-12
-9
-7
-4
-2
1
3
5
6
8
9
10
11
11
11
12
12
11
11
11
10
9
9
8
7
6
5
4
4
3
2
1
1
0
0
-1
-1
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-1
-1
-1
-1
-1
-1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
This diff is collapsed.
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
-1
-1
-1
-1
-1
-1
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-2
-1
-1
0
0
1
1
2
3
4
4
5
6
7
8
9
9
10
11
11
11
12
12
11
11
11
10
9
8
6
5
3
1
-2
-4
-7
-9
-12
-15
-18
-21
-24
-27
-29
-32
-34
-36
-37
-39
-39
-40
-39
-38
-37
-35
-32
-28
-24
-19
-13
-6
1
9
17
27
37
47
58
69
81
93
105
117
129
142
154
165
177
187
198
208
216
225
232
238
244
248
252
254
255
255
254
252
248
244
238
232
225
216
208
198
187
177
165
154
142
129
117
105
93
81
69
58
47
37
27
17
9
1
-6
-13
-19
-24
-28
-32
-35
-37
-38
-39
-40
-39
-39
-37
-36
-34
-32
-29
-27
-24
-21
-18
-15
-12
-9
-7
-4
-2
1
3
5
6
8
9
10
11
11
11
12
12
11
11
11
10
9
9
8
7
6
5
4
4
3
2
1
1
0
0
-1
-1
-2
-2
-2
-2
-2
-2
-2
-3
-3
-3
-2
-3
-1
-2
-2
-1
-1
-2
-1
-1
0
-1
0
0
-1
0
0
0
-1
0
0
-1
0
1
-1
0
-1
-1
-1
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
%-----------------------------------------------------------------------------
%
% Copyright (C) 2016
% ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
% P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
%
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program. If not, see <http://www.gnu.org/licenses/>.
%
%-----------------------------------------------------------------------------
% Author: E. Kooistra, 2016
%
% Purpose : Doppler frequency shift (DS) per block of data
% Description :
% Apply a frequency shift to the input data using a complex phasor.
% All input data is for the same time ctrl.t so the same frequency
% shift is applied to the whole block.
function [state, out_data] = ds(ctrl, in_data)
% Data processing
out_data = exp(j*2*pi*ctrl.shift_freq*ctrl.t) * in_data;
% Keep state next call
state = ctrl;
state.t = ctrl.t + ctrl.block_period;
%-----------------------------------------------------------------------------
%
% Copyright (C) 2016
% ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
% P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
%
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program. If not, see <http://www.gnu.org/licenses/>.
%
%-----------------------------------------------------------------------------
% Author: E. Kooistra, 2016
%
% Purpose : Delay tracking (DT) per block of data
% Description :
%
% Time -->|0 |N |2N |
% Input: |pprev |prev |this |
% |ctrl.buffer |data |
% |buffer |
% |abcd ... xyz|abcd ... xyz|abcd ... xyz|
%
% Output: |prev |this |next
% DT= 0: |abcd ... xyz|abcd ... xyz|
% DT=+1: |zabc ... xy|zabc ... xy|
% DT=+2: |yzab ... x|yzab ... x|
% DT=-1: |bcd ... yza|bcd ... yza|
% DT=+2: |cd ... zab|cd ... zab|
%
% Remarks:
% * With a buffer of two blocks, so 2N, the maximum DT range is -N to + N.
% * Index = Time + 1, because for Matlab index starts at 1 instead of at 0.
function [state, out_data] = dt(ctrl, in_data)
% Data processing
N = ctrl.block_size;
% Append input data to the buffer
buffer = [ctrl.buffer in_data];
% Extract output data for given DT
out_data = buffer(1 + (N:2*N-1) - ctrl.dt);
% Keep buffer for next call
state = ctrl;
state.buffer = buffer(1 + (N:3*N-1));
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment