Changeset 8932
- Timestamp:
- 07/17/08 18:23:04
- Files:
-
- gnuradio/branches/features/experimental-gui/const_controller.py (added)
- gnuradio/branches/features/experimental-gui/const_gui.py (added)
- gnuradio/branches/features/experimental-gui/const_streamer.py (modified) (4 diffs)
- gnuradio/branches/features/experimental-gui/const_top_block.py (modified) (5 diffs)
- gnuradio/branches/features/experimental-gui/test_const.sh (added)
- gnuradio/branches/features/experimental-gui/usrp_const.py (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gnuradio/branches/features/experimental-gui/const_streamer.py
r8929 r8932 36 36 frame_rate=30, 37 37 costas_alpha=0.1, 38 costas_max _freq=0.05,38 costas_max=0.05, 39 39 mm_alpha=0.005, 40 mm_max _freq=0.05):40 mm_max=0.05): 41 41 """! 42 42 Create a const_streamer. … … 47 47 @param frame_rate Number of frames/sec to create (default is 30) 48 48 @param costas_alpha Costas loop 1st order gain constant (default is 0.1) 49 @param costas_max _freqCostas loop maximum offset, rad/sample (default is 0.05)49 @param costas_max Costas loop maximum offset, rad/sample (default is 0.05) 50 50 @param mm_alpha Timing loop 1st order gain constant (default is 0.005) 51 @param mm_max _freqMaximum timing offset in bits/sample (default is 0.05)51 @param mm_max Maximum timing offset in bits/sample (default is 0.05) 52 52 """ 53 53 … … 59 59 # Critically damped 2nd order PLL 60 60 costas_beta = 0.25*costas_alpha*costas_alpha 61 costas_min _freq = -costas_max_freq61 costas_min = -costas_max 62 62 self._costas = gr.costas_loop_cc(costas_alpha, 63 63 costas_beta, 64 costas_max _freq,65 costas_min _freq,64 costas_max, 65 costas_min, 66 66 order) 67 67 … … 71 71 mm_beta = 0.25*mm_alpha*mm_alpha 72 72 mu=0.5 # Center of bit 73 self._retime = gr.clock_recovery_mm_cc(mm_freq, # omega,74 mm_beta, # gain_omega73 self._retime = gr.clock_recovery_mm_cc(mm_freq, # omega, 74 mm_beta, # gain_omega 75 75 mu, 76 mm_alpha, # gain_mu,77 mm_max _freq) # omega_limit76 mm_alpha, # gain_mu, 77 mm_max) # omega_limit 78 78 79 79 # Scale to unity power gnuradio/branches/features/experimental-gui/const_top_block.py
r8930 r8932 45 45 bit_rate=None, 46 46 costas_alpha=0.1, 47 costas_max _freq=0.05,47 costas_max=0.05, 48 48 mm_alpha=0.005, 49 mm_max _freq=0.0549 mm_max=0.05 50 50 ): 51 51 """! … … 65 65 @param bit_rate Modulated bit rate/sec (default equivalent to 2 samples/bit) 66 66 @param costas_alpha Costas loop 1st order gain constant (default is 0.1) 67 @param costas_max _freqCostas loop maximum offset, rad/sample (default is 0.05)67 @param costas_max Costas loop maximum offset, rad/sample (default is 0.05) 68 68 @param mm_alpha Timing loop 1st order gain constant (default is 0.005) 69 @param mm_max _freqMaximum timing offset in bits/sample (default is 0.05)69 @param mm_max Maximum timing offset in bits/sample (default is 0.05) 70 70 """ 71 71 … … 88 88 frame_rate=frame_rate, 89 89 costas_alpha=costas_alpha, 90 costas_max _freq=costas_max_freq,90 costas_max=costas_max, 91 91 mm_alpha=mm_alpha, 92 mm_max _freq=mm_max_freq)92 mm_max=mm_max) 93 93 94 self._sink = gr.file_sink(gr.sizeof_gr_complex*frame_size, 'const.dat') 95 94 self._msgq = gr.msg_queue(2) 95 self._sink = gr.message_sink(gr.sizeof_gr_complex*frame_size, self._msgq, True) 96 96 97 self.connect(self._u, self._const, self._sink) 97 98 … … 105 106 def set_decim(self, decim): 106 107 self._u.set_decim(decim) 107 self._ fft.set_sample_rate(self._u.sample_rate())108 self._const.set_sample_rate(self._u.sample_rate()) 108 109 109 110 # Getters, which are called externally to get information about the flowgraph … … 114 115 return self._u.sample_rate() 115 116 116 # test code117 if __name__ == "__main__":118 tb = const_top_block(order=2,119 decim=64,120 subdev_spec=(0, 0),121 gain=60,122 freq=2.215e9,123 bit_rate=250e3,124 costas_alpha=0.2,125 costas_max_freq=0.06,126 mm_alpha=0.05,127 mm_max_freq=0.05);128 129 tb.run()
