geospace-code / georinex

Python RINEX 2 / 3 NAV / OBS / sp3 reader & batch convert to HDF5 with C-like speed
MIT License
220 stars 91 forks source link

treat blank observations as 0.0 #98

Closed betaBison closed 11 months ago

betaBison commented 1 year ago

This pull request interprets blanks in RINEX 3 as 0.0. According to the RINEX 3.04 specification page A13 "Missing observations are written as 0.0 or blanks". Previously, blank observations caused a ValueError, were interpreted as a "malformed line" and then discarded.

The following snippet downloads a RINEX 3 file and reproduces the error.

wget --ftp-user anonymous ftps://gdc.cddis.eosdis.nasa.gov/gnss/data/daily/2020/brdc/BRDC00IGS_R_20201360000_01D_MN.rnx.gz
gunzip BRDC00IGS_R_20201360000_01D_MN.rnx.gz
python -c "import georinex; georinex.load('BRDC00IGS_R_20201360000_01D_MN.rnx', use='E', verbose=True)"

Previous to this pull request there are many logging messages of INFO:root:malformed line for E25 for example. With the new changes, no errors are logged.

All selftests are passing.

scivision commented 11 months ago

Thanks!