No shortcuts. Work for it.

FPGA-based software GNSS receiver: Tracking issues (Progress Update 1)

Mini-update (01.10.2018): DATASET2** has 8 sample bits packed in bytes which the MATLAB receiver doesn’t like to deal with – even if you specify the data type as ubit1. Best way forward would be to write a script to separate out the bits and create a new data file. (I wrote a C-based converter to take hex values converts it to bits and stores it as individual samples in an int8 format. That seems to work with the receiver.)

My last post talked about how tracking occured periodically. After extensive debugging I found out that the input GPS signal data stream lost about 3 sample bits everytime I would switch between FIFOs (I have two FIFOs acting like ping-pong buffers). In retrospect it is probably not the way to design input buffer streams. Also the test bench I wrote for testing FIFOs would have never caught the problem/bug (now I know).

My new tracking plots look like this (Figure 1):


Figure 1: Tracking results

As you know ideally all the power should appear in the I arm only. This is not the case according to the results.


Figure 1: DLL and FLL discriminator errors

I implemented a Costas loop according to the design and parameters in Scott Gleason’s software receiver. The hardware accumulators pass the values to the microprocessor/ARM every 5ms for tracking loop corrections. So the update to the tracking loops occurs every 5ms or so. Changing filter constants didn’t help my case at all either.

As a different approach to this, I used a DMA to collect about 256 ms of 1-bit GPS data and processed it with various software receivers.

With Kai Borre’s receiver, it acquires the satellites but can’t track them. (I wonder if it is the data format… I do specifiy the data type to be ‘ubit1’ though.)

I tested with my own software receiver and observed the same results, can acquire but can’t track.

Figure 4 below are the ideal results… and Figure 5 is what happens when I process 1-bit GPS data with the same receiver.


Figure 4: Tracking result using Kai Borre’s software receiver (2-bit GPS signal) (DATASET1*)


Figure 5: Tracking result using Kai Borre’s software receiver (1-bit GPS signal) (DATASET2**)

I’m starting to think it is something to do with the dataset itself!

I found a 1-bit GPS dataset online here (DATASET2**). The two software receivers behave similarly. Acquire but don’t track. I think there’s something I’m definitely missing… related to the format perhaps?

DATASET1* GPSdata-DiscreteComponents-fs38_192-if9_55.bin

DATASET2** see link.

DATASET3 (click to download from Google Drive)

[DATASET3 is a short 256ms long 1-bit GPS L1 dataset where each sample is of the type int8, sampling frequency: 16.368 MHz, IF: 4.092 MHz, satellites present: 1, 5, 11, 12, 17, 30]

DATASET4 (click to download from Google Drive)

[DATASET4 is a 500 ms long 1-bit GPS L1 dataset where each sample is of the type int8, sampling frequency: 16.368 MHz, IF: 4.092 MHz, satellites present: 1, 11, 14, 17, 19, 20, 22, 30]

Note: A big thank you to Michele Bavaro for taking interest and providing some suggestions that indeed helped me move ahead (onto the next problem!).




  1. Thanks for the thanks Surabhi 🙂

    I can help with this, I like binary files and I have a lot of tools of my own to find out what’s going on with your file. Also, cracking IF datasets is a bit of a passion of mine (surprisingly I know other people with this illness).

    For a start, tracking is nothing more than a lighter acquisition really. Since your acquisition works, try acquiring at equally spaced positions in the file (e.g. at 10 ms intervals). You should see that the Doppler effect is consistent between code and carrier (1/1540 on GPS L1C/A).
    And be wary of 1-bit files, not all the computers treat them the same way. I suggest you move away from that compressed format asap and go to bytes (int8_t) or interleaved bytes if complex.

    • surabhig

      September 28, 2018 at 4:00 pm

      Thank you for your time Michele!
      I just added DATASET3 which is a short dataset, may or may not be enough for smooth tracking. (I’m working on collecting a longer duration dataset). If you do use it with your magic tools please let me know if you see something suspicious, I’d really appreciate it. I’m glad it is your passion! I think I’m getting there quite fast myself.
      I agree with your point about repeating acquisition at regular intervals and observing the Doppler effect. I’ll get working on that and let you know how it goes.
      When collecting data I packed GPS signal bits into a set of 32 which is then transmitted to the RAM. I wrote a MATLAB script to seperate out all the individual samples which was then saved in a bin file as 0/1 with the data type int8. I used this final .bin file with the software receivers. Please let me know what you think. Thanks again.

Leave a Reply

© 2019

Theme by Anders NorenUp ↑