-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathEx3_obsread_dogu.asv
50 lines (31 loc) · 993 Bytes
/
Ex3_obsread_dogu.asv
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
function G_obs = Ex3_obsread_dogu
clc
obs_num = 16;
fid = fopen('WTZR00DEU_R_20182840000_01D_30S_MO.rnx');
while ~feof(fid)
tline = fgetl(fid);
if strfind(tline,'END OF HEADER')
disp(tline)
break
end
end
tline = fgetl(fid);
epoch = 0;
while ~feof(fid)
kline = fgetl(fid);
if strfind(kline,'>')
epoch = epoch + 1;
year = str2double(kline(3:6))
month = str2double(kline(8:9))
day = str2double(kline(11:12))
hour = str2double(kline(14:15))
minute = str2double(kline(17:18))
second = str2double(kline(20:21))
data = [year, month, day, hour, minute, second]
G_obs(1,epoch)=data;
%d = zeros(6,1);
%d(1) = tline;
end
tline = fgetl(fid);
end
fclose(fid)