New b27 release of demo5 code

I’ve just released a b27  version of the demo5 code that incorporates all the changes in the b27 release of the official code.  I’ve also included some fixes for the Galileo satellites.  The biggest fix I added was for an array overrun that was causing solutions to intermittently report zero status when Galileo satellites were enabled.  Another fix was to correctly decode the range accuracy estimates in the Galileo ephemeris data.  The code can be downloaded from the code download section of the website.   The source code is available in my Github repository.  Please let me know if you find any issues with this code, especially if it was something that was working in the previous code.

One issue I am aware of is the time tag feature which enables simulated real-time runs in RTKNAVI appears to be broken in the new code.  There was an existing incompatibility  between time-tag files that were created in the win32 version of RTKLIB and run in the win64 version or vice-versa.   It looks like an attempt to fix this in the latest release code actually made things worse and now the time-tag files don’t work at all, at least in the win32 version.

By the way, for anyone using the free starter edition of the Embarcadero compiler, be aware that it does not support building win64 executables.  The code will build, but the option to specify win64 is not available, so the compiler will just build the win32 code.  I hadn’t realized this until I tried to build the win64 version recently.

Also, I’ve recently got a hold of two low cost dual frequency receivers, one from Swift Navigation and one from Tersus, so I am collecting and analyzing data with them now.  I should have some results and comparisons to share in my next post soon.

New Github Branch: Demo2


I have created a new Github branch in my repository and called it demo2.  It includes the code and configuration changes as well as the data from the two sets of kayaking data in the last few posts.

Specifically it includes the following modifications from demo1:


Both data sets are in the rtklib\data\demo2 folder. Fore1.ubx and Aft1.ubx are the first data set. Fore2.ubx and Aft2.ubx are the second data set. Note that both data sets have 5 samples per second. In demo1, the data had only 1 sample per second. This will affect any input configuration parameter that has units of counts, since generally the time periods should not be dependent on the sample rate. The receiver is actually sampling at a much higher rate than the output so, in general, increasing the output sample rate should only increase the resolution of the data, not the precision or accuracy.


  • Added an additional position variance constraint for fix-and-hold to avoid erroneous holds occurring before the kalman filter has had time to converge as described in the previous post.
  • Updated the writes to the trace file to make the trace output more meaningful for my experiments

Configuration File:

  • pos2-arthres: 0.999 → .002 ( variance threshold, the original value was unused)
  • pos2-arlockcnt: 30 → 150 (Both values are 30 secs, different sample rates)
  • pos2-arminfix 10 → 100 (10 sec → 20 sec)
  • pos2-minfixsats 4 → 5   (minimum valid satellites for fix)
  • pos2-minholdsats 5 → 6  (minimum valid satellites for hold)
  • remove unused parameters (arthres2, arthres3, arthres3, armaxiter)

I’m always interested in other people’s experiences. Please leave a comment if you find other interesting observations with this data or code or configuration changes, or if you have any questions about them.

RTKLIB: Code comments + new Github repository

If you’ve spent any time perusing the RTKLIB source code you will surely be aware that it is very much what I would call “old-school” code. Comments are sparse and variable names tend to be short and not always very descriptive. The upside is that the code is quite compact, significant pieces of it can be seen on a single page which can sometimes be quite nice. The downside is it can be difficult to follow if you have not been poring over it for a long time. To help myself understand the code I have added a fair bit of commenting to most of the code used to calculate the carrier-phase solution, which is really the heart of the RTKLIB kinematic solution.  This is mostly in the rtkpos.c file.

The changes are too extensive to spell out here so I have forked the RTKLIB code in Github and posted my commented code there. If you are interested, you can download it from the demo1 branch at  

All the previous code changes are also there as well as a couple I have not yet posted about.  The receiver data I have been using for these posts is also there in the rtklib/data/demo1 folder.  The solution file updates for VS2010 c++ are in the rtklib/app/rnx2rtkp/msc folder and the modified executable is in the rtklib/bin folder.