Rinex Observation File Parsing
Load gnss_lib_py into the Python workspace
[1]:
import gnss_lib_py as glp
Rinex is another file standard that is used in the GNSS community to store and transmit navigation information. Files with the extension .yyo, where yy is the year in which the measurement was made, are used to store and transmit measurements. These measurement files can contain any constellation and each measurement usually contains the pseudorange, carrier phase (or difference from carrier frequency), doppler, and signal-to-noise ratio measurements. In the following lines, we show how
to load a .o file into a NavData instance.
Our RinexObs class uses the georinex module to load Rinex files. georinex reads through files line by line and so loading large Rinex files with a lot of measurements can be slow.
[2]:
# download Rinex obs file and load it into NavData instance
glp.make_dir("../data")
!wget https://raw.githubusercontent.com/Stanford-NavLab/gnss_lib_py/main/data/unit_test/rinex/obs/rinex_obs_mixed_types.20o --quiet -nc -O "../data/rinex_obs_mixed_types.20o"
rinex_obs_3 = glp.RinexObs("../data/rinex_obs_mixed_types.20o")
print('Loaded Rinex Obs 3 data for the first time instant\n', \
rinex_obs_3.where('gps_millis', rinex_obs_3['gps_millis', 0], 'eq'))
Loaded Rinex Obs 3 data for the first time instant
gps_millis gnss_sv_id sv_id gnss_id raw_pr_m carrier_phase \
0 1.274131e+12 E13 13 galileo 2.382499e+07 0.000
1 1.274131e+12 E15 15 galileo 2.350783e+07 161307.213
2 1.274131e+12 E21 21 galileo 2.501432e+07 -5441.125
3 1.274131e+12 E27 27 galileo 2.326264e+07 43730.714
4 1.274131e+12 E30 30 galileo 2.521138e+07 -0.000
5 1.274131e+12 G02 2 gps 2.083214e+07 38129.730
6 1.274131e+12 G05 5 gps 2.380925e+07 -690438.431
7 1.274131e+12 G06 6 gps 2.176823e+07 376795.289
8 1.274131e+12 G12 12 gps 2.029037e+07 -282295.998
9 1.274131e+12 G19 19 gps 2.348809e+07 414267.810
10 1.274131e+12 G24 24 gps 2.253072e+07 15832.458
11 1.274131e+12 G25 25 gps 2.182004e+07 -10045.237
12 1.274131e+12 G29 29 gps 2.388993e+07 0.000
13 1.274131e+12 R10 10 glonass 2.222123e+07 689349.850
14 1.274131e+12 R11 11 glonass 1.923343e+07 37945.912
15 1.274131e+12 R12 12 glonass 2.100744e+07 -655438.749
16 1.274131e+12 R21 21 glonass 1.983632e+07 225299.914
17 1.274131e+12 R22 22 glonass 2.061167e+07 -422725.388
18 1.274131e+12 G06 6 gps 2.176588e+07 -0.000
19 1.274131e+12 E15 15 galileo 2.350570e+07 -0.000
20 1.274131e+12 E13 13 galileo 2.382286e+07 -231351.564
21 1.274131e+12 E21 21 galileo 2.501219e+07 -326929.017
22 1.274131e+12 E27 27 galileo 2.326052e+07 32997.575
23 1.274131e+12 E30 30 galileo 2.520925e+07 317573.841
24 1.274131e+12 G25 25 gps 2.181769e+07 0.000
raw_doppler_hz cn0_dbhz signal_type observation_code
0 1576.750 21.8 e1 1C
1 -1007.365 31.9 e1 1C
2 2274.785 25.7 e1 1C
3 -344.217 26.9 e1 1C
4 -2384.200 25.8 e1 1C
5 -322.628 28.6 l1 1C
6 3540.744 28.8 l1 1C
7 -2091.633 35.6 l1 1C
8 1363.048 37.1 l1 1C
9 -2525.238 33.0 l1 1C
10 -2443.686 23.5 l1 1C
11 2900.206 27.2 l1 1C
12 2804.600 20.6 l1 1C
13 -3802.022 32.5 g1 1C
14 -355.709 29.2 g1 1C
15 3399.116 35.0 g1 1C
16 -1318.764 33.1 g1 1C
17 2151.375 32.8 g1 1C
18 -1556.400 20.5 l5 5X
19 -756.350 28.5 e5a 5X
20 1179.229 26.1 e5a 5X
21 1693.903 23.5 e5a 5X
22 -254.042 27.1 e5a 5X
23 -1777.720 33.7 e5a 5X
24 2168.200 20.2 l5 5X