0%

GNSS数据处理过程记录

1 简介

最近在基于GVINS进行开发,无法避免要对GNSS数据进行处理,这部分对于像我这样的外行来说有点不太友好,网上的资料不是很全。这里我会将我在身边朋友帮助下对GNSS数据处理的过程进行记录,如有谬误,请不吝赐教。

2 GNSS数据处理

2.1 接收机文件处理

本人在采集GNSS数据时一般会使用两种GNSS接收机:低成本接收机(一般是Ublox)和高成本接收机(一般是Alloy),两种原始数据都需要经过格式转换之后得到Rinex格式的文件,以下是两种文件的转换方式:

  • Ublox的文件使用RTKlib RTKCONV即可转换;
  • Alloy的文件在从接收机导出时就可以选择“导出并转换”,一般会获得原始观测文件和对应的星历文件;如果得到的是未经转换的原始数据,还可以通过Trimble公司的转换软件ConvertToRinex进行转换。

2.2 基站数据和星历数据下载

实验测试时需要真值数据,一般会通过RTK或者RTK/INS紧组合来求解真值,该过程都会需要基站数据,这里将基站数据和星历数据的获取方式进行记录。

2.2.1 手动下载方式

手动下载方式一般通过ftp从网站进行下载,如可通过使用FileZilla软件来下载,下面分别介绍数据下载方式。

基站数据

  1. 打开FileZilla软件,在①处填写服务器地址(这里使用的是gdc.cddis.eosdis.nasa.gov),然后点击②处的“快速连接”,接着在③处选择合适的选项,这里我一般选择highrate(1Hz)的基站数据,然后即可在④处选择合适的年份、日期进行下载了。比如选择highrate/2026/131这一天的数据进行下载,也可以根据一天内所需的对应时间段下载数据。image-20260512113245467

  2. 这里下载的数据格式为crx.gz文件,接下来使用压缩软件将其进行解压缩,得到crx文件;

  3. 对于Windows系统,在命令提示符中使用如下命令进行数据拼接:for %i in (*.crx) do crx2rnx.exe "%i",即可得到一个完整的参考站数据;
  4. 对于Linux系统,在终端中使用如下命令进行操作:./gfzrnx_2.1.9_lx64 -finp ~/PATH/TO/FILE/*.rnx -kv > output.rnx

以上就是手动下载基站数据的方式。

星历数据

星历数据的下载方式类似,填入地址(这里还需要账号、密码)、“快速连接”、选择“/brdc_whu - 服务器 - 搜索远程文件(F3)”,选取对应天数文件下载,文件名为“brdm**.26p”,其中“.26p”是根据所需年份确定的。

2.2.2 自动下载方式

手动下载方式比较麻烦,特别是针对基站数据,还要手动选择、解压缩等操作,同学给了我一个开源代码可以在不同服务器上自动下载基站数据和星历数据,即GAMPII-GOOD软件,代码详情可以参考其Github页面,下面介绍一下本人使用该软件的过程。

按照要求进行代码编译之后,可根据需求修改配置文件/config/GOOD_cfg.yaml,将部分需要修改的部分摘出来加以说明:

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
# The root/main directory of GNSS observations and products  -------------------
mainDir : /home/***/GAMPII-GOOD/data # 修改为对应路径;

#中间部分省略,不需要修改;

# Time settings ----------------------------------------------------------------
# 日期范围设定,后面有针对不同模式的说明;
procTime : 1 2026 5 11 1 # The setting of start time for processing, which should be set to '1 year month day ndays' or '2 year doy ndays' or '3 week dow ndays'. NOTE: doy = day of year; week = GPS week; dow = day within week

# 该部分不需要修改;
# Settings of FTP downloading --------------------------------------------------
minusAdd1day : 1 # (0: off 1: on) The setting of the day before and after the current day for precise satellite orbit and clock products downloading
merge_sp3files: 0 # (0: off 1: on) to merge three consecutive sp3 files into one file
printInfoWget : 1 # (0: off 1: on) Printing the information generated by 'wget'

# Handling of FTP downloading --------------------------------------------------
ftpDownloading: # The setting of the master switch for data downloading
opt4ftp: 1 # 1st: (0:off 1:on);

# 该部分根据需要进行修改,有时候某个服务器无法下载了可以更换不同的服务器进行下载;
ftpArch: cddis # 2nd: the FTP archive, i.e., cddis, ign, or whu.

# 基站观测文件下载部分;
getObs: # GNSS observation data downloading option
opt4obs: 1 # 1st(opt4obs): (0: off 1: on);
# 根据需要选择不同的频率类型;
obsType: highrate # 2nd(obsType): 'daily', 'hourly', 'highrate', '30s', '5s', or '1s';
# 同样地,如果某个服务器不好用,可已在该处进行更换;
obsFrom: igm # 3rd: 'igs', 'mgex', 'igm', 'cut', 'hk', 'ngs', 'epn', 'pbo', or 'chi';
# 下载站点的列表;
obsList: site_mgex.list # 4th: 'all' (observation files downloaded in the whole directory) or the site list file name (observation files downloaded site-by-site according to the site list file, which needs to inherit the path of 'mainDir');
# 起始时间;
sHH4obs: 1 # 5th: Start hour (00, 01, 02, ...);
# 所需时间总和(h);
nHH4obs: 7 # 6th: The consecutive hours, i.e., '01 3' denotes 01, 02, and 03;
l2s4obs: 1 # 7th: Valid only for the observation files with long name, 0: long name, 1: short name, 2: long and short name
# NOTE: The 5th and 6th items are valid ONLY when the 2nd item 'hourly', 'highrate', '5s', or '1s' is set.
# NOTE: If the 3rd item is 'igs', 'mgex', 'igm', the 2nd item can be 'daily', 'hourly', or 'highrate';
# If the 3rd item is 'cut', 'ngs', 'epn', or 'pbo', the 2nd item should be 'daily';
# If the 3rd item is 'hk', the 2nd item can be 1) '30s', '5s', or '1s' 2) '30s', '05s', or '01s'. However, '30 s', '5 s', or '1 s' is NOT allowed.
# NOTE: If the 3rd item is 'hk' 'ngs', or 'pbo', the 4th item should ONLY be the full path of site list.
# INFO: The 2nd item 'igs' is for IGS observation (RINEX version 2.xx, short name 'd');
# The 2nd item 'mgex' is for MGEX observation (RINEX version 3.xx, long name 'crx');
# The 2nd item 'igm' is for the union of IGS and MGEX (IGS + MGEX, while the priority of MGEX sites is higher) observation with respect to the site name;
# The 2nd item 'cut' is for Curtin University of Technology (CUT) observation (RINEX version 3.xx, long name 'crx');
# The 2nd item 'hk' is for Hong Kong CORS observation (RINEX version 3.xx, long name 'crx');
# The 2nd item 'ngs' is for NGS/NOAA CORS observation (RINEX version 2.xx, short name 'd');
# The 2nd item 'epn' is for EUREF Permanent Network (EPN) observation (RINEX version 3.xx, long name 'crx' and RINEX version 2.xx, short name 'd');
# The 2nd item 'pbo' is for Plate Boundary Observatory (PBO) observation (RINEX version 3.xx, long name 'crx');
# The 2nd item 'chi' is for Centro Sismologico Nacional of Universidad de Chile observation (RINEX version 2.xx, short name "d")

# 星历文件下载设定;
getNav: # Various broadcast ephemeris downloading option
opt4nav: 1 # 1st: (0: off 1: on);
navType: daily # 2nd: 'daily' or 'hourly';
navSys : mixed3 # 3rd: 'gps', 'glo', 'bds', 'gal', 'qzs', 'irn', 'mixed3', 'mixed4', or 'all';
navFrom: gop # 4th: Analysis center (i.e., 'igs', 'dlr', 'ign', 'gop', or 'wrd') that carries out the combination of broadcast ephemeris for mixed navigation data. From CDDIS or WHU FTP, 'igs' and 'dlr' can be downloaded, and from IGN, 'igs' and 'ign' can be downloaded. The downloading of 'gop' and/or 'wrd' is via the other FTP addresses;
navList: site_mgex2.list # 5th: ONLY the site list file name is valid if the 2nd item is 'hourly';
sHH4nav: 01 # 6th: Start hour (00, 01, 02, ...);
nHH4nav: 2 # 7th: The consecutive hours, i.e., '01 3' denotes 01, 02, and 03;
l2s4nav: 2 # 8th: Valid only for the navigation files with long name, 0: long name, 1: short name, 2: long and short name
# NOTE: The 5th, 6th, and 7th items are valid ONLY when the 2nd item 'hourly' is set.
# NOTE: If the 2nd item is 'daily', the 3rd item should be 'gps', 'glo', 'mixed3', or 'mixed4';
# If the 2nd item is 'hourly', the 3rd item can be 'gps', 'glo', 'bds', 'gal', 'qzs', 'irn', 'mixed', or 'all'.
# NOTE: The 4th item is valid ONLY when the 3rd item 'mixed3' is set.
# NOTE: The 3rd item 'mixed3' is for RINEX 3.xx, while 'mixed4' is for RINEX 4.xx.

以上内容后面也均有对应说明,可根据需要进行修改。此外,也需要对/data/site_mgex.list进行修改,填上需要下载的基站名称即可。

修改完配置文件之后,即可进入/bin执行运行命令:./run_GOOD ../config/GOOD_cfg.yaml,然后程序就会自动下载选定时间段、选定基站的观测数据和星历数据。

下载完后的数据会保存在/data/obs和/data/nav下,对于观测数据还需要使用./gfzrnx_2.1.9_lx64 -finp ~/PATH/TO/FILE/*.rnx -kv > output.rnx进行拼接。