Giter Club home page Giter Club logo

rtklib-py's Introduction

rtklib-py : A python subset of RTKLIB for PPK solutions

What is rtklib-py?:

Rtklib-py is a free and open source subset of RTKLIB written in Python. It was originally based on CSSRlib but has been rewritten to align very closely with the demo5 version of RTKLIB. It currently supports only PPK solutions using GPS, GLonass, and Galileo constellations. It supports most but not all options available in PPK solutions in RTKLIB and produces solutions very similar but not identical to the RTKLIB solutions. Debug trace is supported and trace level 3 messages are aligned to closely match the demo5 RTKLIB messages. Funtction names, comments, and variables are also closely aligned to the demo5 RTKLIB code.

How to use:

Run_ppk.py is the top level script to run a PPK solution. The rtklib-py package includes two sample data sets, one is a u-blox F9P rover mounted on the roof of a car, the second is a data set from the 2021 Google Smartphone Decimeter Challenge. Run_ppk.py is configured to generate a solution for the u-blox data set but includes commented out lines to run the GSDC example. Config parameters are in config_f9p.py and config_phone.py and align closely to the config parameters in RTKLIB.

Purpose:

This code is not meant to be a replacement for RTKLIB but as a tool to either:

  1. Use as a "map" to explore the inner details of how RTKLIB works
  2. Use as a development environment to experiment with enhancements or adjustments to the RTKLIB algorithms. Due to the close alignment between the two packages, these can then be fairly easily ported to the C/C++ version of RTKLIB. In particular it is hoped that it will be useful to competitors in the Google Smartphone Decimeter Challenge.
  3. Pieces of this code can be cut and paste into more custom solutions

rtklib-py's People

Contributors

rtklibexplorer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rtklib-py's Issues

Index out of bound in rinex.py

when running with smartphone-decimeter-2022 test data for 2021-08-12-US-MTV-1/GooglePixel4

stack trace as follows:
/tmp/ipykernel_123/834946508.py in
140 # run sequentially, use for debug
141 for input in ppkIn:
--> 142 run_ppk(input[0],input[1],input[2],input[3],input[4])

/tmp/ipykernel_123/834946508.py in run_ppk(folder, rovfile, basefile, navfile, solfile)
93 # load nav data from rover obs
94 print(' Reading nav data...')
---> 95 rov.decode_nav(navfile, nav)
96
97 # calculate solution

/kaggle/working/rinex.py in decode_nav(self, navfile, nav)
170 acc[1] = self.flt(line, 2)
171 geph.frq = self.flt(line, 3)
--> 172 nav.glofrq[sat - uGNSS.GPSMAX - 1] = int(geph.frq)
173
174 line = fnav.readline() #11:14

IndexError: index 27 is out of bounds for axis 0 with size 27

Index out of bound exception when the library tries to parse base station observation data in rinex 3.03

Hi. When I execute run_ppk.py on my input data in rinex 3.03 format, the library throws index out of bound exception when it tries to parse base station observation data in rinex 3.03, even though the same input files can be parsed correctly RTKLIB or other tools.

Exception message

Traceback (most recent call last):
  File ".../src/run_ppk.py", line 82, in <module>
    base.decode_obsfile(nav, basefile, None)
  File ".../src/rinex.py", line 321, in decode_obsfile
    self.decode_obs(nav, maxepoch)
  File .../src/rinex.py", line 292, in decode_obs
    obs.L[n, f] = float(obs_)
IndexError: index 2 is out of bounds for axis 1 with size 2

How to reproduce

The exception can be reproduced with the input files below (attached in a zip file)
receiver and base data.zip

  • rectangle_walk.22o is the rover observatoin data
  • DRAO00CAN_R_20220160000_01D_MN.rnx is the base station navigation data
  • DRAO00CAN_R_20220160000_01D_30S_MO.rnx is the base station observation data
  • The config file is the same as config_f9p.py because this file matches my settings in rtklib.

All observatoin data and navigation data are in rinex 3.03 format

The base station data is pulled from Canadian Active Control System (CACS). These are public base stations managed by government. I use base station close to British Columbia, Canada.

My investigation so far

When the library is parsing the body of base station observation data, it loops throughrange(self.nsig[sys]) using the following code

                for i in range(self.nsig[sys]):
....
                    f = i // (self.nsig[sys] // self.nband[sys])
                    if self.typeid[sys][i] == 0:  # code
                        obs.P[n, f] = float(obs_)
....

The index out of bound exception is thrown when

i = 13
self.nsig[sys] = 20
self.nband[sys] = 6
f = 2

obs.P only has 2 columns, so f =2 triggers index out of bound exception

I didn't figure out why this line compute f in this way

f = i // (self.nsig[sys] // self.nband[sys])

https://github.com/rtklibexplorer/rtklib-py/blob/main/src/rinex.py#L284

Generate RINEX from UBX

Hi, I have a question regarding this library. I have developed a program in Python that establishes a connection with an EVK-M8T ublox receiver, sends configuration messages to receive RAWX and SFRBX type messages, and then collects the received stream of bytes into a .ubx file (removing NMEA sentences and putting only UBX messages). I would like to be able to generate RINEX files from this file that I generate by collecting the bytes that arrive using the library. is it possible to do this? I have some questions about this, in case it is possible:

  • Is the UBX file that contains the stream okay like this?
  • is it possible to generate the .XXo RINEX observations file (where XX is the year of observation) and get several RINEX files for the navigations, one per constellation (for example: .XXn for GPS, .XXg for GLONASS, .XXe for Galileo)?
  • Is it possibile to choose the RINEX version (3.01 or 3.05)?

If this library is not for me, how could I do it?
I apologize in advance for the triviality of my question, but I really have very little experience in this area. Thank you very much in advance.

bug report

F:\RTKLIB\rtklib-python-ppk\src>run_ppk.py "
Traceback (most recent call last):
File "F:\RTKLIB\rtklib-python-ppk\src\run_ppk.py", line 35, in
import __ppk_config as cfg
File "F:\RTKLIB\rtklib-python-ppk\src__ppk_config.py", line 3, in
from rtkcmn import uGNSS, rSIG
File "F:\RTKLIB\rtklib-python-ppk\src\rtkcmn.py", line 11, in
import numpy as np
ModuleNotFoundError: No module named 'numpy'

BDS

Hello, if I want to add the BDS to the solution, what adjustments need to be made to the code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.