2.11 version GPS observation data reading error problem
I am using 2.11 version of gnss observation data and 2 version of navigation data, and the following error occurs. I took a look at the source code and found that it is related to reading gnss observation data.
I uploaded the data I used to my github
import os
from gnssmultipath import GNSS_MultipathAnalysis
base_path = os.getcwd()
parent_dir = os.path.abspath(os.path.join(base_path, os.pardir))
## Path to TestData
path_to_testdata = os.path.join(parent_dir,'obs_lfile' )
ouputdir = os.path.join(parent_dir, 'Results')
print(path_to_testdata)
rinObsFilename1 = os.path.join(path_to_testdata, 'p0803430.24o')
broadcastNav4 = os.path.join(path_to_testdata,'auto3430.24n',)
E:\pythonProject1\obs_lfile
INFO(rinexReadObsFileHeader211): Rinex header has been read
WARNING(rinexReadsObsBlockHead211): Observations event flag encountered. Flag = 0. 6 lines were ignored.
WARNING(rinexReadsObsBlockHead211): Observations event flag encountered. Flag = 0. 6 lines were ignored.
Epoch date = 0024 12 03 02:23:55.0000
WARNING(rinexReadsObsBlockHead211): Observations event flag encountered. Flag = 0. 6 lines were ignored.
WARNING(rinexReadsObsBlockHead211): Observations event flag encountered. Flag = 0. 6 lines were ignored.
Epoch date = 0024 12 03 02:24:0.0000
WARNING(rinexReadsObsBlockHead211): Observations event flag encountered. Flag = 0. 6 lines were ignored.
WARNING(rinexReadsObsBlockHead211): Observations event flag encountered. Flag = 0. 6 lines were ignored.
Epoch date = 0024 12 03 02:24:5.0000
WARNING(rinexReadsObsBlockHead211): Observations event flag encountered. Flag = 0. 6 lines were ignored.
WARNING(rinexReadsObsBlockHead211): Observations event flag encountered. Flag = 0. 6 lines were ignored.
Epoch date = 0024 12 03 02:24:10.0000
WARNING(rinexReadsObsBlockHead211): Observations event flag encountered. Flag = 0. 6 lines were ignored.
WARNING(rinexReadsObsBlockHead211): Observations event flag encountered. Flag = 0. 6 lines were ignored.
Epoch date = 0024 12 03 02:24:15.0000
WARNING(rinexReadsObsBlockHead211): Observations event flag encountered. Flag = 0. 6 lines were ignored.
WARNING(rinexReadsObsBlockHead211): Observations event flag encountered. Flag = 0. 6 lines were ignored.
Epoch date = 0024 12 03 02:24:20.0000
WARNING(rinexReadsObsBlockHead211): Observations event flag encountered. Flag = 0. 6 lines were ignored.
WARNING(rinexReadsObsBlockHead211): Observations event flag encountered. Flag = 0. 6 lines were ignored.
Epoch date = 0024 12 03 02:24:25.0000
WARNING(rinexReadsObsBlockHead211): Observations event flag encountered. Flag = 0. 6 lines were ignored.
WARNING(rinexReadsObsBlockHead211): Observations event flag encountered. Flag = 0. 6 lines were ignored.
Epoch date = 0024 12 03 02:24:30.0000
WARNING(rinexReadsObsBlockHead211): Observations event flag encountered. Flag = 0. 6 lines were ignored.
WARNING(rinexReadsObsBlockHead211): Observations event flag encountered. Flag = 0. 6 lines were ignored.
Epoch date = 0024 12 03 02:24:35.0000
Rinex observations are being read: 0%| | (0/100)
Traceback (most recent call last):
File "E:\pythonProject1\obs_lfile\obs_lfie_get.py", line 15, in
File "C:\Users\Administrator\anaconda3\Lib\site-packages\gnssmultipath\readRinexObs.py", line 32, in readRinexObs
rinexProgr, rinexDate, antDelta, tFirstObs, tLastObs, clockOffsetsON, GLO_Slot2ChannelMap, success= readRinexObs211(filename, readSS=None, readLLI=None, includeAllGNSSsystems=None,includeAllObsCodes=None,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\anaconda3\Lib\site-packages\gnssmultipath\readRinexObs.py", line 1916, in readRinexObs211
success, Obs,SVlist, numSV, LLI, SS, eof = rinexReadObsBlock211(fid, numSV, numOfObsCodes, GNSSsystems, obsCodeIndex, readSS, readLLI, SVlist_)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\anaconda3\Lib\site-packages\gnssmultipath\readRinexObs.py", line 3025, in rinexReadObsBlock211
SV = SVlist[sat]
~~~~~~^^^^^
IndexError: list index out of range
Hi,
Thanks for raising an issue and providing test data. Please note that the software does not support RINEX navigation files of version 2, only version 3.
It does support RINEX V2 observation files, but it looks like there is an issue with reading your file. This is likely a weakness in the reading routine. However, it is not a top priority since RINEX 2.11 is an old format. I will label it as a bug regardless.
I recommend using RINEX V3. If you only have version 2.11 files, you can convert them to version 3 using software like RTKCONV (RTKLIB), for instance.
I forked your test repository and uploaded your file converted to RINEX V3, including both the observation and navigation files. I've tested to run the analysis on these new files, without any errors.
Here is the link:
https://github.com/paarnes/testngssdata/tree/rinex_v3
Thanks
Thanks to @q1165600785, the issue with reading the observations files are resolved. The reading routine for navigation files still needs to be fixed before closing this issue.
Thanks to @q1165600785 for providing fixes and improvements. A new release is made, and the new fixes is available in version 1.6.1. Simply run:
pip install gnssmultipath==1.6.1