Stanford-NavLab / gnss_lib_py

Modular Python tool for parsing, analyzing, and visualizing Global Navigation Satellite Systems (GNSS) data and state estimates
MIT License
116 stars 28 forks source link

Read RINEX Observation data failed! #139

Closed zhangshengping closed 5 months ago

zhangshengping commented 10 months ago

Describe the bug RinexObs("TWTF00TWN_R_20232490000_01D_30S_MO.rnx") run long time and get error report

/home/zsp/.local/lib/python3.8/site-packages/gnss_lib_py/utils/time_conversions.py:586: RuntimeWarning: No time zone info found in datetime, assuming UTC
  warnings.warn("No time zone info found in datetime, assuming UTC",\
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/zsp/.local/lib/python3.8/site-packages/gnss_lib_py/parsers/rinex_obs.py", line 83, in __init__
    obs_navdata_raw.find_wildcard_indexes(f'{measure_char}{band}*',
  File "/home/zsp/.local/lib/python3.8/site-packages/gnss_lib_py/parsers/navdata.py", line 943, in find_wildcard_indexes
    raise KeyError("More than " + str(max_allow) \
KeyError: 'More than 1 possible row indexes for C1*'

TWTF00TWN_R_20232490000_01D_30S_MO.rnx.gz

kanhereashwin commented 10 months ago

georinex can be time consuming for larger rinex files and is the issue for the slow processing. The measurements from multiple channels are causing the error for more than one row index for C1, we will implement a fix and push it in a version release in the next couple of weeks. Thanks for letting us know!

betaBison commented 10 months ago

This issue will be resolved in the ashwin/z-tracking branch

betaBison commented 5 months ago

@zhangshengping This may be irrelevant after so long, but the Rinex Observation parser has been updated in version 0.2.3 of gnss_lib_py that we released last week.

The following code:

import gnss_lib_py as glp
navdata = glp.RinexObs("TWTF00TWN_R_20232490000_01D_30S_MO.rnx")
navdata.to_csv("navdata_20232490000.csv")

produces the attached csv file. This process does take a while (~10 min on my machine) due to loading the file with the georinex package.

navdata_20232490000.csv

Cheers!