Before we use GNSS observation files, we usually need to download, decompress, format conversion, splicing, and a series of processing from FTP. Sometimes different observation stations are stored in different data centers, resulting in very troublesome processing. So the idea of using programs to batch process these observation files came about. Although I know Python is more convenient, I chose MATLAB to implement these functions because I haven’t used Python for a long time. It took two days to finally get it done.
1. File download
File download mainly uses MATLAB’s ftp
and mget
functions. First set the ftp information of the known data center, then set the rules of the data path, find the corresponding folder according to the input time (year, year product day ), traverse all subfolders under this folder, and use mget(FTPObj,[path,'StationName*.16o'])
Search for the site observation file to be downloaded. This function is mainly implemented in the ftp_recursive_download()
function.
On the FTP server of the UNAVCO data center, the 1Hz data is stored in folders with the name of the site. If you search all folders one by one, the speed is very slow. So when downloading the UNAVCO data, directly look for the corresponding folder and then search for the file.
Since when the MATLAB mget () function downloads a file, it is stored locally according to the path on the FTP server, so you need to move the downloaded file to the specified folder…
Learn more MATLAB batch downloads GNSS files and processes them