diff --git a/workspace/Makefile b/workspace/Makefile index 4591143..510f451 100644 --- a/workspace/Makefile +++ b/workspace/Makefile @@ -7,8 +7,8 @@ endif trials := 10 packets := 50 -min_snr := -5 -max_snr := 15 +min_snr := -2 +max_snr := 25 snr_steps := 1 interval := 100 diff --git a/workspace/parse.py b/workspace/parse.py index 8d9036d..81fba5e 100755 --- a/workspace/parse.py +++ b/workspace/parse.py @@ -72,7 +72,7 @@ for enc in sorted(table.keys()): # sort so legend labels are in order plt.ylabel("PDR") plt.xlabel("SNR") plt.title("Delivery rate vs. SNR for different encoding schemes") -plt.legend() +plt.legend(loc="upper left") plt.savefig(os.path.join(path,"plot.png")) plt.show() diff --git a/workspace/plot.png b/workspace/plot.png new file mode 100644 index 0000000..c134c4e Binary files /dev/null and b/workspace/plot.png differ diff --git a/workspace/wifi_loopback_noGUI.grc b/workspace/wifi_loopback_noGUI.grc index ff2ecdb..090dead 100644 --- a/workspace/wifi_loopback_noGUI.grc +++ b/workspace/wifi_loopback_noGUI.grc @@ -167,7 +167,7 @@ const - (10**(snr/10.0))**.5 + ((10**(snr/10.0))**0.5)/(2**0.5) affinity diff --git a/workspace/wifi_loopback_noGUI.py b/workspace/wifi_loopback_noGUI.py index 7706768..29d3f4c 100755 --- a/workspace/wifi_loopback_noGUI.py +++ b/workspace/wifi_loopback_noGUI.py @@ -3,7 +3,7 @@ ################################################## # GNU Radio Python Flow Graph # Title: Wifi Loopback Nogui -# Generated: Sun Nov 15 22:48:19 2015 +# Generated: Sat Nov 21 10:57:29 2015 ################################################## import os @@ -67,7 +67,7 @@ class wifi_loopback_noGUI(gr.top_block): block_tags=False ) self.blocks_null_sink_0 = blocks.null_sink(gr.sizeof_gr_complex*1) - self.blocks_multiply_const_vxx_0 = blocks.multiply_const_vcc(((10**(snr/10.0))**.5, )) + self.blocks_multiply_const_vxx_0 = blocks.multiply_const_vcc((((10**(snr/10.0))**0.5)/(2**0.5), )) self.blocks_file_sink_0_0 = blocks.file_sink(gr.sizeof_char*1, "" + resultdir + "/ofdm_" + str(ntrials) + "_" + str(nmessages) + "_" + str(snr) + "_" + str(encoding) + "_" + str(interval) + ".pcap", False) self.blocks_file_sink_0_0.set_unbuffered(True) @@ -140,8 +140,8 @@ class wifi_loopback_noGUI(gr.top_block): def set_snr(self, snr): self.snr = snr - self.blocks_multiply_const_vxx_0.set_k(((10**(self.snr/10.0))**.5, )) self.blocks_file_sink_0_0.open("" + self.resultdir + "/ofdm_" + str(self.ntrials) + "_" + str(self.nmessages) + "_" + str(self.snr) + "_" + str(self.encoding) + "_" + str(self.interval) + ".pcap") + self.blocks_multiply_const_vxx_0.set_k((((10**(self.snr/10.0))**0.5)/(2**0.5), )) def get_out_buf_size(self): return self.out_buf_size