Converting raw receiver data to standard text format using CONVBIN

At this point, we have collected raw receiver output data in a Ublox binary format file. We need to convert this to RINEX format before RTKLIB will process it. RINEX (Receiver Independent Exchange Format) is a standard text data format supported by many receivers and post‐processing analysis software.

This can be done with RTKCONV, the GUI conversion program in RTKLIB, but I prefer to use CONVBIN, the CUI version.  To avoid having to remember the exact command format, I automate the call with a simple matlab wrapper. To convert binary data from a file named “testdata.ubx” the format of the command to CONVBIN will look like this:

convbin -od -os -oi -ot -f 1 -ts 2015/12/14 17:25:00 -te 2015/12/14 18:25:00 testdata.ubx

The command line options are all well documented in the RTKLIB user manual and there are many I am not using but here’s a brief explanation of the options I am using:

-od: include doppler frequency data in observation output file

-os: include SNR data in observation output file

-oi: include iono correction in nav output file header

-ot: include time correction in nav output file header

-f 1: one frequency (L1 only)

-ts: start time

-te: end time

I leave off the start time and end time options when I choose to process the complete file.

The output of this command will be a set of text files. The .obs file contains the observation data which in this case is the pseudorange, carrier phase, doppler, and SNR from each satellite for each epoch. The start of this file should look something like this:


The top section is the file header, followed by a timedate stamp and list of satellites for the first epoch. After that is a list of pseudorange, carrier phase, doppler, and SNR numbers for five satellites from the first epoch, each row being one satellite. See here for a complete description for the RINEX observation file data format.

There will also be a .nav file containing navigation data for the GPS satellites, a .gnav file for GLONASS navigation data, a .hnav file for geosynchronous satellite navigation data and a .sbs file containing SBAS correction data. All of these files are in text format and we will need most, if not all of them, as inputs to generate position data.

The data is now in a standard format that can be processed by RTKLIB to determine position.


17 thoughts on “Converting raw receiver data to standard text format using CONVBIN”

  1. Hi all,

    I am trying to convert some *.ubx files into rinex with RTKLIB v2.4.2 p10 and I have noticed some strange things. The antenna is connected with an ublox receiver and a commercial one with a splitter, so I have the “same” measurements in both receivers. Comparing both rinex files, I see there are some differences in the pseudoranges (I know the noise is different, but this does not explain the difference). An other strange thing is that I cannot load the rinex file from ublox in a commercial GNSS software (Leica Geo Office, Topcon tolls etc.)


    1. Hi Nikos. The pseudorange measurements are not just a measurement of distance to the satellite but also include a significant offset due to errors in the receiver clock. Your two receivers will have different clock errors and hence different pseudorange measurements.

      RTKLIB can generate different versions of RINEX files. Is it possible that your GNSS software is expecting a different version than you are generating with RTKLIB? The RINEX version number is in the file header so you can look at the version number of a file that the software does accept.


  2. Hi Tim. First, as many have said, thank you for all the work you are putting into maintaining this site. Great for beginners and advanced users alike. Now, to the problem at hand. Let me say I haven’t clue what I am doing but am trying to follow along your examples in this and the previous post using an M8N. I am able to run strsvr and collect data (about 500k). So far so good. I then used your command line slightly modified:

    convbin -od -os -oi -ot -f 1 -ts 2017/10/17 19:24:00 -te 2017/10/17 19:25:30 rtkTest3.ubx

    Starts out looking ok but at the end I get a E=1 (which I assume is an error) and no files are created.
    input file : rtkTest3.ubx (u-blox)
    ->rinex obs : .\rtkTest3.obs
    ->rinex nav : .\rtkTest3.nav
    ->rinex gnav: .\rtkTest3.gnav
    ->rinex hnav: .\rtkTest3.hnav
    ->rinex qnav: .\rtkTest3.qnav
    ->rinex lnav: .\rtkTest3.lnav
    ->sbas log : .\

    I did try rtkconv as well with the same results and playing around with different settings since I have galielo, glonas, gps selected.

    Any help for a newbie would be appreciated.



    1. Ok I may not have v2.01, I may have updated:
      Software Version: EXT CORE 3.01 (107900)
      ROM BASE: 2.01
      FWVER =SPG3.01
      Anybody have v2.01?


      1. Downgraded to 2.01 and everything looks ok with config at 2.01. Now when I create the file no messages but no conversion files are created. What in the world am I doing wrong.

        Ok. Was using 2.4.2 with this new file. When I use rtkconv from your demo5 it works but it only created a obs file – only ran it for about 2 seconds of data just as a test. Maybe now need more data.


  3. First, thanks for your wonderful blog and its wealth of useful information. I am seeing similar problems to Syed. If I capture raw UBX from my LEA-6T for 1 day from 2017-10-03 15:00, my converted RINEX file with convbin/RTKCONV contains datetimes spanning 2017-09-30 to 2017-10-21 (!) mixed together. This cause the post-processing services (I’m using NRC’s PPP service which is happy with L1-only data) to throw it back with ‘Error : An out-of-order data block was found in your RINEX file. Ensure time tags of observations are in proper increasing order.’


      1. Hi Tim. I got your file and it looks like you had both RXMRAW and TRKD5 messages enabled when you collected this data. This will give you a double set of observations and cause all sorts of problems. Disabling the TRKD5 messages in your receiver configuration will fix the problem. I verified that if I modified the RTKLIB ublox.c file to ignore the TRKD5 messages, then the resulting Rinex file looked good.


  4. Hi, I have a question about RTKCONV tool from RTKLIB. When i convert RTCM3 file to RINEX 2.11 using this tool, the output RINEX observation file is not be able to be processed by softwares like NRCAN PPP, GLAB, GAPS, AUSPOS 2.2 etc. The error message which i receive are following

    AUSPOS has detected an error in the data you have submitted for processing. Please check you data is in the correct RINEX format required for processing an AUSPOS job.
    CSRS-PPP online was unable to process your submitted RINEX file. Most likely causes are bad data, bad satellite identification or time tag problems.

    But when i use another RINEX file from receivers which generate RINEX files by themselves, these softwares are working totally fine.

    Please let me know your view about resolving this issue?
    Thanks and best regards,


    1. Hi Syed. I have not tried converting RTCM3 files to RINEX 2.11 for online PPP processing, but I have converted raw binary files from both Swift and Tersus receivers to RINEX 2.11 using RTKCONV and have not had a problem submitting these to any of the online PPP processing tools. Are you submitting dual freq observation files or single freq? I have found that some of the online PPP tools will reject files if they don’t have any L2 observations. Also, do your RINEX files have valid approximate base positions in the header. I have seen this cause problems if it is missing, although not specifically for online PPP processing.


      1. Thanks for your message, The Rinex files are dual frequency KINEMATIC file. My RINEX files do not have base positions and are set to 0. Today, i changed it to approx x,y,z values and post processed it using NRCAN PPP online, still i got an error message saying.

        “Error : CSRS-PPP online was unable to process your submitted RINEX file. Most likely causes are bad data, bad satellite identification or time tag problems.”

        I am not sure why the there is such error. Please guide me about this


  5. Hi,

    I’m doing an experiment for gps tracking of an animal using a base and a rover. I want to use the data for rtklib post-processing. I understand I need carrier phase, psuedorange and raw data. I’m using the C94-M8P which has a NEO-M8P GPS module on it. I am not making use of the RTK functionality, I just want to log the data and do post processing. I was just wondering if you could assist me or at least guide me in the right direction on how to do this. I’m logging the data from the base and rover to an SD card. I need to know what messages to send to the SD card. When configuring the devices in u-center, what messages must I send? Will the UBX-RAW messages contain all the information I need for the rover? Also I know that I need a RINEX log file for the rover, and RINEX and NAV files from the base. I assume for rinex I just need carrier phase, psuedorange and raw data, but what is the navigation file comprised of?

    I hope this was clear!


    1. Hi James. I have not used the M8P and so am not certain on the answer. With the M8T you want to enable the RXM-RAWX and RXM-SFRBX messages but the u-blox documentation suggests these may only be available for the timing modules. I see comments on the u-blox board though that suggest the M8P may support these commands. If that is not true, then you will probably need to enable the RTCM3 messages for raw measurements and navigation data. There is some discussion of this on the u-blox forum that may help. Either way you will need both raw measurements and navigation data. The navigation data includes the necessary orbital information for the satellites.


    2. Hi James,

      I may be able to help you. Currently i am working for a GPS company where we use M8P and RTK lib. Personally i am quite interested in animal tracking applications, so i could give you support for this. UBlox receiver will contain all the information which will be then converted to RINEX format using RTK LIB.
      RINEX NAvigation file comprises of all the satellites that are visible to the receiver for example constellation type, clock parameters etc. In short RINEX Navigation files allows a receiver with info about correct positions of all satellites and time tag information. Even if you do not have Navigation file, another solution is available which is PPP.

      As i am very interested in animal tracking applications, i can help you with further if you are interested. Let me know.


  6. Hi Sir,
    I repeated your experiment with this article.
    But some problem have occured.
    Thank you

    qyh@qyh-ThinkPad-T450:~/uav/rtklib-dx/RTKLIB-b27$ convbin -od -os -oi -ot -f 1 COM5_170617_120649.ubx
    input file : COM5_170617_120649.ubx (u-blox)
    ->rinex obs : COM5_170617_120649.obs
    ->rinex nav : COM5_170617_120649.nav
    ->rinex gnav: COM5_170617_120649.gnav
    ->rinex hnav: COM5_170617_120649.hnav
    ->rinex qnav: COM5_170617_120649.qnav
    ->rinex lnav: COM5_170617_120649.lnav
    ->sbas log :

    Segmentation fault (core dumped)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s