blob: defff002459fb3d229a2cb97050e7472c6545dd4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#!/usr/bin/env python
# $Id: file_gssm.py,v 1.3 2007-07-07 16:31:44 jl Exp $
from gnuradio import gr, usrp, db_dbs_rx, blks
from gnuradio.blksimpl import gmsk
import gssm
import sys
#sps = 1000e3
usrp_rate = 64e6
decim_rate = 112
sps = usrp_rate / decim_rate
gsm_rate = 1625000.0 / 6.0
#xcf = 150e3
#xtw = 50e3
#xm = -31127.933289
file_name = "signal.data"
class gssm_graph(gr.flow_graph):
def __init__(self, fname):
gr.flow_graph.__init__(self)
src = gr.file_source(gr.sizeof_gr_complex, fname)
gs = gssm.sink(sps)
self.connect(src, gs)
def main():
fname = file_name
if len(sys.argv) == 2:
fname = sys.argv[1]
try:
gg = gssm_graph(fname)
gg.run()
except KeyboardInterrupt:
pass
if __name__ == '__main__':
main()
|