-
Notifications
You must be signed in to change notification settings - Fork 3
/
getData.m
69 lines (62 loc) · 1.66 KB
/
getData.m
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
% getData function handles all the subroutines to retrieve different file
% types
% Version: 2014-328
% Copyright (c) 2014, Garrett Seepersad
% All rights reserved.
% Email: [email protected]
function getData (obsTF,navTF,teqTF,gloTF,sp3TF,clkTF,clk30sTF,AC,year,DOY,noOfDays, username,siteList,highRateTF)
%% Start FTP connection
ftpServer=startServer(username,highRateTF);
%% Observation file
if (obsTF ==1 )
fileType = 'd';
downloadRecFiles(year,noOfDays,DOY,siteList,fileType,ftpServer,highRateTF)
unZipObs
uncompressObs
moveObs(fileType)
end
%% GPS Navigation file
if (navTF ==1 )
fileType = 'n';
downloadRecFiles(year,noOfDays,DOY,siteList,fileType,ftpServer,highRateTF)
unZipObs
moveObs(fileType)
end
%% TEQC status file
if (teqTF ==1 )
fileType = 's';
downloadRecFiles(year,noOfDays,DOY,siteList,fileType,ftpServer,highRateTF)
unZipObs
moveObs(fileType)
end
%% Glonass navigation file
if (gloTF ==1 )
fileType = 'g';
downloadRecFiles(year,noOfDays,DOY,siteList,fileType,ftpServer,highRateTF)
unZipObs
moveObs(fileType)
end
%% SP3 orbit file
if (sp3TF ==1 )
fileType = 'sp3';
downloadSatFiles (year,noOfDays,DOY ,fileType,AC,ftpServer)
unZipObs
moveObs(fileType)
end
%% CLK file at 5 min data rate
if (clkTF ==1 )
fileType = 'clk'; %
downloadSatFiles (year,noOfDays,DOY ,fileType,AC,ftpServer)
unZipObs
moveObs(fileType)
end
%% CLK at 30 sec data rate
if (clk30sTF ==1 )
fileType = 'clk_30s';
downloadSatFiles (year,noOfDays,DOY ,fileType,AC,ftpServer)
unZipObs
moveObs(fileType)
end
%% End FTP connection
close (ftpServer)
end