Thursday, August 25, 2016

SoftGNSS w/5 Satellites

I fixed a few small bugs and added a few features. In addition, I played around with skipping the initial few milliseconds of sample time and I'm now able to get a fix with five satellites. This gets a better fix and removes the noise we saw in the last post. We now get a pretty clean trajectory without the 'jitter' until after apogee where the nose cone deploys and the radio is dangling under drogue.

The speed of sound is 343 m/sec at sea level; the flight briefly but clearly passed the speed of sound. 

I posted my fork of the SoftGNSS code on GitHub so you can attempt to reconstruct the flight for yourself and play with the data. You can also look at other data sources. I'm sure there are still improvements to be made, but the code is usable. The code requires Matlab. To use,
  1. cd to \SoftGNSS\GNSS_SDR
  2. edit initSettings.m, line 60 to point to the data file (you can download it here, 1.3GB)
  3. run 'init'
This code is flexible enough to work with a variety of file formats; a close inspection of initSettings will show you the options you can play with. The Matlab documentation for fread will provide insight into which format type to use for different data types. Experiment boldly!

One thing I haven't teased out yet: The number of satellites acquired varies depending on the number of bytes skipped. A small jump in a file will change the number of satellites seen, which shouldn't happen, barring a satellite moving out of the visible horizon, but in this case I can step through the file every couple of milliseconds and see satellites come and go. My first instinct is to suspect this is due to automatic gain control (AGC) and changes in the AGC may influence whether or not you pick up the weaker satellites. I don't know for sure; it may also be the way the satellite search is performed, but it's something I'd like to tease out in the near future. 


  1. man damn. your blog is so is may of 2017 and you are not updating your blog yet. hoping to hear from you soon

  2. I downloaded your code and samples, but couldn't get the same result as you show here........ Is there potential errors I've made? Could anyone help me out?