diff options
Diffstat (limited to 'gr-uhd/apps/hf_radio')
-rw-r--r-- | gr-uhd/apps/hf_radio/README.TXT | 14 | ||||
-rw-r--r-- | gr-uhd/apps/hf_radio/hfir.sci | 2 | ||||
-rw-r--r-- | gr-uhd/apps/hf_radio/input.py | 16 | ||||
-rw-r--r-- | gr-uhd/apps/hf_radio/output.py | 14 | ||||
-rwxr-xr-x | gr-uhd/apps/hf_radio/radio.py | 24 | ||||
-rw-r--r-- | gr-uhd/apps/hf_radio/ssbagc.py | 10 | ||||
-rw-r--r-- | gr-uhd/apps/hf_radio/ssbdemod.py | 18 | ||||
-rwxr-xr-x | gr-uhd/apps/hf_radio/ui.py | 10 |
8 files changed, 54 insertions, 54 deletions
diff --git a/gr-uhd/apps/hf_radio/README.TXT b/gr-uhd/apps/hf_radio/README.TXT index 7c7edf5e0..c5c57f847 100644 --- a/gr-uhd/apps/hf_radio/README.TXT +++ b/gr-uhd/apps/hf_radio/README.TXT @@ -1,17 +1,17 @@ # 2008-02-07 -# +# # These files have not yet been update to use the new top_block/hier_block2 # interfaces. Until someone does that, this files will no longer run. -# +# The files in this directory implement a fairly simple HF radio that works with the basic rx daughter board on the USRP. -Many thanks to the Gnu Radio folks for a great new way to waste large blocks +Many thanks to the Gnu Radio folks for a great new way to waste large blocks of time in infinitely tweaking a huge number of free parameters. -Start the receiver by running the radio.py in this directory. Or from the +Start the receiver by running the radio.py in this directory. Or from the Python prompt type "from radio import *" and you'll get the prompt back with the receiver running. You can then poke around to see what's going on. @@ -19,7 +19,7 @@ There are two spectrum displays. One is the output of the USRP and displays about 300KHz of bandwidth centered at the current tuning freq. The other displays the output spectrum of the demodulator. -The demodulator does AM demod using the complex modulus block from gr. It +The demodulator does AM demod using the complex modulus block from gr. It does SSB demod using the frequency translating fir filter as a complex hilbert transformer. The taps for this filter were generated using a program called Scilab and the Scilab program in the file hfir.sci. More details in @@ -39,7 +39,7 @@ The audio bandwidth can be similarly adjusted from about 50Hz to 10KHz. The GUI layout was produced using wxGlade. The file radio.xml is the GUI specification. It will produce a file called ui.py which is subclassed by classes defined in radio.py. The ui.py is purely generated by wxGlade -all app specific code for the GUI is in radio.py. +all app specific code for the GUI is in radio.py. Most of the actual signal processing code is built up in the other included files using the hierarchical block facilities. This organization should @@ -50,7 +50,7 @@ Known bugs weakness and other wxPython and wxGlade seem to conspire to insure that the layout can never be exactly what you have in mind. -Some of the controls don't behave as one might like. wx spin controls +Some of the controls don't behave as one might like. wx spin controls and spin boxes only support integers so it is rather a nuisance to make units come out nice. In the process of development I came up with a reasonable kluge so there is a mixture of approaches. diff --git a/gr-uhd/apps/hf_radio/hfir.sci b/gr-uhd/apps/hf_radio/hfir.sci index a2d5e2a62..64f5385d7 100644 --- a/gr-uhd/apps/hf_radio/hfir.sci +++ b/gr-uhd/apps/hf_radio/hfir.sci @@ -25,7 +25,7 @@ // This isn't as computationally efficient as using the hilbert transformer // and compensating delay but fascinating none the less. // -// This program is for the scilab language a very powerful free math +// This program is for the scilab language a very powerful free math // package similar to Matlab with infinitely better price/performace. // // compute the prototype lowpass fir diff --git a/gr-uhd/apps/hf_radio/input.py b/gr-uhd/apps/hf_radio/input.py index 2626ddfb5..78e800bb6 100644 --- a/gr-uhd/apps/hf_radio/input.py +++ b/gr-uhd/apps/hf_radio/input.py @@ -1,22 +1,22 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# # Basic USRP setup and control. # It's only ever been tried with a basic rx daughter card. @@ -24,7 +24,7 @@ # Imagine that the gnuradio boilerplate is here. # # M. Revnell 2005-Dec - + from gnuradio import gr from gnuradio import uhd @@ -33,7 +33,7 @@ class uhd_input(gr.hier_block2): gr.hier_block2.__init__(self, "uhd_input", gr.io_signature(0,0,0), gr.io_signature(1,1,gr.sizeof_gr_complex)) - + self.src = uhd.usrp_source(device_addr=address, io_type=uhd.io_type.COMPLEX_FLOAT32, num_channels=1) @@ -65,7 +65,7 @@ class uhd_input(gr.hier_block2): self.gain = gain self.src.set_gain(gain, 0) - def add_options(parser): + def add_options(parser): parser.add_option("-a", "--address", type="string", default="addr=192.168.10.2", help="Address of UHD device, [default=%default]") diff --git a/gr-uhd/apps/hf_radio/output.py b/gr-uhd/apps/hf_radio/output.py index 8ee7dc54c..70add5b84 100644 --- a/gr-uhd/apps/hf_radio/output.py +++ b/gr-uhd/apps/hf_radio/output.py @@ -1,22 +1,22 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# # Audio output with a volume control. @@ -31,7 +31,7 @@ class output( gr.hier_block2 ): gr.hier_block2.__init__(self, "output", gr.io_signature(1,1,gr.sizeof_float), gr.io_signature(0,0,0)) - + self.vol = gr.multiply_const_ff( 0.1 ) self.out = audio.sink( int(rate), device ) @@ -39,4 +39,4 @@ class output( gr.hier_block2 ): def set( self, val ): self.vol.set_k( val ) - + diff --git a/gr-uhd/apps/hf_radio/radio.py b/gr-uhd/apps/hf_radio/radio.py index 32e26c7eb..93d985067 100755 --- a/gr-uhd/apps/hf_radio/radio.py +++ b/gr-uhd/apps/hf_radio/radio.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# # GUI interactions and high level connections handled here. # @@ -107,7 +107,7 @@ class radio_frame( ui_frame ): agc_ref = self.block.agc.offs.k() self.agc_ref.SetValue( str( agc_ref ) ) self.agc_ref_s.SetValue( 5 ) - + self.fespectrum = fftsink2.fft_sink_c( self.fe_panel, fft_size=512, @@ -138,7 +138,7 @@ class radio_frame( ui_frame ): r = r + 5 self.agc_ref.SetValue( str( r ) ) self.block.agc.offs.set_k( r ) - + def agc_ref_down( self, event ): self.agc_ref_s.SetValue( 5 ) r = float( self.agc_ref.GetValue() ) @@ -184,7 +184,7 @@ class radio_frame( ui_frame ): def tune_evt( self, event ): f = self.freq_disp.GetValue() self.tune( f ) - + def tune( self, frequency ): self.freq_disp.SetValue( frequency ) self.block.tune( frequency ) @@ -247,13 +247,13 @@ class radio_frame( ui_frame ): def event_pga( self, event ): self.block.src.set_gain(self.pga.GetValue()) - + def event_vol( self, event ): self.block.out.set( self.volume.GetValue()/20.0 ) def set_usb( self, event ): self.block.demod.upper_sb() - + def set_lsb( self, event ): self.block.demod.lower_sb() @@ -310,9 +310,9 @@ def main(): thread2 = Thread( target = rssi_function ) thread2.start() - + radio_obj.MainLoop() - + if __name__ == "__main__": main() diff --git a/gr-uhd/apps/hf_radio/ssbagc.py b/gr-uhd/apps/hf_radio/ssbagc.py index 494712863..6a2e0a7cd 100644 --- a/gr-uhd/apps/hf_radio/ssbagc.py +++ b/gr-uhd/apps/hf_radio/ssbagc.py @@ -1,22 +1,22 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. - + # post detection agc processing # diff --git a/gr-uhd/apps/hf_radio/ssbdemod.py b/gr-uhd/apps/hf_radio/ssbdemod.py index 072d317a2..3c533f617 100644 --- a/gr-uhd/apps/hf_radio/ssbdemod.py +++ b/gr-uhd/apps/hf_radio/ssbdemod.py @@ -1,22 +1,22 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# # This tries to push the hilbert transform for ssb demod back into the # freq. xlating filter. @@ -45,7 +45,7 @@ class ssb_demod( gr.hier_block2 ): self.sideband = 1 self.xlate_taps = ([complex(v) for v in file('ssb_taps').readlines()]) - + self.audio_taps = gr.firdes.low_pass( 1.0, self.af_rate, @@ -69,7 +69,7 @@ class ssb_demod( gr.hier_block2 ): self.sb_sel = gr.multiply_const_ff( 1 ) self.mixer = gr.add_ff() self.am_det = gr.complex_to_mag() - + self.connect(self, self.xlate) self.connect(self.xlate, self.split) self.connect((self.split, 0), (self.sum, 0)) @@ -83,7 +83,7 @@ class ssb_demod( gr.hier_block2 ): self.connect(self.lpf, self) def upper_sb( self ): - self.xlate.set_taps([v.conjugate() for v in self.xlate_taps]) + self.xlate.set_taps([v.conjugate() for v in self.xlate_taps]) self.sb_sel.set_k( 1.0 ) self.am_sel.set_k( 0.0 ) @@ -91,7 +91,7 @@ class ssb_demod( gr.hier_block2 ): self.xlate.set_taps(self.xlate_taps) self.sb_sel.set_k( 1.0 ) self.am_sel.set_k( 0.0 ) - + def set_am( self ): taps = gr.firdes.low_pass( 1.0, self.if_rate, diff --git a/gr-uhd/apps/hf_radio/ui.py b/gr-uhd/apps/hf_radio/ui.py index 551a30415..a20ba4fab 100755 --- a/gr-uhd/apps/hf_radio/ui.py +++ b/gr-uhd/apps/hf_radio/ui.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# # -*- coding: UTF-8 -*- # generated by wxGlade 0.4 on Mon Jan 2 19:02:03 2006 |