Tuesday, August 22, 2017

Realtime Tracking on a RPi3 - Update

If you read my last post, my GPS project for this summer was to get gnss-sdr working in realtime on a Raspberry Pi 3 using gnss-sdr. Unfortunately to get right to the punchline, I failed to do so. Using pybombs I built GNURadio and gnss-sdr from scratch along with dependancies that weren't in the apt archive. I tuned the Volk profiles to use the NEON extensions, but my flowgraph suffered from overflows. I tried eliminating the prefiltering and reducing the doppler shift range in the acquisition block and was able to nearly get rid of overflows but by then the doppler range was so small as to not acquire satellites!

I still think I may be doing something wrong. Carles, Javier and others from CTTC in Spain wrote a paper where they document the performance of several platforms including the Raspberry Pi 3. They were able to correlate 6-7 satellites. I was unable to replicate, but there were several confounders. Namely, they used a USRP over network connection whereas I was using a RTLSDR over USB. They are using different source blocks (UHD vs. osmocom) different physical hardware/drivers (Ethernet vs. USB) and it is difficult to tease out the actual culprit.

So, I tried using the first generation Intel Compute Stick we use for the data logging on flight. Like the Raspberry Pi, I had to build GNURadio and gnss-sdr from scratch (it comes loaded with Ubuntu 14.04 and the apt packages don't exist until 16.04) but it only took about 8 hours to complete with two cores. I did disable unit tests when compiling gnss-sdr as gcc would get hung up during unit test compilation (ran out of physical memory and swap, 1GB each). When I first ran it overflowed but just barely. Removing the prefilter and it worked great with four satellites. And five. And six. Seven caused overflows and it couldn't hold a track, so six satellites it is.

The plan is to track a GPS fix in flight sometime in the near future. This platform is acceptable, but barely.  Four satellites are the bare minimum to get a fix, but more is better as it improves the quality of the fix (the root-sum-square [RSS] of the satellites minimizes the influence of a 'bad' invidiual satellite fix). Also in flight during long durations/distances the view in the sky will change and you will necessarily lose satellites and gain new satellies. The process of losing multiple satellites (>2) means you completely lose your fix. Losing 1-2 would merely lose precision. Ideally you can track 8-11 satellites with a good view of the sky.

So, do we stick with the Intel Compute stick or try something a little more computationally advanced? Stay tuned...


  1. Hello Philip

    Could you please share your gnss-sdr config file? I'm trying to get a GPS fix using RPi3 and AirSpy but I'm just getting too many overflows.

    1. Sorry for the late reply - that is the problem I also had, overflows on RPi. I could not get around this.

  2. This comment has been removed by a blog administrator.