geospace-code / georinex Goto Github PK
View Code? Open in Web Editor NEWPython RINEX 2 / 3 NAV / OBS / sp3 reader & batch convert to HDF5 with C-like speed
License: MIT License
Python RINEX 2 / 3 NAV / OBS / sp3 reader & batch convert to HDF5 with C-like speed
License: MIT License
In particular, I can't figure out where (if anywhere) receiver location is stored in the Observation data dataframe.
Hi @scivision Thanks for your effort in this package.
when I use following function, I found that the output satellite position is not right. Because if I use the output satellite position to calculate the gps receiver's position, gps receiver's position is wrong.
satpos1 = gps.getSatXYZ(nav,1,arr)
satpos2 = gps.getSatXYZ(nav,2,arr)
satpos3 = gps.getSatXYZ(nav,3,arr)
the parameter arr in function gps.getSatXYZ is the UTC time from .obs file? I use the following code to get the time for function gps.getSatXYZ.
arr_test = np.array([gps_receiver_time + datetime.timedelta(minutes=i) for i in range(2)])#make sure the length of arr_test is not 0
gps_receiver_time is the UTC time provided by .obs file.
and then compute satellite 3 position:
satellite_position=gps.getSatXYZ(nav,3,arr_test)
do you have any idea about this issue?
Best
Welson
Giving correct output for GPS rinex file but showing error in IRNSS rinex nav file.
Error : key value error 'I'
Dear Scivision
some RINEX writers have the habit to write the 1-digit PRN numbers without the leading 0, e.g. :
17 4 29 0 2 0.0000000 0 23R 2R 8G19R18R 1G14R 9R19G 6G22G32G 2
instead of
17 4 29 0 2 0.0000000 0 23R02R08G19R18R01G14R09R19G06G22G32G02
I have seen this in NAV and OBS files, in both RINEX 2 and 3. In general, this is not an issue for georinex. However, the space ends up in the sv coordinate ticks. This makes it hard to compare the same satellite in two RINEX files, recorded by different receivers.
I propose to check the second character of each PRN for a space and replace it by a 0.
Best Regards
Volker
The issue is in line 61 of test_obs3.py
assert S2P.shape == (2, 14)
After looking at demo3.10o file, I think the shape should be (2, 10) since the measurement 'S2P' is present only in the G satellite system (10 satellites) and should not include the R satellite system (4 satellites)
Correct me if I am wrong
I am trying to read a rinex file from UNAVCO on a mac: ftp://data-out.unavco.org/pub/rinex3/obs/2020/257/ARVL00ATA_R_20202570000_01D_15S_MO.crx.gz
and get this error:
georinex_read ARVL00ATA_R_20202570000_01D_15S_MO.rnx -v -o ARVL00ATA_R_20202570000_01D_15S_MO.nc
saving OBS: ARVL00ATA_R_20202570000_01D_15S_MO.nc
Traceback (most recent call last):
File "/Users/tedhabermann/anaconda3/bin/georinex_read", line 8, in
sys.exit(georinex_read())
File "/Users/tedhabermann/anaconda3/lib/python3.6/site-packages/georinex/main.py", line 51, in georinex_read
verbose=P.verbose, fast=P.strict, interval=P.interval)
File "/Users/tedhabermann/anaconda3/lib/python3.6/site-packages/georinex/base.py", line 69, in load
overwrite=overwrite, fast=fast, interval=interval)
File "/Users/tedhabermann/anaconda3/lib/python3.6/site-packages/georinex/base.py", line 207, in rinexobs
obs.to_netcdf(outfn, group=group, mode=wmode, encoding=enc)
File "/Users/tedhabermann/anaconda3/lib/python3.6/site-packages/xarray/core/dataset.py", line 1568, in to_netcdf
invalid_netcdf=invalid_netcdf,
File "/Users/tedhabermann/anaconda3/lib/python3.6/site-packages/xarray/backends/api.py", line 1044, in to_netcdf
scheduler = _get_scheduler()
File "/Users/tedhabermann/anaconda3/lib/python3.6/site-packages/xarray/backends/locks.py", line 79, in _get_scheduler
actual_get = dask.base.get_scheduler(get, collection)
AttributeError: module 'dask.base' has no attribute 'get_scheduler'
It would be useful to have a new method to get the Rinex header data
I'm attempting to open a .crx
file via the following in Python:
import georinex
dat = georinex.load('file.crx.gz')
but am receiving the following error:
File "E:\Anaconda\lib\site-packages\georinex\base.py", line 63, in load
verbose=verbose, fast=fast, interval=interval)
File "E:\Anaconda\lib\site-packages\georinex\base.py", line 186, in rinexobs
fast=fast, interval=interval)
File "E:\Anaconda\lib\site-packages\georinex\obs3.py", line 76, in rinexobs3
with opener(fn) as f:
File "E:\Anaconda\lib\contextlib.py", line 81, in __enter__
return next(self.gen)
File "E:\Anaconda\lib\site-packages\georinex\io.py", line 62, in opener
f = io.StringIO(_opencrx(f))
File "E:\Anaconda\lib\site-packages\georinex\io.py", line 99, in _opencrx
raise RuntimeError('Hatanka crx2rnx not available. Did you compile it per README?')
RuntimeError: Hatanka crx2rnx not available. Did you compile it per README?
I compiled the crx2rnx
as suggested in your documentation, so I'm not really sure what is going on.
I can upload the file I was using in case this helps. I am using Python 3.6.5.
Thanks
Dear Scivision,
I can confirm that your effort to speed up the parsing, by making the indicators optional, was successful.
Unfortunately, the parsing is still a bit slow. I have another proposal to speed it up:
The use argument is very useful to speed up the parsing, by selecting only the constellations/satellites you want. Especially ignoring the GEOs makes a big different, since they are recorded every single epoch. How do you feel about adding an option to allow a similar selection for the signal types?
Here is an example of what I would like to do:
#Only read Galileo E1 Code
gr.readrinex('test.rnx', use='E', signal='C1C')
#Read all code and phase observations of all constellations but GEOs
gr.readrinex('test.rnx', use=['E', 'G', 'C', 'R', 'J'], signal=['C', 'L'] )
I am convinced the potential time saving is substantial.
Implementing this, one may consider changing the use keyword, since it is not unambiguous anymore. But this is a detail.
Thanks a lot for your effort. Keep up the good work!
Best Regards
Volker
Hi!
First of all, thank you very much for this great tool. I am already using it from my python scripts but I am not able to use the CLI tools such as ReadRinex.
Looking inside my virtualenv folder I found a ReadRinex inside bin and it looked like this:
#!/Users/fabiopicchi/.venvs/test/bin/python3.7
# -*- coding: utf-8 -*-
import re
import sys
from ReadRinex import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
However, there is no ReadRinex module installed. Under site-packages I just have the georinex package. Thus, I get the following error when trying to run this CLI tool:
Traceback (most recent call last):
File "/Users/fabiopicchi/.venvs/test/bin/ReadRinex", line 6, in <module>
from ReadRinex import main
ModuleNotFoundError: No module named 'ReadRinex'
I have never dug into the pip packaging process so I can't exactly point where the actual problem is (I read the setup.cfg file and everything seems fine). Maybe I am doing something wrong?
Also, I think it would be very useful to provide the Hatanaka compression and decompression tools as binaries. This way, running a project that has georinex as a dependency in different machines will be a little bit more convenient if this feature is required.
Hi,
I am running python 3.6.4. I got error running a GPS RINEX 2.11 navigation file
plots.py, line 28, in plotobs
if not p in obs:
TypeError: argument of type 'NoneType' is not iterable
Have you seen this error before? Am I missing a library?
Dear scivision,
I ran a profiler on georinex (why did you change the name), while reading a 24h@30s Multi-GNSS Rinex 3 (LEICA GR25) file and found that the xarray.merge is responsible for >90% of the time consumption. This is not a surprise, but annoying nonetheless. I checked the code and saw that you are using xarray.concat instead of xarray.merge for single constellation cases. So I made a test:
#Galileo only: 57.44 sec
e=gr.readrinex('C:/Users/Volker Mayer/Desktop/ABMFxxGLP_R_20181330000_01D_30S_MO.rnx', use=['E'])
#GPS only: 59.79 sec
g=gr.readrinex('C:/Users/Volker Mayer/Desktop/ABMFxxGLP_R_20181330000_01D_30S_MO.rnx', use=['G'])
#GPS+Galileo: 2.89 min
eg=gr.readrinex('C:/Users/Volker Mayer/Desktop/ABMFxxGLP_R_20181330000_01D_30S_MO.rnx', use=['E', 'G'])
As you can see, reading GPS+Galileo at once takes about 50% longer than doing them one after another. This shows that concat is substantially quicker than merge. So here is my proposal:
Create one xarray dataset for each constellation and merge them only once at the very end. I am optimistic that this will allow at least 50% of time savings. Probably even quicker would be to use one xarray dataset per satellite and again merge them only once!
Best Regards
Volker
ValueError: could not convert string to float: '-6\x00\x001447889\x00\x00-2.387'
Check file : ftp://cddis.nasa.gov/gnss/data/daily/2017/090/17n/brdc0900.17n.Z
Dear Michael,
I started working with georinex, big thanks for this packege.
I have a request: is it possible to decimate the observables?
I mean by this that is the observation interval is 1 sec that I want to only read the observables every 5, 10, ... seconds.
Kind regards
Alain
Hi
I'm getting an error when first reading in an obs file.
import pyrinex as pr
obs,nav = pr.readrinex('../Sample/14601736.18o')
Full StackTrace:
ValueError Traceback (most recent call last)
in ()
2 srcDir = '/Users/ianmarang/Documents/Project_docs/Crop/Narrabri_farm_data/DGPS_SNR/Sample/'
3
----> 4 obs,nav = pr.readrinex(srcDir+'14601736.18o')
5 print(obs)
6 print(nav)
~/anaconda2/envs/py3/lib/python3.6/site-packages/pyrinex/init.py in readrinex(rinexfn, outfn, use, verbose)
29 nav = rinexnav(rinexfn, outfn)
30 elif fnl.endswith('o') or fnl.endswith('o.rnx'):
---> 31 obs = rinexobs(rinexfn, outfn, use=use, verbose=verbose)
32 elif rinexfn.suffix.endswith('.nc'):
33 nav = rinexnav(rinexfn)
~/anaconda2/envs/py3/lib/python3.6/site-packages/pyrinex/init.py in rinexobs(fn, ofn, use, group, verbose)
97 ver = getRinexVersion(fn)
98 if int(ver) == 2:
---> 99 obs = _scan2(fn, use, verbose)
100 elif int(ver) == 3:
101 obs = _scan3(fn, use, verbose)
~/anaconda2/envs/py3/lib/python3.6/site-packages/pyrinex/rinex2.py in _scan2(fn, use, verbose)
162 break
163
--> 164 eflag = int(ln[28])
165 if eflag not in (0, 1, 5, 6): # EPOCH FLAG
166 print(eflag)
ValueError: invalid literal for int() with base 10: 'i'
Conda details:
active environment : py3
active env location : /Users/ianmarang/anaconda2/envs/py3
shell level : 1
user config file : /Users/ianmarang/.condarc
populated config files :
conda version : 4.5.4
conda-build version : not installed
python version : 2.7.14.final.0
base environment : /Users/ianmarang/anaconda2 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/osx-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/pro/osx-64
https://repo.anaconda.com/pkgs/pro/noarch
package cache : /Users/ianmarang/anaconda2/pkgs
/Users/ianmarang/.conda/pkgs
envs directories : /Users/ianmarang/anaconda2/envs
/Users/ianmarang/.conda/envs
platform : osx-64
user-agent : conda/4.5.4 requests/2.14.2 CPython/2.7.14 Darwin/14.5.0 OSX/10.10.5
UID:GID : 505:20
netrc file : None
offline mode : False
appnope 0.1.0 py36hf537a9a_0
backcall 0.1.0 py36_0
blas 1.0 mkl
bzip2 1.0.6 h1de35cc_5
ca-certificates 2018.03.07 0
cairo 1.14.12 hc4e6be7_3
certifi 2018.4.16 py36_0
cftime 1.0.0
curl 7.60.0 ha441bb4_0
Cython 0.28.3
decorator 4.3.0 py36_0
expat 2.2.5 hb8e80ba_0
fontconfig 2.13.0 h5d5b041_1
freetype 2.9.1 hb4e5f40_0
freexl 1.0.5 h1de35cc_0
gdal 2.2.4 py36h1702cab_1
geos 3.6.2 h5470d99_2
gettext 0.19.8.1 h15daf44_3
giflib 5.1.4 h1035379_1
glib 2.56.1 h35bc53a_0
hdf4 4.2.13 h39711bb_2
hdf5 1.8.18 h017327d_1
icu 58.2 h4b95b61_1
intel-openmp 2018.0.3 0
ipykernel 4.8.2 py36_0
ipython 6.4.0 py36_0
ipython_genutils 0.2.0 py36h241746c_0
jedi 0.12.0 py36_1
jpeg 9b he5867d9_2
json-c 0.13.1 h3efe00b_0
jupyter_client 5.2.3 py36_0
jupyter_core 4.4.0 py36h79cf704_0
kealib 1.4.7 haa18932_5
libboost 1.65.1 hcc95346_4
libcurl 7.60.0 hf30b1f0_0
libcxx 4.0.1 h579ed51_0
libcxxabi 4.0.1 hebd6815_0
libdap4 3.19.0 hefe82ba_2
libedit 3.1.20170329 hb402a30_2
libffi 3.2.1 h475c297_4
libgdal 2.2.4 h2fbb439_1
libgfortran 3.0.1 h93005f0_2
libiconv 1.15 hdd342a3_7
libkml 1.3.0 hc0cae1e_3
libnetcdf 4.4.1.1 h1d6afd8_8
libpng 1.6.34 he12f830_0
libpq 10.3 hf30b1f0_0
libsodium 1.0.16 h3efe00b_0
libspatialite 4.3.0a h0a2fa02_18
libssh2 1.8.0 h322a93b_4
libtiff 4.0.9 hcb84e12_1
libuuid 1.0.3 h6bb4b03_2
libxml2 2.9.8 hab757c2_1
mkl 2018.0.3 1
mkl_fft 1.0.1 py36h917ab60_0
mkl_random 1.0.1 py36h78cc56f_0
ncurses 6.1 h0a44026_0
netCDF4 1.4.0
numpy 1.14.5 py36h9bb19eb_2
numpy-base 1.14.5 py36ha9ae307_2
openjpeg 2.3.0 hb95cd4c_1
openssl 1.0.2o h26aff7b_0
pandas 0.23.1 py36h1702cab_0
parso 0.2.1 py36_0
pcre 8.42 h378b8a2_0
pexpect 4.6.0 py36_0
pickleshare 0.7.4 py36hf512f8e_0
pip 10.0.1 py36_0
pixman 0.34.0 hca0a616_3
poppler 0.65.0 ha097c24_1
poppler-data 0.4.9 0
proj4 4.9.3 h3f1bf9d_7
prompt_toolkit 1.0.15 py36haeda067_0
ptyprocess 0.6.0 py36_0
pygments 2.2.0 py36h240cd3f_0
pyrinex 1.4.1
python 3.6.6 hc167b69_0
python-dateutil 2.7.3 py36_0
pytz 2018.4 py36_0
pyzmq 17.0.0 py36h1de35cc_1
readline 7.0 hc1231fa_4
setuptools 39.2.0 py36_0
simplegeneric 0.8.1 py36_2
six 1.11.0 py36h0e22d5e_1
sqlite 3.24.0 ha441bb4_0
tk 8.6.7 h35a86e2_3
tornado 5.0.2 py36_0
traitlets 4.3.2 py36h65bd3ce_0
wcwidth 0.1.7 py36h8c6ec74_0
wheel 0.31.1 py36_0
xarray 0.10.7
xerces-c 3.2.1 h44e365a_0
xz 5.2.4 h1de35cc_4
zeromq 4.2.5 h378b8a2_0
zlib 1.2.11 hf3cbc9b_2
Looks like its failing when trying to confirm the version of the rinex obs file, but I've never used this before today so I could use some help.
Cheers
Ian
At first thought, it seems like batch conversion of RINEX to NetCDF could be greatly sped up by using coroutines (asyncio). When time permits, let's consider this enhancement.
Hi Michael,
when i was installing Georinex i got this error message but the package installed fine.
Requirement already satisfied: pytz>=2011k in c:\users\gssc\appdata\local\continuum\anaconda3\lib\site-packages (from pandas>=0.19.2->xarray->georinex)
Building wheels for collected packages: georinex
Running setup.py bdist_wheel for georinex ... error
Complete output from command C:\Users\GSSC\AppData\Local\Continuum\anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\GSSC\AppData\Local\Temp\pip-build-8bww53q8\georinex\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d C:\Users\GSSC\AppData\Local\Temp\tmptm1u2xrhpip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build\lib
creating build\lib\georinex
copying georinex\io.py -> build\lib\georinex
copying georinex\keplerian.py -> build\lib\georinex
copying georinex\nav2.py -> build\lib\georinex
copying georinex\nav3.py -> build\lib\georinex
copying georinex\obs2.py -> build\lib\georinex
copying georinex\obs3.py -> build\lib\georinex
copying georinex\plots.py -> build\lib\georinex
copying georinex_init_.py -> build\lib\georinex
running egg_info
writing georinex.egg-info\PKG-INFO
writing dependency_links to georinex.egg-info\dependency_links.txt
writing entry points to georinex.egg-info\entry_points.txt
writing requirements to georinex.egg-info\requires.txt
writing top-level names to georinex.egg-info\top_level.txt
reading manifest file 'georinex.egg-info\SOURCES.txt'
writing manifest file 'georinex.egg-info\SOURCES.txt'
installing to build\bdist.win-amd64\wheel
running install
running install_lib
creating build\bdist.win-amd64
creating build\bdist.win-amd64\wheel
creating build\bdist.win-amd64\wheel\georinex
copying build\lib\georinex\io.py -> build\bdist.win-amd64\wheel.\georinex
copying build\lib\georinex\keplerian.py -> build\bdist.win-amd64\wheel.\georinex
copying build\lib\georinex\nav2.py -> build\bdist.win-amd64\wheel.\georinex
copying build\lib\georinex\nav3.py -> build\bdist.win-amd64\wheel.\georinex
copying build\lib\georinex\obs2.py -> build\bdist.win-amd64\wheel.\georinex
copying build\lib\georinex\obs3.py -> build\bdist.win-amd64\wheel.\georinex
copying build\lib\georinex\plots.py -> build\bdist.win-amd64\wheel.\georinex
copying build\lib\georinex_init_.py -> build\bdist.win-amd64\wheel.\georinex
running install_egg_info
Copying georinex.egg-info to build\bdist.win-amd64\wheel.\georinex-1.5.3-py3.6.egg-info
running install_scripts
error: [Errno 2] No such file or directory: 'LICENSE'
Failed building wheel for georinex
Running setup.py clean for georinex
Failed to build georinex
Installing collected packages: georinex
Running setup.py install for georinex ... done
Successfully installed georinex-1.5.3
Then i read the mixed Rinex file using the updated version and i examined each data point visually by exporting the data to a excel file. I see (specially Galileo sats) the dates are wrong and some attribute are empty ( in Rinex file they are not). I don't know whether this has something to do with errors during the installation.
Really appreciate the effort you put to make this package.
I hope you will be able to correct this.
Rinex file, excel file -- https://files.fm/u/cu7wrt3z
Cheers
Best regards
Charles
Hello,
I am trying to parse a recent Galileo file:
ftp://ftp.cddis.eosdis.nasa.gov/pub/gnss/data/daily/2020/182/20l/tlsg1820.20l.Z
As it contains both F/NAV 0x102 (258) and I/NAV 0x205 (517) messages, current nav2.py rejects all messages.
Adding a filter on DataSrc value enables to extract information.
I do not know if this solution makes sense.
Thank you
#_ %% format I2 http://gage.upc.edu/sites/default/files/gLAB/HTML/GPS_Navigation_Rinex_v2.11.html
svs.append(f'{svtype}{ln[:2]}'.replace(' ', '0'))
times.append(time)
"""
now get the data as one big long string per SV
"""
raw = ln[22:79] # NOTE: MUST be 79, not 80 due to some files that put \n a character early!
for _ in range(Nl[header['systems']]):
raw += f.readline()[STARTCOL2:79]
# one line per SV
# NOTE: Sebastijan added .replace(' ', ' ').replace(' -', '-')
# here, I would like to see a file that needs this first, to be sure
# I'm not needlessly slowing down reading or creating new problems.
raws.append(raw.replace('D', 'E').replace('\n', ''))
#_ %% Galileo specific: filter data source
#_ https://binex.unavco.org/binex_record_01.html
#_ data sources:
#_ bit 0: I/NAV E1-B
#_ bit 1: F/NAV E5a-I
#_ bit 2: I/NAV E5b-I
#_ bit 8: af0-af2, ToC are for E5a,E1
#_ bit 9: af0-af2, ToC are for E5b,E1
#_ although only specific combinations are valid, i.e.
#_ 0x102 (258) for F/NAV from E5a
#_ 0x201 (513) for I/NAV from E1
#_ 0x204 (516) for I/NAV from E5b
#_ 0x205 (517) for I/NAV from E1+E5b
data_src_filt = 0x205
if svtype == 'E' and data_src_filt is not None:
# aggregate all rows in a 2D char matrix
raw = np.array(raws, dtype="S")
raw_len = np.vectorize(len)(raw)
if not (raw_len == raw_len[0]).all():
raise RuntimeError("Non-uniform rows are unexpected")
raw_uint8 = raw.view(dtype=np.uint8).reshape(len(raw), -1)
# extract characters of column DataSrc and convert to uint16
i_data_src = fields.index("DataSrc")
col = raw_uint8[:, i_data_src*19:(i_data_src+1)*19].reshape(-1)
data_src = col.view(dtype="S19").astype(float).astype(np.uint16)
# filter matching values
is_in = data_src == data_src_filt
times = np.array(times)[is_in].tolist()
raws = [r.decode() for r in raw[is_in]]
svs = np.array(svs)[is_in].tolist()
#_ %% parse
svu = sorted(set(svs))
Consider the following record header:
17 1 2 13 15 0.0000000 0 30S27G30R24G26R23G16E01R17R01G13R09G09
R07G23G29R06G02R08R16G05S28G06G07E09
R10E22S36S20S23S26
In it we have amongst other, the satellites R23, G23, and S23, belonging to the GLONASS, GPS, and SBAS constellations respectively. Currently, the code for enumerating satellites in the pandas tables, create the labels from the following:
sp.append(int(lines[i][33+(s%12)*3:35+(s%12)*3]))
.
This only account for the satellite number, without accounting for its constellation, creating serious errors when trying to use the code on multi-constallation files.
Hello Michael,
I am trying to load measurements from a single GNSS system with the 'use' argument.
The Dataset returned after the load does not contain any data variables
dat = gr.load("cutsamp.16o",meas=['C1C','S1C',],use=['G']) print(dat)
Output
... Data variables: *empty*
But when I add more than one GNSS system as part of the 'use' argument it loads the data correctly
dat = gr.load("cutsamp.16o",meas=['C1C','S1C',],use=['G','S']) print(dat)
Output
... Data variables: C1C (time, sv) : ... S1C (time, sv) : ...
I have attached the file "cutsamp.16o" for your reference. Note that it is a RINEX 3.02 file
cutsamp.zip
This codeline, i can't compile in Python 2.7
sv.append(int(l[:2]))
What can i do?
The following example contains a RINEX file generated by a Spirent GSS9000 constellation simulator. It contains GPS data with 31 field while the nav3 parser expects 29 field. A workaround is to include 2 spare fields at position 20 and at the end.
Hello,
Thanks for your great work. Just a little mark.
In your readme section "Read Navigation File Example", Function readRinexNav does not exist.
perhaps, you mean rinexnav or rinexnav2 or rinexnav3?
Thanks
i have submitted to georinex.rinexheader a rinex file, attached, that have the following line:
5 C1 P2 L1 L2 D1 D2 # / TYPES OF OBSERV
Should be possible do not raise exception?
Hi, @scivision , thanks for your work in this package.
Thanks for your work here. how can this package be changed to read the rinex3.02 .nav file? my .nav file is like this (rinex 3.2):
3.02 N: GNSS NAV DATA G: GPS RINEX VERSION / TYPE
LgsRinex v1.7.7.0 SMO 20171117 051209 UTC PGM / RUN BY / DATE
GPSA 1.1176D-08 -1.4901D-08 -5.9605D-08 1.1921D-07 IONOSPHERIC CORR
GPSB 9.8304D+04 -1.1469D+05 -1.9661D+05 7.2090D+05 IONOSPHERIC CORR
GPUT -3.7252902985D-09-1.065814104D-14 61440 1976 TIME SYSTEM CORR
18 18 1929 7 LEAP SECONDS
END OF HEADER
G01 2017 11 17 00 00 00-1.082336530089D-05-2.387423592154D-12 0.000000000000D+00
2.600000000000D+01 4.312500000000D+01 4.455542601534D-09 2.261013945883D+00
2.192333340645D-06 7.114754174836D-03 7.407739758492D-06 5.153672552109D+03
4.320000000000D+05-9.126961231232D-08 7.577775093435D-01-7.450580596924D-08
9.691207199508D-01 2.407187500000D+02 6.318014759246D-01-7.981403982171D-09
5.718095441587D-10 1.000000000000D+00 1.975000000000D+03 0.000000000000D+00
2.000000000000D+00 0.000000000000D+00 5.587935447693D-09 2.600000000000D+01
4.247400000000D+05
G02 2017 11 17 04 00 00 2.789050340652D-04-9.663381206337D-12 0.000000000000D+00
6.100000000000D+01 4.615625000000D+01 4.950563514683D-09-1.495754475149D+00
2.572312951088D-06 1.728782569990D-02 7.607042789459D-06 5.153617258072D+03
4.464000000000D+05 4.153698682785D-07 7.005942974446D-01 3.054738044739D-07
9.481762359175D-01 2.264062500000D+02-1.938649816409D+00-8.148910879413D-09
4.689481025721D-10 1.000000000000D+00 1.975000000000D+03 0.000000000000D+00
2.000000000000D+00 0.000000000000D+00-2.048909664154D-08 6.100000000000D+01
4.391400000000D+05
G03 2017 11 17 00 00 00-4.102196544409D-05 5.570655048359D-12 0.000000000000D+00
6.200000000000D+01-3.440625000000D+01 4.867345637649D-09 1.199389953372D+00
-1.976266503334D-06 1.129540265538D-03 5.628913640976D-06 5.153610057831D+03
4.320000000000D+05 1.117587089539D-08 1.800773457900D+00 3.911554813385D-08
9.598706640660D-01 2.691562500000D+02 5.853639356718D-01-8.238200344124D-09
-3.446572194310D-10 1.000000000000D+00 1.975000000000D+03 0.000000000000D+00
2.000000000000D+00 0.000000000000D+00 2.328306436539D-09 6.200000000000D+01
4.247400000000D+05
G05 2017 11 17 04 00 00-2.250215038657D-05 1.136868377216D-12 0.000000000000D+00
1.010000000000D+02-3.156250000000D+01 5.160929461567D-09 1.019456906164D+00
-1.467764377594D-06 5.289388587698D-03 5.319714546204D-06 5.153583730698D+03
4.464000000000D+05-7.823109626770D-08 1.781452415021D+00 4.842877388000D-08
9.467839021727D-01 2.704687500000D+02 6.257362175680D-01-8.413207908120D-09
-3.964450712157D-10 1.000000000000D+00 1.975000000000D+03 0.000000000000D+00
2.000000000000D+00 0.000000000000D+00-1.071020960808D-08 1.010000000000D+02
4.391400000000D+05
I got questions when I use pyrinex to read nav files.The error is followed down and I want to know how I can solve the problem.
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition 2017.3.1\helpers\pydev\pydevd.py", line 1668, in
main()
File "C:\Program Files\JetBrains\PyCharm Community Edition 2017.3.1\helpers\pydev\pydevd.py", line 1662, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "C:\Program Files\JetBrains\PyCharm Community Edition 2017.3.1\helpers\pydev\pydevd.py", line 1072, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files\JetBrains\PyCharm Community Edition 2017.3.1\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/lenovo/Desktop/毕设/程序/dual_frequency/rinex.py", line 2, in
navdata = pyrinex.rinexnav('ntus0010.18n')
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python36\lib\site-packages\pyrinex_init_.py", line 71, in rinexnav
darr = np.genfromtxt(BytesIO(raws.encode('ascii')))
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\lib\npyio.py", line 2019, in genfromtxt
raise ValueError(errmsg)
ValueError: Some errors were detected !
ReadRinex rinex_files/brest_france/20191022_BRST00FRA_R_20192950000_01D_30S_MO.crx -u G -m S1C -v
cc /usr/local/lib/python3.7/site-packages/georinex/rnxcmp/source/crx2rnx.c -o /usr/local/lib/python3.7/site-packages/georinex/rnxcmp/crx2rnx
ld: can't open output file for writing '/usr/local/lib/python3.7/site-packages/georinex/rnxcmp/crx2rnx.ld_Qso3hq', errno=13 for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gcc /usr/local/lib/python3.7/site-packages/georinex/rnxcmp/source/crx2rnx.c -o /usr/local/lib/python3.7/site-packages/georinex/rnxcmp/crx2rnx
ld: can't open output file for writing '/usr/local/lib/python3.7/site-packages/georinex/rnxcmp/crx2rnx.ld_IaiMOI', errno=13 for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
clang /usr/local/lib/python3.7/site-packages/georinex/rnxcmp/source/crx2rnx.c -o /usr/local/lib/python3.7/site-packages/georinex/rnxcmp/crx2rnx
ld: can't open output file for writing '/usr/local/lib/python3.7/site-packages/georinex/rnxcmp/crx2rnx.ld_NHyA2O', errno=13 for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Traceback (most recent call last):
File "/usr/local/bin/ReadRinex", line 8, in
sys.exit(main())
File "/usr/local/bin/ReadRinex.py", line 48, in main
verbose=P.verbose, fast=P.strict, interval=P.interval)
File "/usr/local/lib/python3.7/site-packages/georinex/base.py", line 66, in load
verbose=verbose, fast=fast, interval=interval)
File "/usr/local/lib/python3.7/site-packages/georinex/base.py", line 189, in rinexobs
fast=fast, interval=interval)
File "/usr/local/lib/python3.7/site-packages/georinex/obs3.py", line 76, in rinexobs3
with opener(fn) as f:
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/contextlib.py", line 112, in enter
return next(self.gen)
File "/usr/local/lib/python3.7/site-packages/georinex/io.py", line 61, in opener
f = io.StringIO(opencrx(f))
File "/usr/local/lib/python3.7/site-packages/georinex/hatanaka.py", line 51, in opencrx
raise RuntimeError('could not build Hatanka converter. Do you have a C compiler?')
RuntimeError: could not build Hatanka converter. Do you have a C compiler?
I have the home-brew gcc installed but python is complaining I don't have a compiler?
I got 'string to float conversion error' for some rinex with second in "TIME OF FIRST OBS" AND "TIME OF LAST OBS" records represented without zeroes before the dot. like following:
(" 93 1 1 0 0 .000000 ")
In this case the program fail trying to convert the string "." into float
I have also found in some rinex the seconds field set to 60, like following:
(" 93 1 1 23 58 60 .000000 ")
while the correct record should be:
(" 93 1 1 23 59 0 .0000000 ")
In this case the program fail trying to construct datetime object because of the seconds cannot be greather than 59
I fixed this two problems modifing the function obsheader2 of obs2.py module (both for 'TIME OF FIRST OBS' and 'TIME OF LST OBS' keys) like following:
hdr['t0'] = datetime(year=int(t0s[:6]), month=int(t0s[6:12]), day=int(t0s[12:18]),
hour=int(t0s[18:24]), minute=int(t0s[24:30]), second=0,
microsecond=int(float(t0s[30:43]) % 1 * 1000000)) + timedelta(seconds=int(float('0' + t0s[30:36].strip())))
instead of:
hdr['t0'] = datetime(year=int(t0s[:6]), month=int(t0s[6:12]), day=int(t0s[12:18]),
hour=int(t0s[18:24]), minute=int(t0s[24:30]), second=int(float(t0s[30:36]),
microsecond=int(float(t0s[30:43]) % 1 * 1000000))
does it possible to put this patch in the official module or do I need to update my local installation?
Regards
Sergio Bruni
On reading some RINEX files rinexobs fails with the following message "IndexError: list index out of range" after trying to read the number of satellites from the header:
numberOfSv = int(grabfromhead(header,None,6,"# OF SATELLITES")[0][0]
The # OF SATELLITES record is an optional header and it is thus problematic to rely on it.
Dear scivision,
I love the fact that you decided to support Hatanaka compressed files. However, I am struggling to get it to work in my Windows 10 environment. The respective crx2rnx Windows binaries are available here
Thanks!
Volker
Hello Scivison,
Thank you for the correction. Your demo files run ok with the pyrinex but ;
i ran my file and looks like it does not record data to xarray my file can be download here https://files.fm/u/95k952ck
could you please observe the file and tell me whats wrong with it.
<xarray.Dataset>
Dimensions: (sv: 20, time: 933)
Coordinates:
sv (sv) object 'C13' 'C27' 'C28' 'C30' 'G05' 'G14' 'G16' 'G20' ...
time (time) datetime64[ns] 2018-04-17T16:19:25.999800 ...
Data variables:
C1C (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
C1Cssi (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
L1C (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
L1Clli (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
L1Cssi (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
D1C (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
D1Cssi (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
S1C (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
S1Cssi (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
C1B (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
C1Bssi (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
L1B (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
L1Blli (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
L1Bssi (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
D1B (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
D1Bssi (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
S1B (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
S1Bssi (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
C2I (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
C2Issi (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
L2I (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
L2Illi (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
L2Issi (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
D2I (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
D2Issi (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
S2I (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
S2Issi (time, sv) float64 nan nan nan nan nan nan nan nan nan nan nan ...
Attributes:
filename: GEOP107Q.18o
Hey guys, I am using georinex to read some RINEX files from IGS (International GNSS Service). It is working really well and I would like to thank you for providing such a tool.
However, there are some .obs files with a few comments in the middle of the file (not only in the header). See for instance the following RINEX file, at the following line regarding to the observations at 1 hour:
file: ftp://cddis.gsfc.nasa.gov/gnss/data/daily/2013/359/13o/mana3590.13o.Z
line: 13 12 25 1 0 0.0000000 4 5
You will find some strange comments, such as:
13 12 25 1 0 0.0000000 4 5
MANA (COGO code) COMMENT
0.000 (antenna height) COMMENT
+12.14896250 (latitude) COMMENT
-86.24899354 (longitude) COMMENT
0077.169 (elevation) COMMENT
As far as I have detected, georinex is not reading correct such files. It reads the observations bellow the comments and says that such obsearvations are related to the time obtained in the comments plus 30 seconds (or any other interval). However, the next time is also at 1 hour. As a result, georinex is shifting all times when we find this problem.
Indeed, this strange lines are not suposed to be there, so it is a bug in the RINEX files. I have seen this kind of comments since many years ago, which are obtained due to the use of TEQC when generating RINEX files. Despite being a bug, some files have this comments..
I do not know if this would be easy to solve in georinex..
Thanks anyway!
Dear scivision,
I spend the day checking out pyrinex and am starting to like it. However I am having issue reading large RINEX3 files (24h@30s). In this case it crashed at 01:26:30.
I work at ESA's Navigation Support Office and we do a lot of RINEX analysis, mostly of 24h files. I see great potential in this tool for our daily work.
I am looking forward to hear from you.
a= pr.readrinex('ABMF00GLP_R_20181330000_01D_30S_MO.rnx')
Traceback (most recent call last):02:30 2018-05-13 00:04:30 2018-05-13 00:09:00 2018-05-13 00:16:30 2018-05-13 00:19:30 2018-05-13 00:21:30 2018-05-13 00:24:30 2018-05-13 00:26:00 2018-05-13 00:27:30 2018-05-13 00:31:30 2018-05-13 00:33:30 2018-05-13 00:47:30 2018-05-13 00:52:00 2018-05-13 01:06:00 2018-05-13 01:09:00 2018-05-13 01:10:30 2018-05-13 01:13:30 2018-05-13 01:15:00 2018-05-13 01:21:00 2018-05-13 01:25:00 2018-05-13 01:26:30
File "<ipython-input-87-b3eefa642c66>", line 1, in <module>
a= pr.readrinex('C:/Users/xxx/Desktop/ABMF00GLP_R_20181330000_01D_30S_MO.rnx')
File "C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\site-packages\pyrinex\__init__.py", line 31, in readrinex
obs = rinexobs(rinexfn, outfn, use=use, verbose=verbose)
File "C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\site-packages\pyrinex\__init__.py", line 101, in rinexobs
obs = _scan3(fn, use, verbose)
File "C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\site-packages\pyrinex\rinex3.py", line 258, in _scan3
garr = darr[si, :]
IndexError: too many indices for array
I am running pyrinex 1.4.1. find the other versions below:
Well, after to read a lot, I could not find something that allows me to restrict the measures by provide a range of two dates. The reason to do that, is that my rinex is really heavy. and the .load() would be too unnecessary!
So, when read by the first time, I can set the full-day reading, like:
obs = gr.load(complete_path, meas=columns, use=constellations)
and if I want a specific range, I would just use 'tlim' tag. Ok, so, after to get my obs
, I want to get all measures that is related to a specific date, without to read it again. So, I've tried:
obs_short = obs.sel(time=[initial_date, final_date])
but obs_short
will be only a two measures variable, not a range! I also have tried tlim
in the .sel():
obs_short = obs.sel(tlim=[initial_date, final_date])
but there is no such property in .sel
!
Someone could help?
submitting to rinexheader function a rinex file with more than 9 observation types, like the following:
10 C1 L1 S1 P2 L2 S2 C2 C5 L5 # / TYPES OF OBSERV
S5 # / TYPES OF OBSERV
I got a parsing error and I fixed It modifing module obs2.py as shown below:
BEFORE FIXING
137 if '# / TYPES OF OBSERV' in h:
138 if Nobs is None:
139 Nobs = int(c[:6])
140 c = c[6:].split()
AFTER FIXING
137 if '# / TYPES OF OBSERV' in h:
138 if Nobs is None:
139 Nobs = int(c[:6])
140 c = c[6:].split()
Regards
Sergio Bruni
Broadcasted navigation RINEX can contain several navigation messages on the same epoch depending on navigation message decoded for Galileo (INAV[E1B, E5b] / FNAV [E5a]) in a particular station (signal decoded). It would be great to allow the xarray to contain several ephemeris per satellite on the same epoch to differenciate between data sources.
Dear Scivision,
I put your latest release v1.6.1 in a profiler. After getting rid of xarrax.concat and .merge, the new bottle neck is the 'np.genfromtxt' function:
darr = np.genfromtxt(BytesIO(raws.encode('ascii')), delimiter=[Lf, 1, 1]*hdr['Nobs'])
I know np.genfromtxt is handy, but not the fastest. Did you checkout pandas.read_csv
or pandas.read_fwf
? Alternatively, a specialized self-written read function may be quickest. I think it is worth spending some extra thoughts on this one, since it is the center-piece of the whole software.
IndexError Traceback (most recent call last)
in
----> 1 OBSERVABLES = gr.load(SEPTENTRIO_ASTERX4_DATA)
2 #OBSERVABLES = gr.rinexheader(SEPTENTRIO_ASTERX4_DATA)
~/h/virtualenvs/i/lib/python3.8/site-packages/georinex/base.py in load(rinexfn, out, use, tlim, useindicators, meas, verbose, overwrite, fast, interval)
64 overwrite=overwrite)
65 elif info['rinextype'] == 'obs':
---> 66 return rinexobs(rinexfn, outfn, use=use, tlim=tlim,
67 useindicators=useindicators, meas=meas,
68 verbose=verbose,
~/h/virtualenvs/i/lib/python3.8/site-packages/georinex/base.py in rinexobs(fn, outfn, use, group, tlim, useindicators, meas, verbose, overwrite, fast, interval)
184
185 if int(info['version']) in (1, 2):
--> 186 obs = rinexobs2(fn, use, tlim=tlim,
187 useindicators=useindicators, meas=meas,
188 verbose=verbose,
~/h/virtualenvs/i/lib/python3.8/site-packages/georinex/obs2.py in rinexobs2(fn, use, tlim, useindicators, meas, verbose, fast, interval)
36 attrs: Dict[str, Any] = {}
37 for u in use:
---> 38 o = rinexsystem2(fn, system=u, tlim=tlim,
39 useindicators=useindicators, meas=meas,
40 verbose=verbose,
~/h/virtualenvs/i/lib/python3.8/site-packages/georinex/obs2.py in rinexsystem2(fn, system, tlim, useindicators, meas, verbose, fast, interval)
231 data[i3+2, j, isv] = darr[:, k3+2]
232 else:
--> 233 data[i, j, isv] = darr[:, k]
234 # %% output gathering
235 data = data[:, :times.size, :] # trims down for unneeded preallocated
IndexError: index 57 is out of bounds for axis 2 with size 36
Hello Michael,
I was trying to read broadcast ephemerides from BKG GNSS data centre.
The rinex files can be downloaded using in the following link
when i read the data i get following error
E NAV data @ ['2018-09-18T00:00:00.000000000' '2018-09-18T00:10:00.000000000'
'2018-09-18T00:20:00.000000000' '2018-09-18T00:30:00.000000000'
'2018-09-18T00:40:00.000000000' '2018-09-18T00:50:00.000000000'
'2018-09-18T01:00:00.000000000' '2018-09-18T01:20:00.000000000'
'2018-09-18T01:30:00.000000000' '2018-09-18T01:40:00.000000000'
'2018-09-18T01:50:00.000000000' '2018-09-18T02:00:00.000000000'
'2018-09-18T02:10:00.000000000' '2018-09-18T02:20:00.000000000'
'2018-09-18T02:30:00.000000000' '2018-09-18T02:40:00.000000000'
'2018-09-18T02:50:00.000000000' '2018-09-18T03:20:00.000000000'
'2018-09-18T03:30:00.000000000' '2018-09-18T03:50:00.000000000'
'2018-09-18T04:00:00.000000000' '2018-09-18T04:20:00.000000000'
'2018-09-18T05:10:00.000000000' '2018-09-18T05:20:00.000000000'
'2018-09-18T06:30:00.000000000' '2018-09-18T06:40:00.000000000'
'2018-09-18T14:00:00.000000000' '2018-09-18T14:10:00.000000000'
'2018-09-18T14:20:00.000000000' '2018-09-18T14:30:00.000000000'
'2018-09-18T14:40:00.000000000' '2018-09-18T14:50:00.000000000'
'2018-09-18T15:00:00.000000000' '2018-09-18T15:10:00.000000000'
'2018-09-18T16:30:00.000000000' '2018-09-18T16:40:00.000000000'
'2018-09-18T16:50:00.000000000' '2018-09-18T17:00:00.000000000'
'2018-09-18T17:10:00.000000000' '2018-09-18T17:40:00.000000000']
is not the same length as the number of fields.
could you please help me look at this tell me what the issue.
Hi there,
One of the sp3 files for ESA's Swarm mission (ftp://swarm-diss.eo.esa.int/Level1b/Latest_baselines/GPSxNAV/, Satellite A, file for November 26th 2013) contains the following line:
When trying to read this line with load_sp3, the datetime library complains with the following error:
ValueError: second must be in 0..59
The error is of course correct (this one file alone contains this error 64 times), so I see two options here:
Now, I know what I am going to do. So the real question becomes: would you be interested in pulling such a correction of wrong times into the georinex package, or is your position that whoever is responsible for producing sp3 files should take care of this issue, and it is not the responsibility of georinex to handle other people's mistake?
Cheers
Lasse
I am trying to read a .o file with gr.read(), but it cost me very long time >10m, can any one helps me?
Hi the file is well read, but I cannot find the receiver clock offset in the xarray.Dataset. The receiver clock offset is the number at the right of the epoch date, at the beginning of each block (see https://gage.upc.edu/sites/default/files/gLAB/HTML/Observation_Rinex_v3.01.html). Here is a sample :
High-rate data are usually available as Hatanaka-compressed files:
https://cddis.nasa.gov/archive/gnss/data/highrate/2020/288/20d/00/
As I decompress one of these files, turning it into a readable observation file (for instance, gamb288a00.20o), I get an error by simply trying to load the file; in particular, the error is usually of this type:
File "...\Python\Python39\lib\site-packages\georinex\obs2.py", line 233, in rinexsystem2
data[i, j, isv] = darr[:, k]
IndexError: index 37 is out of bounds for axis 2 with size 36
In some previous issues it has been reported that the error may arise from line 94 of obs2.py; nevertheless, even if I change that value (Nsvsys = 36) the error message does not change. Moreover, for certain high-rate observation files georinex works perfectly, so I guess there is some counting issue that I cannot detect. As of now, I've been using georinex for quite some months and I just started using it for high-rate data: I wonder if high-rate files differ in some crucial aspect, making them more likely to fail.
Python version: Python 3.9.0 64bit
Dear Michael,
I have another question. Suppose we have a mixed GPS / Galileo RINEX observation file. Both systems have as observable type C1C and L1C. Now suppose that I only to read the C1C for both systems but only the C1C signal for Galileo. How should I specify the "meas" or do I have to select the same signals for both GNSS systems if they are both available?
kind regards
Alain
Hi, @scivision Thanks for your great work on this package.
I got an error when i run python tests/test.py, I have successfully catkin_make this package.
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/wenws/pyrinex/tests/test.py", line 15, in test_obs
truth = read_hdf(str(rdir/'tests/demo.h5'),key='OBS')
File "/usr/lib/python2.7/dist-packages/pandas/io/pytables.py", line 325, in read_hdf
return f(store, True)
File "/usr/lib/python2.7/dist-packages/pandas/io/pytables.py", line 317, in
key, auto_close=auto_close, **kwargs)
File "/usr/lib/python2.7/dist-packages/pandas/io/pytables.py", line 643, in select
raise KeyError('No object named %s in the file' % key)
KeyError: 'No object named OBS in the file'
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/wenws/pyrinex/tests/test.py", line 21, in test_nav
truthnav = read_hdf(str(rdir/'tests/demo.h5'),key='NAV')
File "/usr/lib/python2.7/dist-packages/pandas/io/pytables.py", line 323, in read_hdf
store = HDFStore(path_or_buf, **kwargs)
File "/usr/lib/python2.7/dist-packages/pandas/io/pytables.py", line 398, in init
self.open(mode=mode, **kwargs)
File "/usr/lib/python2.7/dist-packages/pandas/io/pytables.py", line 549, in open
raise e
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe0 in position 0: unexpected end of data
Ran 2 tests in 0.020s
FAILED (errors=2)
Closing remaining open files:/home/wenws/pyrinex/tests/demo.h5...done_
Dear Scivision,
Your Rinex3 parser does not only read all observations, but also all lli and ssi indicators. Both come with every phase observation and are stored as floats. They take up a large share of the output xarray size.
From my experience, those indicators are irrelevant for most applications.
I propose to make the lli and ssi parsing optional to save memory and potentially also parsing time. Besides, parsing/storing them as integers would make the xarray output more consistent with the nature/definition of the indicators. Personally, I would ignore thr indicators completely.
Thanks for your hard work!
Best Regards
Volker
The time in the file is:
2018 9 23 0 2 37.63292462
Georinex is saving datetime as:
2018-9-23T00:02:37.063292 (incorrect)
instead of:
2018-9-23T00:02:37.63292 (correct)
What is stored inside georinex.to_datetime(data.time[ii]) (first element of the saved dates in sp3 file). this should equal the first date point in file above:
To fix, must multiply what is saved in microseconds by 10.
-Shaylah Mutschler
Hi,
I've found your library on Git and it's great. I've been using it for few projects I have and all is ok, but the attached RINEX file (NAV data).
All data are set to nan.
MAT100ITA_R_20203360000_01H_MN.zip
Is there any trick to use for it?
Cheers,
Gianni
I am currently working with the Rinex files from the esa, but unfortunately I cannot load any of the Rinex version 3 files in the daily directory.
Thank you very much for your help!
File:
ftp://gssc.esa.int/gnss/data/daily/2019/brdc/BRDC00IGS_R_20191330000_01D_MN.rnx.gz
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
in
29 test = 'data/gnss/data/daily/2019/brdc/BRDC00IGS_R_20191330000_01D_MN.rnx.gz'
30
---> 31 obs = gr.load(test, fast=False)
32
33
~/.local/lib/python3.7/site-packages/georinex/base.py in load(rinexfn, out, use, tlim, useindicators, meas, verbose, fast, interval)
57
58 if info['rinextype'] == 'nav':
---> 59 return rinexnav(rinexfn, outfn, use=use, tlim=tlim)
60 elif info['rinextype'] == 'obs':
61 return rinexobs(rinexfn, outfn, use=use, tlim=tlim,
~/.local/lib/python3.7/site-packages/georinex/base.py in rinexnav(fn, outfn, use, group, tlim)
130 nav = rinexnav2(fn, tlim=tlim)
131 elif int(info['version']) == 3:
--> 132 nav = rinexnav3(fn, use=use, tlim=tlim)
133 else:
134 raise LookupError(f'unknown RINEX {info} {fn}')
~/.local/lib/python3.7/site-packages/georinex/nav3.py in rinexnav3(fn, use, tlim)
101 for j, i in enumerate(svi):
102 darr[j, :] = np.genfromtxt(io.BytesIO(raws[i].encode('ascii')),
--> 103 delimiter=Lf)
104
105 # %% discard duplicated times
ValueError: could not broadcast input array from shape (29) into shape (28)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.