Subversion Repositories svnkaklik

Compare Revisions

Ignore whitespace Rev 515 → Rev 672

/programy/GRC/Sonar/Sonar.py
4,12 → 4,13
# Title: Sonar
# Author: Kaklik
# Description: Sonar waform generator
# Generated: Fri Feb 20 19:31:13 2009
# Generated: Sat Feb 21 11:50:42 2009
##################################################
 
from gnuradio import audio
from gnuradio import gr
from gnuradio.wxgui import scopesink2
from gnuradio.wxgui import waterfallsink2
from grc_gnuradio import wxgui as grc_wxgui
import wx
 
72,6 → 73,19
)
self.wxgui_scopesink2_0.win.set_format_line()
self.Add(self.wxgui_scopesink2_0.win)
self.wxgui_waterfallsink2_0 = waterfallsink2.waterfall_sink_f(
self.GetWin(),
baseband_freq=0,
y_per_div=10,
ref_level=50,
sample_rate=samp_rate,
fft_size=512,
fft_rate=15,
average=True,
avg_alpha=None,
title="Waterfall Plot",
)
self.Add(self.wxgui_waterfallsink2_0.win)
 
##################################################
# Connections
79,11 → 93,13
self.connect((self.gr_sig_source_x, 0), (self.audio_sink, 0))
self.connect((self.gr_sig_source_x, 0), (self.wxgui_scopesink2_0, 0))
self.connect((self.audio_source_0, 0), (self.wxgui_scopesink2_0, 1))
self.connect((self.audio_source_0, 0), (self.wxgui_waterfallsink2_0, 0))
 
def set_samp_rate(self, samp_rate):
self.samp_rate = samp_rate
self.gr_sig_source_x.set_sampling_freq(self.samp_rate)
self.wxgui_scopesink2_0.set_sample_rate(self.samp_rate*2)
self.wxgui_waterfallsink2_0.set_sample_rate(self.samp_rate)
 
def set_frequency(self, frequency):
self.frequency = frequency
/programy/GRC/Sonar/frequency_response.grc
1,11 → 1,11
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
<timestamp>Fri Feb 20 19:47:38 2009</timestamp>
<timestamp>Sat Feb 21 13:28:42 2009</timestamp>
<block>
<key>audio_sink</key>
<key>options</key>
<param>
<key>id</key>
<value>audio_sink_0</value>
<value>frequency_response</value>
</param>
<param>
<key>_enabled</key>
12,24 → 12,36
<value>True</value>
</param>
<param>
<key>samp_rate</key>
<value>48000</value>
<key>title</key>
<value>untitled</value>
</param>
<param>
<key>device_name</key>
<value>hw:1,0</value>
<key>author</key>
<value>unknown</value>
</param>
<param>
<key>ok_to_block</key>
<value>True</value>
<key>description</key>
<value>gnuradio flow graph</value>
</param>
<param>
<key>num_inputs</key>
<key>window_size</key>
<value>1280, 1024</value>
</param>
<param>
<key>generate_options</key>
<value>wx_gui</value>
</param>
<param>
<key>category</key>
<value>Custom</value>
</param>
<param>
<key>realtime_scheduling</key>
<value>1</value>
</param>
<param>
<key>_coordinate</key>
<value>(653, 387)</value>
<value>(10, 10)</value>
</param>
<param>
<key>_rotation</key>
95,41 → 107,6
</param>
</block>
<block>
<key>gr_noise_source_x</key>
<param>
<key>id</key>
<value>gr_noise_source_x_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>type</key>
<value>float</value>
</param>
<param>
<key>noise_type</key>
<value>gr.GR_UNIFORM</value>
</param>
<param>
<key>amp</key>
<value>1</value>
</param>
<param>
<key>seed</key>
<value>100</value>
</param>
<param>
<key>_coordinate</key>
<value>(450, 388)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>wxgui_fftsink2</key>
<param>
<key>id</key>
201,10 → 178,10
</param>
</block>
<block>
<key>options</key>
<key>gr_noise_source_x</key>
<param>
<key>id</key>
<value>frequency_response</value>
<value>gr_noise_source_x_0</value>
</param>
<param>
<key>_enabled</key>
211,36 → 188,59
<value>True</value>
</param>
<param>
<key>title</key>
<value>untitled</value>
<key>type</key>
<value>float</value>
</param>
<param>
<key>author</key>
<value>unknown</value>
<key>noise_type</key>
<value>gr.GR_UNIFORM</value>
</param>
<param>
<key>description</key>
<value>gnuradio flow graph</value>
<key>amp</key>
<value>1</value>
</param>
<param>
<key>window_size</key>
<value>1280, 1024</value>
<key>seed</key>
<value>100</value>
</param>
<param>
<key>generate_options</key>
<value>wx_gui</value>
<key>_coordinate</key>
<value>(371, 291)</value>
</param>
<param>
<key>category</key>
<value>Custom</value>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>audio_sink</key>
<param>
<key>realtime_scheduling</key>
<value>1</value>
<key>id</key>
<value>audio_sink_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>samp_rate</key>
<value>48000</value>
</param>
<param>
<key>device_name</key>
<value>hw:1,0</value>
</param>
<param>
<key>ok_to_block</key>
<value>True</value>
</param>
<param>
<key>num_inputs</key>
<value>2</value>
</param>
<param>
<key>_coordinate</key>
<value>(10, 10)</value>
<value>(635, 295)</value>
</param>
<param>
<key>_rotation</key>
259,4 → 259,10
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
<source_block_id>gr_noise_source_x_0</source_block_id>
<sink_block_id>audio_sink_0</sink_block_id>
<source_key>0</source_key>
<sink_key>1</sink_key>
</connection>
</flow_graph>
/programy/GRC/Sonar/frequency_response.py
4,7 → 4,7
# Title: untitled
# Author: unknown
# Description: gnuradio flow graph
# Generated: Fri Feb 20 19:47:38 2009
# Generated: Sat Feb 21 13:28:44 2009
##################################################
 
from gnuradio import audio
54,6 → 54,7
##################################################
self.connect((self.gr_noise_source_x_0, 0), (self.audio_sink_0, 0))
self.connect((self.audio_source_0, 0), (self.wxgui_fftsink2_0, 0))
self.connect((self.gr_noise_source_x_0, 0), (self.audio_sink_0, 1))
 
def set_samp_rate(self, samp_rate):
self.samp_rate = samp_rate
/programy/GRC/Sonar/sonar.grc
1,6 → 1,6
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
<timestamp>Fri Feb 20 19:31:11 2009</timestamp>
<timestamp>Sat Feb 21 12:00:12 2009</timestamp>
<block>
<key>options</key>
<param>
252,6 → 252,61
</param>
</block>
<block>
<key>wxgui_scopesink2</key>
<param>
<key>id</key>
<value>wxgui_scopesink2_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>type</key>
<value>float</value>
</param>
<param>
<key>title</key>
<value>Scope Plot</value>
</param>
<param>
<key>samp_rate</key>
<value>samp_rate*2</value>
</param>
<param>
<key>frame_decim</key>
<value>15</value>
</param>
<param>
<key>v_scale</key>
<value>0</value>
</param>
<param>
<key>t_scale</key>
<value>.0001</value>
</param>
<param>
<key>marker</key>
<value>set_format_line</value>
</param>
<param>
<key>num_inputs</key>
<value>2</value>
</param>
<param>
<key>grid_pos</key>
<value></value>
</param>
<param>
<key>_coordinate</key>
<value>(770, 294)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>audio_source</key>
<param>
<key>id</key>
287,10 → 342,10
</param>
</block>
<block>
<key>wxgui_scopesink2</key>
<key>wxgui_waterfallsink2</key>
<param>
<key>id</key>
<value>wxgui_scopesink2_0</value>
<value>wxgui_waterfallsink2_0</value>
</param>
<param>
<key>_enabled</key>
302,39 → 357,47
</param>
<param>
<key>title</key>
<value>Scope Plot</value>
<value>Waterfall Plot</value>
</param>
<param>
<key>samp_rate</key>
<value>samp_rate*2</value>
<value>samp_rate</value>
</param>
<param>
<key>frame_decim</key>
<value>15</value>
<key>baseband_freq</key>
<value>0</value>
</param>
<param>
<key>v_scale</key>
<value>0</value>
<key>y_per_div</key>
<value>10</value>
</param>
<param>
<key>t_scale</key>
<value>.0001</value>
<key>ref_level</key>
<value>50</value>
</param>
<param>
<key>marker</key>
<value>set_format_line</value>
<key>fft_size</key>
<value>512</value>
</param>
<param>
<key>num_inputs</key>
<value>2</value>
<key>fft_rate</key>
<value>15</value>
</param>
<param>
<key>avg_alpha</key>
<value>0</value>
</param>
<param>
<key>options</key>
<value>average</value>
</param>
<param>
<key>grid_pos</key>
<value></value>
</param>
<param>
<key>_coordinate</key>
<value>(770, 294)</value>
<value>(775, 434)</value>
</param>
<param>
<key>_rotation</key>
359,4 → 422,10
<source_key>0</source_key>
<sink_key>1</sink_key>
</connection>
<connection>
<source_block_id>audio_source_0</source_block_id>
<sink_block_id>wxgui_waterfallsink2_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
</flow_graph>