In the last post we used the RTKPOST GUI to generate a kinematic position solution using “ebay.obs” for the rover data and “zdv13480.15o” for the base station data. To do the equivalent run from RNX2RTKP we use the following command line, run from the folder containing the data files.
rnx2rtkp -k test1.conf -o out.pos ebay.obs zdv13480.15o ebay.nav
The -k option is to specify the configuration file, the -o option is the output file. In this case we use the configuration file we saved from RTKPOST in the previous post.
To plot the calculated solution use the following command line:
This calls up the same plot GUI we previously accessed by clicking on the “Plot” button in the RTKPOST GUI.
The plots should be identical between this solution and the previous solution generated with RTKPOST.
To keep track of changes between various runs with the same data, I use a matlab wrapper to create a sub-folder, copy the config file, trace file, stats file, and result file to that sub-folder, input a short description of the run, and also save that to the sub-folder.
28 thoughts on “Kinematic solution with RNX2RTKP”
Hello I am running RNX2RTKP and I’m getting a malloc error in addobsdata but I don’t get it when running RTKPost. I’m using the same obs, eph and reference station data files and I saved the conf file when I run RTKPost. I hate to bother you but maybe you could just tell me where you’d start looking if you had this problem? Thank you!
My guess is that your observation files are very large and you are running out of memory but I don’t know why you are seeing this in RNX2RTKP and not RTKPOST. Is it possible that you had less system resources available when running RNX2RTKP due to use by other apps? If you send me your obs and nav files to firstname.lastname@example.org I can take a quick look to see if I can duplicate the problem.
Thank you for getting back to me. It turns out that I only get the error when I run rnx2rtkp that I compiled with VS 2019. I don’t get the error with the release version I download that’s dated 09/25/2022 so I’m guessing it’s in my compiler options? I’m still looking into it but I also see a difference between rnx2rtkp and rtkpost in the frequency options. I don’t think I can select L1+2+3+4+5 with rnx2rtkp.
Hi Tim, Am hoping you have time to comment on the following?
I am building an app which uses rnx2rtkp as a DLL. I have a Rover OBS file which goes from 09:41:19 (UTC) to 10:05:30 and four Rover NAV files too. I have two CORS OBS files from a basestation; one goes from 09:00:00 to 09:59:30, the second goes from 10:00:00 to 10:59:30.
When I use a wildcard for the CORS basestation files in RTKPOST I get a result with 2857 Q=2 points, going to 10:05:12 (I figure somewhere I have a UTC vs GPST thing, losing me 18 secs)
When I use a wildcard for the CORS basestation files in RNX2RTKP, with the same configuration file, I get a result with 2183 Q=1 points, going to 09:59:12.
So I have lower quality and fewer points
I can see from the trace that it has failed to wake up and smell the coffee which is the SECOND CORS basestation OBS file (I see MANY “2 10:00:01.00: age of differential error (age=31.0)” errors, with the ages corresponding to time since end of first FIRST CORS basestation OBS file).
I can see 7 files in debug (Rover OBS, CORS basestation OBS x2, Rover NAV x4) which seems correct
Can you suggest a setting or approach which will help me out here? How do I make it realise that my Rover files straddle the hour, so I need TWO basestation files? Any feedback much appreciated
Thanks in advance
I tried to duplicate your issue with my own data but got consistent results with one or two base files for both RNX2RTKP and RTKPOST. If you can send me your data files and config file to email@example.com, I will take a look.
Thanks for the effort you’ve put in and for this very kind offer. I’ll put something coherent together and email you, with gratitude 🙂
Follow up on this issue for other users:
This is only an issue in linux which is why I wasn’t initially able to duplicate the problem.
I wasn’t aware of this till now because I do almost all my work in Windows, but it looks like in linux you need to put the command line arguments in quotes to prevent the wildcards from being expanded by the operating system. When this happens it confuses RTKLIB since it is expecting the unexpanded wild cards.
If I run the code like this, I see the issue:
./rnx2rtkp -x 0 -k ppk.conf -o rnx2rtkp.pos *.obs *.22o *.nav
but if I change it to :
./rnx2rtkp -x 0 -k ppk.conf -o rnx2rtkp.pos “.obs” “.22o” “*.nav”
then it runs fine.
Thx for your help! rtklibexplorer, recently I would like to read the *.pos file in matlab so I can combine it with my IMU data. Unfortunately, I did not find any function online, do you have any idea about that?
Hi Jeremy. The RTKLIB *.pos files are in basic csv format so you should be able to write a very simple MATLAB or python script to parse them.
Hi Tim, I am using RTKLIB compiled from one of your post for linux. I am running it on Ubuntu 20.04 and I an trying to use RNX2RTKP. I do not have base station data, only rover data, in the .20O format. I would also like to use clk and orbit files (sp3). I am using the config file that I saved from running RTKPOST in a windows computer, so I am just trying to reproduce the results in a linux computer from the command line. what would be the line to execute this?
I have been reading your posts and they are very helpful, but for this specif situation I would appreciate some input!
I ran rnx2rtkp -k greenhouse.conf -o out.pos GSDR10_23.20O brdc2970.20n and it seem to be given me a solution (Q=5 most of them) when i try runing rtkplot out.pos it tells me rtkplot command not found. I have to mention that when i tried running the GUI to do the exact same thing I got and error for the rtkplot_qt and didn’t plot my solution.
Hi Maria. If you are running a PPP solution with precise ephemeris and clock enabled, you will need to include the .sp3 and .clk files on the command line. The RtKLIB Qt files are no longer supported in either the official 2.4.3 or demo5 versions of RTKLIB and will probably be removed in the near future.
Hi Maria. If you only have rover data, I am assuming you are running a PPP solution, not a PPK solution, since you need base station data for a PPK solution. If you got a successful solution with RTKPOST in windows, you should be able to get the same result from RNX2RTKP in linux by using the config file you saved from RTKPOST. “rnx2rtkp -help” will give you instructions for how to run rnx2rtkp for your case. For more details see the RTKLIB manual, either the 2.4.2 or the demo5 version.
First of all, thanks for these detailed tuto, they’re really helpful!
I’m currently working on a script that can post process my gnss data by retrieving automatically rinex data from French public antennas, and use Rtklib rnx2rktp.
I exported the configuration file from the GUI, and used the -k option. For some reason, I can’t get the same results using the command line than those I got using RTKPost (command line results tend to be slightly worse). Did you ever experience such an issue?
Thank you for your feedback!
Best wishes for 2021!
Hi Laurent. The internal RTKLIB code for RNX2RTKP and RTKPOST are shared. It’s only the interface code that is different so the two solutions should be identical if the inputs and config parameters are the same. I would suggest doing a file compare between the two solution file header to see if there are any differences there. If not, you can enable debug trace with level 3 and compare the two debug trace files. If there are any differences, it is likely they will appear here.
Hi, I can’t find the data files in the link provided.
Hi Roberto. Sorry, I don’t know what happened to that data but I have updated the post with a link to similar sample GPS data on my rtkexplorer.com website.
Dear Rtklibexplorer how the variable is used to correctly enter the start and end time of an observation (-ts ds = 2019/09/05 ts = 19: 11: 56 -te of = 2019/09/05 te = 19: 13: 38 ) it gives me an error.
Thank you and very good contributions
Hi Gabriel. The correct form for start and end time options is “-ts ds ts” and “-te de te”. For example, to set the start observation you would use something in the form of “-ts 2019/09/19 15:06:00”. You can also get this information from the RTKLIB manual or by using the ? option in the command line (e.g. “rnx2rtkp ?”).
Thank you very much for your answer, I was writing the sentence wrong, and I was able to create static solutions for point.
-ts 2019/09/05 19:11:56 -te 2019/09/05 19:13:56
Do you have some sample data to download? I want to learn how to PPK, but i don’t have the equipment, just want to know how to use RNX2RTKP
Hi Lucas. I have sample data available for download as well as tutorials on getting started with RTKLIB available on my rtkexplorer.com website
I’m using the command line from the post ( rnx2rtkp -k test1.conf -o out.pos ebay.obs zdv13480.15o ebay.nav) to process a static solution with CORS data, even if rnx2rtkp giveme a result, is it the correct way to do it ? is it possible ta add more data from the CORS server to get a better or correct result ? (.SP3 files, GPS
Hi Francklin. If the base and rover are relatively close to each other, then orbital and atmospheric errors will mostly cancel out in the double differencing that is part of the solution process. In this case, the additional information in the files available from the CORS server will generally not help much. If your baselines are longer (say greater than 20 km) you may find using these files does improve the solution.
Very impressed by the work done. Nice and very well documented blog.
About antennas and the JB note, you may be know already that that we could have an image of your antenna SNR in the $GLGSV line. in the 7th parameter. Could be a good point to look at, when comparing antenna in the different test.
On my test, an inbuilt antenna for a small M8N 35*35 give around S1 =35/38 , with a 50*50mm I have roughly 42 , and with the external antenna supplied with the C94-M8P , I acheive around 50 for S1 . I will also soon test the TW3740
For start, let me apologize for my basic english and thank you for your blog, it’s really good.
I have a problem using rnx2rtkp with a .bat file and it would be great if you can help me. Actually, my problem appears when I try the kinematic and the differential mode in the option menu. When I run my .bat file, everything works, the options are correct but when I inspect the .pos files, I see that the time start, the time end and the time interval are not similar that in my .obs file. Furthermore, if I use rtkpost instead with the same .obs file and .nav file, this time I have everything that is correct. Unfortunatly, I have a lot of files to convert in .pos so I can’t do it with rtkpost for everyone of them. Last detail, if this time I use rnx2rtkp but with the single mode, this time also I have everything good. I hope you will be able to help me.
Hi Dan. If rtkpost is working for you, then you should be able to save the config file from the options menu (in rtkpost) and use that with rnx2rtkp. If that doesn’t work then all I can do is suggest the same I did for Alessandro. Start simple and work up. It’s probably something simple that isn’t right (otherwise it wouldn’t work in rtkpost). Enabling the trace output will often help find these kind of problems.
I will try that, thank you again.