# KD7LMO GPS sample and sample rate nomenclature

**URL:** <https://www.ruby-forum.com/t/kd7lmo-gps-sample-and-sample-rate-nomenclature/83401>\
**Category:** GNU Radio\
**Created:** [January 25, 2007, 7:57pm UTC](https://www.ruby-forum.com/t/kd7lmo-gps-sample-and-sample-rate-nomenclature/83401 "2007-01-25T19:57:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [January 25, 2007, 7:57pm UTC](https://www.ruby-forum.com/t/kd7lmo-gps-sample-and-sample-rate-nomenclature/83401/1 "2007-01-25T19:57:44Z")

</div>

Hi,

KD7LMO provides a binary GPS recording, presumably made with the USRP  
(thank you!). It is advertised as “4msps / complex GPS Snapshot (500  
mS)”. I use these ratios to determine what the file size should be:

500e-3 seconds  
4e6 complex\_samples / second  
2 floats / complex\_sample  
32 bits / float  
1/8 bytes / bit

Multiply them all together and I get 16e6 bytes. However, KD7LMO’s file  
is 32e6 bytes large. Can someone explain the discrepancy or  
misunderstanding?

Thank you!

Chris

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [January 26, 2007, 5:06pm UTC](https://www.ruby-forum.com/t/kd7lmo-gps-sample-and-sample-rate-nomenclature/83401/2 "2007-01-26T17:06:55Z")

</div>

Either I recorded them as 64-bit floats (double) or I did the conversion  
from time in seconds to samples incorrectly. The capture script I wrote  
is located at:

[http://www.kd7lmo.net/ground\_gnuradio\_software.html](http://www.kd7lmo.net/ground_gnuradio_software.html)

The code calls the file\_sink method. I’m not sure what units/types it  
generates.

```
dst = gr.file_sink (gr.sizeof_gr_complex, filename)

head = gr.head(gr.sizeof_gr_complex, sample_count)

fg.connect(src, head, dst)

```

So the recording may be 1 seconds, instead of 500mS.

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [January 26, 2007, 7:07pm UTC](https://www.ruby-forum.com/t/kd7lmo-gps-sample-and-sample-rate-nomenclature/83401/3 "2007-01-26T19:07:25Z")

</div>

removed\_email\_address@domain.invalid wrote:

> Either I recorded them as 64-bit floats (double) or I did the conversion  
> from time in seconds to samples incorrectly. The capture script I wrote  
> is located at:

mgray,

Thanks for the response. Your script looks fine to me, but I’ll try  
running it. Perhaps you typed one second at the command prompt.

I tried to read the data as 64 bit floats, but it looked strange  
(typical values 1e13) and I quickly gave up on that.

It appears that the first 7000 samples are bad. I attached a plot of  
the mag of the first 10000. The remainder look like the last chunk on  
the plot. I still cannot acquire a signal, but I’m working on that  
(could be my fault).

BTW, I am working with gps\_4m\_complex.21Apr2005.dat

Thanks,

Chris

PS: attachment rejected by [gnu.org](http://gnu.org)

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [January 26, 2007, 8:21pm UTC](https://www.ruby-forum.com/t/kd7lmo-gps-sample-and-sample-rate-nomenclature/83401/4 "2007-01-26T20:21:38Z")

</div>

Chris S. wrote:

> PS: attachment rejected by [gnu.org](http://gnu.org)

I put it here:

[http://www.stankevitz.com/temp/samples.gif](http://www.stankevitz.com/temp/samples.gif)
