[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 07/16: gr-dtv: Add DVB-S2 transmitter.
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 07/16: gr-dtv: Add DVB-S2 transmitter. |
Date: |
Sun, 29 Mar 2015 02:27:25 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit ea8988825f34ea10f56fa6c65a1877d415da508e
Author: Ron Economos <address@hidden>
Date: Mon Mar 23 14:28:17 2015 -0700
gr-dtv: Add DVB-S2 transmitter.
---
gr-dtv/examples/README.dvbs2 | 4 +
gr-dtv/examples/dvbs2_tx.grc | 1914 ++++++++++++
gr-dtv/grc/CMakeLists.txt | 3 +
gr-dtv/grc/dtv_block_tree.xml | 6 +
gr-dtv/grc/dtv_dvbs2_interleaver_bb.xml | 220 ++
gr-dtv/grc/dtv_dvbs2_modulator_bc.xml | 265 ++
gr-dtv/grc/dtv_dvbs2_physical_cc.xml | 331 +++
gr-dtv/include/gnuradio/dtv/CMakeLists.txt | 3 +
gr-dtv/include/gnuradio/dtv/dvbs2_interleaver_bb.h | 57 +
gr-dtv/include/gnuradio/dtv/dvbs2_modulator_bc.h | 57 +
gr-dtv/include/gnuradio/dtv/dvbs2_physical_cc.h | 60 +
gr-dtv/lib/CMakeLists.txt | 3 +
gr-dtv/lib/dvbs2/dvbs2_interleaver_bb_impl.cc | 587 ++++
gr-dtv/lib/dvbs2/dvbs2_interleaver_bb_impl.h | 63 +
gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.cc | 3040 ++++++++++++++++++++
gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.h | 58 +
gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.cc | 800 ++++++
gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.h | 68 +
gr-dtv/swig/dtv_swig.i | 9 +
19 files changed, 7548 insertions(+)
diff --git a/gr-dtv/examples/README.dvbs2 b/gr-dtv/examples/README.dvbs2
new file mode 100644
index 0000000..d9da03e
--- /dev/null
+++ b/gr-dtv/examples/README.dvbs2
@@ -0,0 +1,4 @@
+Additional information and link to a test stream for the
+DVB-S2 flow graph can be found here:
+
+https://github.com/drmpeg/gr-dvbs2
diff --git a/gr-dtv/examples/dvbs2_tx.grc b/gr-dtv/examples/dvbs2_tx.grc
new file mode 100644
index 0000000..47daa4c
--- /dev/null
+++ b/gr-dtv/examples/dvbs2_tx.grc
@@ -0,0 +1,1914 @@
+<?xml version='1.0' encoding='ASCII'?>
+<?grc format='1' created='3.7.7'?>
+<flow_graph>
+ <timestamp>Wed Sep 3 03:03:39 2014</timestamp>
+ <block>
+ <key>options</key>
+ <param>
+ <key>id</key>
+ <value>dvbs2_tx</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value></value>
+ </param>
+ <param>
+ <key>author</key>
+ <value></value>
+ </param>
+ <param>
+ <key>description</key>
+ <value></value>
+ </param>
+ <param>
+ <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>run_options</key>
+ <value>prompt</value>
+ </param>
+ <param>
+ <key>run</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>max_nouts</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>realtime_scheduling</key>
+ <value></value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(8, 11)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>symbol_rate * 2</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(8, 75)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>symbol_rate</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>5000000</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(8, 139)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>rolloff</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0.2</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(8, 203)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>taps</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>50</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(8, 267)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvb_bch_bb</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvb_bch_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>standard</key>
+ <value>STANDARD_DVBS2</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>rate1</key>
+ <value>C1_2</value>
+ </param>
+ <param>
+ <key>rate2</key>
+ <value>C1_3</value>
+ </param>
+ <param>
+ <key>rate3</key>
+ <value>C9_10</value>
+ </param>
+ <param>
+ <key>rate4</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(824, 35)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvb_bbscrambler_bb</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvb_bbscrambler_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>standard</key>
+ <value>STANDARD_DVBS2</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>rate1</key>
+ <value>C1_2</value>
+ </param>
+ <param>
+ <key>rate2</key>
+ <value>C1_3</value>
+ </param>
+ <param>
+ <key>rate3</key>
+ <value>C9_10</value>
+ </param>
+ <param>
+ <key>rate4</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(608, 35)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvb_ldpc_bb</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvb_ldpc_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>standard</key>
+ <value>STANDARD_DVBS2</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>rate1</key>
+ <value>C1_2</value>
+ </param>
+ <param>
+ <key>rate2</key>
+ <value>C1_3</value>
+ </param>
+ <param>
+ <key>rate3</key>
+ <value>C9_10</value>
+ </param>
+ <param>
+ <key>rate4</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>constellation</key>
+ <value>MOD_OTHER</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1048, 27)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbs2_interleaver_bb</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbs2_interleaver_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>constellation</key>
+ <value>MOD_16APSK</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>C_OTHER</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(192, 235)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>wxgui_fftsink2</key>
+ <param>
+ <key>id</key>
+ <value>wxgui_fftsink2_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>FFT Plot</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>baseband_freq</key>
+ <value>1280000000</value>
+ </param>
+ <param>
+ <key>y_per_div</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>y_divs</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>ref_level</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ref_scale</key>
+ <value>2.0</value>
+ </param>
+ <param>
+ <key>fft_size</key>
+ <value>1024</value>
+ </param>
+ <param>
+ <key>fft_rate</key>
+ <value>15</value>
+ </param>
+ <param>
+ <key>peak_hold</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>average</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>avg_alpha</key>
+ <value>0.13333</value>
+ </param>
+ <param>
+ <key>win</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>win_size</key>
+ <value></value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
+ </param>
+ <param>
+ <key>freqvar</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1000, 395)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbs2_modulator_bc</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbs2_modulator_bc_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>constellation</key>
+ <value>MOD_16APSK</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>C9_10</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(472, 235)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>fft_filter_xxx</key>
+ <param>
+ <key>id</key>
+ <value>fft_filter_xxx_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>ccc</value>
+ </param>
+ <param>
+ <key>decim</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>taps</key>
+ <value>firdes.root_raised_cosine(1, samp_rate, samp_rate/2, rolloff,
taps)</value>
+ </param>
+ <param>
+ <key>samp_delay</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>nthreads</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(472, 459)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvbs2_physical_cc</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvbs2_physical_cc_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>constellation</key>
+ <value>MOD_16APSK</value>
+ </param>
+ <param>
+ <key>rate</key>
+ <value>C9_10</value>
+ </param>
+ <param>
+ <key>pilots</key>
+ <value>PILOTS_ON</value>
+ </param>
+ <param>
+ <key>goldcode</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(192, 443)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>osmosdr_sink</key>
+ <param>
+ <key>id</key>
+ <value>osmosdr_sink_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>fc32</value>
+ </param>
+ <param>
+ <key>args</key>
+ <value>bladerf=0,buffers=128,buflen=32768</value>
+ </param>
+ <param>
+ <key>sync</key>
+ <value></value>
+ </param>
+ <param>
+ <key>num_mboards</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>clock_source0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>nchan</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>sample_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>freq0</key>
+ <value>1280e6</value>
+ </param>
+ <param>
+ <key>corr0</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain0</key>
+ <value>15</value>
+ </param>
+ <param>
+ <key>if_gain0</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>bb_gain0</key>
+ <value>-10</value>
+ </param>
+ <param>
+ <key>ant0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw0</key>
+ <value>6000000</value>
+ </param>
+ <param>
+ <key>freq1</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr1</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain1</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain1</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain1</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw1</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq2</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr2</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain2</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain2</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain2</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw2</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq3</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr3</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain3</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain3</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain3</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw3</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq4</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr4</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain4</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain4</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain4</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw4</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq5</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain5</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain5</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain5</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq6</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain6</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain6</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain6</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq7</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain7</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain7</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain7</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq8</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain8</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain8</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain8</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq9</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain9</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain9</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain9</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq10</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain10</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain10</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain10</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq11</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain11</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain11</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain11</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant11</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq12</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain12</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain12</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain12</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant12</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq13</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain13</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain13</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain13</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant13</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq14</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain14</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain14</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain14</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant14</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq15</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain15</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain15</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain15</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant15</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq16</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain16</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain16</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain16</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant16</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq17</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain17</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain17</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain17</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant17</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq18</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain18</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain18</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain18</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant18</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq19</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain19</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain19</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain19</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant19</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq20</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain20</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain20</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain20</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant20</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq21</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain21</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain21</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain21</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant21</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq22</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain22</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain22</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain22</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant22</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq23</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain23</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain23</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain23</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant23</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq24</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain24</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain24</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain24</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant24</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq25</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain25</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain25</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain25</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant25</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq26</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain26</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain26</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain26</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant26</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq27</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain27</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain27</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain27</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant27</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq28</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain28</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain28</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain28</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant28</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq29</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain29</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain29</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain29</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant29</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq30</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain30</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain30</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain30</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant30</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>freq31</key>
+ <value>100e6</value>
+ </param>
+ <param>
+ <key>corr31</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain31</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>if_gain31</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>bb_gain31</key>
+ <value>20</value>
+ </param>
+ <param>
+ <key>ant31</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw31</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1000, 203)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_file_sink</key>
+ <param>
+ <key>id</key>
+ <value>blocks_file_sink_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>file</key>
+ <value>adv.cfile</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>unbuffered</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>append</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(792, 547)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>dtv_dvb_bbheader_bb</key>
+ <param>
+ <key>id</key>
+ <value>dtv_dvb_bbheader_bb_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>standard</key>
+ <value>STANDARD_DVBS2</value>
+ </param>
+ <param>
+ <key>framesize</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>rate1</key>
+ <value>C1_2</value>
+ </param>
+ <param>
+ <key>rate2</key>
+ <value>C1_3</value>
+ </param>
+ <param>
+ <key>rate3</key>
+ <value>C9_10</value>
+ </param>
+ <param>
+ <key>rate4</key>
+ <value>C1_4</value>
+ </param>
+ <param>
+ <key>rolloff</key>
+ <value>RO_0_20</value>
+ </param>
+ <param>
+ <key>mode</key>
+ <value>FECFRAME_NORMAL</value>
+ </param>
+ <param>
+ <key>inband</key>
+ <value>INBAND_OFF</value>
+ </param>
+ <param>
+ <key>fecblocks</key>
+ <value>168</value>
+ </param>
+ <param>
+ <key>tsrate</key>
+ <value>4000000</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(400, 27)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_file_source</key>
+ <param>
+ <key>id</key>
+ <value>blocks_file_source_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>file</key>
+ <value>/run/shm/adv16apsk910.ts</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(176, 43)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <connection>
+ <source_block_id>fft_filter_xxx_0</source_block_id>
+ <sink_block_id>osmosdr_sink_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fft_filter_xxx_0</source_block_id>
+ <sink_block_id>wxgui_fftsink2_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fft_filter_xxx_0</source_block_id>
+ <sink_block_id>blocks_file_sink_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_file_source_0</source_block_id>
+ <sink_block_id>dtv_dvb_bbheader_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvb_bbheader_bb_0</source_block_id>
+ <sink_block_id>dtv_dvb_bbscrambler_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvb_bbscrambler_bb_0</source_block_id>
+ <sink_block_id>dtv_dvb_bch_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvb_bch_bb_0</source_block_id>
+ <sink_block_id>dtv_dvb_ldpc_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvb_ldpc_bb_0</source_block_id>
+ <sink_block_id>dtv_dvbs2_interleaver_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbs2_interleaver_bb_0</source_block_id>
+ <sink_block_id>dtv_dvbs2_modulator_bc_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbs2_physical_cc_0</source_block_id>
+ <sink_block_id>fft_filter_xxx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>dtv_dvbs2_modulator_bc_0</source_block_id>
+ <sink_block_id>dtv_dvbs2_physical_cc_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+</flow_graph>
diff --git a/gr-dtv/grc/CMakeLists.txt b/gr-dtv/grc/CMakeLists.txt
index 93d6b57..ce2d718 100644
--- a/gr-dtv/grc/CMakeLists.txt
+++ b/gr-dtv/grc/CMakeLists.txt
@@ -49,6 +49,9 @@ install(FILES
dtv_dvbt2_paprtr_cc.xml
dtv_dvbt2_p1insertion_cc.xml
dtv_dvbt2_miso_cc.xml
+ dtv_dvbs2_interleaver_bb.xml
+ dtv_dvbs2_modulator_bc.xml
+ dtv_dvbs2_physical_cc.xml
DESTINATION ${GRC_BLOCKS_DIR}
COMPONENT "dtv_python"
)
diff --git a/gr-dtv/grc/dtv_block_tree.xml b/gr-dtv/grc/dtv_block_tree.xml
index ba7e3ca..770b7ec 100644
--- a/gr-dtv/grc/dtv_block_tree.xml
+++ b/gr-dtv/grc/dtv_block_tree.xml
@@ -69,5 +69,11 @@
<block>dtv_dvbt2_p1insertion_cc</block>
<block>dtv_dvbt2_miso_cc</block>
</cat>
+ <cat>
+ <name>DVB-S2</name>
+ <block>dtv_dvbs2_interleaver_bb</block>
+ <block>dtv_dvbs2_modulator_bc</block>
+ <block>dtv_dvbs2_physical_cc</block>
+ </cat>
</cat>
</cat>
diff --git a/gr-dtv/grc/dtv_dvbs2_interleaver_bb.xml
b/gr-dtv/grc/dtv_dvbs2_interleaver_bb.xml
new file mode 100644
index 0000000..9a6d2ef
--- /dev/null
+++ b/gr-dtv/grc/dtv_dvbs2_interleaver_bb.xml
@@ -0,0 +1,220 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+## DVB-S2 Bit Interleaver
+###################################################
+ -->
+<block>
+ <name>Interleaver</name>
+ <key>dtv_dvbs2_interleaver_bb</key>
+ <import>from gnuradio import dtv</import>
+ <make>dtv.dvbs2_interleaver_bb($framesize.val, $rate.val,
$constellation.val)</make>
+ <param>
+ <name>FECFRAME size</name>
+ <key>framesize</key>
+ <type>enum</type>
+ <option>
+ <name>Normal</name>
+ <key>FECFRAME_NORMAL</key>
+ <opt>val:dtv.FECFRAME_NORMAL</opt>
+ </option>
+ <option>
+ <name>Short</name>
+ <key>FECFRAME_SHORT</key>
+ <opt>val:dtv.FECFRAME_SHORT</opt>
+ </option>
+ </param>
+ <param>
+ <name>Code rate</name>
+ <key>rate</key>
+ <type>enum</type>
+ <option>
+ <name>Other</name>
+ <key>C_OTHER</key>
+ <opt>val:dtv.C_OTHER</opt>
+ </option>
+ <option>
+ <name>3/5</name>
+ <key>C3_5</key>
+ <opt>val:dtv.C3_5</opt>
+ </option>
+ <option>
+ <name>2/3</name>
+ <key>C2_3</key>
+ <opt>val:dtv.C2_3</opt>
+ </option>
+ <option>
+ <name>4/5</name>
+ <key>C4_5</key>
+ <opt>val:dtv.C4_5</opt>
+ </option>
+ <option>
+ <name>5/6</name>
+ <key>C5_6</key>
+ <opt>val:dtv.C5_6</opt>
+ </option>
+ <option>
+ <name>90/180</name>
+ <key>C90_180</key>
+ <opt>val:dtv.C90_180</opt>
+ </option>
+ <option>
+ <name>96/180</name>
+ <key>C96_180</key>
+ <opt>val:dtv.C96_180</opt>
+ </option>
+ <option>
+ <name>100/180</name>
+ <key>C100_180</key>
+ <opt>val:dtv.C100_180</opt>
+ </option>
+ <option>
+ <name>26/45</name>
+ <key>C26_45</key>
+ <opt>val:dtv.C26_45</opt>
+ </option>
+ <option>
+ <name>28/45</name>
+ <key>C28_45</key>
+ <opt>val:dtv.C28_45</opt>
+ </option>
+ <option>
+ <name>23/36</name>
+ <key>C23_36</key>
+ <opt>val:dtv.C23_36</opt>
+ </option>
+ <option>
+ <name>116/180</name>
+ <key>C116_180</key>
+ <opt>val:dtv.C116_180</opt>
+ </option>
+ <option>
+ <name>124/180</name>
+ <key>C124_180</key>
+ <opt>val:dtv.C124_180</opt>
+ </option>
+ <option>
+ <name>25/36</name>
+ <key>C25_36</key>
+ <opt>val:dtv.C25_36</opt>
+ </option>
+ <option>
+ <name>128/180</name>
+ <key>C128_180</key>
+ <opt>val:dtv.C128_180</opt>
+ </option>
+ <option>
+ <name>13/18</name>
+ <key>C13_18</key>
+ <opt>val:dtv.C13_18</opt>
+ </option>
+ <option>
+ <name>135/180</name>
+ <key>C135_180</key>
+ <opt>val:dtv.C135_180</opt>
+ </option>
+ <option>
+ <name>140/180</name>
+ <key>C140_180</key>
+ <opt>val:dtv.C140_180</opt>
+ </option>
+ <option>
+ <name>7/9</name>
+ <key>C7_9</key>
+ <opt>val:dtv.C7_9</opt>
+ </option>
+ <option>
+ <name>7/15</name>
+ <key>C7_15</key>
+ <opt>val:dtv.C7_15</opt>
+ </option>
+ <option>
+ <name>8/15</name>
+ <key>C8_15</key>
+ <opt>val:dtv.C8_15</opt>
+ </option>
+ <option>
+ <name>32/45</name>
+ <key>C32_45</key>
+ <opt>val:dtv.C32_45</opt>
+ </option>
+ </param>
+ <param>
+ <name>Constellation</name>
+ <key>constellation</key>
+ <type>enum</type>
+ <option>
+ <name>QPSK</name>
+ <key>MOD_QPSK</key>
+ <opt>val:dtv.MOD_QPSK</opt>
+ </option>
+ <option>
+ <name>8PSK</name>
+ <key>MOD_8PSK</key>
+ <opt>val:dtv.MOD_8PSK</opt>
+ </option>
+ <option>
+ <name>8APSK</name>
+ <key>MOD_8APSK</key>
+ <opt>val:dtv.MOD_8APSK</opt>
+ </option>
+ <option>
+ <name>16APSK</name>
+ <key>MOD_16APSK</key>
+ <opt>val:dtv.MOD_16APSK</opt>
+ </option>
+ <option>
+ <name>8+8APSK</name>
+ <key>MOD_8_8APSK</key>
+ <opt>val:dtv.MOD_8_8APSK</opt>
+ </option>
+ <option>
+ <name>32APSK</name>
+ <key>MOD_32APSK</key>
+ <opt>val:dtv.MOD_32APSK</opt>
+ </option>
+ <option>
+ <name>4+12+16rbAPSK</name>
+ <key>MOD_4_12_16APSK</key>
+ <opt>val:dtv.MOD_4_12_16APSK</opt>
+ </option>
+ <option>
+ <name>4+8+4+16APSK</name>
+ <key>MOD_4_8_4_16APSK</key>
+ <opt>val:dtv.MOD_4_8_4_16APSK</opt>
+ </option>
+ <option>
+ <name>64APSK</name>
+ <key>MOD_64APSK</key>
+ <opt>val:dtv.MOD_64APSK</opt>
+ </option>
+ <option>
+ <name>8+16+20+20APSK</name>
+ <key>MOD_8_16_20_20APSK</key>
+ <opt>val:dtv.MOD_8_16_20_20APSK</opt>
+ </option>
+ <option>
+ <name>4+12+20+28APSK</name>
+ <key>MOD_4_12_20_28APSK</key>
+ <opt>val:dtv.MOD_4_12_20_28APSK</opt>
+ </option>
+ <option>
+ <name>128APSK</name>
+ <key>MOD_128APSK</key>
+ <opt>val:dtv.MOD_128APSK</opt>
+ </option>
+ <option>
+ <name>256APSK</name>
+ <key>MOD_256APSK</key>
+ <opt>val:dtv.MOD_256APSK</opt>
+ </option>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>byte</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>byte</type>
+ </source>
+</block>
diff --git a/gr-dtv/grc/dtv_dvbs2_modulator_bc.xml
b/gr-dtv/grc/dtv_dvbs2_modulator_bc.xml
new file mode 100644
index 0000000..1f7fef0
--- /dev/null
+++ b/gr-dtv/grc/dtv_dvbs2_modulator_bc.xml
@@ -0,0 +1,265 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+## DVB-S2X Modulator
+###################################################
+ -->
+<block>
+ <name>DVB-S2X Modulator</name>
+ <key>dtv_dvbs2_modulator_bc</key>
+ <import>from gnuradio import dtv</import>
+ <make>dtv.dvbs2_modulator_bc($framesize.val, $rate.val,
$constellation.val)</make>
+ <param>
+ <name>FECFRAME size</name>
+ <key>framesize</key>
+ <type>enum</type>
+ <option>
+ <name>Normal</name>
+ <key>FECFRAME_NORMAL</key>
+ <opt>val:dtv.FECFRAME_NORMAL</opt>
+ </option>
+ <option>
+ <name>Short</name>
+ <key>FECFRAME_SHORT</key>
+ <opt>val:dtv.FECFRAME_SHORT</opt>
+ </option>
+ </param>
+ <param>
+ <name>Code rate</name>
+ <key>rate</key>
+ <type>enum</type>
+ <option>
+ <name>Other</name>
+ <key>C_OTHER</key>
+ <opt>val:dtv.C_OTHER</opt>
+ </option>
+ <option>
+ <name>3/5</name>
+ <key>C3_5</key>
+ <opt>val:dtv.C3_5</opt>
+ </option>
+ <option>
+ <name>2/3</name>
+ <key>C2_3</key>
+ <opt>val:dtv.C2_3</opt>
+ </option>
+ <option>
+ <name>3/4</name>
+ <key>C3_4</key>
+ <opt>val:dtv.C3_4</opt>
+ </option>
+ <option>
+ <name>4/5</name>
+ <key>C4_5</key>
+ <opt>val:dtv.C4_5</opt>
+ </option>
+ <option>
+ <name>5/6</name>
+ <key>C5_6</key>
+ <opt>val:dtv.C5_6</opt>
+ </option>
+ <option>
+ <name>8/9</name>
+ <key>C8_9</key>
+ <opt>val:dtv.C8_9</opt>
+ </option>
+ <option>
+ <name>9/10</name>
+ <key>C9_10</key>
+ <opt>val:dtv.C9_10</opt>
+ </option>
+ <option>
+ <name>90/180</name>
+ <key>C90_180</key>
+ <opt>val:dtv.C90_180</opt>
+ </option>
+ <option>
+ <name>96/180</name>
+ <key>C96_180</key>
+ <opt>val:dtv.C96_180</opt>
+ </option>
+ <option>
+ <name>100/180</name>
+ <key>C100_180</key>
+ <opt>val:dtv.C100_180</opt>
+ </option>
+ <option>
+ <name>104/180</name>
+ <key>C104_180</key>
+ <opt>val:dtv.C104_180</opt>
+ </option>
+ <option>
+ <name>26/45</name>
+ <key>C26_45</key>
+ <opt>val:dtv.C26_45</opt>
+ </option>
+ <option>
+ <name>18/30</name>
+ <key>C18_30</key>
+ <opt>val:dtv.C18_30</opt>
+ </option>
+ <option>
+ <name>28/45</name>
+ <key>C28_45</key>
+ <opt>val:dtv.C28_45</opt>
+ </option>
+ <option>
+ <name>23/36</name>
+ <key>C23_36</key>
+ <opt>val:dtv.C23_36</opt>
+ </option>
+ <option>
+ <name>116/180</name>
+ <key>C116_180</key>
+ <opt>val:dtv.C116_180</opt>
+ </option>
+ <option>
+ <name>20/30</name>
+ <key>C20_30</key>
+ <opt>val:dtv.C20_30</opt>
+ </option>
+ <option>
+ <name>124/180</name>
+ <key>C124_180</key>
+ <opt>val:dtv.C124_180</opt>
+ </option>
+ <option>
+ <name>25/36</name>
+ <key>C25_36</key>
+ <opt>val:dtv.C25_36</opt>
+ </option>
+ <option>
+ <name>128/180</name>
+ <key>C128_180</key>
+ <opt>val:dtv.C128_180</opt>
+ </option>
+ <option>
+ <name>13/18</name>
+ <key>C13_18</key>
+ <opt>val:dtv.C13_18</opt>
+ </option>
+ <option>
+ <name>132/180</name>
+ <key>C132_180</key>
+ <opt>val:dtv.C132_180</opt>
+ </option>
+ <option>
+ <name>22/30</name>
+ <key>C22_30</key>
+ <opt>val:dtv.C22_30</opt>
+ </option>
+ <option>
+ <name>135/180</name>
+ <key>C135_180</key>
+ <opt>val:dtv.C135_180</opt>
+ </option>
+ <option>
+ <name>140/180</name>
+ <key>C140_180</key>
+ <opt>val:dtv.C140_180</opt>
+ </option>
+ <option>
+ <name>7/9</name>
+ <key>C7_9</key>
+ <opt>val:dtv.C7_9</opt>
+ </option>
+ <option>
+ <name>154/180</name>
+ <key>C154_180</key>
+ <opt>val:dtv.C154_180</opt>
+ </option>
+ <option>
+ <name>7/15</name>
+ <key>C7_15</key>
+ <opt>val:dtv.C7_15</opt>
+ </option>
+ <option>
+ <name>8/15</name>
+ <key>C8_15</key>
+ <opt>val:dtv.C8_15</opt>
+ </option>
+ <option>
+ <name>32/45</name>
+ <key>C32_45</key>
+ <opt>val:dtv.C32_45</opt>
+ </option>
+ </param>
+ <param>
+ <name>Constellation</name>
+ <key>constellation</key>
+ <type>enum</type>
+ <option>
+ <name>QPSK</name>
+ <key>MOD_QPSK</key>
+ <opt>val:dtv.MOD_QPSK</opt>
+ </option>
+ <option>
+ <name>8PSK</name>
+ <key>MOD_8PSK</key>
+ <opt>val:dtv.MOD_8PSK</opt>
+ </option>
+ <option>
+ <name>8APSK</name>
+ <key>MOD_8APSK</key>
+ <opt>val:dtv.MOD_8APSK</opt>
+ </option>
+ <option>
+ <name>16APSK</name>
+ <key>MOD_16APSK</key>
+ <opt>val:dtv.MOD_16APSK</opt>
+ </option>
+ <option>
+ <name>8+8APSK</name>
+ <key>MOD_8_8APSK</key>
+ <opt>val:dtv.MOD_8_8APSK</opt>
+ </option>
+ <option>
+ <name>32APSK</name>
+ <key>MOD_32APSK</key>
+ <opt>val:dtv.MOD_32APSK</opt>
+ </option>
+ <option>
+ <name>4+12+16rbAPSK</name>
+ <key>MOD_4_12_16APSK</key>
+ <opt>val:dtv.MOD_4_12_16APSK</opt>
+ </option>
+ <option>
+ <name>4+8+4+16APSK</name>
+ <key>MOD_4_8_4_16APSK</key>
+ <opt>val:dtv.MOD_4_8_4_16APSK</opt>
+ </option>
+ <option>
+ <name>64APSK</name>
+ <key>MOD_64APSK</key>
+ <opt>val:dtv.MOD_64APSK</opt>
+ </option>
+ <option>
+ <name>8+6+20+20APSK</name>
+ <key>MOD_8_16_20_20APSK</key>
+ <opt>val:dtv.MOD_8_16_20_20APSK</opt>
+ </option>
+ <option>
+ <name>4+12+20+28APSK</name>
+ <key>MOD_4_12_20_28APSK</key>
+ <opt>val:dtv.MOD_4_12_20_28APSK</opt>
+ </option>
+ <option>
+ <name>128APSK</name>
+ <key>MOD_128APSK</key>
+ <opt>val:dtv.MOD_128APSK</opt>
+ </option>
+ <option>
+ <name>256APSK</name>
+ <key>MOD_256APSK</key>
+ <opt>val:dtv.MOD_256APSK</opt>
+ </option>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>byte</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>complex</type>
+ </source>
+</block>
diff --git a/gr-dtv/grc/dtv_dvbs2_physical_cc.xml
b/gr-dtv/grc/dtv_dvbs2_physical_cc.xml
new file mode 100644
index 0000000..ad9eb9a
--- /dev/null
+++ b/gr-dtv/grc/dtv_dvbs2_physical_cc.xml
@@ -0,0 +1,331 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+## DVB-S2 Physical Layer Framer
+###################################################
+ -->
+<block>
+ <name>Physical Layer Framer</name>
+ <key>dtv_dvbs2_physical_cc</key>
+ <import>from gnuradio import dtv</import>
+ <make>dtv.dvbs2_physical_cc($framesize.val, $rate.val, $constellation.val,
$pilots.val, $goldcode)</make>
+ <param>
+ <name>FECFRAME size</name>
+ <key>framesize</key>
+ <type>enum</type>
+ <option>
+ <name>Normal</name>
+ <key>FECFRAME_NORMAL</key>
+ <opt>val:dtv.FECFRAME_NORMAL</opt>
+ </option>
+ <option>
+ <name>Short</name>
+ <key>FECFRAME_SHORT</key>
+ <opt>val:dtv.FECFRAME_SHORT</opt>
+ </option>
+ </param>
+ <param>
+ <name>Code rate</name>
+ <key>rate</key>
+ <type>enum</type>
+ <option>
+ <name>1/4</name>
+ <key>C1_4</key>
+ <opt>val:dtv.C1_4</opt>
+ </option>
+ <option>
+ <name>1/3</name>
+ <key>C1_3</key>
+ <opt>val:dtv.C1_3</opt>
+ </option>
+ <option>
+ <name>2/5</name>
+ <key>C2_5</key>
+ <opt>val:dtv.C2_5</opt>
+ </option>
+ <option>
+ <name>1/2</name>
+ <key>C1_2</key>
+ <opt>val:dtv.C1_2</opt>
+ </option>
+ <option>
+ <name>3/5</name>
+ <key>C3_5</key>
+ <opt>val:dtv.C3_5</opt>
+ </option>
+ <option>
+ <name>2/3</name>
+ <key>C2_3</key>
+ <opt>val:dtv.C2_3</opt>
+ </option>
+ <option>
+ <name>3/4</name>
+ <key>C3_4</key>
+ <opt>val:dtv.C3_4</opt>
+ </option>
+ <option>
+ <name>4/5</name>
+ <key>C4_5</key>
+ <opt>val:dtv.C4_5</opt>
+ </option>
+ <option>
+ <name>5/6</name>
+ <key>C5_6</key>
+ <opt>val:dtv.C5_6</opt>
+ </option>
+ <option>
+ <name>8/9</name>
+ <key>C8_9</key>
+ <opt>val:dtv.C8_9</opt>
+ </option>
+ <option>
+ <name>9/10</name>
+ <key>C9_10</key>
+ <opt>val:dtv.C9_10</opt>
+ </option>
+ <option>
+ <name>13/45</name>
+ <key>C13_45</key>
+ <opt>val:dtv.C13_45</opt>
+ </option>
+ <option>
+ <name>9/20</name>
+ <key>C9_20</key>
+ <opt>val:dtv.C9_20</opt>
+ </option>
+ <option>
+ <name>90/180</name>
+ <key>C90_180</key>
+ <opt>val:dtv.C90_180</opt>
+ </option>
+ <option>
+ <name>96/180</name>
+ <key>C96_180</key>
+ <opt>val:dtv.C96_180</opt>
+ </option>
+ <option>
+ <name>11/20</name>
+ <key>C11_20</key>
+ <opt>val:dtv.C11_20</opt>
+ </option>
+ <option>
+ <name>100/180</name>
+ <key>C100_180</key>
+ <opt>val:dtv.C100_180</opt>
+ </option>
+ <option>
+ <name>104/180</name>
+ <key>C104_180</key>
+ <opt>val:dtv.C104_180</opt>
+ </option>
+ <option>
+ <name>26/45</name>
+ <key>C26_45</key>
+ <opt>val:dtv.C26_45</opt>
+ </option>
+ <option>
+ <name>18/30</name>
+ <key>C18_30</key>
+ <opt>val:dtv.C18_30</opt>
+ </option>
+ <option>
+ <name>28/45</name>
+ <key>C28_45</key>
+ <opt>val:dtv.C28_45</opt>
+ </option>
+ <option>
+ <name>23/36</name>
+ <key>C23_36</key>
+ <opt>val:dtv.C23_36</opt>
+ </option>
+ <option>
+ <name>116/180</name>
+ <key>C116_180</key>
+ <opt>val:dtv.C116_180</opt>
+ </option>
+ <option>
+ <name>20/30</name>
+ <key>C20_30</key>
+ <opt>val:dtv.C20_30</opt>
+ </option>
+ <option>
+ <name>124/180</name>
+ <key>C124_180</key>
+ <opt>val:dtv.C124_180</opt>
+ </option>
+ <option>
+ <name>25/36</name>
+ <key>C25_36</key>
+ <opt>val:dtv.C25_36</opt>
+ </option>
+ <option>
+ <name>128/180</name>
+ <key>C128_180</key>
+ <opt>val:dtv.C128_180</opt>
+ </option>
+ <option>
+ <name>13/18</name>
+ <key>C13_18</key>
+ <opt>val:dtv.C13_18</opt>
+ </option>
+ <option>
+ <name>132/180</name>
+ <key>C132_180</key>
+ <opt>val:dtv.C132_180</opt>
+ </option>
+ <option>
+ <name>22/30</name>
+ <key>C22_30</key>
+ <opt>val:dtv.C22_30</opt>
+ </option>
+ <option>
+ <name>135/180</name>
+ <key>C135_180</key>
+ <opt>val:dtv.C135_180</opt>
+ </option>
+ <option>
+ <name>140/180</name>
+ <key>C140_180</key>
+ <opt>val:dtv.C140_180</opt>
+ </option>
+ <option>
+ <name>7/9</name>
+ <key>C7_9</key>
+ <opt>val:dtv.C7_9</opt>
+ </option>
+ <option>
+ <name>154/180</name>
+ <key>C154_180</key>
+ <opt>val:dtv.C154_180</opt>
+ </option>
+ <option>
+ <name>11/45</name>
+ <key>C11_45</key>
+ <opt>val:dtv.C11_45</opt>
+ </option>
+ <option>
+ <name>4/15</name>
+ <key>C4_15</key>
+ <opt>val:dtv.C4_15</opt>
+ </option>
+ <option>
+ <name>14/45</name>
+ <key>C14_45</key>
+ <opt>val:dtv.C14_45</opt>
+ </option>
+ <option>
+ <name>7/15</name>
+ <key>C7_15</key>
+ <opt>val:dtv.C7_15</opt>
+ </option>
+ <option>
+ <name>8/15</name>
+ <key>C8_15</key>
+ <opt>val:dtv.C8_15</opt>
+ </option>
+ <option>
+ <name>32/45</name>
+ <key>C32_45</key>
+ <opt>val:dtv.C32_45</opt>
+ </option>
+ </param>
+ <param>
+ <name>Constellation</name>
+ <key>constellation</key>
+ <type>enum</type>
+ <option>
+ <name>QPSK</name>
+ <key>MOD_QPSK</key>
+ <opt>val:dtv.MOD_QPSK</opt>
+ </option>
+ <option>
+ <name>8PSK</name>
+ <key>MOD_8PSK</key>
+ <opt>val:dtv.MOD_8PSK</opt>
+ </option>
+ <option>
+ <name>8APSK</name>
+ <key>MOD_8APSK</key>
+ <opt>val:dtv.MOD_8APSK</opt>
+ </option>
+ <option>
+ <name>16APSK</name>
+ <key>MOD_16APSK</key>
+ <opt>val:dtv.MOD_16APSK</opt>
+ </option>
+ <option>
+ <name>8+8APSK</name>
+ <key>MOD_8_8APSK</key>
+ <opt>val:dtv.MOD_8_8APSK</opt>
+ </option>
+ <option>
+ <name>32APSK</name>
+ <key>MOD_32APSK</key>
+ <opt>val:dtv.MOD_32APSK</opt>
+ </option>
+ <option>
+ <name>4+12+16rbAPSK</name>
+ <key>MOD_4_12_16APSK</key>
+ <opt>val:dtv.MOD_4_12_16APSK</opt>
+ </option>
+ <option>
+ <name>4+8+4+16APSK</name>
+ <key>MOD_4_8_4_16APSK</key>
+ <opt>val:dtv.MOD_4_8_4_16APSK</opt>
+ </option>
+ <option>
+ <name>64APSK</name>
+ <key>MOD_64APSK</key>
+ <opt>val:dtv.MOD_64APSK</opt>
+ </option>
+ <option>
+ <name>8+6+20+20APSK</name>
+ <key>MOD_8_16_20_20APSK</key>
+ <opt>val:dtv.MOD_8_16_20_20APSK</opt>
+ </option>
+ <option>
+ <name>4+12+20+28APSK</name>
+ <key>MOD_4_12_20_28APSK</key>
+ <opt>val:dtv.MOD_4_12_20_28APSK</opt>
+ </option>
+ <option>
+ <name>128APSK</name>
+ <key>MOD_128APSK</key>
+ <opt>val:dtv.MOD_128APSK</opt>
+ </option>
+ <option>
+ <name>256APSK</name>
+ <key>MOD_256APSK</key>
+ <opt>val:dtv.MOD_256APSK</opt>
+ </option>
+ </param>
+ <param>
+ <name>Pilots</name>
+ <key>pilots</key>
+ <type>enum</type>
+ <option>
+ <name>Off</name>
+ <key>PILOTS_OFF</key>
+ <opt>val:dtv.PILOTS_OFF</opt>
+ </option>
+ <option>
+ <name>On</name>
+ <key>PILOTS_ON</key>
+ <opt>val:dtv.PILOTS_ON</opt>
+ </option>
+ </param>
+ <param>
+ <name>Gold Code</name>
+ <key>goldcode</key>
+ <value>0</value>
+ <type>int</type>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>complex</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>complex</type>
+ </source>
+</block>
diff --git a/gr-dtv/include/gnuradio/dtv/CMakeLists.txt
b/gr-dtv/include/gnuradio/dtv/CMakeLists.txt
index 7add5a8..9726449 100644
--- a/gr-dtv/include/gnuradio/dtv/CMakeLists.txt
+++ b/gr-dtv/include/gnuradio/dtv/CMakeLists.txt
@@ -54,6 +54,9 @@ install(FILES
dvbt2_paprtr_cc.h
dvbt2_p1insertion_cc.h
dvbt2_miso_cc.h
+ dvbs2_interleaver_bb.h
+ dvbs2_modulator_bc.h
+ dvbs2_physical_cc.h
DESTINATION ${GR_INCLUDE_DIR}/gnuradio/dtv
COMPONENT "dtv_devel"
)
diff --git a/gr-dtv/include/gnuradio/dtv/dvbs2_interleaver_bb.h
b/gr-dtv/include/gnuradio/dtv/dvbs2_interleaver_bb.h
new file mode 100644
index 0000000..3aba9da
--- /dev/null
+++ b/gr-dtv/include/gnuradio/dtv/dvbs2_interleaver_bb.h
@@ -0,0 +1,57 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This 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.
+ *
+ * This software 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 this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_DTV_DVBS2_INTERLEAVER_BB_H
+#define INCLUDED_DTV_DVBS2_INTERLEAVER_BB_H
+
+#include <gnuradio/dtv/api.h>
+#include <gnuradio/dtv/dvb_config.h>
+#include <gnuradio/block.h>
+
+namespace gr {
+ namespace dtv {
+
+ /*!
+ * \brief Bit interleaves DVB-S2 FEC baseband frames.
+ * \ingroup dtv
+ *
+ * Input: Normal or short FEC baseband frames with appended LPDC (LDPCFEC).
+ * Output: Bit interleaved baseband frames.
+ */
+ class DTV_API dvbs2_interleaver_bb : virtual public gr::block
+ {
+ public:
+ typedef boost::shared_ptr<dvbs2_interleaver_bb> sptr;
+
+ /*!
+ * \brief Create a DVB-S2 bit interleaver.
+ *
+ * \param framesize FEC frame size (normal or short).
+ * \param rate FEC code rate.
+ * \param constellation DVB-S2 constellation.
+ */
+ static sptr make(dvb_framesize_t framesize, dvb_code_rate_t rate,
dvb_constellation_t constellation);
+ };
+
+ } // namespace dtv
+} // namespace gr
+
+#endif /* INCLUDED_DTV_DVBS2_INTERLEAVER_BB_H */
+
diff --git a/gr-dtv/include/gnuradio/dtv/dvbs2_modulator_bc.h
b/gr-dtv/include/gnuradio/dtv/dvbs2_modulator_bc.h
new file mode 100644
index 0000000..f38cf42
--- /dev/null
+++ b/gr-dtv/include/gnuradio/dtv/dvbs2_modulator_bc.h
@@ -0,0 +1,57 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This 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.
+ *
+ * This software 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 this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_DTV_DVBS2_MODULATOR_BC_H
+#define INCLUDED_DTV_DVBS2_MODULATOR_BC_H
+
+#include <gnuradio/dtv/api.h>
+#include <gnuradio/dtv/dvb_config.h>
+#include <gnuradio/block.h>
+
+namespace gr {
+ namespace dtv {
+
+ /*!
+ * \brief Modulates DVB-S2 frames.
+ * \ingroup dtv
+ *
+ * Input: Bit interleaved baseband frames.
+ * Output: QPSK, 8PSK, 16APSK or 32APSK modulated complex IQ values
(XFECFRAME).
+ */
+ class DTV_API dvbs2_modulator_bc : virtual public gr::block
+ {
+ public:
+ typedef boost::shared_ptr<dvbs2_modulator_bc> sptr;
+
+ /*!
+ * \brief Create a DVB-S2 constellation modulator.
+ *
+ * \param constellation DVB-S2 constellation.
+ * \param rate FEC code rate.
+ * \param framesize FEC frame size (normal or short).
+ */
+ static sptr make(dvb_framesize_t framesize, dvb_code_rate_t rate,
dvb_constellation_t constellation);
+ };
+
+ } // namespace dtv
+} // namespace gr
+
+#endif /* INCLUDED_DTV_DVBS2_MODULATOR_BC_H */
+
diff --git a/gr-dtv/include/gnuradio/dtv/dvbs2_physical_cc.h
b/gr-dtv/include/gnuradio/dtv/dvbs2_physical_cc.h
new file mode 100644
index 0000000..a7d6b3b
--- /dev/null
+++ b/gr-dtv/include/gnuradio/dtv/dvbs2_physical_cc.h
@@ -0,0 +1,60 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This 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.
+ *
+ * This software 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 this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_DTV_DVBS2_PHYSICAL_CC_H
+#define INCLUDED_DTV_DVBS2_PHYSICAL_CC_H
+
+#include <gnuradio/dtv/api.h>
+#include <gnuradio/dtv/dvb_config.h>
+#include <gnuradio/dtv/dvbs2_config.h>
+#include <gnuradio/block.h>
+
+namespace gr {
+ namespace dtv {
+
+ /*!
+ * \brief Signals DVB-S2 physical layer frames.
+ * \ingroup dtv
+ *
+ * Input: QPSK, 8PSK, 16APSK or 32APSK modulated complex IQ values
(XFECFRAME).
+ * Output: DVB-S2 PLFRAME.
+ */
+ class DTV_API dvbs2_physical_cc : virtual public gr::block
+ {
+ public:
+ typedef boost::shared_ptr<dvbs2_physical_cc> sptr;
+
+ /*!
+ * \brief Create a DVB-S2 physical layer framer.
+ *
+ * \param constellation DVB-S2 constellation.
+ * \param rate FEC code rate.
+ * \param pilots pilot symbols (on/off).
+ * \param framesize FEC frame size (normal or short).
+ * \param goldcode physical layer scrambler Gold code (0 to 262141
inclusive).
+ */
+ static sptr make(dvb_framesize_t framesize, dvb_code_rate_t rate,
dvb_constellation_t constellation, dvbs2_pilots_t pilots, int goldcode);
+ };
+
+ } // namespace dtv
+} // namespace gr
+
+#endif /* INCLUDED_DTV_DVBS2_PHYSICAL_CC_H */
+
diff --git a/gr-dtv/lib/CMakeLists.txt b/gr-dtv/lib/CMakeLists.txt
index 25838ca..b72e7a4 100644
--- a/gr-dtv/lib/CMakeLists.txt
+++ b/gr-dtv/lib/CMakeLists.txt
@@ -91,6 +91,9 @@ list(APPEND dtv_sources
dvbt2/dvbt2_paprtr_cc_impl.cc
dvbt2/dvbt2_p1insertion_cc_impl.cc
dvbt2/dvbt2_miso_cc_impl.cc
+ dvbs2/dvbs2_interleaver_bb_impl.cc
+ dvbs2/dvbs2_modulator_bc_impl.cc
+ dvbs2/dvbs2_physical_cc_impl.cc
)
if(ENABLE_GR_CTRLPORT)
diff --git a/gr-dtv/lib/dvbs2/dvbs2_interleaver_bb_impl.cc
b/gr-dtv/lib/dvbs2/dvbs2_interleaver_bb_impl.cc
new file mode 100644
index 0000000..7abfbe3
--- /dev/null
+++ b/gr-dtv/lib/dvbs2/dvbs2_interleaver_bb_impl.cc
@@ -0,0 +1,587 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This 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.
+ *
+ * This software 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 this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gnuradio/io_signature.h>
+#include "dvbs2_interleaver_bb_impl.h"
+
+namespace gr {
+ namespace dtv {
+
+ dvbs2_interleaver_bb::sptr
+ dvbs2_interleaver_bb::make(dvb_framesize_t framesize, dvb_code_rate_t
rate, dvb_constellation_t constellation)
+ {
+ return gnuradio::get_initial_sptr
+ (new dvbs2_interleaver_bb_impl(framesize, rate, constellation));
+ }
+
+ /*
+ * The private constructor
+ */
+ dvbs2_interleaver_bb_impl::dvbs2_interleaver_bb_impl(dvb_framesize_t
framesize, dvb_code_rate_t rate, dvb_constellation_t constellation)
+ : gr::block("dvbs2_interleaver_bb",
+ gr::io_signature::make(1, 1, sizeof(unsigned char)),
+ gr::io_signature::make(1, 1, sizeof(unsigned char)))
+ {
+ int rows;
+ signal_constellation = constellation;
+ code_rate = rate;
+ if (framesize == FECFRAME_NORMAL) {
+ frame_size = FRAME_SIZE_NORMAL;
+ }
+ else {
+ frame_size = FRAME_SIZE_SHORT;
+ }
+ switch (constellation) {
+ case MOD_QPSK:
+ mod = 2;
+ rows = frame_size / mod;
+ set_output_multiple(rows);
+ packed_items = rows;
+ break;
+ case MOD_8PSK:
+ mod = 3;
+ rows = frame_size / mod;
+ /* 210 */
+ if (rate == C3_5) {
+ rowaddr0 = rows * 2;
+ rowaddr1 = rows;
+ rowaddr2 = 0;
+ }
+ /* 102 */
+ else if (rate == C25_36 || rate == C13_18 || rate == C7_15 || rate
== C8_15) {
+ rowaddr0 = rows;
+ rowaddr1 = 0;
+ rowaddr2 = rows * 2;
+ }
+ /* 012 */
+ else {
+ rowaddr0 = 0;
+ rowaddr1 = rows;
+ rowaddr2 = rows * 2;
+ }
+ set_output_multiple(rows);
+ packed_items = rows;
+ break;
+ case MOD_8APSK:
+ mod = 3;
+ rows = frame_size / mod;
+ /* 012 */
+ rowaddr0 = 0;
+ rowaddr1 = rows;
+ rowaddr2 = rows * 2;
+ set_output_multiple(rows);
+ packed_items = rows;
+ break;
+ case MOD_16APSK:
+ mod = 4;
+ rows = frame_size / mod;
+ if (rate == C26_45) {
+ /* 3201 */
+ if (frame_size == FRAME_SIZE_NORMAL) {
+ rowaddr0 = rows * 3;
+ rowaddr1 = rows * 2;
+ rowaddr2 = 0;
+ rowaddr3 = rows;
+ }
+ /* 2130 */
+ else {
+ rowaddr0 = rows * 2;
+ rowaddr1 = rows;
+ rowaddr2 = rows * 3;
+ rowaddr3 = 0;
+ }
+ }
+ else if (rate == C3_5) {
+ /* 3210 */
+ if (frame_size == FRAME_SIZE_NORMAL) {
+ rowaddr0 = rows * 3;
+ rowaddr1 = rows * 2;
+ rowaddr2 = rows;
+ rowaddr3 = 0;
+ }
+ /* 3201 */
+ else {
+ rowaddr0 = rows * 3;
+ rowaddr1 = rows * 2;
+ rowaddr2 = 0;
+ rowaddr3 = rows;
+ }
+ }
+ /* 3012 */
+ else if (rate == C28_45) {
+ rowaddr0 = rows * 3;
+ rowaddr1 = 0;
+ rowaddr2 = rows;
+ rowaddr3 = rows * 2;
+ }
+ /* 3021 */
+ else if (rate == C23_36 || rate == C13_18) {
+ rowaddr0 = rows * 3;
+ rowaddr1 = 0;
+ rowaddr2 = rows * 2;
+ rowaddr3 = rows;
+ }
+ /* 2310 */
+ else if (rate == C25_36) {
+ rowaddr0 = rows * 2;
+ rowaddr1 = rows * 3;
+ rowaddr2 = rows;
+ rowaddr3 = 0;
+ }
+ /* 2103 */
+ else if (rate == C7_15 || rate == C8_15) {
+ rowaddr0 = rows * 2;
+ rowaddr1 = rows;
+ rowaddr2 = 0;
+ rowaddr3 = rows * 3;
+ }
+ /* 0123 */
+ else {
+ rowaddr0 = 0;
+ rowaddr1 = rows;
+ rowaddr2 = rows * 2;
+ rowaddr3 = rows * 3;
+ }
+ set_output_multiple(rows);
+ packed_items = rows;
+ break;
+ case MOD_8_8APSK:
+ mod = 4;
+ rows = frame_size / mod;
+ /* 3210 */
+ if (rate == C90_180) {
+ rowaddr0 = rows * 3;
+ rowaddr1 = rows * 2;
+ rowaddr2 = rows;
+ rowaddr3 = 0;
+ }
+ /* 2310 */
+ else if (rate == C96_180) {
+ rowaddr0 = rows * 2;
+ rowaddr1 = rows * 3;
+ rowaddr2 = rows;
+ rowaddr3 = 0;
+ }
+ /* 2301 */
+ else if (rate == C100_180) {
+ rowaddr0 = rows * 2;
+ rowaddr1 = rows * 3;
+ rowaddr2 = 0;
+ rowaddr3 = rows;
+ }
+ /* 0123 */
+ else {
+ rowaddr0 = 0;
+ rowaddr1 = rows;
+ rowaddr2 = rows * 2;
+ rowaddr3 = rows * 3;
+ }
+ set_output_multiple(rows);
+ packed_items = rows;
+ break;
+ case MOD_32APSK:
+ mod = 5;
+ rows = frame_size / mod;
+ /* 01234 */
+ rowaddr0 = 0;
+ rowaddr1 = rows;
+ rowaddr2 = rows * 2;
+ rowaddr3 = rows * 3;
+ rowaddr4 = rows * 4;
+ set_output_multiple(rows);
+ packed_items = rows;
+ break;
+ case MOD_4_12_16APSK:
+ mod = 5;
+ rows = frame_size / mod;
+ /* 21430 */
+ if (frame_size == FRAME_SIZE_NORMAL) {
+ rowaddr0 = rows * 2;
+ rowaddr1 = rows;
+ rowaddr2 = rows * 4;
+ rowaddr3 = rows * 3;
+ rowaddr4 = 0;
+ }
+ else {
+ /* 41230 */
+ if (rate == C2_3) {
+ rowaddr0 = rows * 4;
+ rowaddr1 = rows;
+ rowaddr2 = rows * 2;
+ rowaddr3 = rows * 3;
+ rowaddr4 = 0;
+ }
+ /* 10423 */
+ else if (rate == C32_45) {
+ rowaddr0 = rows;
+ rowaddr1 = 0;
+ rowaddr2 = rows * 4;
+ rowaddr3 = rows * 2;
+ rowaddr4 = rows * 3;
+ }
+ }
+ set_output_multiple(rows);
+ packed_items = rows;
+ break;
+ case MOD_4_8_4_16APSK:
+ mod = 5;
+ rows = frame_size / mod;
+ /* 40213 */
+ if (rate == C140_180) {
+ rowaddr0 = rows * 4;
+ rowaddr1 = 0;
+ rowaddr2 = rows * 2;
+ rowaddr3 = rows;
+ rowaddr4 = rows * 3;
+ }
+ /* 40312 */
+ else {
+ rowaddr0 = rows * 4;
+ rowaddr1 = 0;
+ rowaddr2 = rows * 3;
+ rowaddr3 = rows;
+ rowaddr4 = rows * 2;
+ }
+ set_output_multiple(rows);
+ packed_items = rows;
+ break;
+ case MOD_64APSK:
+ mod = 6;
+ rows = frame_size / mod;
+ /* 305214 */
+ rowaddr0 = rows * 3;
+ rowaddr1 = 0;
+ rowaddr2 = rows * 5;
+ rowaddr3 = rows * 2;
+ rowaddr4 = rows;
+ rowaddr5 = rows * 4;
+ set_output_multiple(rows);
+ packed_items = rows;
+ break;
+ case MOD_8_16_20_20APSK:
+ mod = 6;
+ rows = frame_size / mod;
+ /* 201543 */
+ if (rate == C7_9) {
+ rowaddr0 = rows * 2;
+ rowaddr1 = 0;
+ rowaddr2 = rows;
+ rowaddr3 = rows * 5;
+ rowaddr4 = rows * 4;
+ rowaddr5 = rows * 3;
+ }
+ /* 124053 */
+ else if (rate == C4_5) {
+ rowaddr0 = rows;
+ rowaddr1 = rows * 2;
+ rowaddr2 = rows * 4;
+ rowaddr3 = 0;
+ rowaddr4 = rows * 5;
+ rowaddr5 = rows * 3;
+ }
+ /* 421053 */
+ else if (rate == C5_6) {
+ rowaddr0 = rows * 4;
+ rowaddr1 = rows * 2;
+ rowaddr2 = rows;
+ rowaddr3 = 0;
+ rowaddr4 = rows * 5;
+ rowaddr5 = rows * 3;
+ }
+ set_output_multiple(rows);
+ packed_items = rows;
+ break;
+ case MOD_4_12_20_28APSK:
+ mod = 6;
+ rows = frame_size / mod;
+ /* 520143 */
+ rowaddr0 = rows * 5;
+ rowaddr1 = rows * 2;
+ rowaddr2 = 0;
+ rowaddr3 = rows;
+ rowaddr4 = rows * 4;
+ rowaddr5 = rows * 3;
+ set_output_multiple(rows);
+ packed_items = rows;
+ break;
+ case MOD_128APSK:
+ mod = 7;
+ rows = (frame_size + 6) / mod;
+ /* 4250316 */
+ if (rate == C135_180) {
+ rowaddr0 = rows * 4;
+ rowaddr1 = rows * 2;
+ rowaddr2 = rows * 5;
+ rowaddr3 = 0;
+ rowaddr4 = rows * 3;
+ rowaddr5 = rows;
+ rowaddr6 = rows * 6;
+ }
+ /* 4130256 */
+ else if (rate == C140_180) {
+ rowaddr0 = rows * 4;
+ rowaddr1 = rows;
+ rowaddr2 = rows * 3;
+ rowaddr3 = 0;
+ rowaddr4 = rows * 2;
+ rowaddr5 = rows * 5;
+ rowaddr6 = rows * 6;
+ }
+ set_output_multiple(rows + 12);
+ packed_items = rows + 12;
+ break;
+ case MOD_256APSK:
+ mod = 8;
+ rows = frame_size / mod;
+ /* 40372156 */
+ if (rate == C116_180) {
+ rowaddr0 = rows * 4;
+ rowaddr1 = 0;
+ rowaddr2 = rows * 3;
+ rowaddr3 = rows * 7;
+ rowaddr4 = rows * 2;
+ rowaddr5 = rows;
+ rowaddr6 = rows * 5;
+ rowaddr7 = rows * 6;
+ }
+ /* 46320571 */
+ else if (rate == C124_180) {
+ rowaddr0 = rows * 4;
+ rowaddr1 = rows * 6;
+ rowaddr2 = rows * 3;
+ rowaddr3 = rows * 2;
+ rowaddr4 = 0;
+ rowaddr5 = rows * 5;
+ rowaddr6 = rows * 7;
+ rowaddr7 = rows;
+ }
+ /* 75642301 */
+ else if (rate == C128_180) {
+ rowaddr0 = rows * 7;
+ rowaddr1 = rows * 5;
+ rowaddr2 = rows * 6;
+ rowaddr3 = rows * 4;
+ rowaddr4 = rows * 2;
+ rowaddr5 = rows * 3;
+ rowaddr6 = 0;
+ rowaddr7 = rows;
+ }
+ /* 50743612 */
+ else if (rate == C135_180) {
+ rowaddr0 = rows * 5;
+ rowaddr1 = 0;
+ rowaddr2 = rows * 7;
+ rowaddr3 = rows * 4;
+ rowaddr4 = rows * 3;
+ rowaddr5 = rows * 6;
+ rowaddr6 = rows;
+ rowaddr7 = rows * 2;
+ }
+ /* 01234567 */
+ else {
+ rowaddr0 = 0;
+ rowaddr1 = rows;
+ rowaddr2 = rows * 2;
+ rowaddr3 = rows * 3;
+ rowaddr4 = rows * 4;
+ rowaddr5 = rows * 5;
+ rowaddr6 = rows * 6;
+ rowaddr7 = rows * 7;
+ }
+ set_output_multiple(rows);
+ packed_items = rows;
+ break;
+ default:
+ mod = 2;
+ rows = frame_size / mod;
+ set_output_multiple(rows);
+ packed_items = rows;
+ break;
+ }
+ }
+
+ /*
+ * Our virtual destructor.
+ */
+ dvbs2_interleaver_bb_impl::~dvbs2_interleaver_bb_impl()
+ {
+ }
+
+ void
+ dvbs2_interleaver_bb_impl::forecast (int noutput_items, gr_vector_int
&ninput_items_required)
+ {
+ if (signal_constellation == MOD_128APSK) {
+ ninput_items_required[0] = ((noutput_items / 9270) * 9258) * mod;
+ }
+ else {
+ ninput_items_required[0] = noutput_items * mod;
+ }
+ }
+
+ int
+ dvbs2_interleaver_bb_impl::general_work (int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+ {
+ const unsigned char *in = (const unsigned char *) input_items[0];
+ unsigned char *out = (unsigned char *) output_items[0];
+ int consumed = 0;
+ int produced = 0;
+ int rows;
+
+ switch (signal_constellation) {
+ case MOD_QPSK:
+ for (int i = 0; i < noutput_items; i += packed_items) {
+ rows = frame_size / 2;
+ for (int j = 0; j < rows; j++) {
+ out[produced] = in[consumed++] << 1;
+ out[produced++] |= in[consumed++];
+ }
+ }
+ break;
+ case MOD_8PSK:
+ case MOD_8APSK:
+ for (int i = 0; i < noutput_items; i += packed_items) {
+ rows = frame_size / 3;
+ const unsigned char *c1, *c2, *c3;
+ c1 = &in[consumed + rowaddr0];
+ c2 = &in[consumed + rowaddr1];
+ c3 = &in[consumed + rowaddr2];
+ for (int j = 0; j < rows; j++) {
+ out[produced++] = (c1[j]<<2) | (c2[j]<<1) | (c3[j]);
+ consumed += 3;
+ }
+ }
+ break;
+ case MOD_16APSK:
+ case MOD_8_8APSK:
+ for (int i = 0; i < noutput_items; i += packed_items) {
+ rows = frame_size / 4;
+ const unsigned char *c1, *c2, *c3, *c4;
+ c1 = &in[consumed + rowaddr0];
+ c2 = &in[consumed + rowaddr1];
+ c3 = &in[consumed + rowaddr2];
+ c4 = &in[consumed + rowaddr3];
+ for (int j = 0; j < rows; j++) {
+ out[produced++] = (c1[j]<<3) | (c2[j]<<2) | (c3[j]<<1) | (c4[j]);
+ consumed += 4;
+ }
+ }
+ break;
+ case MOD_32APSK:
+ case MOD_4_12_16APSK:
+ case MOD_4_8_4_16APSK:
+ for (int i = 0; i < noutput_items; i += packed_items) {
+ rows = frame_size / 5;
+ const unsigned char *c1, *c2, *c3, *c4, *c5;
+ c1 = &in[consumed + rowaddr0];
+ c2 = &in[consumed + rowaddr1];
+ c3 = &in[consumed + rowaddr2];
+ c4 = &in[consumed + rowaddr3];
+ c5 = &in[consumed + rowaddr4];
+ for (int j = 0; j < rows; j++) {
+ out[produced++] = (c1[j]<<4) | (c2[j]<<3) | (c3[j]<<2) |
(c4[j]<<1) | c5[j];
+ consumed += 5;
+ }
+ }
+ break;
+ case MOD_64APSK:
+ case MOD_8_16_20_20APSK:
+ case MOD_4_12_20_28APSK:
+ for (int i = 0; i < noutput_items; i += packed_items) {
+ rows = frame_size / 6;
+ const unsigned char *c1, *c2, *c3, *c4, *c5, *c6;
+ c1 = &in[consumed + rowaddr0];
+ c2 = &in[consumed + rowaddr1];
+ c3 = &in[consumed + rowaddr2];
+ c4 = &in[consumed + rowaddr3];
+ c5 = &in[consumed + rowaddr4];
+ c6 = &in[consumed + rowaddr5];
+ for (int j = 0; j < rows; j++) {
+ out[produced++] = (c1[j]<<5) | (c2[j]<<4) | (c3[j]<<3) |
(c4[j]<<2) | (c5[j]<<1) | c6[j];
+ consumed += 6;
+ }
+ }
+ break;
+ case MOD_128APSK:
+ for (int i = 0; i < noutput_items; i += packed_items) {
+ rows = (frame_size + 6) / 7;
+ const unsigned char *c1, *c2, *c3, *c4, *c5, *c6, *c7;
+ c1 = &in[consumed + rowaddr0];
+ c2 = &in[consumed + rowaddr1];
+ c3 = &in[consumed + rowaddr2];
+ c4 = &in[consumed + rowaddr3];
+ c5 = &in[consumed + rowaddr4];
+ c6 = &in[consumed + rowaddr5];
+ c7 = &in[consumed + rowaddr6];
+ for (int j = 0; j < rows; j++) {
+ out[produced++] = (c1[j]<<6) | (c2[j]<<5) | (c3[j]<<4) |
(c4[j]<<3) | (c5[j]<<2) | (c6[j]<<1) | c7[j];
+ consumed += 7;
+ }
+ for (int j = 0; j < 12; j++) {
+ out[produced++] = 0x7f;
+ }
+ }
+ break;
+ case MOD_256APSK:
+ for (int i = 0; i < noutput_items; i += packed_items) {
+ rows = frame_size / 8;
+ const unsigned char *c1, *c2, *c3, *c4, *c5, *c6, *c7, *c8;
+ c1 = &in[consumed + rowaddr0];
+ c2 = &in[consumed + rowaddr1];
+ c3 = &in[consumed + rowaddr2];
+ c4 = &in[consumed + rowaddr3];
+ c5 = &in[consumed + rowaddr4];
+ c6 = &in[consumed + rowaddr5];
+ c7 = &in[consumed + rowaddr6];
+ c8 = &in[consumed + rowaddr7];
+ for (int j = 0; j < rows; j++) {
+ out[produced++] = (c1[j]<<7) | (c2[j]<<6) | (c3[j]<<5) |
(c4[j]<<4) | (c5[j]<<3) | (c6[j]<<2) | (c7[j]<<1) | c8[j];
+ consumed += 8;
+ }
+ }
+ break;
+ default:
+ for (int i = 0; i < noutput_items; i += packed_items) {
+ rows = frame_size / 2;
+ for (int j = 0; j < rows; j++) {
+ out[produced] = in[consumed++] << 1;
+ out[produced++] |= in[consumed++];
+ }
+ }
+ break;
+ }
+
+ // Tell runtime system how many input items we consumed on
+ // each input stream.
+ consume_each (consumed);
+
+ // Tell runtime system how many output items we produced.
+ return noutput_items;
+ }
+
+ } /* namespace dtv */
+} /* namespace gr */
+
diff --git a/gr-dtv/lib/dvbs2/dvbs2_interleaver_bb_impl.h
b/gr-dtv/lib/dvbs2/dvbs2_interleaver_bb_impl.h
new file mode 100644
index 0000000..36d314c
--- /dev/null
+++ b/gr-dtv/lib/dvbs2/dvbs2_interleaver_bb_impl.h
@@ -0,0 +1,63 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This 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.
+ *
+ * This software 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 this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_DTV_DVBS2_INTERLEAVER_BB_IMPL_H
+#define INCLUDED_DTV_DVBS2_INTERLEAVER_BB_IMPL_H
+
+#include <gnuradio/dtv/dvbs2_interleaver_bb.h>
+#include "dvb/dvb_defines.h"
+
+namespace gr {
+ namespace dtv {
+
+ class dvbs2_interleaver_bb_impl : public dvbs2_interleaver_bb
+ {
+ private:
+ int frame_size;
+ int signal_constellation;
+ int code_rate;
+ int mod;
+ int packed_items;
+ int rowaddr0;
+ int rowaddr1;
+ int rowaddr2;
+ int rowaddr3;
+ int rowaddr4;
+ int rowaddr5;
+ int rowaddr6;
+ int rowaddr7;
+
+ public:
+ dvbs2_interleaver_bb_impl(dvb_framesize_t framesize, dvb_code_rate_t
rate, dvb_constellation_t constellation);
+ ~dvbs2_interleaver_bb_impl();
+
+ void forecast (int noutput_items, gr_vector_int &ninput_items_required);
+
+ int general_work(int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+ };
+
+ } // namespace dtv
+} // namespace gr
+
+#endif /* INCLUDED_DTV_DVBS2_INTERLEAVER_BB_IMPL_H */
+
diff --git a/gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.cc
b/gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.cc
new file mode 100644
index 0000000..56e2fd0
--- /dev/null
+++ b/gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.cc
@@ -0,0 +1,3040 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This 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.
+ *
+ * This software 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 this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gnuradio/io_signature.h>
+#include "dvbs2_modulator_bc_impl.h"
+
+namespace gr {
+ namespace dtv {
+
+ dvbs2_modulator_bc::sptr
+ dvbs2_modulator_bc::make(dvb_framesize_t framesize, dvb_code_rate_t rate,
dvb_constellation_t constellation)
+ {
+ return gnuradio::get_initial_sptr
+ (new dvbs2_modulator_bc_impl(framesize, rate, constellation));
+ }
+
+ /*
+ * The private constructor
+ */
+ dvbs2_modulator_bc_impl::dvbs2_modulator_bc_impl(dvb_framesize_t
framesize, dvb_code_rate_t rate, dvb_constellation_t constellation)
+ : gr::block("dvbs2_modulator_bc",
+ gr::io_signature::make(1, 1, sizeof(unsigned char)),
+ gr::io_signature::make(1, 1, sizeof(gr_complex)))
+ {
+ double r1, r2, r3, r4, r5, r6, r7, r8;
+ double m = 1.0;
+ r1 = m;
+ switch (constellation) {
+ case MOD_QPSK:
+ m_qpsk[0].real() = (r1 * cos(M_PI / 4.0));
+ m_qpsk[0].imag() = (r1 * sin(M_PI / 4.0));
+ m_qpsk[1].real() = (r1 * cos(7 * M_PI / 4.0));
+ m_qpsk[1].imag() = (r1 * sin(7 * M_PI / 4.0));
+ m_qpsk[2].real() = (r1 * cos(3 * M_PI / 4.0));
+ m_qpsk[2].imag() = (r1 * sin(3 * M_PI / 4.0));
+ m_qpsk[3].real() = (r1 * cos(5 * M_PI / 4.0));
+ m_qpsk[3].imag() = (r1 * sin(5 * M_PI / 4.0));
+ break;
+ case MOD_8PSK:
+ m_8psk[0].real() = (r1 * cos(M_PI / 4.0));
+ m_8psk[0].imag() = (r1 * sin(M_PI / 4.0));
+ m_8psk[1].real() = (r1 * cos(0.0));
+ m_8psk[1].imag() = (r1 * sin(0.0));
+ m_8psk[2].real() = (r1 * cos(4 * M_PI / 4.0));
+ m_8psk[2].imag() = (r1 * sin(4 * M_PI / 4.0));
+ m_8psk[3].real() = (r1 * cos(5 * M_PI / 4.0));
+ m_8psk[3].imag() = (r1 * sin(5 * M_PI / 4.0));
+ m_8psk[4].real() = (r1 * cos(2 * M_PI / 4.0));
+ m_8psk[4].imag() = (r1 * sin(2 * M_PI / 4.0));
+ m_8psk[5].real() = (r1 * cos(7 * M_PI / 4.0));
+ m_8psk[5].imag() = (r1 * sin(7 * M_PI / 4.0));
+ m_8psk[6].real() = (r1 * cos(3 * M_PI / 4.0));
+ m_8psk[6].imag() = (r1 * sin(3 * M_PI / 4.0));
+ m_8psk[7].real() = (r1 * cos(6 * M_PI / 4.0));
+ m_8psk[7].imag() = (r1 * sin(6 * M_PI / 4.0));
+ break;
+ case MOD_8APSK:
+ r3 = m;
+ switch(rate) {
+ case C100_180:
+ r1 = r3 / 6.8;
+ r2 = r1 * 5.32;
+ break;
+ case C104_180:
+ r1 = r3 / 8.0;
+ r2 = r1 * 6.39;
+ break;
+ default:
+ r1 = 0;
+ r2 = 0;
+ break;
+ }
+ m_8psk[0].real() = (r1 * cos(M_PI));
+ m_8psk[0].imag() = (r1 * sin(M_PI));
+ m_8psk[1].real() = (r2 * cos(M_PI * 1.352));
+ m_8psk[1].imag() = (r2 * sin(M_PI * 1.352));
+ m_8psk[2].real() = (r2 * cos(M_PI * -1.352));
+ m_8psk[2].imag() = (r2 * sin(M_PI * -1.352));
+ m_8psk[3].real() = (r3 * cos(M_PI));
+ m_8psk[3].imag() = (r3 * sin(M_PI));
+ m_8psk[4].real() = (r1 * cos(0.0));
+ m_8psk[4].imag() = (r1 * sin(0.0));
+ m_8psk[5].real() = (r2 * cos(M_PI * -0.352));
+ m_8psk[5].imag() = (r2 * sin(M_PI * -0.352));
+ m_8psk[6].real() = (r2 * cos(M_PI * 0.352));
+ m_8psk[6].imag() = (r2 * sin(M_PI * 0.352));
+ m_8psk[7].real() = (r3 * cos(0.0));
+ m_8psk[7].imag() = (r3 * sin(0.0));
+ break;
+ case MOD_16APSK:
+ r2 = m;
+ if (framesize == FECFRAME_NORMAL) {
+ switch(rate) {
+ case C2_3:
+ r1 = r2 / 3.15;
+ break;
+ case C3_4:
+ r1 = r2 / 2.85;
+ break;
+ case C4_5:
+ r1 = r2 / 2.75;
+ break;
+ case C5_6:
+ r1 = r2 / 2.70;
+ break;
+ case C8_9:
+ r1 = r2 / 2.60;
+ break;
+ case C9_10:
+ r1 = r2 / 2.57;
+ break;
+ case C26_45:
+ case C3_5:
+ r1 = r2 / 3.70;
+ break;
+ case C28_45:
+ r1 = r2 / 3.50;
+ break;
+ case C23_36:
+ case C25_36:
+ r1 = r2 / 3.10;
+ break;
+ case C13_18:
+ r1 = r2 / 2.85;
+ break;
+ case C140_180:
+ r1 = r2 / 3.60;
+ break;
+ case C154_180:
+ r1 = r2 / 3.20;
+ break;
+ default:
+ r1 = 0;
+ break;
+ }
+ }
+ else {
+ switch(rate) {
+ case C2_3:
+ r1 = r2 / 3.15;
+ break;
+ case C3_4:
+ r1 = r2 / 2.85;
+ break;
+ case C4_5:
+ r1 = r2 / 2.75;
+ break;
+ case C5_6:
+ r1 = r2 / 2.70;
+ break;
+ case C8_9:
+ r1 = r2 / 2.60;
+ break;
+ case C7_15:
+ r1 = r2 / 3.32;
+ break;
+ case C8_15:
+ r1 = r2 / 3.50;
+ break;
+ case C26_45:
+ case C3_5:
+ r1 = r2 / 3.70;
+ break;
+ case C32_45:
+ r1 = r2 / 2.85;
+ break;
+ default:
+ r1 = 0;
+ break;
+ }
+ }
+ m_16apsk[0].real() = (r2 * cos(M_PI / 4.0));
+ m_16apsk[0].imag() = (r2 * sin(M_PI / 4.0));
+ m_16apsk[1].real() = (r2 * cos(-M_PI / 4.0));
+ m_16apsk[1].imag() = (r2 * sin(-M_PI / 4.0));
+ m_16apsk[2].real() = (r2 * cos(3 * M_PI / 4.0));
+ m_16apsk[2].imag() = (r2 * sin(3 * M_PI / 4.0));
+ m_16apsk[3].real() = (r2 * cos(-3 * M_PI / 4.0));
+ m_16apsk[3].imag() = (r2 * sin(-3 * M_PI / 4.0));
+ m_16apsk[4].real() = (r2 * cos(M_PI / 12.0));
+ m_16apsk[4].imag() = (r2 * sin(M_PI / 12.0));
+ m_16apsk[5].real() = (r2 * cos(-M_PI / 12.0));
+ m_16apsk[5].imag() = (r2 * sin(-M_PI / 12.0));
+ m_16apsk[6].real() = (r2 * cos(11 * M_PI / 12.0));
+ m_16apsk[6].imag() = (r2 * sin(11 * M_PI / 12.0));
+ m_16apsk[7].real() = (r2 * cos(-11 * M_PI / 12.0));
+ m_16apsk[7].imag() = (r2 * sin(-11 * M_PI / 12.0));
+ m_16apsk[8].real() = (r2 * cos(5 * M_PI / 12.0));
+ m_16apsk[8].imag() = (r2 * sin(5 * M_PI / 12.0));
+ m_16apsk[9].real() = (r2 * cos(-5 * M_PI / 12.0));
+ m_16apsk[9].imag() = (r2 * sin(-5 * M_PI / 12.0));
+ m_16apsk[10].real() = (r2 * cos(7 * M_PI / 12.0));
+ m_16apsk[10].imag() = (r2 * sin(7 * M_PI / 12.0));
+ m_16apsk[11].real() = (r2 * cos(-7 * M_PI / 12.0));
+ m_16apsk[11].imag() = (r2 * sin(-7 * M_PI / 12.0));
+ m_16apsk[12].real() = (r1 * cos(M_PI / 4.0));
+ m_16apsk[12].imag() = (r1 * sin(M_PI / 4.0));
+ m_16apsk[13].real() = (r1 * cos(-M_PI / 4.0));
+ m_16apsk[13].imag() = (r1 * sin(-M_PI / 4.0));
+ m_16apsk[14].real() = (r1 * cos(3 * M_PI / 4.0));
+ m_16apsk[14].imag() = (r1 * sin(3 * M_PI / 4.0));
+ m_16apsk[15].real() = (r1 * cos(-3 * M_PI / 4.0));
+ m_16apsk[15].imag() = (r1 * sin(-3 * M_PI / 4.0));
+ break;
+ case MOD_8_8APSK:
+ if (rate == C18_30) {
+ m_16apsk[0].real() = 0.4718;
+ m_16apsk[0].imag() = 0.2606;
+ m_16apsk[1].real() = 0.2606;
+ m_16apsk[1].imag() = 0.4718;
+ m_16apsk[2].real() = -0.4718;
+ m_16apsk[2].imag() = 0.2606;
+ m_16apsk[3].real() = -0.2606;
+ m_16apsk[3].imag() = 0.4718;
+ m_16apsk[4].real() = 0.4718;
+ m_16apsk[4].imag() = -0.2606;
+ m_16apsk[5].real() = 0.2606;
+ m_16apsk[5].imag() = -0.4718;
+ m_16apsk[6].real() = -0.4718;
+ m_16apsk[6].imag() = -0.2606;
+ m_16apsk[7].real() = -0.2606;
+ m_16apsk[7].imag() = -0.4718;
+ m_16apsk[8].real() = 1.2088;
+ m_16apsk[8].imag() = 0.4984;
+ m_16apsk[9].real() = 0.4984;
+ m_16apsk[9].imag() = 1.2088;
+ m_16apsk[10].real() = -1.2088;
+ m_16apsk[10].imag() = 0.4984;
+ m_16apsk[11].real() = -0.4984;
+ m_16apsk[11].imag() = 1.2088;
+ m_16apsk[12].real() = 1.2088;
+ m_16apsk[12].imag() = -0.4984;
+ m_16apsk[13].real() = 0.4984;
+ m_16apsk[13].imag() = -1.2088;
+ m_16apsk[14].real() = -1.2088;
+ m_16apsk[14].imag() = -0.4984;
+ m_16apsk[15].real() = -0.4984;
+ m_16apsk[15].imag() = -1.2088;
+ for (int i = 0; i < 16; i++) {
+ m_16apsk[i].real() /= 1.2088;
+ m_16apsk[i].imag() /= 1.2088;
+ }
+ }
+ else if (rate == C20_30) {
+ m_16apsk[0].real() = 0.5061;
+ m_16apsk[0].imag() = 0.2474;
+ m_16apsk[1].real() = 0.2474;
+ m_16apsk[1].imag() = 0.5061;
+ m_16apsk[2].real() = -0.5061;
+ m_16apsk[2].imag() = 0.2474;
+ m_16apsk[3].real() = -0.2474;
+ m_16apsk[3].imag() = 0.5061;
+ m_16apsk[4].real() = 0.5061;
+ m_16apsk[4].imag() = -0.2474;
+ m_16apsk[5].real() = 0.2474;
+ m_16apsk[5].imag() = -0.5061;
+ m_16apsk[6].real() = -0.5061;
+ m_16apsk[6].imag() = -0.2474;
+ m_16apsk[7].real() = -0.2474;
+ m_16apsk[7].imag() = -0.5061;
+ m_16apsk[8].real() = 1.2007;
+ m_16apsk[8].imag() = 0.4909;
+ m_16apsk[9].real() = 0.4909;
+ m_16apsk[9].imag() = 1.2007;
+ m_16apsk[10].real() = -1.2007;
+ m_16apsk[10].imag() = 0.4909;
+ m_16apsk[11].real() = -0.4909;
+ m_16apsk[11].imag() = 1.2007;
+ m_16apsk[12].real() = 1.2007;
+ m_16apsk[12].imag() = -0.4909;
+ m_16apsk[13].real() = 0.4909;
+ m_16apsk[13].imag() = -1.2007;
+ m_16apsk[14].real() = -1.2007;
+ m_16apsk[14].imag() = -0.4909;
+ m_16apsk[15].real() = -0.4909;
+ m_16apsk[15].imag() = -1.2007;
+ for (int i = 0; i < 16; i++) {
+ m_16apsk[i].real() /= 1.2007;
+ m_16apsk[i].imag() /= 1.2007;
+ }
+ }
+ else {
+ r2 = m;
+ switch(rate) {
+ case C90_180:
+ case C96_180:
+ case C100_180:
+ r1 = r2 / 2.19;
+ break;
+ default:
+ r1 = 0;
+ break;
+ }
+ m_16apsk[0].real() = (r1 * cos(M_PI / 8.0));
+ m_16apsk[0].imag() = (r1 * sin(M_PI / 8.0));
+ m_16apsk[1].real() = (r1 * cos(3 * M_PI / 8.0));
+ m_16apsk[1].imag() = (r1 * sin(3 * M_PI / 8.0));
+ m_16apsk[2].real() = (r1 * cos(7 * M_PI / 8.0));
+ m_16apsk[2].imag() = (r1 * sin(7 * M_PI / 8.0));
+ m_16apsk[3].real() = (r1 * cos(5 * M_PI / 8.0));
+ m_16apsk[3].imag() = (r1 * sin(5 * M_PI / 8.0));
+ m_16apsk[4].real() = (r1 * cos(15 * M_PI / 8.0));
+ m_16apsk[4].imag() = (r1 * sin(15 * M_PI / 8.0));
+ m_16apsk[5].real() = (r1 * cos(13 * M_PI / 8.0));
+ m_16apsk[5].imag() = (r1 * sin(13 * M_PI / 8.0));
+ m_16apsk[6].real() = (r1 * cos(9 * M_PI / 8.0));
+ m_16apsk[6].imag() = (r1 * sin(9 * M_PI / 8.0));
+ m_16apsk[7].real() = (r1 * cos(11 * M_PI / 8.0));
+ m_16apsk[7].imag() = (r1 * sin(11 * M_PI / 8.0));
+ m_16apsk[8].real() = (r2 * cos(M_PI / 8.0));
+ m_16apsk[8].imag() = (r2 * sin(M_PI / 8.0));
+ m_16apsk[9].real() = (r2 * cos(3 * M_PI / 8.0));
+ m_16apsk[9].imag() = (r2 * sin(3 * M_PI / 8.0));
+ m_16apsk[10].real() = (r2 * cos(7 * M_PI / 8.0));
+ m_16apsk[10].imag() = (r2 * sin(7 * M_PI / 8.0));
+ m_16apsk[11].real() = (r2 * cos(5 * M_PI / 8.0));
+ m_16apsk[11].imag() = (r2 * sin(5 * M_PI / 8.0));
+ m_16apsk[12].real() = (r2 * cos(15 * M_PI / 8.0));
+ m_16apsk[12].imag() = (r2 * sin(15 * M_PI / 8.0));
+ m_16apsk[13].real() = (r2 * cos(13 * M_PI / 8.0));
+ m_16apsk[13].imag() = (r2 * sin(13 * M_PI / 8.0));
+ m_16apsk[14].real() = (r2 * cos(9 * M_PI / 8.0));
+ m_16apsk[14].imag() = (r2 * sin(9 * M_PI / 8.0));
+ m_16apsk[15].real() = (r2 * cos(11 * M_PI / 8.0));
+ m_16apsk[15].imag() = (r2 * sin(11 * M_PI / 8.0));
+ }
+ break;
+ case MOD_32APSK:
+ r3 = m;
+ switch(rate) {
+ case C3_4:
+ r1 = r3 / 5.27;
+ r2 = r1 * 2.84;
+ break;
+ case C4_5:
+ r1 = r3 / 4.87;
+ r2 = r1 * 2.72;
+ break;
+ case C5_6:
+ r1 = r3 / 4.64;
+ r2 = r1 * 2.64;
+ break;
+ case C8_9:
+ r1 = r3 / 4.33;
+ r2 = r1 * 2.54;
+ break;
+ case C9_10:
+ r1 = r3 / 4.30;
+ r2 = r1 * 2.53;
+ break;
+ default:
+ r1 = 0;
+ r2 = 0;
+ break;
+ }
+ m_32apsk[0].real() = (r2 * cos(M_PI / 4.0));
+ m_32apsk[0].imag() = (r2 * sin(M_PI / 4.0));
+ m_32apsk[1].real() = (r2 * cos(5 * M_PI / 12.0));
+ m_32apsk[1].imag() = (r2 * sin(5 * M_PI / 12.0));
+ m_32apsk[2].real() = (r2 * cos(-M_PI / 4.0));
+ m_32apsk[2].imag() = (r2 * sin(-M_PI / 4.0));
+ m_32apsk[3].real() = (r2 * cos(-5 * M_PI / 12.0));
+ m_32apsk[3].imag() = (r2 * sin(-5 * M_PI / 12.0));
+ m_32apsk[4].real() = (r2 * cos(3 * M_PI / 4.0));
+ m_32apsk[4].imag() = (r2 * sin(3 * M_PI / 4.0));
+ m_32apsk[5].real() = (r2 * cos(7 * M_PI / 12.0));
+ m_32apsk[5].imag() = (r2 * sin(7 * M_PI / 12.0));
+ m_32apsk[6].real() = (r2 * cos(-3 * M_PI / 4.0));
+ m_32apsk[6].imag() = (r2 * sin(-3 * M_PI / 4.0));
+ m_32apsk[7].real() = (r2 * cos(-7 * M_PI / 12.0));
+ m_32apsk[7].imag() = (r2 * sin(-7 * M_PI / 12.0));
+ m_32apsk[8].real() = (r3 * cos(M_PI / 8.0));
+ m_32apsk[8].imag() = (r3 * sin(M_PI / 8.0));
+ m_32apsk[9].real() = (r3 * cos(3 * M_PI / 8.0));
+ m_32apsk[9].imag() = (r3 * sin(3 * M_PI / 8.0));
+ m_32apsk[10].real() = (r3 * cos(-M_PI / 4.0));
+ m_32apsk[10].imag() = (r3 * sin(-M_PI / 4.0));
+ m_32apsk[11].real() = (r3 * cos(-M_PI / 2.0));
+ m_32apsk[11].imag() = (r3 * sin(-M_PI / 2.0));
+ m_32apsk[12].real() = (r3 * cos(3 * M_PI / 4.0));
+ m_32apsk[12].imag() = (r3 * sin(3 * M_PI / 4.0));
+ m_32apsk[13].real() = (r3 * cos(M_PI / 2.0));
+ m_32apsk[13].imag() = (r3 * sin(M_PI / 2.0));
+ m_32apsk[14].real() = (r3 * cos(-7 * M_PI / 8.0));
+ m_32apsk[14].imag() = (r3 * sin(-7 * M_PI / 8.0));
+ m_32apsk[15].real() = (r3 * cos(-5 * M_PI / 8.0));
+ m_32apsk[15].imag() = (r3 * sin(-5 * M_PI / 8.0));
+ m_32apsk[16].real() = (r2 * cos(M_PI / 12.0));
+ m_32apsk[16].imag() = (r2 * sin(M_PI / 12.0));
+ m_32apsk[17].real() = (r1 * cos(M_PI / 4.0));
+ m_32apsk[17].imag() = (r1 * sin(M_PI / 4.0));
+ m_32apsk[18].real() = (r2 * cos(-M_PI / 12.0));
+ m_32apsk[18].imag() = (r2 * sin(-M_PI / 12.0));
+ m_32apsk[19].real() = (r1 * cos(-M_PI / 4.0));
+ m_32apsk[19].imag() = (r1 * sin(-M_PI / 4.0));
+ m_32apsk[20].real() = (r2 * cos(11 * M_PI / 12.0));
+ m_32apsk[20].imag() = (r2 * sin(11 * M_PI / 12.0));
+ m_32apsk[21].real() = (r1 * cos(3 * M_PI / 4.0));
+ m_32apsk[21].imag() = (r1 * sin(3 * M_PI / 4.0));
+ m_32apsk[22].real() = (r2 * cos(-11 * M_PI / 12.0));
+ m_32apsk[22].imag() = (r2 * sin(-11 * M_PI / 12.0));
+ m_32apsk[23].real() = (r1 * cos(-3 * M_PI / 4.0));
+ m_32apsk[23].imag() = (r1 * sin(-3 * M_PI / 4.0));
+ m_32apsk[24].real() = (r3 * cos(0.0));
+ m_32apsk[24].imag() = (r3 * sin(0.0));
+ m_32apsk[25].real() = (r3 * cos(M_PI / 4.0));
+ m_32apsk[25].imag() = (r3 * sin(M_PI / 4.0));
+ m_32apsk[26].real() = (r3 * cos(-M_PI / 8.0));
+ m_32apsk[26].imag() = (r3 * sin(-M_PI / 8.0));
+ m_32apsk[27].real() = (r3 * cos(-3 * M_PI / 8.0));
+ m_32apsk[27].imag() = (r3 * sin(-3 * M_PI / 8.0));
+ m_32apsk[28].real() = (r3 * cos(7 * M_PI / 8.0));
+ m_32apsk[28].imag() = (r3 * sin(7 * M_PI / 8.0));
+ m_32apsk[29].real() = (r3 * cos(5 * M_PI / 8.0));
+ m_32apsk[29].imag() = (r3 * sin(5 * M_PI / 8.0));
+ m_32apsk[30].real() = (r3 * cos(M_PI));
+ m_32apsk[30].imag() = (r3 * sin(M_PI));
+ m_32apsk[31].real() = (r3 * cos(-3 * M_PI / 4.0));
+ m_32apsk[31].imag() = (r3 * sin(-3 * M_PI / 4.0));
+ break;
+ case MOD_4_12_16APSK:
+ r3 = m;
+ if (framesize == FECFRAME_NORMAL) {
+ switch(rate) {
+ case C2_3:
+ r1 = r3 / 5.55;
+ r2 = r1 * 2.85;
+ break;
+ default:
+ r1 = 0;
+ r2 = 0;
+ break;
+ }
+ }
+ else {
+ switch(rate) {
+ case C2_3:
+ r1 = r3 / 5.54;
+ r2 = r1 * 2.84;
+ break;
+ case C32_45:
+ r1 = r3 / 5.26;
+ r2 = r1 * 2.84;
+ break;
+ default:
+ r1 = 0;
+ r2 = 0;
+ break;
+ }
+ }
+ m_32apsk[0].real() = (r3 * cos(11 * M_PI / 16.0));
+ m_32apsk[0].imag() = (r3 * sin(11 * M_PI / 16.0));
+ m_32apsk[1].real() = (r3 * cos(9 * M_PI / 16.0));
+ m_32apsk[1].imag() = (r3 * sin(9 * M_PI / 16.0));
+ m_32apsk[2].real() = (r3 * cos(5 * M_PI / 16.0));
+ m_32apsk[2].imag() = (r3 * sin(5 * M_PI / 16.0));
+ m_32apsk[3].real() = (r3 * cos(7 * M_PI / 16.0));
+ m_32apsk[3].imag() = (r3 * sin(7 * M_PI / 16.0));
+ m_32apsk[4].real() = (r2 * cos(3 * M_PI / 4.0));
+ m_32apsk[4].imag() = (r2 * sin(3 * M_PI / 4.0));
+ m_32apsk[5].real() = (r2 * cos(7 * M_PI / 12.0));
+ m_32apsk[5].imag() = (r2 * sin(7 * M_PI / 12.0));
+ m_32apsk[6].real() = (r2 * cos(M_PI / 4.0));
+ m_32apsk[6].imag() = (r2 * sin(M_PI / 4.0));
+ m_32apsk[7].real() = (r2 * cos(5 * M_PI / 12.0));
+ m_32apsk[7].imag() = (r2 * sin(5 * M_PI / 12.0));
+ m_32apsk[8].real() = (r3 * cos(13 * M_PI / 16.0));
+ m_32apsk[8].imag() = (r3 * sin(13 * M_PI / 16.0));
+ m_32apsk[9].real() = (r3 * cos(15 * M_PI / 16.0));
+ m_32apsk[9].imag() = (r3 * sin(15 * M_PI / 16.0));
+ m_32apsk[10].real() = (r3 * cos(3 * M_PI / 16.0));
+ m_32apsk[10].imag() = (r3 * sin(3 * M_PI / 16.0));
+ m_32apsk[11].real() = (r3 * cos(M_PI / 16.0));
+ m_32apsk[11].imag() = (r3 * sin(M_PI / 16.0));
+ m_32apsk[12].real() = (r2 * cos(11 * M_PI / 12.0));
+ m_32apsk[12].imag() = (r2 * sin(11 * M_PI / 12.0));
+ m_32apsk[13].real() = (r1 * cos(3 * M_PI / 4.0));
+ m_32apsk[13].imag() = (r1 * sin(3 * M_PI / 4.0));
+ m_32apsk[14].real() = (r2 * cos(M_PI / 12.0));
+ m_32apsk[14].imag() = (r2 * sin(M_PI / 12.0));
+ m_32apsk[15].real() = (r1 * cos(M_PI / 4.0));
+ m_32apsk[15].imag() = (r1 * sin(M_PI / 4.0));
+ m_32apsk[16].real() = (r3 * cos(21 * M_PI / 16.0));
+ m_32apsk[16].imag() = (r3 * sin(21 * M_PI / 16.0));
+ m_32apsk[17].real() = (r3 * cos(23 * M_PI / 16.0));
+ m_32apsk[17].imag() = (r3 * sin(23 * M_PI / 16.0));
+ m_32apsk[18].real() = (r3 * cos(27 * M_PI / 16.0));
+ m_32apsk[18].imag() = (r3 * sin(27 * M_PI / 16.0));
+ m_32apsk[19].real() = (r3 * cos(25 * M_PI / 16.0));
+ m_32apsk[19].imag() = (r3 * sin(25 * M_PI / 16.0));
+ m_32apsk[20].real() = (r2 * cos(5 * M_PI / 4.0));
+ m_32apsk[20].imag() = (r2 * sin(5 * M_PI / 4.0));
+ m_32apsk[21].real() = (r2 * cos(17 * M_PI / 12.0));
+ m_32apsk[21].imag() = (r2 * sin(17 * M_PI / 12.0));
+ m_32apsk[22].real() = (r2 * cos(7 * M_PI / 4.0));
+ m_32apsk[22].imag() = (r2 * sin(7 * M_PI / 4.0));
+ m_32apsk[23].real() = (r2 * cos(19 * M_PI / 12.0));
+ m_32apsk[23].imag() = (r2 * sin(19 * M_PI / 12.0));
+ m_32apsk[24].real() = (r3 * cos(19 * M_PI / 16.0));
+ m_32apsk[24].imag() = (r3 * sin(19 * M_PI / 16.0));
+ m_32apsk[25].real() = (r3 * cos(17 * M_PI / 16.0));
+ m_32apsk[25].imag() = (r3 * sin(17 * M_PI / 16.0));
+ m_32apsk[26].real() = (r3 * cos(29 * M_PI / 16.0));
+ m_32apsk[26].imag() = (r3 * sin(29 * M_PI / 16.0));
+ m_32apsk[27].real() = (r3 * cos(31 * M_PI / 16.0));
+ m_32apsk[27].imag() = (r3 * sin(31 * M_PI / 16.0));
+ m_32apsk[28].real() = (r2 * cos(13 * M_PI / 12.0));
+ m_32apsk[28].imag() = (r2 * sin(13 * M_PI / 12.0));
+ m_32apsk[29].real() = (r1 * cos(5 * M_PI / 4.0));
+ m_32apsk[29].imag() = (r1 * sin(5 * M_PI / 4.0));
+ m_32apsk[30].real() = (r2 * cos(23 * M_PI / 12.0));
+ m_32apsk[30].imag() = (r2 * sin(23 * M_PI / 12.0));
+ m_32apsk[31].real() = (r1 * cos(7 * M_PI / 4.0));
+ m_32apsk[31].imag() = (r1 * sin(7 * M_PI / 4.0));
+ break;
+ case MOD_4_8_4_16APSK:
+ r4 = m;
+ switch(rate) {
+ case C128_180:
+ r1 = r4 / 5.6;
+ r3 = r1 * 2.99;
+ r2 = r1 * 2.6;
+ break;
+ case C132_180:
+ r1 = r4 / 5.6;
+ r3 = r1 * 2.86;
+ r2 = r1 * 2.6;
+ break;
+ case C140_180:
+ r1 = r4 / 5.6;
+ r3 = r1 * 3.08;
+ r2 = r1 * 2.6;
+ break;
+ default:
+ r1 = 0;
+ r2 = 0;
+ r3 = 0;
+ break;
+ }
+ m_32apsk[0].real() = (r1 * cos(M_PI / 4.0));
+ m_32apsk[0].imag() = (r1 * sin(M_PI / 4.0));
+ m_32apsk[1].real() = (r4 * cos(7 * M_PI / 16.0));
+ m_32apsk[1].imag() = (r4 * sin(7 * M_PI / 16.0));
+ m_32apsk[2].real() = (r1 * cos(7 * M_PI / 4.0));
+ m_32apsk[2].imag() = (r1 * sin(7 * M_PI / 4.0));
+ m_32apsk[3].real() = (r4 * cos(25 * M_PI / 16.0));
+ m_32apsk[3].imag() = (r4 * sin(25 * M_PI / 16.0));
+ m_32apsk[4].real() = (r1 * cos(3 * M_PI / 4.0));
+ m_32apsk[4].imag() = (r1 * sin(3 * M_PI / 4.0));
+ m_32apsk[5].real() = (r4 * cos(9 * M_PI / 16.0));
+ m_32apsk[5].imag() = (r4 * sin(9 * M_PI / 16.0));
+ m_32apsk[6].real() = (r1 * cos(5 * M_PI / 4.0));
+ m_32apsk[6].imag() = (r1 * sin(5 * M_PI / 4.0));
+ m_32apsk[7].real() = (r4 * cos(23 * M_PI / 16.0));
+ m_32apsk[7].imag() = (r4 * sin(23 * M_PI / 16.0));
+ m_32apsk[8].real() = (r2 * cos(M_PI / 12.0));
+ m_32apsk[8].imag() = (r2 * sin(M_PI / 12.0));
+ m_32apsk[9].real() = (r4 * cos(M_PI / 16.0));
+ m_32apsk[9].imag() = (r4 * sin(M_PI / 16.0));
+ m_32apsk[10].real() = (r2 * cos(23 * M_PI / 12.0));
+ m_32apsk[10].imag() = (r2 * sin(23 * M_PI / 12.0));
+ m_32apsk[11].real() = (r4 * cos(31 * M_PI / 16.0));
+ m_32apsk[11].imag() = (r4 * sin(31 * M_PI / 16.0));
+ m_32apsk[12].real() = (r2 * cos(11 * M_PI / 12.0));
+ m_32apsk[12].imag() = (r2 * sin(11 * M_PI / 12.0));
+ m_32apsk[13].real() = (r4 * cos(15 * M_PI / 16.0));
+ m_32apsk[13].imag() = (r4 * sin(15 * M_PI / 16.0));
+ m_32apsk[14].real() = (r2 * cos(13 * M_PI / 12.0));
+ m_32apsk[14].imag() = (r2 * sin(13 * M_PI / 12.0));
+ m_32apsk[15].real() = (r4 * cos(17 * M_PI / 16.0));
+ m_32apsk[15].imag() = (r4 * sin(17 * M_PI / 16.0));
+ m_32apsk[16].real() = (r2 * cos(5 * M_PI / 12.0));
+ m_32apsk[16].imag() = (r2 * sin(5 * M_PI / 12.0));
+ m_32apsk[17].real() = (r4 * cos(5 * M_PI / 16.0));
+ m_32apsk[17].imag() = (r4 * sin(5 * M_PI / 16.0));
+ m_32apsk[18].real() = (r2 * cos(19 * M_PI / 12.0));
+ m_32apsk[18].imag() = (r2 * sin(19 * M_PI / 12.0));
+ m_32apsk[19].real() = (r4 * cos(27 * M_PI / 16.0));
+ m_32apsk[19].imag() = (r4 * sin(27 * M_PI / 16.0));
+ m_32apsk[20].real() = (r2 * cos(7 * M_PI / 12.0));
+ m_32apsk[20].imag() = (r2 * sin(7 * M_PI / 12.0));
+ m_32apsk[21].real() = (r4 * cos(11 * M_PI / 16.0));
+ m_32apsk[21].imag() = (r4 * sin(11 * M_PI / 16.0));
+ m_32apsk[22].real() = (r2 * cos(17 * M_PI / 12.0));
+ m_32apsk[22].imag() = (r2 * sin(17 * M_PI / 12.0));
+ m_32apsk[23].real() = (r4 * cos(21 * M_PI / 16.0));
+ m_32apsk[23].imag() = (r4 * sin(21 * M_PI / 16.0));
+ m_32apsk[24].real() = (r3 * cos(M_PI / 4.0));
+ m_32apsk[24].imag() = (r3 * sin(M_PI / 4.0));
+ m_32apsk[25].real() = (r4 * cos(3 * M_PI / 16.0));
+ m_32apsk[25].imag() = (r4 * sin(3 * M_PI / 16.0));
+ m_32apsk[26].real() = (r3 * cos(7 * M_PI / 4.0));
+ m_32apsk[26].imag() = (r3 * sin(7 * M_PI / 4.0));
+ m_32apsk[27].real() = (r4 * cos(29 * M_PI / 16.0));
+ m_32apsk[27].imag() = (r4 * sin(29 * M_PI / 16.0));
+ m_32apsk[28].real() = (r3 * cos(3 * M_PI / 4.0));
+ m_32apsk[28].imag() = (r3 * sin(3 * M_PI / 4.0));
+ m_32apsk[29].real() = (r4 * cos(13 * M_PI / 16.0));
+ m_32apsk[29].imag() = (r4 * sin(13 * M_PI / 16.0));
+ m_32apsk[30].real() = (r3 * cos(5 * M_PI / 4.0));
+ m_32apsk[30].imag() = (r3 * sin(5 * M_PI / 4.0));
+ m_32apsk[31].real() = (r4 * cos(19 * M_PI / 16.0));
+ m_32apsk[31].imag() = (r4 * sin(19 * M_PI / 16.0));
+ break;
+ case MOD_64APSK:
+ r4 = m;
+ switch(rate) {
+ case C128_180:
+ r1 = r4 / 3.95;
+ r3 = r1 * 2.72;
+ r2 = r1 * 1.88;
+ break;
+ default:
+ r1 = 0;
+ r2 = 0;
+ r3 = 0;
+ break;
+ }
+ m_64apsk[0].real() = (r1 * cos(M_PI / 16.0));
+ m_64apsk[0].imag() = (r1 * sin(M_PI / 16.0));
+ m_64apsk[1].real() = (r1 * cos(3 * M_PI / 16.0));
+ m_64apsk[1].imag() = (r1 * sin(3 * M_PI / 16.0));
+ m_64apsk[2].real() = (r1 * cos(7 * M_PI / 16.0));
+ m_64apsk[2].imag() = (r1 * sin(7 * M_PI / 16.0));
+ m_64apsk[3].real() = (r1 * cos(5 * M_PI / 16.0));
+ m_64apsk[3].imag() = (r1 * sin(5 * M_PI / 16.0));
+ m_64apsk[4].real() = (r1 * cos(31 * M_PI / 16.0));
+ m_64apsk[4].imag() = (r1 * sin(31 * M_PI / 16.0));
+ m_64apsk[5].real() = (r1 * cos(29 * M_PI / 16.0));
+ m_64apsk[5].imag() = (r1 * sin(29 * M_PI / 16.0));
+ m_64apsk[6].real() = (r1 * cos(25 * M_PI / 16.0));
+ m_64apsk[6].imag() = (r1 * sin(25 * M_PI / 16.0));
+ m_64apsk[7].real() = (r1 * cos(27 * M_PI / 16.0));
+ m_64apsk[7].imag() = (r1 * sin(27 * M_PI / 16.0));
+ m_64apsk[8].real() = (r1 * cos(15 * M_PI / 16.0));
+ m_64apsk[8].imag() = (r1 * sin(15 * M_PI / 16.0));
+ m_64apsk[9].real() = (r1 * cos(13 * M_PI / 16.0));
+ m_64apsk[9].imag() = (r1 * sin(13 * M_PI / 16.0));
+ m_64apsk[10].real() = (r1 * cos(9 * M_PI / 16.0));
+ m_64apsk[10].imag() = (r1 * sin(9 * M_PI / 16.0));
+ m_64apsk[11].real() = (r1 * cos(11 * M_PI / 16.0));
+ m_64apsk[11].imag() = (r1 * sin(11 * M_PI / 16.0));
+ m_64apsk[12].real() = (r1 * cos(17 * M_PI / 16.0));
+ m_64apsk[12].imag() = (r1 * sin(17 * M_PI / 16.0));
+ m_64apsk[13].real() = (r1 * cos(19 * M_PI / 16.0));
+ m_64apsk[13].imag() = (r1 * sin(19 * M_PI / 16.0));
+ m_64apsk[14].real() = (r1 * cos(23 * M_PI / 16.0));
+ m_64apsk[14].imag() = (r1 * sin(23 * M_PI / 16.0));
+ m_64apsk[15].real() = (r1 * cos(21 * M_PI / 16.0));
+ m_64apsk[15].imag() = (r1 * sin(21 * M_PI / 16.0));
+ m_64apsk[16].real() = (r2 * cos(M_PI / 16.0));
+ m_64apsk[16].imag() = (r2 * sin(M_PI / 16.0));
+ m_64apsk[17].real() = (r2 * cos(3 * M_PI / 16.0));
+ m_64apsk[17].imag() = (r2 * sin(3 * M_PI / 16.0));
+ m_64apsk[18].real() = (r2 * cos(7 * M_PI / 16.0));
+ m_64apsk[18].imag() = (r2 * sin(7 * M_PI / 16.0));
+ m_64apsk[19].real() = (r2 * cos(5 * M_PI / 16.0));
+ m_64apsk[19].imag() = (r2 * sin(5 * M_PI / 16.0));
+ m_64apsk[20].real() = (r2 * cos(31 * M_PI / 16.0));
+ m_64apsk[20].imag() = (r2 * sin(31* M_PI / 16.0));
+ m_64apsk[21].real() = (r2 * cos(29 * M_PI / 16.0));
+ m_64apsk[21].imag() = (r2 * sin(29 * M_PI / 16.0));
+ m_64apsk[22].real() = (r2 * cos(25 * M_PI / 16.0));
+ m_64apsk[22].imag() = (r2 * sin(25 * M_PI / 16.0));
+ m_64apsk[23].real() = (r2 * cos(27 * M_PI / 16.0));
+ m_64apsk[23].imag() = (r2 * sin(27 * M_PI / 16.0));
+ m_64apsk[24].real() = (r2 * cos(15 * M_PI / 16.0));
+ m_64apsk[24].imag() = (r2 * sin(15 * M_PI / 16.0));
+ m_64apsk[25].real() = (r2 * cos(13 * M_PI / 16.0));
+ m_64apsk[25].imag() = (r2 * sin(13 * M_PI / 16.0));
+ m_64apsk[26].real() = (r2 * cos(9 * M_PI / 16.0));
+ m_64apsk[26].imag() = (r2 * sin(9 * M_PI / 16.0));
+ m_64apsk[27].real() = (r2 * cos(11 * M_PI / 16.0));
+ m_64apsk[27].imag() = (r2 * sin(11 * M_PI / 16.0));
+ m_64apsk[28].real() = (r2 * cos(17 * M_PI / 16.0));
+ m_64apsk[28].imag() = (r2 * sin(17 * M_PI / 16.0));
+ m_64apsk[29].real() = (r2 * cos(19 * M_PI / 16.0));
+ m_64apsk[29].imag() = (r2 * sin(19 * M_PI / 16.0));
+ m_64apsk[30].real() = (r2 * cos(23 * M_PI / 16.0));
+ m_64apsk[30].imag() = (r2 * sin(23 * M_PI / 16.0));
+ m_64apsk[31].real() = (r2 * cos(21 * M_PI / 16.0));
+ m_64apsk[31].imag() = (r2 * sin(21 * M_PI / 16.0));
+ m_64apsk[32].real() = (r4 * cos(M_PI / 16.0));
+ m_64apsk[32].imag() = (r4 * sin(M_PI / 16.0));
+ m_64apsk[33].real() = (r4 * cos(3 * M_PI / 16.0));
+ m_64apsk[33].imag() = (r4 * sin(3 * M_PI / 16.0));
+ m_64apsk[34].real() = (r4 * cos(7 * M_PI / 16.0));
+ m_64apsk[34].imag() = (r4 * sin(7 * M_PI / 16.0));
+ m_64apsk[35].real() = (r4 * cos(5 * M_PI / 16.0));
+ m_64apsk[35].imag() = (r4 * sin(5 * M_PI / 16.0));
+ m_64apsk[36].real() = (r4 * cos(31 * M_PI / 16.0));
+ m_64apsk[36].imag() = (r4 * sin(31 * M_PI / 16.0));
+ m_64apsk[37].real() = (r4 * cos(29 * M_PI / 16.0));
+ m_64apsk[37].imag() = (r4 * sin(29 * M_PI / 16.0));
+ m_64apsk[38].real() = (r4 * cos(25 * M_PI / 16.0));
+ m_64apsk[38].imag() = (r4 * sin(25 * M_PI / 16.0));
+ m_64apsk[39].real() = (r4 * cos(27 * M_PI / 16.0));
+ m_64apsk[39].imag() = (r4 * sin(27 * M_PI / 16.0));
+ m_64apsk[40].real() = (r4 * cos(15 * M_PI / 16.0));
+ m_64apsk[40].imag() = (r4 * sin(15 * M_PI / 16.0));
+ m_64apsk[41].real() = (r4 * cos(13 * M_PI / 16.0));
+ m_64apsk[41].imag() = (r4 * sin(13 * M_PI / 16.0));
+ m_64apsk[42].real() = (r4 * cos(9 * M_PI / 16.0));
+ m_64apsk[42].imag() = (r4 * sin(9 * M_PI / 16.0));
+ m_64apsk[43].real() = (r4 * cos(11 * M_PI / 16.0));
+ m_64apsk[43].imag() = (r4 * sin(11 * M_PI / 16.0));
+ m_64apsk[44].real() = (r4 * cos(17 * M_PI / 16.0));
+ m_64apsk[44].imag() = (r4 * sin(17 * M_PI / 16.0));
+ m_64apsk[45].real() = (r4 * cos(19 * M_PI / 16.0));
+ m_64apsk[45].imag() = (r4 * sin(19 * M_PI / 16.0));
+ m_64apsk[46].real() = (r4 * cos(23 * M_PI / 16.0));
+ m_64apsk[46].imag() = (r4 * sin(23 * M_PI / 16.0));
+ m_64apsk[47].real() = (r4 * cos(21 * M_PI / 16.0));
+ m_64apsk[47].imag() = (r4 * sin(21 * M_PI / 16.0));
+ m_64apsk[48].real() = (r3 * cos(M_PI / 16.0));
+ m_64apsk[48].imag() = (r3 * sin(M_PI / 16.0));
+ m_64apsk[49].real() = (r3 * cos(3 * M_PI / 16.0));
+ m_64apsk[49].imag() = (r3 * sin(3 * M_PI / 16.0));
+ m_64apsk[50].real() = (r3 * cos(7 * M_PI / 16.0));
+ m_64apsk[50].imag() = (r3 * sin(7 * M_PI / 16.0));
+ m_64apsk[51].real() = (r3 * cos(5 * M_PI / 16.0));
+ m_64apsk[51].imag() = (r3 * sin(5 * M_PI / 16.0));
+ m_64apsk[52].real() = (r3 * cos(31 * M_PI / 16.0));
+ m_64apsk[52].imag() = (r3 * sin(31 * M_PI / 16.0));
+ m_64apsk[53].real() = (r3 * cos(29 * M_PI / 16.0));
+ m_64apsk[53].imag() = (r3 * sin(29 * M_PI / 16.0));
+ m_64apsk[54].real() = (r3 * cos(25 * M_PI / 16.0));
+ m_64apsk[54].imag() = (r3 * sin(25 * M_PI / 16.0));
+ m_64apsk[55].real() = (r3 * cos(27 * M_PI / 16.0));
+ m_64apsk[55].imag() = (r3 * sin(27 * M_PI / 16.0));
+ m_64apsk[56].real() = (r3 * cos(15 * M_PI / 16.0));
+ m_64apsk[56].imag() = (r3 * sin(15 * M_PI / 16.0));
+ m_64apsk[57].real() = (r3 * cos(13 * M_PI / 16.0));
+ m_64apsk[57].imag() = (r3 * sin(13 * M_PI / 16.0));
+ m_64apsk[58].real() = (r3 * cos(9 * M_PI / 16.0));
+ m_64apsk[58].imag() = (r3 * sin(9 * M_PI / 16.0));
+ m_64apsk[59].real() = (r3 * cos(11 * M_PI / 16.0));
+ m_64apsk[59].imag() = (r3 * sin(11 * M_PI / 16.0));
+ m_64apsk[60].real() = (r3 * cos(17 * M_PI / 16.0));
+ m_64apsk[60].imag() = (r3 * sin(17 * M_PI / 16.0));
+ m_64apsk[61].real() = (r3 * cos(19 * M_PI / 16.0));
+ m_64apsk[61].imag() = (r3 * sin(19 * M_PI / 16.0));
+ m_64apsk[62].real() = (r3 * cos(23 * M_PI / 16.0));
+ m_64apsk[62].imag() = (r3 * sin(23 * M_PI / 16.0));
+ m_64apsk[63].real() = (r3 * cos(21 * M_PI / 16.0));
+ m_64apsk[63].imag() = (r3 * sin(21 * M_PI / 16.0));
+ break;
+ case MOD_8_16_20_20APSK:
+ r4 = m;
+ switch(rate) {
+ case C7_9:
+ case C4_5:
+ r1 = r4 / 5.2;
+ r3 = r1 * 3.6;
+ r2 = r1 * 2.2;
+ break;
+ case C5_6:
+ r1 = r4 / 5.0;
+ r3 = r1 * 3.5;
+ r2 = r1 * 2.2;
+ break;
+ default:
+ r1 = 0;
+ r2 = 0;
+ r3 = 0;
+ break;
+ }
+ m_64apsk[0].real() = (r2 * cos(25 * M_PI / 16.0));
+ m_64apsk[0].imag() = (r2 * sin(25 * M_PI / 16.0));
+ m_64apsk[1].real() = (r4 * cos(7 * M_PI / 4.0));
+ m_64apsk[1].imag() = (r4 * sin(7 * M_PI / 4.0));
+ m_64apsk[2].real() = (r2 * cos(27 * M_PI / 16.0));
+ m_64apsk[2].imag() = (r2 * sin(27 * M_PI / 16.0));
+ m_64apsk[3].real() = (r3 * cos(7 * M_PI / 4.0));
+ m_64apsk[3].imag() = (r3 * sin(7 * M_PI / 4.0));
+ m_64apsk[4].real() = (r4 * cos(31 * M_PI / 20.0));
+ m_64apsk[4].imag() = (r4 * sin(31 * M_PI / 20.0));
+ m_64apsk[5].real() = (r4 * cos(33 * M_PI / 20.0));
+ m_64apsk[5].imag() = (r4 * sin(33 * M_PI / 20.0));
+ m_64apsk[6].real() = (r3 * cos(31 * M_PI / 20.0));
+ m_64apsk[6].imag() = (r3 * sin(31 * M_PI / 20.0));
+ m_64apsk[7].real() = (r3 * cos(33 * M_PI / 20.0));
+ m_64apsk[7].imag() = (r3 * sin(33 * M_PI / 20.0));
+ m_64apsk[8].real() = (r2 * cos(23 * M_PI / 16.0));
+ m_64apsk[8].imag() = (r2 * sin(23 * M_PI / 16.0));
+ m_64apsk[9].real() = (r4 * cos(5 * M_PI / 4.0));
+ m_64apsk[9].imag() = (r4 * sin(5 * M_PI / 4.0));
+ m_64apsk[10].real() = (r2 * cos(21 * M_PI / 16.0));
+ m_64apsk[10].imag() = (r2 * sin(21 * M_PI / 16.0));
+ m_64apsk[11].real() = (r3 * cos(5 * M_PI / 4.0));
+ m_64apsk[11].imag() = (r3 * sin(5 * M_PI / 4.0));
+ m_64apsk[12].real() = (r4 * cos(29 * M_PI / 20.0));
+ m_64apsk[12].imag() = (r4 * sin(29 * M_PI / 20.0));
+ m_64apsk[13].real() = (r4 * cos(27 * M_PI / 20.0));
+ m_64apsk[13].imag() = (r4 * sin(27 * M_PI / 20.0));
+ m_64apsk[14].real() = (r3 * cos(29 * M_PI / 20.0));
+ m_64apsk[14].imag() = (r3 * sin(29 * M_PI / 20.0));
+ m_64apsk[15].real() = (r3 * cos(27 * M_PI / 20.0));
+ m_64apsk[15].imag() = (r3 * sin(27 * M_PI / 20.0));
+ m_64apsk[16].real() = (r1 * cos(13 * M_PI / 8.0));
+ m_64apsk[16].imag() = (r1 * sin(13 * M_PI / 8.0));
+ m_64apsk[17].real() = (r4 * cos(37 * M_PI / 20.0));
+ m_64apsk[17].imag() = (r4 * sin(37 * M_PI / 20.0));
+ m_64apsk[18].real() = (r2 * cos(29 * M_PI / 16.0));
+ m_64apsk[18].imag() = (r2 * sin(29 * M_PI / 16.0));
+ m_64apsk[19].real() = (r3 * cos(37 * M_PI / 20.0));
+ m_64apsk[19].imag() = (r3 * sin(37 * M_PI / 20.0));
+ m_64apsk[20].real() = (r1 * cos(15 * M_PI / 8.0));
+ m_64apsk[20].imag() = (r1 * sin(15 * M_PI / 8.0));
+ m_64apsk[21].real() = (r4 * cos(39 * M_PI / 20.0));
+ m_64apsk[21].imag() = (r4 * sin(39 * M_PI / 20.0));
+ m_64apsk[22].real() = (r2 * cos(31 * M_PI / 16.0));
+ m_64apsk[22].imag() = (r2 * sin(31 * M_PI / 16.0));
+ m_64apsk[23].real() = (r3 * cos(39 * M_PI / 20.0));
+ m_64apsk[23].imag() = (r3 * sin(39 * M_PI / 20.0));
+ m_64apsk[24].real() = (r1 * cos(11 * M_PI / 8.0));
+ m_64apsk[24].imag() = (r1 * sin(11 * M_PI / 8.0));
+ m_64apsk[25].real() = (r4 * cos(23 * M_PI / 20.0));
+ m_64apsk[25].imag() = (r4 * sin(23 * M_PI / 20.0));
+ m_64apsk[26].real() = (r2 * cos(19 * M_PI / 16.0));
+ m_64apsk[26].imag() = (r2 * sin(19 * M_PI / 16.0));
+ m_64apsk[27].real() = (r3 * cos(23 * M_PI / 20.0));
+ m_64apsk[27].imag() = (r3 * sin(23 * M_PI / 20.0));
+ m_64apsk[28].real() = (r1 * cos(9 * M_PI / 8.0));
+ m_64apsk[28].imag() = (r1 * sin(9 * M_PI / 8.0));
+ m_64apsk[29].real() = (r4 * cos(21 * M_PI / 20.0));
+ m_64apsk[29].imag() = (r4 * sin(21 * M_PI / 20.0));
+ m_64apsk[30].real() = (r2 * cos(17 * M_PI / 16.0));
+ m_64apsk[30].imag() = (r2 * sin(17 * M_PI / 16.0));
+ m_64apsk[31].real() = (r3 * cos(21 * M_PI / 20.0));
+ m_64apsk[31].imag() = (r3 * sin(21 * M_PI / 20.0));
+ m_64apsk[32].real() = (r2 * cos(7 * M_PI / 16.0));
+ m_64apsk[32].imag() = (r2 * sin(7 * M_PI / 16.0));
+ m_64apsk[33].real() = (r4 * cos(M_PI / 4.0));
+ m_64apsk[33].imag() = (r4 * sin(M_PI / 4.0));
+ m_64apsk[34].real() = (r2 * cos(5 * M_PI / 16.0));
+ m_64apsk[34].imag() = (r2 * sin(5 * M_PI / 16.0));
+ m_64apsk[35].real() = (r3 * cos(M_PI / 4.0));
+ m_64apsk[35].imag() = (r3 * sin(M_PI / 4.0));
+ m_64apsk[36].real() = (r4 * cos(9 * M_PI / 20.0));
+ m_64apsk[36].imag() = (r4 * sin(9 * M_PI / 20.0));
+ m_64apsk[37].real() = (r4 * cos(7 * M_PI / 20.0));
+ m_64apsk[37].imag() = (r4 * sin(7 * M_PI / 20.0));
+ m_64apsk[38].real() = (r3 * cos(9 * M_PI / 20.0));
+ m_64apsk[38].imag() = (r3 * sin(9 * M_PI / 20.0));
+ m_64apsk[39].real() = (r3 * cos(7 * M_PI / 20.0));
+ m_64apsk[39].imag() = (r3 * sin(7 * M_PI / 20.0));
+ m_64apsk[40].real() = (r2 * cos(9 * M_PI / 16.0));
+ m_64apsk[40].imag() = (r2 * sin(9 * M_PI / 16.0));
+ m_64apsk[41].real() = (r4 * cos(3 * M_PI / 4.0));
+ m_64apsk[41].imag() = (r4 * sin(3 * M_PI / 4.0));
+ m_64apsk[42].real() = (r2 * cos(11 * M_PI / 16.0));
+ m_64apsk[42].imag() = (r2 * sin(11 * M_PI / 16.0));
+ m_64apsk[43].real() = (r3 * cos(3 * M_PI / 4.0));
+ m_64apsk[43].imag() = (r3 * sin(3 * M_PI / 4.0));
+ m_64apsk[44].real() = (r4 * cos(11 * M_PI / 20.0));
+ m_64apsk[44].imag() = (r4 * sin(11 * M_PI / 20.0));
+ m_64apsk[45].real() = (r4 * cos(13 * M_PI / 20.0));
+ m_64apsk[45].imag() = (r4 * sin(13 * M_PI / 20.0));
+ m_64apsk[46].real() = (r3 * cos(11 * M_PI / 20.0));
+ m_64apsk[46].imag() = (r3 * sin(11 * M_PI / 20.0));
+ m_64apsk[47].real() = (r3 * cos(13 * M_PI / 20.0));
+ m_64apsk[47].imag() = (r3 * sin(13 * M_PI / 20.0));
+ m_64apsk[48].real() = (r1 * cos(3 * M_PI / 8.0));
+ m_64apsk[48].imag() = (r1 * sin(3 * M_PI / 8.0));
+ m_64apsk[49].real() = (r4 * cos(3 * M_PI / 20.0));
+ m_64apsk[49].imag() = (r4 * sin(3 * M_PI / 20.0));
+ m_64apsk[50].real() = (r2 * cos(3 * M_PI / 16.0));
+ m_64apsk[50].imag() = (r2 * sin(3 * M_PI / 16.0));
+ m_64apsk[51].real() = (r3 * cos(3 * M_PI / 20.0));
+ m_64apsk[51].imag() = (r3 * sin(3 * M_PI / 20.0));
+ m_64apsk[52].real() = (r1 * cos(M_PI / 8.0));
+ m_64apsk[52].imag() = (r1 * sin(M_PI / 8.0));
+ m_64apsk[53].real() = (r4 * cos(M_PI / 20.0));
+ m_64apsk[53].imag() = (r4 * sin(M_PI / 20.0));
+ m_64apsk[54].real() = (r2 * cos(M_PI / 16.0));
+ m_64apsk[54].imag() = (r2 * sin(M_PI / 16.0));
+ m_64apsk[55].real() = (r3 * cos(M_PI / 20.0));
+ m_64apsk[55].imag() = (r3 * sin(M_PI / 20.0));
+ m_64apsk[56].real() = (r1 * cos(5 * M_PI / 8.0));
+ m_64apsk[56].imag() = (r1 * sin(5 * M_PI / 8.0));
+ m_64apsk[57].real() = (r4 * cos(17 * M_PI / 20.0));
+ m_64apsk[57].imag() = (r4 * sin(17 * M_PI / 20.0));
+ m_64apsk[58].real() = (r2 * cos(13 * M_PI / 16.0));
+ m_64apsk[58].imag() = (r2 * sin(13 * M_PI / 16.0));
+ m_64apsk[59].real() = (r3 * cos(17 * M_PI / 20.0));
+ m_64apsk[59].imag() = (r3 * sin(17 * M_PI / 20.0));
+ m_64apsk[60].real() = (r1 * cos(7 * M_PI / 8.0));
+ m_64apsk[60].imag() = (r1 * sin(7 * M_PI / 8.0));
+ m_64apsk[61].real() = (r4 * cos(19 * M_PI / 20.0));
+ m_64apsk[61].imag() = (r4 * sin(19 * M_PI / 20.0));
+ m_64apsk[62].real() = (r2 * cos(15 * M_PI / 16.0));
+ m_64apsk[62].imag() = (r2 * sin(15 * M_PI / 16.0));
+ m_64apsk[63].real() = (r3 * cos(19 * M_PI / 20.0));
+ m_64apsk[63].imag() = (r3 * sin(19 * M_PI / 20.0));
+ break;
+ case MOD_4_12_20_28APSK:
+ r4 = m;
+ switch(rate) {
+ case C132_180:
+ r1 = r4 / 7.0;
+ r3 = r1 * 4.3;
+ r2 = r1 * 2.4;
+ break;
+ default:
+ r1 = 0;
+ r2 = 0;
+ r3 = 0;
+ break;
+ }
+ m_64apsk[0].real() = (r4 * cos(M_PI / 4.0));
+ m_64apsk[0].imag() = (r4 * sin(M_PI / 4.0));
+ m_64apsk[1].real() = (r4 * cos(7 * M_PI / 4.0));
+ m_64apsk[1].imag() = (r4 * sin(7 * M_PI / 4.0));
+ m_64apsk[2].real() = (r4 * cos(3 * M_PI / 4.0));
+ m_64apsk[2].imag() = (r4 * sin(3 * M_PI / 4.0));
+ m_64apsk[3].real() = (r4 * cos(5 * M_PI / 4.0));
+ m_64apsk[3].imag() = (r4 * sin(5 * M_PI / 4.0));
+ m_64apsk[4].real() = (r4 * cos(13 * M_PI / 28.0));
+ m_64apsk[4].imag() = (r4 * sin(13 * M_PI / 28.0));
+ m_64apsk[5].real() = (r4 * cos(43 * M_PI / 28.0));
+ m_64apsk[5].imag() = (r4 * sin(43 * M_PI / 28.0));
+ m_64apsk[6].real() = (r4 * cos(15 * M_PI / 28.0));
+ m_64apsk[6].imag() = (r4 * sin(15 * M_PI / 28.0));
+ m_64apsk[7].real() = (r4 * cos(41 * M_PI / 28.0));
+ m_64apsk[7].imag() = (r4 * sin(41 * M_PI / 28.0));
+ m_64apsk[8].real() = (r4 * cos(M_PI / 28.0));
+ m_64apsk[8].imag() = (r4 * sin(M_PI / 28.0));
+ m_64apsk[9].real() = (r4 * cos(55 * M_PI / 28.0));
+ m_64apsk[9].imag() = (r4 * sin(55 * M_PI / 28.0));
+ m_64apsk[10].real() = (r4 * cos(27 * M_PI / 28.0));
+ m_64apsk[10].imag() = (r4 * sin(27 * M_PI / 28.0));
+ m_64apsk[11].real() = (r4 * cos(29 * M_PI / 28.0));
+ m_64apsk[11].imag() = (r4 * sin(29 * M_PI / 28.0));
+ m_64apsk[12].real() = (r1 * cos(M_PI / 4.0));
+ m_64apsk[12].imag() = (r1 * sin(M_PI / 4.0));
+ m_64apsk[13].real() = (r1 * cos(7 * M_PI / 4.0));
+ m_64apsk[13].imag() = (r1 * sin(7 * M_PI / 4.0));
+ m_64apsk[14].real() = (r1 * cos(3 * M_PI / 4.0));
+ m_64apsk[14].imag() = (r1 * sin(3 * M_PI / 4.0));
+ m_64apsk[15].real() = (r1 * cos(5 * M_PI / 4.0));
+ m_64apsk[15].imag() = (r1 * sin(5 * M_PI / 4.0));
+ m_64apsk[16].real() = (r4 * cos(9 * M_PI / 28.0));
+ m_64apsk[16].imag() = (r4 * sin(9 * M_PI / 28.0));
+ m_64apsk[17].real() = (r4 * cos(47 * M_PI / 28.0));
+ m_64apsk[17].imag() = (r4 * sin(47 * M_PI / 28.0));
+ m_64apsk[18].real() = (r4 * cos(19 * M_PI / 28.0));
+ m_64apsk[18].imag() = (r4 * sin(19 * M_PI / 28.0));
+ m_64apsk[19].real() = (r4 * cos(37 * M_PI / 28.0));
+ m_64apsk[19].imag() = (r4 * sin(37 * M_PI / 28.0));
+ m_64apsk[20].real() = (r4 * cos(11 * M_PI / 28.0));
+ m_64apsk[20].imag() = (r4 * sin(11 * M_PI / 28.0));
+ m_64apsk[21].real() = (r4 * cos(45 * M_PI / 28.0));
+ m_64apsk[21].imag() = (r4 * sin(45 * M_PI / 28.0));
+ m_64apsk[22].real() = (r4 * cos(17 * M_PI / 28.0));
+ m_64apsk[22].imag() = (r4 * sin(17 * M_PI / 28.0));
+ m_64apsk[23].real() = (r4 * cos(39 * M_PI / 28.0));
+ m_64apsk[23].imag() = (r4 * sin(39 * M_PI / 28.0));
+ m_64apsk[24].real() = (r3 * cos(M_PI / 20.0));
+ m_64apsk[24].imag() = (r3 * sin(M_PI / 20.0));
+ m_64apsk[25].real() = (r3 * cos(39 * M_PI / 20.0));
+ m_64apsk[25].imag() = (r3 * sin(39 * M_PI / 20.0));
+ m_64apsk[26].real() = (r3 * cos(19 * M_PI / 20.0));
+ m_64apsk[26].imag() = (r3 * sin(19 * M_PI / 20.0));
+ m_64apsk[27].real() = (r3 * cos(21 * M_PI / 20.0));
+ m_64apsk[27].imag() = (r3 * sin(21 * M_PI / 20.0));
+ m_64apsk[28].real() = (r2 * cos(M_PI / 12.0));
+ m_64apsk[28].imag() = (r2 * sin(M_PI / 12.0));
+ m_64apsk[29].real() = (r2 * cos(23 * M_PI / 12.0));
+ m_64apsk[29].imag() = (r2 * sin(23 * M_PI / 12.0));
+ m_64apsk[30].real() = (r2 * cos(11 * M_PI / 12.0));
+ m_64apsk[30].imag() = (r2 * sin(11 * M_PI / 12.0));
+ m_64apsk[31].real() = (r2 * cos(13 * M_PI / 12.0));
+ m_64apsk[31].imag() = (r2 * sin(13 * M_PI / 12.0));
+ m_64apsk[32].real() = (r4 * cos(5 * M_PI / 28.0));
+ m_64apsk[32].imag() = (r4 * sin(5 * M_PI / 28.0));
+ m_64apsk[33].real() = (r4 * cos(51 * M_PI / 28.0));
+ m_64apsk[33].imag() = (r4 * sin(51 * M_PI / 28.0));
+ m_64apsk[34].real() = (r4 * cos(23 * M_PI / 28.0));
+ m_64apsk[34].imag() = (r4 * sin(23 * M_PI / 28.0));
+ m_64apsk[35].real() = (r4 * cos(33 * M_PI / 28.0));
+ m_64apsk[35].imag() = (r4 * sin(33 * M_PI / 28.0));
+ m_64apsk[36].real() = (r3 * cos(9 * M_PI / 20.0));
+ m_64apsk[36].imag() = (r3 * sin(9 * M_PI / 20.0));
+ m_64apsk[37].real() = (r3 * cos(31 * M_PI / 20.0));
+ m_64apsk[37].imag() = (r3 * sin(31 * M_PI / 20.0));
+ m_64apsk[38].real() = (r3 * cos(11 * M_PI / 20.0));
+ m_64apsk[38].imag() = (r3 * sin(11 * M_PI / 20.0));
+ m_64apsk[39].real() = (r3 * cos(29 * M_PI / 20.0));
+ m_64apsk[39].imag() = (r3 * sin(29 * M_PI / 20.0));
+ m_64apsk[40].real() = (r4 * cos(3 * M_PI / 28.0));
+ m_64apsk[40].imag() = (r4 * sin(3 * M_PI / 28.0));
+ m_64apsk[41].real() = (r4 * cos(53 * M_PI / 28.0));
+ m_64apsk[41].imag() = (r4 * sin(53 * M_PI / 28.0));
+ m_64apsk[42].real() = (r4 * cos(25 * M_PI / 28.0));
+ m_64apsk[42].imag() = (r4 * sin(25 * M_PI / 28.0));
+ m_64apsk[43].real() = (r4 * cos(31 * M_PI / 28.0));
+ m_64apsk[43].imag() = (r4 * sin(31 * M_PI / 28.0));
+ m_64apsk[44].real() = (r2 * cos(5 * M_PI / 12.0));
+ m_64apsk[44].imag() = (r2 * sin(5 * M_PI / 12.0));
+ m_64apsk[45].real() = (r2 * cos(19 * M_PI / 12.0));
+ m_64apsk[45].imag() = (r2 * sin(19 * M_PI / 12.0));
+ m_64apsk[46].real() = (r2 * cos(7 * M_PI / 12.0));
+ m_64apsk[46].imag() = (r2 * sin(7 * M_PI / 12.0));
+ m_64apsk[47].real() = (r2 * cos(17 * M_PI / 12.0));
+ m_64apsk[47].imag() = (r2 * sin(17 * M_PI / 12.0));
+ m_64apsk[48].real() = (r3 * cos(M_PI / 4.0));
+ m_64apsk[48].imag() = (r3 * sin(M_PI / 4.0));
+ m_64apsk[49].real() = (r3 * cos(7 * M_PI / 4.0));
+ m_64apsk[49].imag() = (r3 * sin(7 * M_PI / 4.0));
+ m_64apsk[50].real() = (r3 * cos(3 * M_PI / 4.0));
+ m_64apsk[50].imag() = (r3 * sin(3 * M_PI / 4.0));
+ m_64apsk[51].real() = (r3 * cos(5 * M_PI / 4.0));
+ m_64apsk[51].imag() = (r3 * sin(5 * M_PI / 4.0));
+ m_64apsk[52].real() = (r3 * cos(7 * M_PI / 20.0));
+ m_64apsk[52].imag() = (r3 * sin(7 * M_PI / 20.0));
+ m_64apsk[53].real() = (r3 * cos(33 * M_PI / 20.0));
+ m_64apsk[53].imag() = (r3 * sin(33 * M_PI / 20.0));
+ m_64apsk[54].real() = (r3 * cos(13 * M_PI / 20.0));
+ m_64apsk[54].imag() = (r3 * sin(13 * M_PI / 20.0));
+ m_64apsk[55].real() = (r3 * cos(27 * M_PI / 20.0));
+ m_64apsk[55].imag() = (r3 * sin(27 * M_PI / 20.0));
+ m_64apsk[56].real() = (r3 * cos(3 * M_PI / 20.0));
+ m_64apsk[56].imag() = (r3 * sin(3 * M_PI / 20.0));
+ m_64apsk[57].real() = (r3 * cos(37 * M_PI / 20.0));
+ m_64apsk[57].imag() = (r3 * sin(37 * M_PI / 20.0));
+ m_64apsk[58].real() = (r3 * cos(17 * M_PI / 20.0));
+ m_64apsk[58].imag() = (r3 * sin(17 * M_PI / 20.0));
+ m_64apsk[59].real() = (r3 * cos(23 * M_PI / 20.0));
+ m_64apsk[59].imag() = (r3 * sin(23 * M_PI / 20.0));
+ m_64apsk[60].real() = (r2 * cos(M_PI / 4.0));
+ m_64apsk[60].imag() = (r2 * sin(M_PI / 4.0));
+ m_64apsk[61].real() = (r2 * cos(7 * M_PI / 4.0));
+ m_64apsk[61].imag() = (r2 * sin(7 * M_PI / 4.0));
+ m_64apsk[62].real() = (r2 * cos(3 * M_PI / 4.0));
+ m_64apsk[62].imag() = (r2 * sin(3 * M_PI / 4.0));
+ m_64apsk[63].real() = (r2 * cos(5 * M_PI / 4.0));
+ m_64apsk[63].imag() = (r2 * sin(5 * M_PI / 4.0));
+ break;
+ case MOD_128APSK:
+ r6 = m;
+ switch(rate) {
+ case C135_180:
+ r1 = r6 / 3.819;
+ r5 = r1 * 2.75;
+ r4 = r1 * 2.681;
+ r3 = r1 * 2.118;
+ r2 = r1 * 1.715;
+ break;
+ case C140_180:
+ r1 = r6 / 3.733;
+ r5 = r1 * 2.75;
+ r4 = r1 * 2.681;
+ r3 = r1 * 2.118;
+ r2 = r1 * 1.715;
+ break;
+ default:
+ r1 = 0;
+ r2 = 0;
+ r3 = 0;
+ r4 = 0;
+ r5 = 0;
+ break;
+ }
+ m_128apsk[0].real() = (r1 * cos(83 * M_PI / 1260.0));
+ m_128apsk[0].imag() = (r1 * sin(83 * M_PI / 1260.0));
+ m_128apsk[1].real() = (r6 * cos(11 * M_PI / 105.0));
+ m_128apsk[1].imag() = (r6 * sin(11 * M_PI / 105.0));
+ m_128apsk[2].real() = (r6 * cos(37 * M_PI / 1680.0));
+ m_128apsk[2].imag() = (r6 * sin(37 * M_PI / 1680.0));
+ m_128apsk[3].real() = (r6 * cos(11 * M_PI / 168.0));
+ m_128apsk[3].imag() = (r6 * sin(11 * M_PI / 168.0));
+ m_128apsk[4].real() = (r2 * cos(121 * M_PI / 2520.0));
+ m_128apsk[4].imag() = (r2 * sin(121 * M_PI / 2520.0));
+ m_128apsk[5].real() = (r3 * cos(23 * M_PI / 280.0));
+ m_128apsk[5].imag() = (r3 * sin(23 * M_PI / 280.0));
+ m_128apsk[6].real() = (r5 * cos(19 * M_PI / 720.0));
+ m_128apsk[6].imag() = (r5 * sin(19 * M_PI / 720.0));
+ m_128apsk[7].real() = (r4 * cos(61 * M_PI / 720.0));
+ m_128apsk[7].imag() = (r4 * sin(61 * M_PI / 720.0));
+ m_128apsk[8].real() = (r1 * cos(103 * M_PI / 560.0));
+ m_128apsk[8].imag() = (r1 * sin(103 * M_PI / 560.0));
+ m_128apsk[9].real() = (r6 * cos(61 * M_PI / 420.0));
+ m_128apsk[9].imag() = (r6 * sin(61 * M_PI / 420.0));
+ m_128apsk[10].real() = (r6 * cos(383 * M_PI / 1680.0));
+ m_128apsk[10].imag() = (r6 * sin(383 * M_PI / 1680.0));
+ m_128apsk[11].real() = (r6 * cos(929 * M_PI / 5040.0));
+ m_128apsk[11].imag() = (r6 * sin(929 * M_PI / 5040.0));
+ m_128apsk[12].real() = (r2 * cos(113 * M_PI / 560.0));
+ m_128apsk[12].imag() = (r2 * sin(113 * M_PI / 560.0));
+ m_128apsk[13].real() = (r3 * cos(169 * M_PI / 1008.0));
+ m_128apsk[13].imag() = (r3 * sin(169 * M_PI / 1008.0));
+ m_128apsk[14].real() = (r5 * cos(563 * M_PI / 2520.0));
+ m_128apsk[14].imag() = (r5 * sin(563 * M_PI / 2520.0));
+ m_128apsk[15].real() = (r4 * cos(139 * M_PI / 840.0));
+ m_128apsk[15].imag() = (r4 * sin(139 * M_PI / 840.0));
+ m_128apsk[16].real() = (r1 * cos(243 * M_PI / 560.0));
+ m_128apsk[16].imag() = (r1 * sin(243 * M_PI / 560.0));
+ m_128apsk[17].real() = (r6 * cos(1993 * M_PI / 5040.0));
+ m_128apsk[17].imag() = (r6 * sin(1993 * M_PI / 5040.0));
+ m_128apsk[18].real() = (r6 * cos(43 * M_PI / 90.0));
+ m_128apsk[18].imag() = (r6 * sin(43 * M_PI / 90.0));
+ m_128apsk[19].real() = (r6 * cos(73 * M_PI / 168.0));
+ m_128apsk[19].imag() = (r6 * sin(73 * M_PI / 168.0));
+ m_128apsk[20].real() = (r2 * cos(1139 * M_PI / 2520.0));
+ m_128apsk[20].imag() = (r2 * sin(1139 * M_PI / 2520.0));
+ m_128apsk[21].real() = (r3 * cos(117 * M_PI / 280.0));
+ m_128apsk[21].imag() = (r3 * sin(117 * M_PI / 280.0));
+ m_128apsk[22].real() = (r5 * cos(341 * M_PI / 720.0));
+ m_128apsk[22].imag() = (r5 * sin(341 * M_PI / 720.0));
+ m_128apsk[23].real() = (r4 * cos(349 * M_PI / 840.0));
+ m_128apsk[23].imag() = (r4 * sin(349 * M_PI / 840.0));
+ m_128apsk[24].real() = (r1 * cos(177 * M_PI / 560.0));
+ m_128apsk[24].imag() = (r1 * sin(177 * M_PI / 560.0));
+ m_128apsk[25].real() = (r6 * cos(1789 * M_PI / 5040.0));
+ m_128apsk[25].imag() = (r6 * sin(1789 * M_PI / 5040.0));
+ m_128apsk[26].real() = (r6 * cos(49 * M_PI / 180.0));
+ m_128apsk[26].imag() = (r6 * sin(49 * M_PI / 180.0));
+ m_128apsk[27].real() = (r6 * cos(53 * M_PI / 168.0));
+ m_128apsk[27].imag() = (r6 * sin(53 * M_PI / 168.0));
+ m_128apsk[28].real() = (r2 * cos(167 * M_PI / 560.0));
+ m_128apsk[28].imag() = (r2 * sin(167 * M_PI / 560.0));
+ m_128apsk[29].real() = (r3 * cos(239 * M_PI / 720.0));
+ m_128apsk[29].imag() = (r3 * sin(239 * M_PI / 720.0));
+ m_128apsk[30].real() = (r5 * cos(199 * M_PI / 720.0));
+ m_128apsk[30].imag() = (r5 * sin(199 * M_PI / 720.0));
+ m_128apsk[31].real() = (r4 * cos(281 * M_PI / 840.0));
+ m_128apsk[31].imag() = (r4 * sin(281 * M_PI / 840.0));
+ m_128apsk[32].real() = (r1 * cos(1177 * M_PI / 1260.0));
+ m_128apsk[32].imag() = (r1 * sin(1177 * M_PI / 1260.0));
+ m_128apsk[33].real() = (r6 * cos(94 * M_PI / 105.0));
+ m_128apsk[33].imag() = (r6 * sin(94 * M_PI / 105.0));
+ m_128apsk[34].real() = (r6 * cos(1643 * M_PI / 1680.0));
+ m_128apsk[34].imag() = (r6 * sin(1643 * M_PI / 1680.0));
+ m_128apsk[35].real() = (r6 * cos(157 * M_PI / 168.0));
+ m_128apsk[35].imag() = (r6 * sin(157 * M_PI / 168.0));
+ m_128apsk[36].real() = (r2 * cos(2399 * M_PI / 2520.0));
+ m_128apsk[36].imag() = (r2 * sin(2399 * M_PI / 2520.0));
+ m_128apsk[37].real() = (r3 * cos(257 * M_PI / 280.0));
+ m_128apsk[37].imag() = (r3 * sin(257 * M_PI / 280.0));
+ m_128apsk[38].real() = (r5 * cos(701 * M_PI / 720.0));
+ m_128apsk[38].imag() = (r5 * sin(701 * M_PI / 720.0));
+ m_128apsk[39].real() = (r4 * cos(659 * M_PI / 720.0));
+ m_128apsk[39].imag() = (r4 * sin(659 * M_PI / 720.0));
+ m_128apsk[40].real() = (r1 * cos(457 * M_PI / 560.0));
+ m_128apsk[40].imag() = (r1 * sin(457 * M_PI / 560.0));
+ m_128apsk[41].real() = (r6 * cos(359 * M_PI / 420.0));
+ m_128apsk[41].imag() = (r6 * sin(359 * M_PI / 420.0));
+ m_128apsk[42].real() = (r6 * cos(1297 * M_PI / 1680.0));
+ m_128apsk[42].imag() = (r6 * sin(1297 * M_PI / 1680.0));
+ m_128apsk[43].real() = (r6 * cos(4111 * M_PI / 5040.0));
+ m_128apsk[43].imag() = (r6 * sin(4111 * M_PI / 5040.0));
+ m_128apsk[44].real() = (r2 * cos(447 * M_PI / 560.0));
+ m_128apsk[44].imag() = (r2 * sin(447 * M_PI / 560.0));
+ m_128apsk[45].real() = (r3 * cos(839 * M_PI / 1008.0));
+ m_128apsk[45].imag() = (r3 * sin(839 * M_PI / 1008.0));
+ m_128apsk[46].real() = (r5 * cos(1957 * M_PI / 2520.0));
+ m_128apsk[46].imag() = (r5 * sin(1957 * M_PI / 2520.0));
+ m_128apsk[47].real() = (r4 * cos(701 * M_PI / 840.0));
+ m_128apsk[47].imag() = (r4 * sin(701 * M_PI / 840.0));
+ m_128apsk[48].real() = (r1 * cos(317 * M_PI / 560.0));
+ m_128apsk[48].imag() = (r1 * sin(317 * M_PI / 560.0));
+ m_128apsk[49].real() = (r6 * cos(3047 * M_PI / 5040.0));
+ m_128apsk[49].imag() = (r6 * sin(3047 * M_PI / 5040.0));
+ m_128apsk[50].real() = (r6 * cos(47 * M_PI / 90.0));
+ m_128apsk[50].imag() = (r6 * sin(47 * M_PI / 90.0));
+ m_128apsk[51].real() = (r6 * cos(95 * M_PI / 168.0));
+ m_128apsk[51].imag() = (r6 * sin(95 * M_PI / 168.0));
+ m_128apsk[52].real() = (r2 * cos(1381 * M_PI / 2520.0));
+ m_128apsk[52].imag() = (r2 * sin(1381 * M_PI / 2520.0));
+ m_128apsk[53].real() = (r3 * cos(163 * M_PI / 280.0));
+ m_128apsk[53].imag() = (r3 * sin(163 * M_PI / 280.0));
+ m_128apsk[54].real() = (r5 * cos(379 * M_PI / 720.0));
+ m_128apsk[54].imag() = (r5 * sin(379 * M_PI / 720.0));
+ m_128apsk[55].real() = (r4 * cos(491 * M_PI / 840.0));
+ m_128apsk[55].imag() = (r4 * sin(491 * M_PI / 840.0));
+ m_128apsk[56].real() = (r1 * cos(383 * M_PI / 560.0));
+ m_128apsk[56].imag() = (r1 * sin(383 * M_PI / 560.0));
+ m_128apsk[57].real() = (r6 * cos(3251 * M_PI / 5040.0));
+ m_128apsk[57].imag() = (r6 * sin(3251 * M_PI / 5040.0));
+ m_128apsk[58].real() = (r6 * cos(131 * M_PI / 180.0));
+ m_128apsk[58].imag() = (r6 * sin(131 * M_PI / 180.0));
+ m_128apsk[59].real() = (r6 * cos(115 * M_PI / 168.0));
+ m_128apsk[59].imag() = (r6 * sin(115 * M_PI / 168.0));
+ m_128apsk[60].real() = (r2 * cos(393 * M_PI / 560.0));
+ m_128apsk[60].imag() = (r2 * sin(393 * M_PI / 560.0));
+ m_128apsk[61].real() = (r3 * cos(481 * M_PI / 720.0));
+ m_128apsk[61].imag() = (r3 * sin(481 * M_PI / 720.0));
+ m_128apsk[62].real() = (r5 * cos(521 * M_PI / 720.0));
+ m_128apsk[62].imag() = (r5 * sin(521 * M_PI / 720.0));
+ m_128apsk[63].real() = (r4 * cos(559 * M_PI / 840.0));
+ m_128apsk[63].imag() = (r4 * sin(559 * M_PI / 840.0));
+ m_128apsk[64].real() = (r1 * cos(2437 * M_PI / 1260.0));
+ m_128apsk[64].imag() = (r1 * sin(2437 * M_PI / 1260.0));
+ m_128apsk[65].real() = (r6 * cos(199 * M_PI / 105.0));
+ m_128apsk[65].imag() = (r6 * sin(199 * M_PI / 105.0));
+ m_128apsk[66].real() = (r6 * cos(3323 * M_PI / 1680.0));
+ m_128apsk[66].imag() = (r6 * sin(3323 * M_PI / 1680.0));
+ m_128apsk[67].real() = (r6 * cos(325 * M_PI / 168.0));
+ m_128apsk[67].imag() = (r6 * sin(325 * M_PI / 168.0));
+ m_128apsk[68].real() = (r2 * cos(4919 * M_PI / 2520.0));
+ m_128apsk[68].imag() = (r2 * sin(4919 * M_PI / 2520.0));
+ m_128apsk[69].real() = (r3 * cos(537 * M_PI / 280.0));
+ m_128apsk[69].imag() = (r3 * sin(537 * M_PI / 280.0));
+ m_128apsk[70].real() = (r5 * cos(1421 * M_PI / 720.0));
+ m_128apsk[70].imag() = (r5 * sin(1421 * M_PI / 720.0));
+ m_128apsk[71].real() = (r4 * cos(1379 * M_PI / 720.0));
+ m_128apsk[71].imag() = (r4 * sin(1379 * M_PI / 720.0));
+ m_128apsk[72].real() = (r1 * cos(1017 * M_PI / 560.0));
+ m_128apsk[72].imag() = (r1 * sin(1017 * M_PI / 560.0));
+ m_128apsk[73].real() = (r6 * cos(779 * M_PI / 420.0));
+ m_128apsk[73].imag() = (r6 * sin(779 * M_PI / 420.0));
+ m_128apsk[74].real() = (r6 * cos(2977 * M_PI / 1680.0));
+ m_128apsk[74].imag() = (r6 * sin(2977 * M_PI / 1680.0));
+ m_128apsk[75].real() = (r6 * cos(9151 * M_PI / 5040.0));
+ m_128apsk[75].imag() = (r6 * sin(9151 * M_PI / 5040.0));
+ m_128apsk[76].real() = (r2 * cos(1007 * M_PI / 560.0));
+ m_128apsk[76].imag() = (r2 * sin(1007 * M_PI / 560.0));
+ m_128apsk[77].real() = (r3 * cos(1847 * M_PI / 1008.0));
+ m_128apsk[77].imag() = (r3 * sin(1847 * M_PI / 1008.0));
+ m_128apsk[78].real() = (r5 * cos(4477 * M_PI / 2520.0));
+ m_128apsk[78].imag() = (r5 * sin(4477 * M_PI / 2520.0));
+ m_128apsk[79].real() = (r4 * cos(1541 * M_PI / 840.0));
+ m_128apsk[79].imag() = (r4 * sin(1541 * M_PI / 840.0));
+ m_128apsk[80].real() = (r1 * cos(877 * M_PI / 560.0));
+ m_128apsk[80].imag() = (r1 * sin(877 * M_PI / 560.0));
+ m_128apsk[81].real() = (r6 * cos(8087 * M_PI / 5040.0));
+ m_128apsk[81].imag() = (r6 * sin(8087 * M_PI / 5040.0));
+ m_128apsk[82].real() = (r6 * cos(137 * M_PI / 90.0));
+ m_128apsk[82].imag() = (r6 * sin(137 * M_PI / 90.0));
+ m_128apsk[83].real() = (r6 * cos(263 * M_PI / 168.0));
+ m_128apsk[83].imag() = (r6 * sin(263 * M_PI / 168.0));
+ m_128apsk[84].real() = (r2 * cos(3901 * M_PI / 2520.0));
+ m_128apsk[84].imag() = (r2 * sin(3901 * M_PI / 2520.0));
+ m_128apsk[85].real() = (r3 * cos(443 * M_PI / 280.0));
+ m_128apsk[85].imag() = (r3 * sin(443 * M_PI / 280.0));
+ m_128apsk[86].real() = (r5 * cos(1099 * M_PI / 720.0));
+ m_128apsk[86].imag() = (r5 * sin(1099 * M_PI / 720.0));
+ m_128apsk[87].real() = (r4 * cos(1331 * M_PI / 840.0));
+ m_128apsk[87].imag() = (r4 * sin(1331 * M_PI / 840.0));
+ m_128apsk[88].real() = (r1 * cos(943 * M_PI / 560.0));
+ m_128apsk[88].imag() = (r1 * sin(943 * M_PI / 560.0));
+ m_128apsk[89].real() = (r6 * cos(8291 * M_PI / 5040.0));
+ m_128apsk[89].imag() = (r6 * sin(8291 * M_PI / 5040.0));
+ m_128apsk[90].real() = (r6 * cos(311 * M_PI / 180.0));
+ m_128apsk[90].imag() = (r6 * sin(311 * M_PI / 180.0));
+ m_128apsk[91].real() = (r6 * cos(283 * M_PI / 168.0));
+ m_128apsk[91].imag() = (r6 * sin(283 * M_PI / 168.0));
+ m_128apsk[92].real() = (r2 * cos(953 * M_PI / 560.0));
+ m_128apsk[92].imag() = (r2 * sin(953 * M_PI / 560.0));
+ m_128apsk[93].real() = (r3 * cos(1201 * M_PI / 720.0));
+ m_128apsk[93].imag() = (r3 * sin(1201 * M_PI / 720.0));
+ m_128apsk[94].real() = (r5 * cos(1241 * M_PI / 720.0));
+ m_128apsk[94].imag() = (r5 * sin(1241 * M_PI / 720.0));
+ m_128apsk[95].real() = (r4 * cos(1399 * M_PI / 840.0));
+ m_128apsk[95].imag() = (r4 * sin(1399 * M_PI / 840.0));
+ m_128apsk[96].real() = (r1 * cos(1343 * M_PI / 1260.0));
+ m_128apsk[96].imag() = (r1 * sin(1343 * M_PI / 1260.0));
+ m_128apsk[97].real() = (r6 * cos(116 * M_PI / 105.0));
+ m_128apsk[97].imag() = (r6 * sin(116 * M_PI / 105.0));
+ m_128apsk[98].real() = (r6 * cos(1717 * M_PI / 1680.0));
+ m_128apsk[98].imag() = (r6 * sin(1717 * M_PI / 1680.0));
+ m_128apsk[99].real() = (r6 * cos(179 * M_PI / 168.0));
+ m_128apsk[99].imag() = (r6 * sin(179 * M_PI / 168.0));
+ m_128apsk[100].real() = (r2 * cos(2641 * M_PI / 2520.0));
+ m_128apsk[100].imag() = (r2 * sin(2641 * M_PI / 2520.0));
+ m_128apsk[101].real() = (r3 * cos(303 * M_PI / 280.0));
+ m_128apsk[101].imag() = (r3 * sin(303 * M_PI / 280.0));
+ m_128apsk[102].real() = (r5 * cos(739 * M_PI / 720.0));
+ m_128apsk[102].imag() = (r5 * sin(739 * M_PI / 720.0));
+ m_128apsk[103].real() = (r4 * cos(781 * M_PI / 720.0));
+ m_128apsk[103].imag() = (r4 * sin(781 * M_PI / 720.0));
+ m_128apsk[104].real() = (r1 * cos(663 * M_PI / 560.0));
+ m_128apsk[104].imag() = (r1 * sin(663 * M_PI / 560.0));
+ m_128apsk[105].real() = (r6 * cos(481 * M_PI / 420.0));
+ m_128apsk[105].imag() = (r6 * sin(481 * M_PI / 420.0));
+ m_128apsk[106].real() = (r6 * cos(2063 * M_PI / 1680.0));
+ m_128apsk[106].imag() = (r6 * sin(2063 * M_PI / 1680.0));
+ m_128apsk[107].real() = (r6 * cos(5969 * M_PI / 5040.0));
+ m_128apsk[107].imag() = (r6 * sin(5969 * M_PI / 5040.0));
+ m_128apsk[108].real() = (r2 * cos(673 * M_PI / 560.0));
+ m_128apsk[108].imag() = (r2 * sin(673 * M_PI / 560.0));
+ m_128apsk[109].real() = (r3 * cos(1177 * M_PI / 1008.0));
+ m_128apsk[109].imag() = (r3 * sin(1177 * M_PI / 1008.0));
+ m_128apsk[110].real() = (r5 * cos(3083 * M_PI / 2520.0));
+ m_128apsk[110].imag() = (r5 * sin(3083 * M_PI / 2520.0));
+ m_128apsk[111].real() = (r4 * cos(979 * M_PI / 840.0));
+ m_128apsk[111].imag() = (r4 * sin(979 * M_PI / 840.0));
+ m_128apsk[112].real() = (r1 * cos(803 * M_PI / 560.0));
+ m_128apsk[112].imag() = (r1 * sin(803 * M_PI / 560.0));
+ m_128apsk[113].real() = (r6 * cos(7033 * M_PI / 5040.0));
+ m_128apsk[113].imag() = (r6 * sin(7033 * M_PI / 5040.0));
+ m_128apsk[114].real() = (r6 * cos(133 * M_PI / 90.0));
+ m_128apsk[114].imag() = (r6 * sin(133 * M_PI / 90.0));
+ m_128apsk[115].real() = (r6 * cos(241 * M_PI / 168.0));
+ m_128apsk[115].imag() = (r6 * sin(241 * M_PI / 168.0));
+ m_128apsk[116].real() = (r2 * cos(3659 * M_PI / 2520.0));
+ m_128apsk[116].imag() = (r2 * sin(3659 * M_PI / 2520.0));
+ m_128apsk[117].real() = (r3 * cos(397 * M_PI / 280.0));
+ m_128apsk[117].imag() = (r3 * sin(397 * M_PI / 280.0));
+ m_128apsk[118].real() = (r5 * cos(1061 * M_PI / 720.0));
+ m_128apsk[118].imag() = (r5 * sin(1061 * M_PI / 720.0));
+ m_128apsk[119].real() = (r4 * cos(1189 * M_PI / 840.0));
+ m_128apsk[119].imag() = (r4 * sin(1189 * M_PI / 840.0));
+ m_128apsk[120].real() = (r1 * cos(737 * M_PI / 560.0));
+ m_128apsk[120].imag() = (r1 * sin(737 * M_PI / 560.0));
+ m_128apsk[121].real() = (r6 * cos(6829 * M_PI / 5040.0));
+ m_128apsk[121].imag() = (r6 * sin(6829 * M_PI / 5040.0));
+ m_128apsk[122].real() = (r6 * cos(229 * M_PI / 180.0));
+ m_128apsk[122].imag() = (r6 * sin(229 * M_PI / 180.0));
+ m_128apsk[123].real() = (r6 * cos(221 * M_PI / 168.0));
+ m_128apsk[123].imag() = (r6 * sin(221 * M_PI / 168.0));
+ m_128apsk[124].real() = (r2 * cos(727 * M_PI / 560.0));
+ m_128apsk[124].imag() = (r2 * sin(727 * M_PI / 560.0));
+ m_128apsk[125].real() = (r3 * cos(959 * M_PI / 720.0));
+ m_128apsk[125].imag() = (r3 * sin(959 * M_PI / 720.0));
+ m_128apsk[126].real() = (r5 * cos(919 * M_PI / 720.0));
+ m_128apsk[126].imag() = (r5 * sin(919 * M_PI / 720.0));
+ m_128apsk[127].real() = (r4 * cos(1121 * M_PI / 840.0));
+ m_128apsk[127].imag() = (r4 * sin(1121 * M_PI / 840.0));
+ break;
+ case MOD_256APSK:
+ if (rate == C20_30) {
+ m_256apsk[0].real() = 1.6350;
+ m_256apsk[0].imag() = 0.1593;
+ m_256apsk[1].real() = 1.5776;
+ m_256apsk[1].imag() = 0.4735;
+ m_256apsk[2].real() = 0.9430;
+ m_256apsk[2].imag() = 0.1100;
+ m_256apsk[3].real() = 0.9069;
+ m_256apsk[3].imag() = 0.2829;
+ m_256apsk[4].real() = 0.3237;
+ m_256apsk[4].imag() = 0.0849;
+ m_256apsk[5].real() = 0.3228;
+ m_256apsk[5].imag() = 0.0867;
+ m_256apsk[6].real() = 0.7502;
+ m_256apsk[6].imag() = 0.1138;
+ m_256apsk[7].real() = 0.7325;
+ m_256apsk[7].imag() = 0.2088;
+ m_256apsk[8].real() = 0.1658;
+ m_256apsk[8].imag() = 1.6747;
+ m_256apsk[9].real() = 0.4907;
+ m_256apsk[9].imag() = 1.6084;
+ m_256apsk[10].real() = 0.1088;
+ m_256apsk[10].imag() = 0.9530;
+ m_256apsk[11].real() = 0.2464;
+ m_256apsk[11].imag() = 0.9270;
+ m_256apsk[12].real() = 0.0872;
+ m_256apsk[12].imag() = 0.1390;
+ m_256apsk[13].real() = 0.0871;
+ m_256apsk[13].imag() = 0.1392;
+ m_256apsk[14].real() = 0.1091;
+ m_256apsk[14].imag() = 0.7656;
+ m_256apsk[15].real() = 0.1699;
+ m_256apsk[15].imag() = 0.7537;
+ m_256apsk[16].real() = -1.6350;
+ m_256apsk[16].imag() = 0.1593;
+ m_256apsk[17].real() = -1.5776;
+ m_256apsk[17].imag() = 0.4735;
+ m_256apsk[18].real() = -0.9430;
+ m_256apsk[18].imag() = 0.1100;
+ m_256apsk[19].real() = -0.9069;
+ m_256apsk[19].imag() = 0.2829;
+ m_256apsk[20].real() = -0.3237;
+ m_256apsk[20].imag() = 0.0849;
+ m_256apsk[21].real() = -0.3228;
+ m_256apsk[21].imag() = 0.0867;
+ m_256apsk[22].real() = -0.7502;
+ m_256apsk[22].imag() = 0.1138;
+ m_256apsk[23].real() = -0.7325;
+ m_256apsk[23].imag() = 0.2088;
+ m_256apsk[24].real() = -0.1658;
+ m_256apsk[24].imag() = 1.6747;
+ m_256apsk[25].real() = -0.4907;
+ m_256apsk[25].imag() = 1.6084;
+ m_256apsk[26].real() = -0.1088;
+ m_256apsk[26].imag() = 0.9530;
+ m_256apsk[27].real() = -0.2464;
+ m_256apsk[27].imag() = 0.9270;
+ m_256apsk[28].real() = -0.0872;
+ m_256apsk[28].imag() = 0.1390;
+ m_256apsk[29].real() = -0.0871;
+ m_256apsk[29].imag() = 0.1392;
+ m_256apsk[30].real() = -0.1091;
+ m_256apsk[30].imag() = 0.7656;
+ m_256apsk[31].real() = -0.1699;
+ m_256apsk[31].imag() = 0.7537;
+ m_256apsk[32].real() = 1.3225;
+ m_256apsk[32].imag() = 0.1320;
+ m_256apsk[33].real() = 1.2742;
+ m_256apsk[33].imag() = 0.3922;
+ m_256apsk[34].real() = 1.0854;
+ m_256apsk[34].imag() = 0.1139;
+ m_256apsk[35].real() = 1.0441;
+ m_256apsk[35].imag() = 0.3296;
+ m_256apsk[36].real() = 0.4582;
+ m_256apsk[36].imag() = 0.1123;
+ m_256apsk[37].real() = 0.4545;
+ m_256apsk[37].imag() = 0.1251;
+ m_256apsk[38].real() = 0.6473;
+ m_256apsk[38].imag() = 0.1138;
+ m_256apsk[39].real() = 0.6339;
+ m_256apsk[39].imag() = 0.1702;
+ m_256apsk[40].real() = 0.1322;
+ m_256apsk[40].imag() = 1.3631;
+ m_256apsk[41].real() = 0.3929;
+ m_256apsk[41].imag() = 1.3102;
+ m_256apsk[42].real() = 0.1124;
+ m_256apsk[42].imag() = 1.1327;
+ m_256apsk[43].real() = 0.3160;
+ m_256apsk[43].imag() = 1.0913;
+ m_256apsk[44].real() = 0.0928;
+ m_256apsk[44].imag() = 0.3970;
+ m_256apsk[45].real() = 0.0937;
+ m_256apsk[45].imag() = 0.3973;
+ m_256apsk[46].real() = 0.1054;
+ m_256apsk[46].imag() = 0.5979;
+ m_256apsk[47].real() = 0.1230;
+ m_256apsk[47].imag() = 0.5949;
+ m_256apsk[48].real() = -1.3225;
+ m_256apsk[48].imag() = 0.1320;
+ m_256apsk[49].real() = -1.2742;
+ m_256apsk[49].imag() = 0.3922;
+ m_256apsk[50].real() = -1.0854;
+ m_256apsk[50].imag() = 0.1139;
+ m_256apsk[51].real() = -1.0441;
+ m_256apsk[51].imag() = 0.3296;
+ m_256apsk[52].real() = -0.4582;
+ m_256apsk[52].imag() = 0.1123;
+ m_256apsk[53].real() = -0.4545;
+ m_256apsk[53].imag() = 0.1251;
+ m_256apsk[54].real() = -0.6473;
+ m_256apsk[54].imag() = 0.1138;
+ m_256apsk[55].real() = -0.6339;
+ m_256apsk[55].imag() = 0.1702;
+ m_256apsk[56].real() = -0.1322;
+ m_256apsk[56].imag() = 1.3631;
+ m_256apsk[57].real() = -0.3929;
+ m_256apsk[57].imag() = 1.3102;
+ m_256apsk[58].real() = -0.1124;
+ m_256apsk[58].imag() = 1.1327;
+ m_256apsk[59].real() = -0.3160;
+ m_256apsk[59].imag() = 1.0913;
+ m_256apsk[60].real() = -0.0928;
+ m_256apsk[60].imag() = 0.3970;
+ m_256apsk[61].real() = -0.0937;
+ m_256apsk[61].imag() = 0.3973;
+ m_256apsk[62].real() = -0.1054;
+ m_256apsk[62].imag() = 0.5979;
+ m_256apsk[63].real() = -0.1230;
+ m_256apsk[63].imag() = 0.5949;
+ m_256apsk[64].real() = 1.6350;
+ m_256apsk[64].imag() = -0.1593;
+ m_256apsk[65].real() = 1.5776;
+ m_256apsk[65].imag() = -0.4735;
+ m_256apsk[66].real() = 0.9430;
+ m_256apsk[66].imag() = -0.1100;
+ m_256apsk[67].real() = 0.9069;
+ m_256apsk[67].imag() = -0.2829;
+ m_256apsk[68].real() = 0.3237;
+ m_256apsk[68].imag() = -0.0849;
+ m_256apsk[69].real() = 0.3228;
+ m_256apsk[69].imag() = -0.0867;
+ m_256apsk[70].real() = 0.7502;
+ m_256apsk[70].imag() = -0.1138;
+ m_256apsk[71].real() = 0.7325;
+ m_256apsk[71].imag() = -0.2088;
+ m_256apsk[72].real() = 0.1658;
+ m_256apsk[72].imag() = -1.6747;
+ m_256apsk[73].real() = 0.4907;
+ m_256apsk[73].imag() = -1.6084;
+ m_256apsk[74].real() = 0.1088;
+ m_256apsk[74].imag() = -0.9530;
+ m_256apsk[75].real() = 0.2464;
+ m_256apsk[75].imag() = -0.9270;
+ m_256apsk[76].real() = 0.0872;
+ m_256apsk[76].imag() = -0.1390;
+ m_256apsk[77].real() = 0.0871;
+ m_256apsk[77].imag() = -0.1392;
+ m_256apsk[78].real() = 0.1091;
+ m_256apsk[78].imag() = -0.7656;
+ m_256apsk[79].real() = 0.1699;
+ m_256apsk[79].imag() = -0.7537;
+ m_256apsk[80].real() = -1.6350;
+ m_256apsk[80].imag() = -0.1593;
+ m_256apsk[81].real() = -1.5776;
+ m_256apsk[81].imag() = -0.4735;
+ m_256apsk[82].real() = -0.9430;
+ m_256apsk[82].imag() = -0.1100;
+ m_256apsk[83].real() = -0.9069;
+ m_256apsk[83].imag() = -0.2829;
+ m_256apsk[84].real() = -0.3237;
+ m_256apsk[84].imag() = -0.0849;
+ m_256apsk[85].real() = -0.3228;
+ m_256apsk[85].imag() = -0.0867;
+ m_256apsk[86].real() = -0.7502;
+ m_256apsk[86].imag() = -0.1138;
+ m_256apsk[87].real() = -0.7325;
+ m_256apsk[87].imag() = -0.2088;
+ m_256apsk[88].real() = -0.1658;
+ m_256apsk[88].imag() = -1.6747;
+ m_256apsk[89].real() = -0.4907;
+ m_256apsk[89].imag() = -1.6084;
+ m_256apsk[90].real() = -0.1088;
+ m_256apsk[90].imag() = -0.9530;
+ m_256apsk[91].real() = -0.2464;
+ m_256apsk[91].imag() = -0.9270;
+ m_256apsk[92].real() = -0.0872;
+ m_256apsk[92].imag() = -0.1390;
+ m_256apsk[93].real() = -0.0871;
+ m_256apsk[93].imag() = -0.1392;
+ m_256apsk[94].real() = -0.1091;
+ m_256apsk[94].imag() = -0.7656;
+ m_256apsk[95].real() = -0.1699;
+ m_256apsk[95].imag() = -0.7537;
+ m_256apsk[96].real() = 1.3225;
+ m_256apsk[96].imag() = -0.1320;
+ m_256apsk[97].real() = 1.2742;
+ m_256apsk[97].imag() = -0.3922;
+ m_256apsk[98].real() = 1.0854;
+ m_256apsk[98].imag() = -0.1139;
+ m_256apsk[99].real() = 1.0441;
+ m_256apsk[99].imag() = -0.3296;
+ m_256apsk[100].real() = 0.4582;
+ m_256apsk[100].imag() = -0.1123;
+ m_256apsk[101].real() = 0.4545;
+ m_256apsk[101].imag() = -0.1251;
+ m_256apsk[102].real() = 0.6473;
+ m_256apsk[102].imag() = -0.1138;
+ m_256apsk[103].real() = 0.6339;
+ m_256apsk[103].imag() = -0.1702;
+ m_256apsk[104].real() = 0.1322;
+ m_256apsk[104].imag() = -1.3631;
+ m_256apsk[105].real() = 0.3929;
+ m_256apsk[105].imag() = -1.3102;
+ m_256apsk[106].real() = 0.1124;
+ m_256apsk[106].imag() = -1.1327;
+ m_256apsk[107].real() = 0.3160;
+ m_256apsk[107].imag() = -1.0913;
+ m_256apsk[108].real() = 0.0928;
+ m_256apsk[108].imag() = -0.3970;
+ m_256apsk[109].real() = 0.0937;
+ m_256apsk[109].imag() = -0.3973;
+ m_256apsk[110].real() = 0.1054;
+ m_256apsk[110].imag() = -0.5979;
+ m_256apsk[111].real() = 0.1230;
+ m_256apsk[111].imag() = -0.5949;
+ m_256apsk[112].real() = -1.3225;
+ m_256apsk[112].imag() = -0.1320;
+ m_256apsk[113].real() = -1.2742;
+ m_256apsk[113].imag() = -0.3922;
+ m_256apsk[114].real() = -1.0854;
+ m_256apsk[114].imag() = -0.1139;
+ m_256apsk[115].real() = -1.0441;
+ m_256apsk[115].imag() = -0.3296;
+ m_256apsk[116].real() = -0.4582;
+ m_256apsk[116].imag() = -0.1123;
+ m_256apsk[117].real() = -0.4545;
+ m_256apsk[117].imag() = -0.1251;
+ m_256apsk[118].real() = -0.6473;
+ m_256apsk[118].imag() = -0.1138;
+ m_256apsk[119].real() = -0.6339;
+ m_256apsk[119].imag() = -0.1702;
+ m_256apsk[120].real() = -0.1322;
+ m_256apsk[120].imag() = -1.3631;
+ m_256apsk[121].real() = -0.3929;
+ m_256apsk[121].imag() = -1.3102;
+ m_256apsk[122].real() = -0.1124;
+ m_256apsk[122].imag() = -1.1327;
+ m_256apsk[123].real() = -0.3160;
+ m_256apsk[123].imag() = -1.0913;
+ m_256apsk[124].real() = -0.0928;
+ m_256apsk[124].imag() = -0.3970;
+ m_256apsk[125].real() = -0.0937;
+ m_256apsk[125].imag() = -0.3973;
+ m_256apsk[126].real() = -0.1054;
+ m_256apsk[126].imag() = -0.5979;
+ m_256apsk[127].real() = -0.1230;
+ m_256apsk[127].imag() = -0.5949;
+ m_256apsk[128].real() = 1.2901;
+ m_256apsk[128].imag() = 1.0495;
+ m_256apsk[129].real() = 1.4625;
+ m_256apsk[129].imag() = 0.7740;
+ m_256apsk[130].real() = 0.7273;
+ m_256apsk[130].imag() = 0.6160;
+ m_256apsk[131].real() = 0.8177;
+ m_256apsk[131].imag() = 0.4841;
+ m_256apsk[132].real() = 0.2844;
+ m_256apsk[132].imag() = 0.1296;
+ m_256apsk[133].real() = 0.2853;
+ m_256apsk[133].imag() = 0.1309;
+ m_256apsk[134].real() = 0.5902;
+ m_256apsk[134].imag() = 0.4857;
+ m_256apsk[135].real() = 0.6355;
+ m_256apsk[135].imag() = 0.4185;
+ m_256apsk[136].real() = 1.0646;
+ m_256apsk[136].imag() = 1.2876;
+ m_256apsk[137].real() = 0.7949;
+ m_256apsk[137].imag() = 1.4772;
+ m_256apsk[138].real() = 0.5707;
+ m_256apsk[138].imag() = 0.7662;
+ m_256apsk[139].real() = 0.4490;
+ m_256apsk[139].imag() = 0.8461;
+ m_256apsk[140].real() = 0.1053;
+ m_256apsk[140].imag() = 0.1494;
+ m_256apsk[141].real() = 0.1052;
+ m_256apsk[141].imag() = 0.1495;
+ m_256apsk[142].real() = 0.4294;
+ m_256apsk[142].imag() = 0.6363;
+ m_256apsk[143].real() = 0.3744;
+ m_256apsk[143].imag() = 0.6744;
+ m_256apsk[144].real() = -1.2901;
+ m_256apsk[144].imag() = 1.0495;
+ m_256apsk[145].real() = -1.4625;
+ m_256apsk[145].imag() = 0.7740;
+ m_256apsk[146].real() = -0.7273;
+ m_256apsk[146].imag() = 0.6160;
+ m_256apsk[147].real() = -0.8177;
+ m_256apsk[147].imag() = 0.4841;
+ m_256apsk[148].real() = -0.2844;
+ m_256apsk[148].imag() = 0.1296;
+ m_256apsk[149].real() = -0.2853;
+ m_256apsk[149].imag() = 0.1309;
+ m_256apsk[150].real() = -0.5902;
+ m_256apsk[150].imag() = 0.4857;
+ m_256apsk[151].real() = -0.6355;
+ m_256apsk[151].imag() = 0.4185;
+ m_256apsk[152].real() = -1.0646;
+ m_256apsk[152].imag() = 1.2876;
+ m_256apsk[153].real() = -0.7949;
+ m_256apsk[153].imag() = 1.4772;
+ m_256apsk[154].real() = -0.5707;
+ m_256apsk[154].imag() = 0.7662;
+ m_256apsk[155].real() = -0.4490;
+ m_256apsk[155].imag() = 0.8461;
+ m_256apsk[156].real() = -0.1053;
+ m_256apsk[156].imag() = 0.1494;
+ m_256apsk[157].real() = -0.1052;
+ m_256apsk[157].imag() = 0.1495;
+ m_256apsk[158].real() = -0.4294;
+ m_256apsk[158].imag() = 0.6363;
+ m_256apsk[159].real() = -0.3744;
+ m_256apsk[159].imag() = 0.6744;
+ m_256apsk[160].real() = 1.0382;
+ m_256apsk[160].imag() = 0.8623;
+ m_256apsk[161].real() = 1.1794;
+ m_256apsk[161].imag() = 0.6376;
+ m_256apsk[162].real() = 0.8504;
+ m_256apsk[162].imag() = 0.7217;
+ m_256apsk[163].real() = 0.9638;
+ m_256apsk[163].imag() = 0.5407;
+ m_256apsk[164].real() = 0.3734;
+ m_256apsk[164].imag() = 0.2560;
+ m_256apsk[165].real() = 0.3799;
+ m_256apsk[165].imag() = 0.2517;
+ m_256apsk[166].real() = 0.4968;
+ m_256apsk[166].imag() = 0.3947;
+ m_256apsk[167].real() = 0.5231;
+ m_256apsk[167].imag() = 0.3644;
+ m_256apsk[168].real() = 0.8555;
+ m_256apsk[168].imag() = 1.0542;
+ m_256apsk[169].real() = 0.6363;
+ m_256apsk[169].imag() = 1.2064;
+ m_256apsk[170].real() = 0.6961;
+ m_256apsk[170].imag() = 0.8850;
+ m_256apsk[171].real() = 0.5229;
+ m_256apsk[171].imag() = 1.0037;
+ m_256apsk[172].real() = 0.1938;
+ m_256apsk[172].imag() = 0.3621;
+ m_256apsk[173].real() = 0.1909;
+ m_256apsk[173].imag() = 0.3627;
+ m_256apsk[174].real() = 0.3224;
+ m_256apsk[174].imag() = 0.5236;
+ m_256apsk[175].real() = 0.3016;
+ m_256apsk[175].imag() = 0.5347;
+ m_256apsk[176].real() = -1.0382;
+ m_256apsk[176].imag() = 0.8623;
+ m_256apsk[177].real() = -1.1794;
+ m_256apsk[177].imag() = 0.6376;
+ m_256apsk[178].real() = -0.8504;
+ m_256apsk[178].imag() = 0.7217;
+ m_256apsk[179].real() = -0.9638;
+ m_256apsk[179].imag() = 0.5407;
+ m_256apsk[180].real() = -0.3734;
+ m_256apsk[180].imag() = 0.2560;
+ m_256apsk[181].real() = -0.3799;
+ m_256apsk[181].imag() = 0.2517;
+ m_256apsk[182].real() = -0.4968;
+ m_256apsk[182].imag() = 0.3947;
+ m_256apsk[183].real() = -0.5231;
+ m_256apsk[183].imag() = 0.3644;
+ m_256apsk[184].real() = -0.8555;
+ m_256apsk[184].imag() = 1.0542;
+ m_256apsk[185].real() = -0.6363;
+ m_256apsk[185].imag() = 1.2064;
+ m_256apsk[186].real() = -0.6961;
+ m_256apsk[186].imag() = 0.8850;
+ m_256apsk[187].real() = -0.5229;
+ m_256apsk[187].imag() = 1.0037;
+ m_256apsk[188].real() = -0.1938;
+ m_256apsk[188].imag() = 0.3621;
+ m_256apsk[189].real() = -0.1909;
+ m_256apsk[189].imag() = 0.3627;
+ m_256apsk[190].real() = -0.3224;
+ m_256apsk[190].imag() = 0.5236;
+ m_256apsk[191].real() = -0.3016;
+ m_256apsk[191].imag() = 0.5347;
+ m_256apsk[192].real() = 1.2901;
+ m_256apsk[192].imag() = -1.0495;
+ m_256apsk[193].real() = 1.4625;
+ m_256apsk[193].imag() = -0.7740;
+ m_256apsk[194].real() = 0.7273;
+ m_256apsk[194].imag() = -0.6160;
+ m_256apsk[195].real() = 0.8177;
+ m_256apsk[195].imag() = -0.4841;
+ m_256apsk[196].real() = 0.2844;
+ m_256apsk[196].imag() = -0.1296;
+ m_256apsk[197].real() = 0.2853;
+ m_256apsk[197].imag() = -0.1309;
+ m_256apsk[198].real() = 0.5902;
+ m_256apsk[198].imag() = -0.4857;
+ m_256apsk[199].real() = 0.6355;
+ m_256apsk[199].imag() = -0.4185;
+ m_256apsk[200].real() = 1.0646;
+ m_256apsk[200].imag() = -1.2876;
+ m_256apsk[201].real() = 0.7949;
+ m_256apsk[201].imag() = -1.4772;
+ m_256apsk[202].real() = 0.5707;
+ m_256apsk[202].imag() = -0.7662;
+ m_256apsk[203].real() = 0.4490;
+ m_256apsk[203].imag() = -0.8461;
+ m_256apsk[204].real() = 0.1053;
+ m_256apsk[204].imag() = -0.1494;
+ m_256apsk[205].real() = 0.1052;
+ m_256apsk[205].imag() = -0.1495;
+ m_256apsk[206].real() = 0.4294;
+ m_256apsk[206].imag() = -0.6363;
+ m_256apsk[207].real() = 0.3744;
+ m_256apsk[207].imag() = -0.6744;
+ m_256apsk[208].real() = -1.2901;
+ m_256apsk[208].imag() = -1.0495;
+ m_256apsk[209].real() = -1.4625;
+ m_256apsk[209].imag() = -0.7740;
+ m_256apsk[210].real() = -0.7273;
+ m_256apsk[210].imag() = -0.6160;
+ m_256apsk[211].real() = -0.8177;
+ m_256apsk[211].imag() = -0.4841;
+ m_256apsk[212].real() = -0.2844;
+ m_256apsk[212].imag() = -0.1296;
+ m_256apsk[213].real() = -0.2853;
+ m_256apsk[213].imag() = -0.1309;
+ m_256apsk[214].real() = -0.5902;
+ m_256apsk[214].imag() = -0.4857;
+ m_256apsk[215].real() = -0.6355;
+ m_256apsk[215].imag() = -0.4185;
+ m_256apsk[216].real() = -1.0646;
+ m_256apsk[216].imag() = -1.2876;
+ m_256apsk[217].real() = -0.7949;
+ m_256apsk[217].imag() = -1.4772;
+ m_256apsk[218].real() = -0.5707;
+ m_256apsk[218].imag() = -0.7662;
+ m_256apsk[219].real() = -0.4490;
+ m_256apsk[219].imag() = -0.8461;
+ m_256apsk[220].real() = -0.1053;
+ m_256apsk[220].imag() = -0.1494;
+ m_256apsk[221].real() = -0.1052;
+ m_256apsk[221].imag() = -0.1495;
+ m_256apsk[222].real() = -0.4294;
+ m_256apsk[222].imag() = -0.6363;
+ m_256apsk[223].real() = -0.3744;
+ m_256apsk[223].imag() = -0.6744;
+ m_256apsk[224].real() = 1.0382;
+ m_256apsk[224].imag() = -0.8623;
+ m_256apsk[225].real() = 1.1794;
+ m_256apsk[225].imag() = -0.6376;
+ m_256apsk[226].real() = 0.8504;
+ m_256apsk[226].imag() = -0.7217;
+ m_256apsk[227].real() = 0.9638;
+ m_256apsk[227].imag() = -0.5407;
+ m_256apsk[228].real() = 0.3734;
+ m_256apsk[228].imag() = -0.2560;
+ m_256apsk[229].real() = 0.3799;
+ m_256apsk[229].imag() = -0.2517;
+ m_256apsk[230].real() = 0.4968;
+ m_256apsk[230].imag() = -0.3947;
+ m_256apsk[231].real() = 0.5231;
+ m_256apsk[231].imag() = -0.3644;
+ m_256apsk[232].real() = 0.8555;
+ m_256apsk[232].imag() = -1.0542;
+ m_256apsk[233].real() = 0.6363;
+ m_256apsk[233].imag() = -1.2064;
+ m_256apsk[234].real() = 0.6961;
+ m_256apsk[234].imag() = -0.8850;
+ m_256apsk[235].real() = 0.5229;
+ m_256apsk[235].imag() = -1.0037;
+ m_256apsk[236].real() = 0.1938;
+ m_256apsk[236].imag() = -0.3621;
+ m_256apsk[237].real() = 0.1909;
+ m_256apsk[237].imag() = -0.3627;
+ m_256apsk[238].real() = 0.3224;
+ m_256apsk[238].imag() = -0.5236;
+ m_256apsk[239].real() = 0.3016;
+ m_256apsk[239].imag() = -0.5347;
+ m_256apsk[240].real() = -1.0382;
+ m_256apsk[240].imag() = -0.8623;
+ m_256apsk[241].real() = -1.1794;
+ m_256apsk[241].imag() = -0.6376;
+ m_256apsk[242].real() = -0.8504;
+ m_256apsk[242].imag() = -0.7217;
+ m_256apsk[243].real() = -0.9638;
+ m_256apsk[243].imag() = -0.5407;
+ m_256apsk[244].real() = -0.3734;
+ m_256apsk[244].imag() = -0.2560;
+ m_256apsk[245].real() = -0.3799;
+ m_256apsk[245].imag() = -0.2517;
+ m_256apsk[246].real() = -0.4968;
+ m_256apsk[246].imag() = -0.3947;
+ m_256apsk[247].real() = -0.5231;
+ m_256apsk[247].imag() = -0.3644;
+ m_256apsk[248].real() = -0.8555;
+ m_256apsk[248].imag() = -1.0542;
+ m_256apsk[249].real() = -0.6363;
+ m_256apsk[249].imag() = -1.2064;
+ m_256apsk[250].real() = -0.6961;
+ m_256apsk[250].imag() = -0.8850;
+ m_256apsk[251].real() = -0.5229;
+ m_256apsk[251].imag() = -1.0037;
+ m_256apsk[252].real() = -0.1938;
+ m_256apsk[252].imag() = -0.3621;
+ m_256apsk[253].real() = -0.1909;
+ m_256apsk[253].imag() = -0.3627;
+ m_256apsk[254].real() = -0.3224;
+ m_256apsk[254].imag() = -0.5236;
+ m_256apsk[255].real() = -0.3016;
+ m_256apsk[255].imag() = -0.5347;
+ for (int i = 0; i < 256; i++) {
+ m_256apsk[i].real() /= 1.6747;
+ m_256apsk[i].imag() /= 1.6747;
+ }
+ }
+ else if (rate == C22_30) {
+ m_256apsk[0].real() = 1.5977;
+ m_256apsk[0].imag() = 0.1526;
+ m_256apsk[1].real() = 1.3187;
+ m_256apsk[1].imag() = 0.1269;
+ m_256apsk[2].real() = -1.5977;
+ m_256apsk[2].imag() = 0.1526;
+ m_256apsk[3].real() = -1.3187;
+ m_256apsk[3].imag() = 0.1269;
+ m_256apsk[4].real() = 0.2574;
+ m_256apsk[4].imag() = 0.0733;
+ m_256apsk[5].real() = 0.4496;
+ m_256apsk[5].imag() = 0.0807;
+ m_256apsk[6].real() = -0.2574;
+ m_256apsk[6].imag() = 0.0733;
+ m_256apsk[7].real() = -0.4496;
+ m_256apsk[7].imag() = 0.0807;
+ m_256apsk[8].real() = 1.5977;
+ m_256apsk[8].imag() = -0.1526;
+ m_256apsk[9].real() = 1.3187;
+ m_256apsk[9].imag() = -0.1269;
+ m_256apsk[10].real() = -1.5977;
+ m_256apsk[10].imag() = -0.1526;
+ m_256apsk[11].real() = -1.3187;
+ m_256apsk[11].imag() = -0.1269;
+ m_256apsk[12].real() = 0.2574;
+ m_256apsk[12].imag() = -0.0733;
+ m_256apsk[13].real() = 0.4496;
+ m_256apsk[13].imag() = -0.0807;
+ m_256apsk[14].real() = -0.2574;
+ m_256apsk[14].imag() = -0.0733;
+ m_256apsk[15].real() = -0.4496;
+ m_256apsk[15].imag() = -0.0807;
+ m_256apsk[16].real() = 0.9269;
+ m_256apsk[16].imag() = 0.0943;
+ m_256apsk[17].real() = 1.1024;
+ m_256apsk[17].imag() = 0.1086;
+ m_256apsk[18].real() = -0.9269;
+ m_256apsk[18].imag() = 0.0943;
+ m_256apsk[19].real() = -1.1024;
+ m_256apsk[19].imag() = 0.1086;
+ m_256apsk[20].real() = 0.7663;
+ m_256apsk[20].imag() = 0.0867;
+ m_256apsk[21].real() = 0.6115;
+ m_256apsk[21].imag() = 0.0871;
+ m_256apsk[22].real() = -0.7663;
+ m_256apsk[22].imag() = 0.0867;
+ m_256apsk[23].real() = -0.6115;
+ m_256apsk[23].imag() = 0.0871;
+ m_256apsk[24].real() = 0.9269;
+ m_256apsk[24].imag() = -0.0943;
+ m_256apsk[25].real() = 1.1024;
+ m_256apsk[25].imag() = -0.1086;
+ m_256apsk[26].real() = -0.9269;
+ m_256apsk[26].imag() = -0.0943;
+ m_256apsk[27].real() = -1.1024;
+ m_256apsk[27].imag() = -0.1086;
+ m_256apsk[28].real() = 0.7663;
+ m_256apsk[28].imag() = -0.0867;
+ m_256apsk[29].real() = 0.6115;
+ m_256apsk[29].imag() = -0.0871;
+ m_256apsk[30].real() = -0.7663;
+ m_256apsk[30].imag() = -0.0867;
+ m_256apsk[31].real() = -0.6115;
+ m_256apsk[31].imag() = -0.0871;
+ m_256apsk[32].real() = 1.2701;
+ m_256apsk[32].imag() = 1.0139;
+ m_256apsk[33].real() = 1.0525;
+ m_256apsk[33].imag() = 0.8406;
+ m_256apsk[34].real() = -1.2701;
+ m_256apsk[34].imag() = 1.0139;
+ m_256apsk[35].real() = -1.0525;
+ m_256apsk[35].imag() = 0.8406;
+ m_256apsk[36].real() = 0.2487;
+ m_256apsk[36].imag() = 0.1978;
+ m_256apsk[37].real() = 0.3523;
+ m_256apsk[37].imag() = 0.2915;
+ m_256apsk[38].real() = -0.2487;
+ m_256apsk[38].imag() = 0.1978;
+ m_256apsk[39].real() = -0.3523;
+ m_256apsk[39].imag() = 0.2915;
+ m_256apsk[40].real() = 1.2701;
+ m_256apsk[40].imag() = -1.0139;
+ m_256apsk[41].real() = 1.0525;
+ m_256apsk[41].imag() = -0.8406;
+ m_256apsk[42].real() = -1.2701;
+ m_256apsk[42].imag() = -1.0139;
+ m_256apsk[43].real() = -1.0525;
+ m_256apsk[43].imag() = -0.8406;
+ m_256apsk[44].real() = 0.2487;
+ m_256apsk[44].imag() = -0.1978;
+ m_256apsk[45].real() = 0.3523;
+ m_256apsk[45].imag() = -0.2915;
+ m_256apsk[46].real() = -0.2487;
+ m_256apsk[46].imag() = -0.1978;
+ m_256apsk[47].real() = -0.3523;
+ m_256apsk[47].imag() = -0.2915;
+ m_256apsk[48].real() = 0.7359;
+ m_256apsk[48].imag() = 0.6043;
+ m_256apsk[49].real() = 0.8807;
+ m_256apsk[49].imag() = 0.7105;
+ m_256apsk[50].real() = -0.7359;
+ m_256apsk[50].imag() = 0.6043;
+ m_256apsk[51].real() = -0.8807;
+ m_256apsk[51].imag() = 0.7105;
+ m_256apsk[52].real() = 0.6017;
+ m_256apsk[52].imag() = 0.5019;
+ m_256apsk[53].real() = 0.4747;
+ m_256apsk[53].imag() = 0.3996;
+ m_256apsk[54].real() = -0.6017;
+ m_256apsk[54].imag() = 0.5019;
+ m_256apsk[55].real() = -0.4747;
+ m_256apsk[55].imag() = 0.3996;
+ m_256apsk[56].real() = 0.7359;
+ m_256apsk[56].imag() = -0.6043;
+ m_256apsk[57].real() = 0.8807;
+ m_256apsk[57].imag() = -0.7105;
+ m_256apsk[58].real() = -0.7359;
+ m_256apsk[58].imag() = -0.6043;
+ m_256apsk[59].real() = -0.8807;
+ m_256apsk[59].imag() = -0.7105;
+ m_256apsk[60].real() = 0.6017;
+ m_256apsk[60].imag() = -0.5019;
+ m_256apsk[61].real() = 0.4747;
+ m_256apsk[61].imag() = -0.3996;
+ m_256apsk[62].real() = -0.6017;
+ m_256apsk[62].imag() = -0.5019;
+ m_256apsk[63].real() = -0.4747;
+ m_256apsk[63].imag() = -0.3996;
+ m_256apsk[64].real() = 1.5441;
+ m_256apsk[64].imag() = 0.4545;
+ m_256apsk[65].real() = 1.2750;
+ m_256apsk[65].imag() = 0.3775;
+ m_256apsk[66].real() = -1.5441;
+ m_256apsk[66].imag() = 0.4545;
+ m_256apsk[67].real() = -1.2750;
+ m_256apsk[67].imag() = 0.3775;
+ m_256apsk[68].real() = 0.2586;
+ m_256apsk[68].imag() = 0.0752;
+ m_256apsk[69].real() = 0.4435;
+ m_256apsk[69].imag() = 0.1065;
+ m_256apsk[70].real() = -0.2586;
+ m_256apsk[70].imag() = 0.0752;
+ m_256apsk[71].real() = -0.4435;
+ m_256apsk[71].imag() = 0.1065;
+ m_256apsk[72].real() = 1.5441;
+ m_256apsk[72].imag() = -0.4545;
+ m_256apsk[73].real() = 1.2750;
+ m_256apsk[73].imag() = -0.3775;
+ m_256apsk[74].real() = -1.5441;
+ m_256apsk[74].imag() = -0.4545;
+ m_256apsk[75].real() = -1.2750;
+ m_256apsk[75].imag() = -0.3775;
+ m_256apsk[76].real() = 0.2586;
+ m_256apsk[76].imag() = -0.0752;
+ m_256apsk[77].real() = 0.4435;
+ m_256apsk[77].imag() = -0.1065;
+ m_256apsk[78].real() = -0.2586;
+ m_256apsk[78].imag() = -0.0752;
+ m_256apsk[79].real() = -0.4435;
+ m_256apsk[79].imag() = -0.1065;
+ m_256apsk[80].real() = 0.8925;
+ m_256apsk[80].imag() = 0.2771;
+ m_256apsk[81].real() = 1.0649;
+ m_256apsk[81].imag() = 0.3219;
+ m_256apsk[82].real() = -0.8925;
+ m_256apsk[82].imag() = 0.2771;
+ m_256apsk[83].real() = -1.0649;
+ m_256apsk[83].imag() = 0.3219;
+ m_256apsk[84].real() = 0.7362;
+ m_256apsk[84].imag() = 0.2279;
+ m_256apsk[85].real() = 0.5936;
+ m_256apsk[85].imag() = 0.1699;
+ m_256apsk[86].real() = -0.7362;
+ m_256apsk[86].imag() = 0.2279;
+ m_256apsk[87].real() = -0.5936;
+ m_256apsk[87].imag() = 0.1699;
+ m_256apsk[88].real() = 0.8925;
+ m_256apsk[88].imag() = -0.2771;
+ m_256apsk[89].real() = 1.0649;
+ m_256apsk[89].imag() = -0.3219;
+ m_256apsk[90].real() = -0.8925;
+ m_256apsk[90].imag() = -0.2771;
+ m_256apsk[91].real() = -1.0649;
+ m_256apsk[91].imag() = -0.3219;
+ m_256apsk[92].real() = 0.7362;
+ m_256apsk[92].imag() = -0.2279;
+ m_256apsk[93].real() = 0.5936;
+ m_256apsk[93].imag() = -0.1699;
+ m_256apsk[94].real() = -0.7362;
+ m_256apsk[94].imag() = -0.2279;
+ m_256apsk[95].real() = -0.5936;
+ m_256apsk[95].imag() = -0.1699;
+ m_256apsk[96].real() = 1.4352;
+ m_256apsk[96].imag() = 0.7452;
+ m_256apsk[97].real() = 1.1866;
+ m_256apsk[97].imag() = 0.6182;
+ m_256apsk[98].real() = -1.4352;
+ m_256apsk[98].imag() = 0.7452;
+ m_256apsk[99].real() = -1.1866;
+ m_256apsk[99].imag() = 0.6182;
+ m_256apsk[100].real() = 0.2523;
+ m_256apsk[100].imag() = 0.1944;
+ m_256apsk[101].real() = 0.3695;
+ m_256apsk[101].imag() = 0.2695;
+ m_256apsk[102].real() = -0.2523;
+ m_256apsk[102].imag() = 0.1944;
+ m_256apsk[103].real() = -0.3695;
+ m_256apsk[103].imag() = 0.2695;
+ m_256apsk[104].real() = 1.4352;
+ m_256apsk[104].imag() = -0.7452;
+ m_256apsk[105].real() = 1.1866;
+ m_256apsk[105].imag() = -0.6182;
+ m_256apsk[106].real() = -1.4352;
+ m_256apsk[106].imag() = -0.7452;
+ m_256apsk[107].real() = -1.1866;
+ m_256apsk[107].imag() = -0.6182;
+ m_256apsk[108].real() = 0.2523;
+ m_256apsk[108].imag() = -0.1944;
+ m_256apsk[109].real() = 0.3695;
+ m_256apsk[109].imag() = -0.2695;
+ m_256apsk[110].real() = -0.2523;
+ m_256apsk[110].imag() = -0.1944;
+ m_256apsk[111].real() = -0.3695;
+ m_256apsk[111].imag() = -0.2695;
+ m_256apsk[112].real() = 0.8273;
+ m_256apsk[112].imag() = 0.4493;
+ m_256apsk[113].real() = 0.9911;
+ m_256apsk[113].imag() = 0.5243;
+ m_256apsk[114].real() = -0.8273;
+ m_256apsk[114].imag() = 0.4493;
+ m_256apsk[115].real() = -0.9911;
+ m_256apsk[115].imag() = 0.5243;
+ m_256apsk[116].real() = 0.6708;
+ m_256apsk[116].imag() = 0.3859;
+ m_256apsk[117].real() = 0.5197;
+ m_256apsk[117].imag() = 0.3331;
+ m_256apsk[118].real() = -0.6708;
+ m_256apsk[118].imag() = 0.3859;
+ m_256apsk[119].real() = -0.5197;
+ m_256apsk[119].imag() = 0.3331;
+ m_256apsk[120].real() = 0.8273;
+ m_256apsk[120].imag() = -0.4493;
+ m_256apsk[121].real() = 0.9911;
+ m_256apsk[121].imag() = -0.5243;
+ m_256apsk[122].real() = -0.8273;
+ m_256apsk[122].imag() = -0.4493;
+ m_256apsk[123].real() = -0.9911;
+ m_256apsk[123].imag() = -0.5243;
+ m_256apsk[124].real() = 0.6708;
+ m_256apsk[124].imag() = -0.3859;
+ m_256apsk[125].real() = 0.5197;
+ m_256apsk[125].imag() = -0.3331;
+ m_256apsk[126].real() = -0.6708;
+ m_256apsk[126].imag() = -0.3859;
+ m_256apsk[127].real() = -0.5197;
+ m_256apsk[127].imag() = -0.3331;
+ m_256apsk[128].real() = 0.1646;
+ m_256apsk[128].imag() = 1.6329;
+ m_256apsk[129].real() = 0.1379;
+ m_256apsk[129].imag() = 1.3595;
+ m_256apsk[130].real() = -0.1646;
+ m_256apsk[130].imag() = 1.6329;
+ m_256apsk[131].real() = -0.1379;
+ m_256apsk[131].imag() = 1.3595;
+ m_256apsk[132].real() = 0.0736;
+ m_256apsk[132].imag() = 0.0898;
+ m_256apsk[133].real() = 0.0742;
+ m_256apsk[133].imag() = 0.5054;
+ m_256apsk[134].real() = -0.0736;
+ m_256apsk[134].imag() = 0.0898;
+ m_256apsk[135].real() = -0.0742;
+ m_256apsk[135].imag() = 0.5054;
+ m_256apsk[136].real() = 0.1646;
+ m_256apsk[136].imag() = -1.6329;
+ m_256apsk[137].real() = 0.1379;
+ m_256apsk[137].imag() = -1.3595;
+ m_256apsk[138].real() = -0.1646;
+ m_256apsk[138].imag() = -1.6329;
+ m_256apsk[139].real() = -0.1379;
+ m_256apsk[139].imag() = -1.3595;
+ m_256apsk[140].real() = 0.0736;
+ m_256apsk[140].imag() = -0.0898;
+ m_256apsk[141].real() = 0.0742;
+ m_256apsk[141].imag() = -0.5054;
+ m_256apsk[142].real() = -0.0736;
+ m_256apsk[142].imag() = -0.0898;
+ m_256apsk[143].real() = -0.0742;
+ m_256apsk[143].imag() = -0.5054;
+ m_256apsk[144].real() = 0.0992;
+ m_256apsk[144].imag() = 0.9847;
+ m_256apsk[145].real() = 0.1170;
+ m_256apsk[145].imag() = 1.1517;
+ m_256apsk[146].real() = -0.0992;
+ m_256apsk[146].imag() = 0.9847;
+ m_256apsk[147].real() = -0.1170;
+ m_256apsk[147].imag() = 1.1517;
+ m_256apsk[148].real() = 0.0894;
+ m_256apsk[148].imag() = 0.8287;
+ m_256apsk[149].real() = 0.0889;
+ m_256apsk[149].imag() = 0.6739;
+ m_256apsk[150].real() = -0.0894;
+ m_256apsk[150].imag() = 0.8287;
+ m_256apsk[151].real() = -0.0889;
+ m_256apsk[151].imag() = 0.6739;
+ m_256apsk[152].real() = 0.0992;
+ m_256apsk[152].imag() = -0.9847;
+ m_256apsk[153].real() = 0.1170;
+ m_256apsk[153].imag() = -1.1517;
+ m_256apsk[154].real() = -0.0992;
+ m_256apsk[154].imag() = -0.9847;
+ m_256apsk[155].real() = -0.1170;
+ m_256apsk[155].imag() = -1.1517;
+ m_256apsk[156].real() = 0.0894;
+ m_256apsk[156].imag() = -0.8287;
+ m_256apsk[157].real() = 0.0889;
+ m_256apsk[157].imag() = -0.6739;
+ m_256apsk[158].real() = -0.0894;
+ m_256apsk[158].imag() = -0.8287;
+ m_256apsk[159].real() = -0.0889;
+ m_256apsk[159].imag() = -0.6739;
+ m_256apsk[160].real() = 1.0516;
+ m_256apsk[160].imag() = 1.2481;
+ m_256apsk[161].real() = 0.8742;
+ m_256apsk[161].imag() = 1.0355;
+ m_256apsk[162].real() = -1.0516;
+ m_256apsk[162].imag() = 1.2481;
+ m_256apsk[163].real() = -0.8742;
+ m_256apsk[163].imag() = 1.0355;
+ m_256apsk[164].real() = 0.0970;
+ m_256apsk[164].imag() = 0.2450;
+ m_256apsk[165].real() = 0.1959;
+ m_256apsk[165].imag() = 0.4045;
+ m_256apsk[166].real() = -0.0970;
+ m_256apsk[166].imag() = 0.2450;
+ m_256apsk[167].real() = -0.1959;
+ m_256apsk[167].imag() = 0.4045;
+ m_256apsk[168].real() = 1.0516;
+ m_256apsk[168].imag() = -1.2481;
+ m_256apsk[169].real() = 0.8742;
+ m_256apsk[169].imag() = -1.0355;
+ m_256apsk[170].real() = -1.0516;
+ m_256apsk[170].imag() = -1.2481;
+ m_256apsk[171].real() = -0.8742;
+ m_256apsk[171].imag() = -1.0355;
+ m_256apsk[172].real() = 0.0970;
+ m_256apsk[172].imag() = -0.2450;
+ m_256apsk[173].real() = 0.1959;
+ m_256apsk[173].imag() = -0.4045;
+ m_256apsk[174].real() = -0.0970;
+ m_256apsk[174].imag() = -0.2450;
+ m_256apsk[175].real() = -0.1959;
+ m_256apsk[175].imag() = -0.4045;
+ m_256apsk[176].real() = 0.6150;
+ m_256apsk[176].imag() = 0.7441;
+ m_256apsk[177].real() = 0.7345;
+ m_256apsk[177].imag() = 0.8743;
+ m_256apsk[178].real() = -0.6150;
+ m_256apsk[178].imag() = 0.7441;
+ m_256apsk[179].real() = -0.7345;
+ m_256apsk[179].imag() = 0.8743;
+ m_256apsk[180].real() = 0.4932;
+ m_256apsk[180].imag() = 0.6301;
+ m_256apsk[181].real() = 0.3620;
+ m_256apsk[181].imag() = 0.5258;
+ m_256apsk[182].real() = -0.4932;
+ m_256apsk[182].imag() = 0.6301;
+ m_256apsk[183].real() = -0.3620;
+ m_256apsk[183].imag() = 0.5258;
+ m_256apsk[184].real() = 0.6150;
+ m_256apsk[184].imag() = -0.7441;
+ m_256apsk[185].real() = 0.7345;
+ m_256apsk[185].imag() = -0.8743;
+ m_256apsk[186].real() = -0.6150;
+ m_256apsk[186].imag() = -0.7441;
+ m_256apsk[187].real() = -0.7345;
+ m_256apsk[187].imag() = -0.8743;
+ m_256apsk[188].real() = 0.4932;
+ m_256apsk[188].imag() = -0.6301;
+ m_256apsk[189].real() = 0.3620;
+ m_256apsk[189].imag() = -0.5258;
+ m_256apsk[190].real() = -0.4932;
+ m_256apsk[190].imag() = -0.6301;
+ m_256apsk[191].real() = -0.3620;
+ m_256apsk[191].imag() = -0.5258;
+ m_256apsk[192].real() = 0.4866;
+ m_256apsk[192].imag() = 1.5660;
+ m_256apsk[193].real() = 0.4068;
+ m_256apsk[193].imag() = 1.3027;
+ m_256apsk[194].real() = -0.4866;
+ m_256apsk[194].imag() = 1.5660;
+ m_256apsk[195].real() = -0.4068;
+ m_256apsk[195].imag() = 1.3027;
+ m_256apsk[196].real() = 0.0732;
+ m_256apsk[196].imag() = 0.0899;
+ m_256apsk[197].real() = 0.0877;
+ m_256apsk[197].imag() = 0.4997;
+ m_256apsk[198].real() = -0.0732;
+ m_256apsk[198].imag() = 0.0899;
+ m_256apsk[199].real() = -0.0877;
+ m_256apsk[199].imag() = 0.4997;
+ m_256apsk[200].real() = 0.4866;
+ m_256apsk[200].imag() = -1.5660;
+ m_256apsk[201].real() = 0.4068;
+ m_256apsk[201].imag() = -1.3027;
+ m_256apsk[202].real() = -0.4866;
+ m_256apsk[202].imag() = -1.5660;
+ m_256apsk[203].real() = -0.4068;
+ m_256apsk[203].imag() = -1.3027;
+ m_256apsk[204].real() = 0.0732;
+ m_256apsk[204].imag() = -0.0899;
+ m_256apsk[205].real() = 0.0877;
+ m_256apsk[205].imag() = -0.4997;
+ m_256apsk[206].real() = -0.0732;
+ m_256apsk[206].imag() = -0.0899;
+ m_256apsk[207].real() = -0.0877;
+ m_256apsk[207].imag() = -0.4997;
+ m_256apsk[208].real() = 0.2927;
+ m_256apsk[208].imag() = 0.9409;
+ m_256apsk[209].real() = 0.3446;
+ m_256apsk[209].imag() = 1.1023;
+ m_256apsk[210].real() = -0.2927;
+ m_256apsk[210].imag() = 0.9409;
+ m_256apsk[211].real() = -0.3446;
+ m_256apsk[211].imag() = 1.1023;
+ m_256apsk[212].real() = 0.2350;
+ m_256apsk[212].imag() = 0.7945;
+ m_256apsk[213].real() = 0.1670;
+ m_256apsk[213].imag() = 0.6529;
+ m_256apsk[214].real() = -0.2350;
+ m_256apsk[214].imag() = 0.7945;
+ m_256apsk[215].real() = -0.1670;
+ m_256apsk[215].imag() = 0.6529;
+ m_256apsk[216].real() = 0.2927;
+ m_256apsk[216].imag() = -0.9409;
+ m_256apsk[217].real() = 0.3446;
+ m_256apsk[217].imag() = -1.1023;
+ m_256apsk[218].real() = -0.2927;
+ m_256apsk[218].imag() = -0.9409;
+ m_256apsk[219].real() = -0.3446;
+ m_256apsk[219].imag() = -1.1023;
+ m_256apsk[220].real() = 0.2350;
+ m_256apsk[220].imag() = -0.7945;
+ m_256apsk[221].real() = 0.1670;
+ m_256apsk[221].imag() = -0.6529;
+ m_256apsk[222].real() = -0.2350;
+ m_256apsk[222].imag() = -0.7945;
+ m_256apsk[223].real() = -0.1670;
+ m_256apsk[223].imag() = -0.6529;
+ m_256apsk[224].real() = 0.7867;
+ m_256apsk[224].imag() = 1.4356;
+ m_256apsk[225].real() = 0.6561;
+ m_256apsk[225].imag() = 1.1927;
+ m_256apsk[226].real() = -0.7867;
+ m_256apsk[226].imag() = 1.4356;
+ m_256apsk[227].real() = -0.6561;
+ m_256apsk[227].imag() = 1.1927;
+ m_256apsk[228].real() = 0.0947;
+ m_256apsk[228].imag() = 0.2451;
+ m_256apsk[229].real() = 0.1865;
+ m_256apsk[229].imag() = 0.4121;
+ m_256apsk[230].real() = -0.0947;
+ m_256apsk[230].imag() = 0.2451;
+ m_256apsk[231].real() = -0.1865;
+ m_256apsk[231].imag() = 0.4121;
+ m_256apsk[232].real() = 0.7867;
+ m_256apsk[232].imag() = -1.4356;
+ m_256apsk[233].real() = 0.6561;
+ m_256apsk[233].imag() = -1.1927;
+ m_256apsk[234].real() = -0.7867;
+ m_256apsk[234].imag() = -1.4356;
+ m_256apsk[235].real() = -0.6561;
+ m_256apsk[235].imag() = -1.1927;
+ m_256apsk[236].real() = 0.0947;
+ m_256apsk[236].imag() = -0.2451;
+ m_256apsk[237].real() = 0.1865;
+ m_256apsk[237].imag() = -0.4121;
+ m_256apsk[238].real() = -0.0947;
+ m_256apsk[238].imag() = -0.2451;
+ m_256apsk[239].real() = -0.1865;
+ m_256apsk[239].imag() = -0.4121;
+ m_256apsk[240].real() = 0.4677;
+ m_256apsk[240].imag() = 0.8579;
+ m_256apsk[241].real() = 0.5537;
+ m_256apsk[241].imag() = 1.0081;
+ m_256apsk[242].real() = -0.4677;
+ m_256apsk[242].imag() = 0.8579;
+ m_256apsk[243].real() = -0.5537;
+ m_256apsk[243].imag() = 1.0081;
+ m_256apsk[244].real() = 0.3893;
+ m_256apsk[244].imag() = 0.7143;
+ m_256apsk[245].real() = 0.3110;
+ m_256apsk[245].imag() = 0.5686;
+ m_256apsk[246].real() = -0.3893;
+ m_256apsk[246].imag() = 0.7143;
+ m_256apsk[247].real() = -0.3110;
+ m_256apsk[247].imag() = 0.5686;
+ m_256apsk[248].real() = 0.4677;
+ m_256apsk[248].imag() = -0.8579;
+ m_256apsk[249].real() = 0.5537;
+ m_256apsk[249].imag() = -1.0081;
+ m_256apsk[250].real() = -0.4677;
+ m_256apsk[250].imag() = -0.8579;
+ m_256apsk[251].real() = -0.5537;
+ m_256apsk[251].imag() = -1.0081;
+ m_256apsk[252].real() = 0.3893;
+ m_256apsk[252].imag() = -0.7143;
+ m_256apsk[253].real() = 0.3110;
+ m_256apsk[253].imag() = -0.5686;
+ m_256apsk[254].real() = -0.3893;
+ m_256apsk[254].imag() = -0.7143;
+ m_256apsk[255].real() = -0.3110;
+ m_256apsk[255].imag() = -0.5686;
+ for (int i = 0; i < 256; i++) {
+ m_256apsk[i].real() /= 1.6329;
+ m_256apsk[i].imag() /= 1.6329;
+ }
+ }
+ else {
+ r8 = m;
+ switch(rate) {
+ case C116_180:
+ case C124_180:
+ r1 = r8 / 6.536;
+ r7 = r1 * 5.078;
+ r6 = r1 * 4.235;
+ r5 = r1 * 3.569;
+ r4 = r1 * 2.98;
+ r3 = r1 * 2.405;
+ r2 = r1 * 1.791;
+ break;
+ case C128_180:
+ r1 = r8 / 5.4;
+ r7 = r1 * 4.6;
+ r6 = r1 * 4.045;
+ r5 = r1 * 3.579;
+ r4 = r1 * 2.986;
+ r3 = r1 * 2.409;
+ r2 = r1 * 1.794;
+ break;
+ case C135_180:
+ r1 = r8 / 5.2;
+ r7 = r1 * 4.5;
+ r6 = r1 * 4.045;
+ r5 = r1 * 3.579;
+ r4 = r1 * 2.986;
+ r3 = r1 * 2.409;
+ r2 = r1 * 1.794;
+ break;
+ default:
+ r1 = 0;
+ r2 = 0;
+ r3 = 0;
+ r4 = 0;
+ r5 = 0;
+ r6 = 0;
+ r7 = 0;
+ break;
+ }
+ m_256apsk[0].real() = (r1 * cos(M_PI / 32.0));
+ m_256apsk[0].imag() = (r1 * sin(M_PI / 32.0));
+ m_256apsk[1].real() = (r1 * cos(3 * M_PI / 32.0));
+ m_256apsk[1].imag() = (r1 * sin(3 * M_PI / 32.0));
+ m_256apsk[2].real() = (r1 * cos(7 * M_PI / 32.0));
+ m_256apsk[2].imag() = (r1 * sin(7 * M_PI / 32.0));
+ m_256apsk[3].real() = (r1 * cos(5 * M_PI / 32.0));
+ m_256apsk[3].imag() = (r1 * sin(5 * M_PI / 32.0));
+ m_256apsk[4].real() = (r1 * cos(15 * M_PI / 32.0));
+ m_256apsk[4].imag() = (r1 * sin(15 * M_PI / 32.0));
+ m_256apsk[5].real() = (r1 * cos(13 * M_PI / 32.0));
+ m_256apsk[5].imag() = (r1 * sin(13 * M_PI / 32.0));
+ m_256apsk[6].real() = (r1 * cos(9 * M_PI / 32.0));
+ m_256apsk[6].imag() = (r1 * sin(9 * M_PI / 32.0));
+ m_256apsk[7].real() = (r1 * cos(11 * M_PI / 32.0));
+ m_256apsk[7].imag() = (r1 * sin(11 * M_PI / 32.0));
+ m_256apsk[8].real() = (r1 * cos(31 * M_PI / 32.0));
+ m_256apsk[8].imag() = (r1 * sin(31 * M_PI / 32.0));
+ m_256apsk[9].real() = (r1 * cos(29 * M_PI / 32.0));
+ m_256apsk[9].imag() = (r1 * sin(29 * M_PI / 32.0));
+ m_256apsk[10].real() = (r1 * cos(25 * M_PI / 32.0));
+ m_256apsk[10].imag() = (r1 * sin(25 * M_PI / 32.0));
+ m_256apsk[11].real() = (r1 * cos(27 * M_PI / 32.0));
+ m_256apsk[11].imag() = (r1 * sin(27 * M_PI / 32.0));
+ m_256apsk[12].real() = (r1 * cos(17 * M_PI / 32.0));
+ m_256apsk[12].imag() = (r1 * sin(17 * M_PI / 32.0));
+ m_256apsk[13].real() = (r1 * cos(19 * M_PI / 32.0));
+ m_256apsk[13].imag() = (r1 * sin(19 * M_PI / 32.0));
+ m_256apsk[14].real() = (r1 * cos(23 * M_PI / 32.0));
+ m_256apsk[14].imag() = (r1 * sin(23 * M_PI / 32.0));
+ m_256apsk[15].real() = (r1 * cos(21 * M_PI / 32.0));
+ m_256apsk[15].imag() = (r1 * sin(21 * M_PI / 32.0));
+ m_256apsk[16].real() = (r1 * cos(-1 * M_PI / 32.0));
+ m_256apsk[16].imag() = (r1 * sin(-1 * M_PI / 32.0));
+ m_256apsk[17].real() = (r1 * cos(-3 * M_PI / 32.0));
+ m_256apsk[17].imag() = (r1 * sin(-3 * M_PI / 32.0));
+ m_256apsk[18].real() = (r1 * cos(-7 * M_PI / 32.0));
+ m_256apsk[18].imag() = (r1 * sin(-7 * M_PI / 32.0));
+ m_256apsk[19].real() = (r1 * cos(-5 * M_PI / 32.0));
+ m_256apsk[19].imag() = (r1 * sin(-5 * M_PI / 32.0));
+ m_256apsk[20].real() = (r1 * cos(-15 * M_PI / 32.0));
+ m_256apsk[20].imag() = (r1 * sin(-15 * M_PI / 32.0));
+ m_256apsk[21].real() = (r1 * cos(-13 * M_PI / 32.0));
+ m_256apsk[21].imag() = (r1 * sin(-13 * M_PI / 32.0));
+ m_256apsk[22].real() = (r1 * cos(-9 * M_PI / 32.0));
+ m_256apsk[22].imag() = (r1 * sin(-9 * M_PI / 32.0));
+ m_256apsk[23].real() = (r1 * cos(-11 * M_PI / 32.0));
+ m_256apsk[23].imag() = (r1 * sin(-11 * M_PI / 32.0));
+ m_256apsk[24].real() = (r1 * cos(33 * M_PI / 32.0));
+ m_256apsk[24].imag() = (r1 * sin(33 * M_PI / 32.0));
+ m_256apsk[25].real() = (r1 * cos(35 * M_PI / 32.0));
+ m_256apsk[25].imag() = (r1 * sin(35 * M_PI / 32.0));
+ m_256apsk[26].real() = (r1 * cos(39 * M_PI / 32.0));
+ m_256apsk[26].imag() = (r1 * sin(39 * M_PI / 32.0));
+ m_256apsk[27].real() = (r1 * cos(37 * M_PI / 32.0));
+ m_256apsk[27].imag() = (r1 * sin(37 * M_PI / 32.0));
+ m_256apsk[28].real() = (r1 * cos(47 * M_PI / 32.0));
+ m_256apsk[28].imag() = (r1 * sin(47 * M_PI / 32.0));
+ m_256apsk[29].real() = (r1 * cos(45 * M_PI / 32.0));
+ m_256apsk[29].imag() = (r1 * sin(45 * M_PI / 32.0));
+ m_256apsk[30].real() = (r1 * cos(41 * M_PI / 32.0));
+ m_256apsk[30].imag() = (r1 * sin(41 * M_PI / 32.0));
+ m_256apsk[31].real() = (r1 * cos(43 * M_PI / 32.0));
+ m_256apsk[31].imag() = (r1 * sin(43 * M_PI / 32.0));
+ m_256apsk[32].real() = (r2 * cos(M_PI / 32.0));
+ m_256apsk[32].imag() = (r2 * sin(M_PI / 32.0));
+ m_256apsk[33].real() = (r2 * cos(3 * M_PI / 32.0));
+ m_256apsk[33].imag() = (r2 * sin(3 * M_PI / 32.0));
+ m_256apsk[34].real() = (r2 * cos(7 * M_PI / 32.0));
+ m_256apsk[34].imag() = (r2 * sin(7 * M_PI / 32.0));
+ m_256apsk[35].real() = (r2 * cos(5 * M_PI / 32.0));
+ m_256apsk[35].imag() = (r2 * sin(5 * M_PI / 32.0));
+ m_256apsk[36].real() = (r2 * cos(15 * M_PI / 32.0));
+ m_256apsk[36].imag() = (r2 * sin(15 * M_PI / 32.0));
+ m_256apsk[37].real() = (r2 * cos(13 * M_PI / 32.0));
+ m_256apsk[37].imag() = (r2 * sin(13 * M_PI / 32.0));
+ m_256apsk[38].real() = (r2 * cos(9 * M_PI / 32.0));
+ m_256apsk[38].imag() = (r2 * sin(9 * M_PI / 32.0));
+ m_256apsk[39].real() = (r2 * cos(11 * M_PI / 32.0));
+ m_256apsk[39].imag() = (r2 * sin(11 * M_PI / 32.0));
+ m_256apsk[40].real() = (r2 * cos(31 * M_PI / 32.0));
+ m_256apsk[40].imag() = (r2 * sin(31 * M_PI / 32.0));
+ m_256apsk[41].real() = (r2 * cos(29 * M_PI / 32.0));
+ m_256apsk[41].imag() = (r2 * sin(29 * M_PI / 32.0));
+ m_256apsk[42].real() = (r2 * cos(25 * M_PI / 32.0));
+ m_256apsk[42].imag() = (r2 * sin(25 * M_PI / 32.0));
+ m_256apsk[43].real() = (r2 * cos(27 * M_PI / 32.0));
+ m_256apsk[43].imag() = (r2 * sin(27 * M_PI / 32.0));
+ m_256apsk[44].real() = (r2 * cos(17 * M_PI / 32.0));
+ m_256apsk[44].imag() = (r2 * sin(17 * M_PI / 32.0));
+ m_256apsk[45].real() = (r2 * cos(19 * M_PI / 32.0));
+ m_256apsk[45].imag() = (r2 * sin(19 * M_PI / 32.0));
+ m_256apsk[46].real() = (r2 * cos(23 * M_PI / 32.0));
+ m_256apsk[46].imag() = (r2 * sin(23 * M_PI / 32.0));
+ m_256apsk[47].real() = (r2 * cos(21 * M_PI / 32.0));
+ m_256apsk[47].imag() = (r2 * sin(21 * M_PI / 32.0));
+ m_256apsk[48].real() = (r2 * cos(-1 * M_PI / 32.0));
+ m_256apsk[48].imag() = (r2 * sin(-1 * M_PI / 32.0));
+ m_256apsk[49].real() = (r2 * cos(-3 * M_PI / 32.0));
+ m_256apsk[49].imag() = (r2 * sin(-3 * M_PI / 32.0));
+ m_256apsk[50].real() = (r2 * cos(-7 * M_PI / 32.0));
+ m_256apsk[50].imag() = (r2 * sin(-7 * M_PI / 32.0));
+ m_256apsk[51].real() = (r2 * cos(-5 * M_PI / 32.0));
+ m_256apsk[51].imag() = (r2 * sin(-5 * M_PI / 32.0));
+ m_256apsk[52].real() = (r2 * cos(-15 * M_PI / 32.0));
+ m_256apsk[52].imag() = (r2 * sin(-15 * M_PI / 32.0));
+ m_256apsk[53].real() = (r2 * cos(-13 * M_PI / 32.0));
+ m_256apsk[53].imag() = (r2 * sin(-13 * M_PI / 32.0));
+ m_256apsk[54].real() = (r2 * cos(-9 * M_PI / 32.0));
+ m_256apsk[54].imag() = (r2 * sin(-9 * M_PI / 32.0));
+ m_256apsk[55].real() = (r2 * cos(-11 * M_PI / 32.0));
+ m_256apsk[55].imag() = (r2 * sin(-11 * M_PI / 32.0));
+ m_256apsk[56].real() = (r2 * cos(33 * M_PI / 32.0));
+ m_256apsk[56].imag() = (r2 * sin(33 * M_PI / 32.0));
+ m_256apsk[57].real() = (r2 * cos(35 * M_PI / 32.0));
+ m_256apsk[57].imag() = (r2 * sin(35 * M_PI / 32.0));
+ m_256apsk[58].real() = (r2 * cos(39 * M_PI / 32.0));
+ m_256apsk[58].imag() = (r2 * sin(39 * M_PI / 32.0));
+ m_256apsk[59].real() = (r2 * cos(37 * M_PI / 32.0));
+ m_256apsk[59].imag() = (r2 * sin(37 * M_PI / 32.0));
+ m_256apsk[60].real() = (r2 * cos(47 * M_PI / 32.0));
+ m_256apsk[60].imag() = (r2 * sin(47 * M_PI / 32.0));
+ m_256apsk[61].real() = (r2 * cos(45 * M_PI / 32.0));
+ m_256apsk[61].imag() = (r2 * sin(45 * M_PI / 32.0));
+ m_256apsk[62].real() = (r2 * cos(41 * M_PI / 32.0));
+ m_256apsk[62].imag() = (r2 * sin(41 * M_PI / 32.0));
+ m_256apsk[63].real() = (r2 * cos(43 * M_PI / 32.0));
+ m_256apsk[63].imag() = (r2 * sin(43 * M_PI / 32.0));
+ m_256apsk[64].real() = (r4 * cos(M_PI / 32.0));
+ m_256apsk[64].imag() = (r4 * sin(M_PI / 32.0));
+ m_256apsk[65].real() = (r4 * cos(3 * M_PI / 32.0));
+ m_256apsk[65].imag() = (r4 * sin(3 * M_PI / 32.0));
+ m_256apsk[66].real() = (r4 * cos(7 * M_PI / 32.0));
+ m_256apsk[66].imag() = (r4 * sin(7 * M_PI / 32.0));
+ m_256apsk[67].real() = (r4 * cos(5 * M_PI / 32.0));
+ m_256apsk[67].imag() = (r4 * sin(5 * M_PI / 32.0));
+ m_256apsk[68].real() = (r4 * cos(15 * M_PI / 32.0));
+ m_256apsk[68].imag() = (r4 * sin(15 * M_PI / 32.0));
+ m_256apsk[69].real() = (r4 * cos(13 * M_PI / 32.0));
+ m_256apsk[69].imag() = (r4 * sin(13 * M_PI / 32.0));
+ m_256apsk[70].real() = (r4 * cos(9 * M_PI / 32.0));
+ m_256apsk[70].imag() = (r4 * sin(9 * M_PI / 32.0));
+ m_256apsk[71].real() = (r4 * cos(11 * M_PI / 32.0));
+ m_256apsk[71].imag() = (r4 * sin(11 * M_PI / 32.0));
+ m_256apsk[72].real() = (r4 * cos(31 * M_PI / 32.0));
+ m_256apsk[72].imag() = (r4 * sin(31 * M_PI / 32.0));
+ m_256apsk[73].real() = (r4 * cos(29 * M_PI / 32.0));
+ m_256apsk[73].imag() = (r4 * sin(29 * M_PI / 32.0));
+ m_256apsk[74].real() = (r4 * cos(25 * M_PI / 32.0));
+ m_256apsk[74].imag() = (r4 * sin(25 * M_PI / 32.0));
+ m_256apsk[75].real() = (r4 * cos(27 * M_PI / 32.0));
+ m_256apsk[75].imag() = (r4 * sin(27 * M_PI / 32.0));
+ m_256apsk[76].real() = (r4 * cos(17 * M_PI / 32.0));
+ m_256apsk[76].imag() = (r4 * sin(17 * M_PI / 32.0));
+ m_256apsk[77].real() = (r4 * cos(19 * M_PI / 32.0));
+ m_256apsk[77].imag() = (r4 * sin(19 * M_PI / 32.0));
+ m_256apsk[78].real() = (r4 * cos(23 * M_PI / 32.0));
+ m_256apsk[78].imag() = (r4 * sin(23 * M_PI / 32.0));
+ m_256apsk[79].real() = (r4 * cos(21 * M_PI / 32.0));
+ m_256apsk[79].imag() = (r4 * sin(21 * M_PI / 32.0));
+ m_256apsk[80].real() = (r4 * cos(-1 * M_PI / 32.0));
+ m_256apsk[80].imag() = (r4 * sin(-1 * M_PI / 32.0));
+ m_256apsk[81].real() = (r4 * cos(-3 * M_PI / 32.0));
+ m_256apsk[81].imag() = (r4 * sin(-3 * M_PI / 32.0));
+ m_256apsk[82].real() = (r4 * cos(-7 * M_PI / 32.0));
+ m_256apsk[82].imag() = (r4 * sin(-7 * M_PI / 32.0));
+ m_256apsk[83].real() = (r4 * cos(-5 * M_PI / 32.0));
+ m_256apsk[83].imag() = (r4 * sin(-5 * M_PI / 32.0));
+ m_256apsk[84].real() = (r4 * cos(-15 * M_PI / 32.0));
+ m_256apsk[84].imag() = (r4 * sin(-15 * M_PI / 32.0));
+ m_256apsk[85].real() = (r4 * cos(-13 * M_PI / 32.0));
+ m_256apsk[85].imag() = (r4 * sin(-13 * M_PI / 32.0));
+ m_256apsk[86].real() = (r4 * cos(-9 * M_PI / 32.0));
+ m_256apsk[86].imag() = (r4 * sin(-9 * M_PI / 32.0));
+ m_256apsk[87].real() = (r4 * cos(-11 * M_PI / 32.0));
+ m_256apsk[87].imag() = (r4 * sin(-11 * M_PI / 32.0));
+ m_256apsk[88].real() = (r4 * cos(33 * M_PI / 32.0));
+ m_256apsk[88].imag() = (r4 * sin(33 * M_PI / 32.0));
+ m_256apsk[89].real() = (r4 * cos(35 * M_PI / 32.0));
+ m_256apsk[89].imag() = (r4 * sin(35 * M_PI / 32.0));
+ m_256apsk[90].real() = (r4 * cos(39 * M_PI / 32.0));
+ m_256apsk[90].imag() = (r4 * sin(39 * M_PI / 32.0));
+ m_256apsk[91].real() = (r4 * cos(37 * M_PI / 32.0));
+ m_256apsk[91].imag() = (r4 * sin(37 * M_PI / 32.0));
+ m_256apsk[92].real() = (r4 * cos(47 * M_PI / 32.0));
+ m_256apsk[92].imag() = (r4 * sin(47 * M_PI / 32.0));
+ m_256apsk[93].real() = (r4 * cos(45 * M_PI / 32.0));
+ m_256apsk[93].imag() = (r4 * sin(45 * M_PI / 32.0));
+ m_256apsk[94].real() = (r4 * cos(41 * M_PI / 32.0));
+ m_256apsk[94].imag() = (r4 * sin(41 * M_PI / 32.0));
+ m_256apsk[95].real() = (r4 * cos(43 * M_PI / 32.0));
+ m_256apsk[95].imag() = (r4 * sin(43 * M_PI / 32.0));
+ m_256apsk[96].real() = (r3 * cos(M_PI / 32.0));
+ m_256apsk[96].imag() = (r3 * sin(M_PI / 32.0));
+ m_256apsk[97].real() = (r3 * cos(3 * M_PI / 32.0));
+ m_256apsk[97].imag() = (r3 * sin(3 * M_PI / 32.0));
+ m_256apsk[98].real() = (r3 * cos(7 * M_PI / 32.0));
+ m_256apsk[98].imag() = (r3 * sin(7 * M_PI / 32.0));
+ m_256apsk[99].real() = (r3 * cos(5 * M_PI / 32.0));
+ m_256apsk[99].imag() = (r3 * sin(5 * M_PI / 32.0));
+ m_256apsk[100].real() = (r3 * cos(15 * M_PI / 32.0));
+ m_256apsk[100].imag() = (r3 * sin(15 * M_PI / 32.0));
+ m_256apsk[101].real() = (r3 * cos(13 * M_PI / 32.0));
+ m_256apsk[101].imag() = (r3 * sin(13 * M_PI / 32.0));
+ m_256apsk[102].real() = (r3 * cos(9 * M_PI / 32.0));
+ m_256apsk[102].imag() = (r3 * sin(9 * M_PI / 32.0));
+ m_256apsk[103].real() = (r3 * cos(11 * M_PI / 32.0));
+ m_256apsk[103].imag() = (r3 * sin(11 * M_PI / 32.0));
+ m_256apsk[104].real() = (r3 * cos(31 * M_PI / 32.0));
+ m_256apsk[104].imag() = (r3 * sin(31 * M_PI / 32.0));
+ m_256apsk[105].real() = (r3 * cos(29 * M_PI / 32.0));
+ m_256apsk[105].imag() = (r3 * sin(29 * M_PI / 32.0));
+ m_256apsk[106].real() = (r3 * cos(25 * M_PI / 32.0));
+ m_256apsk[106].imag() = (r3 * sin(25 * M_PI / 32.0));
+ m_256apsk[107].real() = (r3 * cos(27 * M_PI / 32.0));
+ m_256apsk[107].imag() = (r3 * sin(27 * M_PI / 32.0));
+ m_256apsk[108].real() = (r3 * cos(17 * M_PI / 32.0));
+ m_256apsk[108].imag() = (r3 * sin(17 * M_PI / 32.0));
+ m_256apsk[109].real() = (r3 * cos(19 * M_PI / 32.0));
+ m_256apsk[109].imag() = (r3 * sin(19 * M_PI / 32.0));
+ m_256apsk[110].real() = (r3 * cos(23 * M_PI / 32.0));
+ m_256apsk[110].imag() = (r3 * sin(23 * M_PI / 32.0));
+ m_256apsk[111].real() = (r3 * cos(21 * M_PI / 32.0));
+ m_256apsk[111].imag() = (r3 * sin(21 * M_PI / 32.0));
+ m_256apsk[112].real() = (r3 * cos(-1 * M_PI / 32.0));
+ m_256apsk[112].imag() = (r3 * sin(-1 * M_PI / 32.0));
+ m_256apsk[113].real() = (r3 * cos(-3 * M_PI / 32.0));
+ m_256apsk[113].imag() = (r3 * sin(-3 * M_PI / 32.0));
+ m_256apsk[114].real() = (r3 * cos(-7 * M_PI / 32.0));
+ m_256apsk[114].imag() = (r3 * sin(-7 * M_PI / 32.0));
+ m_256apsk[115].real() = (r3 * cos(-5 * M_PI / 32.0));
+ m_256apsk[115].imag() = (r3 * sin(-5 * M_PI / 32.0));
+ m_256apsk[116].real() = (r3 * cos(-15 * M_PI / 32.0));
+ m_256apsk[116].imag() = (r3 * sin(-15 * M_PI / 32.0));
+ m_256apsk[117].real() = (r3 * cos(-13 * M_PI / 32.0));
+ m_256apsk[117].imag() = (r3 * sin(-13 * M_PI / 32.0));
+ m_256apsk[118].real() = (r3 * cos(-9 * M_PI / 32.0));
+ m_256apsk[118].imag() = (r3 * sin(-9 * M_PI / 32.0));
+ m_256apsk[119].real() = (r3 * cos(-11 * M_PI / 32.0));
+ m_256apsk[119].imag() = (r3 * sin(-11 * M_PI / 32.0));
+ m_256apsk[120].real() = (r3 * cos(33 * M_PI / 32.0));
+ m_256apsk[120].imag() = (r3 * sin(33 * M_PI / 32.0));
+ m_256apsk[121].real() = (r3 * cos(35 * M_PI / 32.0));
+ m_256apsk[121].imag() = (r3 * sin(35 * M_PI / 32.0));
+ m_256apsk[122].real() = (r3 * cos(39 * M_PI / 32.0));
+ m_256apsk[122].imag() = (r3 * sin(39 * M_PI / 32.0));
+ m_256apsk[123].real() = (r3 * cos(37 * M_PI / 32.0));
+ m_256apsk[123].imag() = (r3 * sin(37 * M_PI / 32.0));
+ m_256apsk[124].real() = (r3 * cos(47 * M_PI / 32.0));
+ m_256apsk[124].imag() = (r3 * sin(47 * M_PI / 32.0));
+ m_256apsk[125].real() = (r3 * cos(45 * M_PI / 32.0));
+ m_256apsk[125].imag() = (r3 * sin(45 * M_PI / 32.0));
+ m_256apsk[126].real() = (r3 * cos(41 * M_PI / 32.0));
+ m_256apsk[126].imag() = (r3 * sin(41 * M_PI / 32.0));
+ m_256apsk[127].real() = (r3 * cos(43 * M_PI / 32.0));
+ m_256apsk[127].imag() = (r3 * sin(43 * M_PI / 32.0));
+ m_256apsk[128].real() = (r8 * cos(M_PI / 32.0));
+ m_256apsk[128].imag() = (r8 * sin(M_PI / 32.0));
+ m_256apsk[129].real() = (r8 * cos(3 * M_PI / 32.0));
+ m_256apsk[129].imag() = (r8 * sin(3 * M_PI / 32.0));
+ m_256apsk[130].real() = (r8 * cos(7 * M_PI / 32.0));
+ m_256apsk[130].imag() = (r8 * sin(7 * M_PI / 32.0));
+ m_256apsk[131].real() = (r8 * cos(5 * M_PI / 32.0));
+ m_256apsk[131].imag() = (r8 * sin(5 * M_PI / 32.0));
+ m_256apsk[132].real() = (r8 * cos(15 * M_PI / 32.0));
+ m_256apsk[132].imag() = (r8 * sin(15 * M_PI / 32.0));
+ m_256apsk[133].real() = (r8 * cos(13 * M_PI / 32.0));
+ m_256apsk[133].imag() = (r8 * sin(13 * M_PI / 32.0));
+ m_256apsk[134].real() = (r8 * cos(9 * M_PI / 32.0));
+ m_256apsk[134].imag() = (r8 * sin(9 * M_PI / 32.0));
+ m_256apsk[135].real() = (r8 * cos(11 * M_PI / 32.0));
+ m_256apsk[135].imag() = (r8 * sin(11 * M_PI / 32.0));
+ m_256apsk[136].real() = (r8 * cos(31 * M_PI / 32.0));
+ m_256apsk[136].imag() = (r8 * sin(31 * M_PI / 32.0));
+ m_256apsk[137].real() = (r8 * cos(29 * M_PI / 32.0));
+ m_256apsk[137].imag() = (r8 * sin(29 * M_PI / 32.0));
+ m_256apsk[138].real() = (r8 * cos(25 * M_PI / 32.0));
+ m_256apsk[138].imag() = (r8 * sin(25 * M_PI / 32.0));
+ m_256apsk[139].real() = (r8 * cos(27 * M_PI / 32.0));
+ m_256apsk[139].imag() = (r8 * sin(27 * M_PI / 32.0));
+ m_256apsk[140].real() = (r8 * cos(17 * M_PI / 32.0));
+ m_256apsk[140].imag() = (r8 * sin(17 * M_PI / 32.0));
+ m_256apsk[141].real() = (r8 * cos(19 * M_PI / 32.0));
+ m_256apsk[141].imag() = (r8 * sin(19 * M_PI / 32.0));
+ m_256apsk[142].real() = (r8 * cos(23 * M_PI / 32.0));
+ m_256apsk[142].imag() = (r8 * sin(23 * M_PI / 32.0));
+ m_256apsk[143].real() = (r8 * cos(21 * M_PI / 32.0));
+ m_256apsk[143].imag() = (r8 * sin(21 * M_PI / 32.0));
+ m_256apsk[144].real() = (r8 * cos(-1 * M_PI / 32.0));
+ m_256apsk[144].imag() = (r8 * sin(-1 * M_PI / 32.0));
+ m_256apsk[145].real() = (r8 * cos(-3 * M_PI / 32.0));
+ m_256apsk[145].imag() = (r8 * sin(-3 * M_PI / 32.0));
+ m_256apsk[146].real() = (r8 * cos(-7 * M_PI / 32.0));
+ m_256apsk[146].imag() = (r8 * sin(-7 * M_PI / 32.0));
+ m_256apsk[147].real() = (r8 * cos(-5 * M_PI / 32.0));
+ m_256apsk[147].imag() = (r8 * sin(-5 * M_PI / 32.0));
+ m_256apsk[148].real() = (r8 * cos(-15 * M_PI / 32.0));
+ m_256apsk[148].imag() = (r8 * sin(-15 * M_PI / 32.0));
+ m_256apsk[149].real() = (r8 * cos(-13 * M_PI / 32.0));
+ m_256apsk[149].imag() = (r8 * sin(-13 * M_PI / 32.0));
+ m_256apsk[150].real() = (r8 * cos(-9 * M_PI / 32.0));
+ m_256apsk[150].imag() = (r8 * sin(-9 * M_PI / 32.0));
+ m_256apsk[151].real() = (r8 * cos(-11 * M_PI / 32.0));
+ m_256apsk[151].imag() = (r8 * sin(-11 * M_PI / 32.0));
+ m_256apsk[152].real() = (r8 * cos(33 * M_PI / 32.0));
+ m_256apsk[152].imag() = (r8 * sin(33 * M_PI / 32.0));
+ m_256apsk[153].real() = (r8 * cos(35 * M_PI / 32.0));
+ m_256apsk[153].imag() = (r8 * sin(35 * M_PI / 32.0));
+ m_256apsk[154].real() = (r8 * cos(39 * M_PI / 32.0));
+ m_256apsk[154].imag() = (r8 * sin(39 * M_PI / 32.0));
+ m_256apsk[155].real() = (r8 * cos(37 * M_PI / 32.0));
+ m_256apsk[155].imag() = (r8 * sin(37 * M_PI / 32.0));
+ m_256apsk[156].real() = (r8 * cos(47 * M_PI / 32.0));
+ m_256apsk[156].imag() = (r8 * sin(47 * M_PI / 32.0));
+ m_256apsk[157].real() = (r8 * cos(45 * M_PI / 32.0));
+ m_256apsk[157].imag() = (r8 * sin(45 * M_PI / 32.0));
+ m_256apsk[158].real() = (r8 * cos(41 * M_PI / 32.0));
+ m_256apsk[158].imag() = (r8 * sin(41 * M_PI / 32.0));
+ m_256apsk[159].real() = (r8 * cos(43 * M_PI / 32.0));
+ m_256apsk[159].imag() = (r8 * sin(43 * M_PI / 32.0));
+ m_256apsk[160].real() = (r7 * cos(M_PI / 32.0));
+ m_256apsk[160].imag() = (r7 * sin(M_PI / 32.0));
+ m_256apsk[161].real() = (r7 * cos(3 * M_PI / 32.0));
+ m_256apsk[161].imag() = (r7 * sin(3 * M_PI / 32.0));
+ m_256apsk[162].real() = (r7 * cos(7 * M_PI / 32.0));
+ m_256apsk[162].imag() = (r7 * sin(7 * M_PI / 32.0));
+ m_256apsk[163].real() = (r7 * cos(5 * M_PI / 32.0));
+ m_256apsk[163].imag() = (r7 * sin(5 * M_PI / 32.0));
+ m_256apsk[164].real() = (r7 * cos(15 * M_PI / 32.0));
+ m_256apsk[164].imag() = (r7 * sin(15 * M_PI / 32.0));
+ m_256apsk[165].real() = (r7 * cos(13 * M_PI / 32.0));
+ m_256apsk[165].imag() = (r7 * sin(13 * M_PI / 32.0));
+ m_256apsk[166].real() = (r7 * cos(9 * M_PI / 32.0));
+ m_256apsk[166].imag() = (r7 * sin(9 * M_PI / 32.0));
+ m_256apsk[167].real() = (r7 * cos(11 * M_PI / 32.0));
+ m_256apsk[167].imag() = (r7 * sin(11 * M_PI / 32.0));
+ m_256apsk[168].real() = (r7 * cos(31 * M_PI / 32.0));
+ m_256apsk[168].imag() = (r7 * sin(31 * M_PI / 32.0));
+ m_256apsk[169].real() = (r7 * cos(29 * M_PI / 32.0));
+ m_256apsk[169].imag() = (r7 * sin(29 * M_PI / 32.0));
+ m_256apsk[170].real() = (r7 * cos(25 * M_PI / 32.0));
+ m_256apsk[170].imag() = (r7 * sin(25 * M_PI / 32.0));
+ m_256apsk[171].real() = (r7 * cos(27 * M_PI / 32.0));
+ m_256apsk[171].imag() = (r7 * sin(27 * M_PI / 32.0));
+ m_256apsk[172].real() = (r7 * cos(17 * M_PI / 32.0));
+ m_256apsk[172].imag() = (r7 * sin(17 * M_PI / 32.0));
+ m_256apsk[173].real() = (r7 * cos(19 * M_PI / 32.0));
+ m_256apsk[173].imag() = (r7 * sin(19 * M_PI / 32.0));
+ m_256apsk[174].real() = (r7 * cos(23 * M_PI / 32.0));
+ m_256apsk[174].imag() = (r7 * sin(23 * M_PI / 32.0));
+ m_256apsk[175].real() = (r7 * cos(21 * M_PI / 32.0));
+ m_256apsk[175].imag() = (r7 * sin(21 * M_PI / 32.0));
+ m_256apsk[176].real() = (r7 * cos(-1 * M_PI / 32.0));
+ m_256apsk[176].imag() = (r7 * sin(-1 * M_PI / 32.0));
+ m_256apsk[177].real() = (r7 * cos(-3 * M_PI / 32.0));
+ m_256apsk[177].imag() = (r7 * sin(-3 * M_PI / 32.0));
+ m_256apsk[178].real() = (r7 * cos(-7 * M_PI / 32.0));
+ m_256apsk[178].imag() = (r7 * sin(-7 * M_PI / 32.0));
+ m_256apsk[179].real() = (r7 * cos(-5 * M_PI / 32.0));
+ m_256apsk[179].imag() = (r7 * sin(-5 * M_PI / 32.0));
+ m_256apsk[180].real() = (r7 * cos(-15 * M_PI / 32.0));
+ m_256apsk[180].imag() = (r7 * sin(-15 * M_PI / 32.0));
+ m_256apsk[181].real() = (r7 * cos(-13 * M_PI / 32.0));
+ m_256apsk[181].imag() = (r7 * sin(-13 * M_PI / 32.0));
+ m_256apsk[182].real() = (r7 * cos(-9 * M_PI / 32.0));
+ m_256apsk[182].imag() = (r7 * sin(-9 * M_PI / 32.0));
+ m_256apsk[183].real() = (r7 * cos(-11 * M_PI / 32.0));
+ m_256apsk[183].imag() = (r7 * sin(-11 * M_PI / 32.0));
+ m_256apsk[184].real() = (r7 * cos(33 * M_PI / 32.0));
+ m_256apsk[184].imag() = (r7 * sin(33 * M_PI / 32.0));
+ m_256apsk[185].real() = (r7 * cos(35 * M_PI / 32.0));
+ m_256apsk[185].imag() = (r7 * sin(35 * M_PI / 32.0));
+ m_256apsk[186].real() = (r7 * cos(39 * M_PI / 32.0));
+ m_256apsk[186].imag() = (r7 * sin(39 * M_PI / 32.0));
+ m_256apsk[187].real() = (r7 * cos(37 * M_PI / 32.0));
+ m_256apsk[187].imag() = (r7 * sin(37 * M_PI / 32.0));
+ m_256apsk[188].real() = (r7 * cos(47 * M_PI / 32.0));
+ m_256apsk[188].imag() = (r7 * sin(47 * M_PI / 32.0));
+ m_256apsk[189].real() = (r7 * cos(45 * M_PI / 32.0));
+ m_256apsk[189].imag() = (r7 * sin(45 * M_PI / 32.0));
+ m_256apsk[190].real() = (r7 * cos(41 * M_PI / 32.0));
+ m_256apsk[190].imag() = (r7 * sin(41 * M_PI / 32.0));
+ m_256apsk[191].real() = (r7 * cos(43 * M_PI / 32.0));
+ m_256apsk[191].imag() = (r7 * sin(43 * M_PI / 32.0));
+ m_256apsk[192].real() = (r5 * cos(M_PI / 32.0));
+ m_256apsk[192].imag() = (r5 * sin(M_PI / 32.0));
+ m_256apsk[193].real() = (r5 * cos(3 * M_PI / 32.0));
+ m_256apsk[193].imag() = (r5 * sin(3 * M_PI / 32.0));
+ m_256apsk[194].real() = (r5 * cos(7 * M_PI / 32.0));
+ m_256apsk[194].imag() = (r5 * sin(7 * M_PI / 32.0));
+ m_256apsk[195].real() = (r5 * cos(5 * M_PI / 32.0));
+ m_256apsk[195].imag() = (r5 * sin(5 * M_PI / 32.0));
+ m_256apsk[196].real() = (r5 * cos(15 * M_PI / 32.0));
+ m_256apsk[196].imag() = (r5 * sin(15 * M_PI / 32.0));
+ m_256apsk[197].real() = (r5 * cos(13 * M_PI / 32.0));
+ m_256apsk[197].imag() = (r5 * sin(13 * M_PI / 32.0));
+ m_256apsk[198].real() = (r5 * cos(9 * M_PI / 32.0));
+ m_256apsk[198].imag() = (r5 * sin(9 * M_PI / 32.0));
+ m_256apsk[199].real() = (r5 * cos(11 * M_PI / 32.0));
+ m_256apsk[199].imag() = (r5 * sin(11 * M_PI / 32.0));
+ m_256apsk[200].real() = (r5 * cos(31 * M_PI / 32.0));
+ m_256apsk[200].imag() = (r5 * sin(31 * M_PI / 32.0));
+ m_256apsk[201].real() = (r5 * cos(29 * M_PI / 32.0));
+ m_256apsk[201].imag() = (r5 * sin(29 * M_PI / 32.0));
+ m_256apsk[202].real() = (r5 * cos(25 * M_PI / 32.0));
+ m_256apsk[202].imag() = (r5 * sin(25 * M_PI / 32.0));
+ m_256apsk[203].real() = (r5 * cos(27 * M_PI / 32.0));
+ m_256apsk[203].imag() = (r5 * sin(27 * M_PI / 32.0));
+ m_256apsk[204].real() = (r5 * cos(17 * M_PI / 32.0));
+ m_256apsk[204].imag() = (r5 * sin(17 * M_PI / 32.0));
+ m_256apsk[205].real() = (r5 * cos(19 * M_PI / 32.0));
+ m_256apsk[205].imag() = (r5 * sin(19 * M_PI / 32.0));
+ m_256apsk[206].real() = (r5 * cos(23 * M_PI / 32.0));
+ m_256apsk[206].imag() = (r5 * sin(23 * M_PI / 32.0));
+ m_256apsk[207].real() = (r5 * cos(21 * M_PI / 32.0));
+ m_256apsk[207].imag() = (r5 * sin(21 * M_PI / 32.0));
+ m_256apsk[208].real() = (r5 * cos(-1 * M_PI / 32.0));
+ m_256apsk[208].imag() = (r5 * sin(-1 * M_PI / 32.0));
+ m_256apsk[209].real() = (r5 * cos(-3 * M_PI / 32.0));
+ m_256apsk[209].imag() = (r5 * sin(-3 * M_PI / 32.0));
+ m_256apsk[210].real() = (r5 * cos(-7 * M_PI / 32.0));
+ m_256apsk[210].imag() = (r5 * sin(-7 * M_PI / 32.0));
+ m_256apsk[211].real() = (r5 * cos(-5 * M_PI / 32.0));
+ m_256apsk[211].imag() = (r5 * sin(-5 * M_PI / 32.0));
+ m_256apsk[212].real() = (r5 * cos(-15 * M_PI / 32.0));
+ m_256apsk[212].imag() = (r5 * sin(-15 * M_PI / 32.0));
+ m_256apsk[213].real() = (r5 * cos(-13 * M_PI / 32.0));
+ m_256apsk[213].imag() = (r5 * sin(-13 * M_PI / 32.0));
+ m_256apsk[214].real() = (r5 * cos(-9 * M_PI / 32.0));
+ m_256apsk[214].imag() = (r5 * sin(-9 * M_PI / 32.0));
+ m_256apsk[215].real() = (r5 * cos(-11 * M_PI / 32.0));
+ m_256apsk[215].imag() = (r5 * sin(-11 * M_PI / 32.0));
+ m_256apsk[216].real() = (r5 * cos(33 * M_PI / 32.0));
+ m_256apsk[216].imag() = (r5 * sin(33 * M_PI / 32.0));
+ m_256apsk[217].real() = (r5 * cos(35 * M_PI / 32.0));
+ m_256apsk[217].imag() = (r5 * sin(35 * M_PI / 32.0));
+ m_256apsk[218].real() = (r5 * cos(39 * M_PI / 32.0));
+ m_256apsk[218].imag() = (r5 * sin(39 * M_PI / 32.0));
+ m_256apsk[219].real() = (r5 * cos(37 * M_PI / 32.0));
+ m_256apsk[219].imag() = (r5 * sin(37 * M_PI / 32.0));
+ m_256apsk[220].real() = (r5 * cos(47 * M_PI / 32.0));
+ m_256apsk[220].imag() = (r5 * sin(47 * M_PI / 32.0));
+ m_256apsk[221].real() = (r5 * cos(45 * M_PI / 32.0));
+ m_256apsk[221].imag() = (r5 * sin(45 * M_PI / 32.0));
+ m_256apsk[222].real() = (r5 * cos(41 * M_PI / 32.0));
+ m_256apsk[222].imag() = (r5 * sin(41 * M_PI / 32.0));
+ m_256apsk[223].real() = (r5 * cos(43 * M_PI / 32.0));
+ m_256apsk[223].imag() = (r5 * sin(43 * M_PI / 32.0));
+ m_256apsk[224].real() = (r6 * cos(M_PI / 32.0));
+ m_256apsk[224].imag() = (r6 * sin(M_PI / 32.0));
+ m_256apsk[225].real() = (r6 * cos(3 * M_PI / 32.0));
+ m_256apsk[225].imag() = (r6 * sin(3 * M_PI / 32.0));
+ m_256apsk[226].real() = (r6 * cos(7 * M_PI / 32.0));
+ m_256apsk[226].imag() = (r6 * sin(7 * M_PI / 32.0));
+ m_256apsk[227].real() = (r6 * cos(5 * M_PI / 32.0));
+ m_256apsk[227].imag() = (r6 * sin(5 * M_PI / 32.0));
+ m_256apsk[228].real() = (r6 * cos(15 * M_PI / 32.0));
+ m_256apsk[228].imag() = (r6 * sin(15 * M_PI / 32.0));
+ m_256apsk[229].real() = (r6 * cos(13 * M_PI / 32.0));
+ m_256apsk[229].imag() = (r6 * sin(13 * M_PI / 32.0));
+ m_256apsk[230].real() = (r6 * cos(9 * M_PI / 32.0));
+ m_256apsk[230].imag() = (r6 * sin(9 * M_PI / 32.0));
+ m_256apsk[231].real() = (r6 * cos(11 * M_PI / 32.0));
+ m_256apsk[231].imag() = (r6 * sin(11 * M_PI / 32.0));
+ m_256apsk[232].real() = (r6 * cos(31 * M_PI / 32.0));
+ m_256apsk[232].imag() = (r6 * sin(31 * M_PI / 32.0));
+ m_256apsk[233].real() = (r6 * cos(29 * M_PI / 32.0));
+ m_256apsk[233].imag() = (r6 * sin(29 * M_PI / 32.0));
+ m_256apsk[234].real() = (r6 * cos(25 * M_PI / 32.0));
+ m_256apsk[234].imag() = (r6 * sin(25 * M_PI / 32.0));
+ m_256apsk[235].real() = (r6 * cos(27 * M_PI / 32.0));
+ m_256apsk[235].imag() = (r6 * sin(27 * M_PI / 32.0));
+ m_256apsk[236].real() = (r6 * cos(17 * M_PI / 32.0));
+ m_256apsk[236].imag() = (r6 * sin(17 * M_PI / 32.0));
+ m_256apsk[237].real() = (r6 * cos(19 * M_PI / 32.0));
+ m_256apsk[237].imag() = (r6 * sin(19 * M_PI / 32.0));
+ m_256apsk[238].real() = (r6 * cos(23 * M_PI / 32.0));
+ m_256apsk[238].imag() = (r6 * sin(23 * M_PI / 32.0));
+ m_256apsk[239].real() = (r6 * cos(21 * M_PI / 32.0));
+ m_256apsk[239].imag() = (r6 * sin(21 * M_PI / 32.0));
+ m_256apsk[240].real() = (r6 * cos(-1 * M_PI / 32.0));
+ m_256apsk[240].imag() = (r6 * sin(-1 * M_PI / 32.0));
+ m_256apsk[241].real() = (r6 * cos(-3 * M_PI / 32.0));
+ m_256apsk[241].imag() = (r6 * sin(-3 * M_PI / 32.0));
+ m_256apsk[242].real() = (r6 * cos(-7 * M_PI / 32.0));
+ m_256apsk[242].imag() = (r6 * sin(-7 * M_PI / 32.0));
+ m_256apsk[243].real() = (r6 * cos(-5 * M_PI / 32.0));
+ m_256apsk[243].imag() = (r6 * sin(-5 * M_PI / 32.0));
+ m_256apsk[244].real() = (r6 * cos(-15 * M_PI / 32.0));
+ m_256apsk[244].imag() = (r6 * sin(-15 * M_PI / 32.0));
+ m_256apsk[245].real() = (r6 * cos(-13 * M_PI / 32.0));
+ m_256apsk[245].imag() = (r6 * sin(-13 * M_PI / 32.0));
+ m_256apsk[246].real() = (r6 * cos(-9 * M_PI / 32.0));
+ m_256apsk[246].imag() = (r6 * sin(-9 * M_PI / 32.0));
+ m_256apsk[247].real() = (r6 * cos(-11 * M_PI / 32.0));
+ m_256apsk[247].imag() = (r6 * sin(-11 * M_PI / 32.0));
+ m_256apsk[248].real() = (r6 * cos(33 * M_PI / 32.0));
+ m_256apsk[248].imag() = (r6 * sin(33 * M_PI / 32.0));
+ m_256apsk[249].real() = (r6 * cos(35 * M_PI / 32.0));
+ m_256apsk[249].imag() = (r6 * sin(35 * M_PI / 32.0));
+ m_256apsk[250].real() = (r6 * cos(39 * M_PI / 32.0));
+ m_256apsk[250].imag() = (r6 * sin(39 * M_PI / 32.0));
+ m_256apsk[251].real() = (r6 * cos(37 * M_PI / 32.0));
+ m_256apsk[251].imag() = (r6 * sin(37 * M_PI / 32.0));
+ m_256apsk[252].real() = (r6 * cos(47 * M_PI / 32.0));
+ m_256apsk[252].imag() = (r6 * sin(47 * M_PI / 32.0));
+ m_256apsk[253].real() = (r6 * cos(45 * M_PI / 32.0));
+ m_256apsk[253].imag() = (r6 * sin(45 * M_PI / 32.0));
+ m_256apsk[254].real() = (r6 * cos(41 * M_PI / 32.0));
+ m_256apsk[254].imag() = (r6 * sin(41 * M_PI / 32.0));
+ m_256apsk[255].real() = (r6 * cos(43 * M_PI / 32.0));
+ m_256apsk[255].imag() = (r6 * sin(43 * M_PI / 32.0));
+ }
+ break;
+ default:
+ m_qpsk[0].real() = (r1 * cos(M_PI / 4.0));
+ m_qpsk[0].imag() = (r1 * sin(M_PI / 4.0));
+ m_qpsk[1].real() = (r1 * cos(7 * M_PI / 4.0));
+ m_qpsk[1].imag() = (r1 * sin(7 * M_PI / 4.0));
+ m_qpsk[2].real() = (r1 * cos(3 * M_PI / 4.0));
+ m_qpsk[2].imag() = (r1 * sin(3 * M_PI / 4.0));
+ m_qpsk[3].real() = (r1 * cos(5 * M_PI / 4.0));
+ m_qpsk[3].imag() = (r1 * sin(5 * M_PI / 4.0));
+ break;
+ }
+ signal_constellation = constellation;
+ set_output_multiple(2);
+ }
+
+ /*
+ * Our virtual destructor.
+ */
+ dvbs2_modulator_bc_impl::~dvbs2_modulator_bc_impl()
+ {
+ }
+
+ void
+ dvbs2_modulator_bc_impl::forecast (int noutput_items, gr_vector_int
&ninput_items_required)
+ {
+ ninput_items_required[0] = noutput_items;
+ }
+
+ int
+ dvbs2_modulator_bc_impl::general_work (int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+ {
+ const unsigned char *in = (const unsigned char *) input_items[0];
+ gr_complex *out = (gr_complex *) output_items[0];
+ int index;
+
+ switch (signal_constellation) {
+ case MOD_QPSK:
+ for (int i = 0; i < noutput_items; i++) {
+ index = *in++;
+ *out++ = m_qpsk[index & 0x3];
+ }
+ break;
+ case MOD_8PSK:
+ case MOD_8APSK:
+ for (int i = 0; i < noutput_items; i++) {
+ index = *in++;
+ *out++ = m_8psk[index & 0x7];
+ }
+ break;
+ case MOD_16APSK:
+ case MOD_8_8APSK:
+ for (int i = 0; i < noutput_items; i++) {
+ index = *in++;
+ *out++ = m_16apsk[index & 0xf];
+ }
+ break;
+ case MOD_32APSK:
+ case MOD_4_12_16APSK:
+ case MOD_4_8_4_16APSK:
+ for (int i = 0; i < noutput_items; i++) {
+ index = *in++;
+ *out++ = m_32apsk[index & 0x1f];
+ }
+ break;
+ case MOD_64APSK:
+ case MOD_8_16_20_20APSK:
+ case MOD_4_12_20_28APSK:
+ for (int i = 0; i < noutput_items; i++) {
+ index = *in++;
+ *out++ = m_64apsk[index & 0x3f];
+ }
+ break;
+ case MOD_128APSK:
+ for (int i = 0; i < noutput_items; i++) {
+ index = *in++;
+ *out++ = m_128apsk[index & 0x7f];
+ }
+ break;
+ case MOD_256APSK:
+ for (int i = 0; i < noutput_items; i++) {
+ index = *in++;
+ *out++ = m_256apsk[index & 0xff];
+ }
+ break;
+ default:
+ for (int i = 0; i < noutput_items; i++) {
+ index = *in++;
+ *out++ = m_qpsk[index & 0x3];
+ }
+ break;
+ }
+
+ // Tell runtime system how many input items we consumed on
+ // each input stream.
+ consume_each (noutput_items);
+
+ // Tell runtime system how many output items we produced.
+ return noutput_items;
+ }
+
+ } /* namespace dtv */
+} /* namespace gr */
+
diff --git a/gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.h
b/gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.h
new file mode 100644
index 0000000..8507878
--- /dev/null
+++ b/gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.h
@@ -0,0 +1,58 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This 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.
+ *
+ * This software 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 this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_DTV_DVBS2_MODULATOR_BC_IMPL_H
+#define INCLUDED_DTV_DVBS2_MODULATOR_BC_IMPL_H
+
+#include <gnuradio/dtv/dvbs2_modulator_bc.h>
+#include "dvb/dvb_defines.h"
+
+namespace gr {
+ namespace dtv {
+
+ class dvbs2_modulator_bc_impl : public dvbs2_modulator_bc
+ {
+ private:
+ int signal_constellation;
+ gr_complex m_qpsk[4];
+ gr_complex m_8psk[8];
+ gr_complex m_16apsk[16];
+ gr_complex m_32apsk[32];
+ gr_complex m_64apsk[64];
+ gr_complex m_128apsk[128];
+ gr_complex m_256apsk[256];
+
+ public:
+ dvbs2_modulator_bc_impl(dvb_framesize_t framesize, dvb_code_rate_t rate,
dvb_constellation_t constellation);
+ ~dvbs2_modulator_bc_impl();
+
+ void forecast (int noutput_items, gr_vector_int &ninput_items_required);
+
+ int general_work(int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+ };
+
+ } // namespace dtv
+} // namespace gr
+
+#endif /* INCLUDED_DVBS2_MODULATOR_BC_IMPL_H */
+
diff --git a/gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.cc
b/gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.cc
new file mode 100644
index 0000000..6b58b15
--- /dev/null
+++ b/gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.cc
@@ -0,0 +1,800 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This 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.
+ *
+ * This software 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 this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gnuradio/io_signature.h>
+#include "dvbs2_physical_cc_impl.h"
+#include <stdio.h>
+
+namespace gr {
+ namespace dtv {
+
+ dvbs2_physical_cc::sptr
+ dvbs2_physical_cc::make(dvb_framesize_t framesize, dvb_code_rate_t rate,
dvb_constellation_t constellation, dvbs2_pilots_t pilots, int goldcode)
+ {
+ return gnuradio::get_initial_sptr
+ (new dvbs2_physical_cc_impl(framesize, rate, constellation, pilots,
goldcode));
+ }
+
+ /*
+ * The private constructor
+ */
+ dvbs2_physical_cc_impl::dvbs2_physical_cc_impl(dvb_framesize_t framesize,
dvb_code_rate_t rate, dvb_constellation_t constellation, dvbs2_pilots_t pilots,
int goldcode)
+ : gr::block("dvbs2_physical_cc",
+ gr::io_signature::make(1, 1, sizeof(gr_complex)),
+ gr::io_signature::make(1, 1, sizeof(gr_complex)))
+ {
+ int type, modcod;
+ double r0 = 1.0;
+
+ modcod = 0;
+ if (framesize == FECFRAME_NORMAL) {
+ frame_size = FRAME_SIZE_NORMAL;
+ type = 0;
+ }
+ else {
+ frame_size = FRAME_SIZE_SHORT;
+ type = 2;
+ }
+
+ pilot_mode = pilots;
+ if (pilot_mode) {
+ type |= 1;
+ }
+ if (goldcode < 0 || goldcode > 262141) {
+ fprintf(stderr, "Gold Code must be between 0 and 262141 inclusive.\n");
+ fprintf(stderr, "Gold Code set to 0.\n");
+ goldcode = 0;
+ }
+ gold_code = goldcode;
+
+ m_bpsk[0][0].real() = (r0 * cos(M_PI / 4.0));
+ m_bpsk[0][0].imag() = (r0 * sin(M_PI / 4.0));
+ m_bpsk[0][1].real() = (r0 * cos(5.0 * M_PI / 4.0));
+ m_bpsk[0][1].imag() = (r0 * sin(5.0 * M_PI / 4.0));
+ m_bpsk[1][0].real() = (r0 * cos(5.0 * M_PI / 4.0));
+ m_bpsk[1][0].imag() = (r0 * sin(M_PI / 4.0));
+ m_bpsk[1][1].real() = (r0 * cos(M_PI / 4.0));
+ m_bpsk[1][1].imag() = (r0 * sin(5.0 * M_PI /4.0));
+ m_bpsk[2][0].real() = (r0 * cos(5.0 * M_PI / 4.0));
+ m_bpsk[2][0].imag() = (r0 * sin(M_PI / 4.0));
+ m_bpsk[2][1].real() = (r0 * cos(M_PI / 4.0));
+ m_bpsk[2][1].imag() = (r0 * sin(5.0 * M_PI /4.0));
+ m_bpsk[3][0].real() = (r0 * cos(5.0 * M_PI / 4.0));
+ m_bpsk[3][0].imag() = (r0 * sin(5.0 * M_PI / 4.0));
+ m_bpsk[3][1].real() = (r0 * cos(M_PI / 4.0));
+ m_bpsk[3][1].imag() = (r0 * sin(M_PI / 4.0));
+
+ m_zero[0].real() = 0.0; /* used for zero stuffing interpolation */
+ m_zero[0].imag() = 0.0;
+
+ // Mode and code rate
+ if (constellation == MOD_QPSK) {
+ slots = (frame_size / 2) / 90;
+ pilot_symbols = (slots / 16) * 36;
+ if (!(slots % 16)) {
+ pilot_symbols -= 36;
+ }
+ switch (rate) {
+ case C1_4:
+ modcod = 1;
+ break;
+ case C1_3:
+ modcod = 2;
+ break;
+ case C2_5:
+ modcod = 3;
+ break;
+ case C1_2:
+ modcod = 4;
+ break;
+ case C3_5:
+ modcod = 5;
+ break;
+ case C2_3:
+ modcod = 6;
+ break;
+ case C3_4:
+ modcod = 7;
+ break;
+ case C4_5:
+ modcod = 8;
+ break;
+ case C5_6:
+ modcod = 9;
+ break;
+ case C8_9:
+ modcod = 10;
+ break;
+ case C9_10:
+ modcod = 11;
+ break;
+ case C13_45:
+ modcod = 132;
+ break;
+ case C9_20:
+ modcod = 134;
+ break;
+ case C11_20:
+ modcod = 136;
+ break;
+ case C11_45:
+ modcod = 216;
+ break;
+ case C4_15:
+ modcod = 218;
+ break;
+ case C14_45:
+ modcod = 220;
+ break;
+ case C7_15:
+ modcod = 222;
+ break;
+ case C8_15:
+ modcod = 224;
+ break;
+ case C32_45:
+ modcod = 226;
+ break;
+ default:
+ modcod = 0;
+ break;
+ }
+ }
+
+ if (constellation == MOD_8PSK) {
+ slots = (frame_size / 3) / 90;
+ pilot_symbols = (slots / 16) * 36;
+ if (!(slots % 16)) {
+ pilot_symbols -= 36;
+ }
+ switch (rate) {
+ case C3_5:
+ modcod = 12;
+ break;
+ case C2_3:
+ modcod = 13;
+ break;
+ case C3_4:
+ modcod = 14;
+ break;
+ case C5_6:
+ modcod = 15;
+ break;
+ case C8_9:
+ modcod = 16;
+ break;
+ case C9_10:
+ modcod = 17;
+ break;
+ case C23_36:
+ modcod = 142;
+ break;
+ case C25_36:
+ modcod = 144;
+ break;
+ case C13_18:
+ modcod = 146;
+ break;
+ case C7_15:
+ modcod = 228;
+ break;
+ case C8_15:
+ modcod = 230;
+ break;
+ case C26_45:
+ modcod = 232;
+ break;
+ case C32_45:
+ modcod = 234;
+ break;
+ default:
+ modcod = 0;
+ break;
+ }
+ }
+
+ if (constellation == MOD_8APSK) {
+ slots = (frame_size / 3) / 90;
+ pilot_symbols = (slots / 16) * 36;
+ if (!(slots % 16)) {
+ pilot_symbols -= 36;
+ }
+ switch (rate) {
+ case C100_180:
+ modcod = 138;
+ break;
+ case C104_180:
+ modcod = 140;
+ break;
+ default:
+ modcod = 0;
+ break;
+ }
+ }
+
+ if (constellation == MOD_16APSK) {
+ slots = (frame_size / 4) / 90;
+ pilot_symbols = (slots / 16) * 36;
+ if (!(slots % 16)) {
+ pilot_symbols -= 36;
+ }
+ switch (rate) {
+ case C2_3:
+ modcod = 18;
+ break;
+ case C3_4:
+ modcod = 19;
+ break;
+ case C4_5:
+ modcod = 20;
+ break;
+ case C5_6:
+ modcod = 21;
+ break;
+ case C8_9:
+ modcod = 22;
+ break;
+ case C9_10:
+ modcod = 23;
+ break;
+ case C26_45:
+ if (frame_size == FRAME_SIZE_NORMAL) {
+ modcod = 154;
+ }
+ else {
+ modcod = 240;
+ }
+ break;
+ case C3_5:
+ if (frame_size == FRAME_SIZE_NORMAL) {
+ modcod = 156;
+ }
+ else {
+ modcod = 242;
+ }
+ break;
+ case C28_45:
+ modcod = 160;
+ break;
+ case C23_36:
+ modcod = 162;
+ break;
+ case C25_36:
+ modcod = 166;
+ break;
+ case C13_18:
+ modcod = 168;
+ break;
+ case C140_180:
+ modcod = 170;
+ break;
+ case C154_180:
+ modcod = 172;
+ break;
+ case C7_15:
+ modcod = 236;
+ break;
+ case C8_15:
+ modcod = 238;
+ break;
+ case C32_45:
+ modcod = 244;
+ break;
+ default:
+ modcod = 0;
+ break;
+ }
+ }
+
+ if (constellation == MOD_8_8APSK)
+ {
+ slots = (frame_size / 4) / 90;
+ pilot_symbols = (slots / 16) * 36;
+ if (!(slots % 16)) {
+ pilot_symbols -= 36;
+ }
+ switch (rate) {
+ case C90_180:
+ modcod = 148;
+ break;
+ case C96_180:
+ modcod = 150;
+ break;
+ case C100_180:
+ modcod = 152;
+ break;
+ case C18_30:
+ modcod = 158;
+ break;
+ case C20_30:
+ modcod = 164;
+ break;
+ default:
+ modcod = 0;
+ break;
+ }
+ }
+
+ if (constellation == MOD_32APSK) {
+ slots = (frame_size / 5) / 90;
+ pilot_symbols = (slots / 16) * 36;
+ if (!(slots % 16)) {
+ pilot_symbols -= 36;
+ }
+ switch (rate) {
+ case C3_4:
+ modcod = 24;
+ break;
+ case C4_5:
+ modcod = 25;
+ break;
+ case C5_6:
+ modcod = 26;
+ break;
+ case C8_9:
+ modcod = 27;
+ break;
+ case C9_10:
+ modcod = 28;
+ break;
+ default:
+ modcod = 0;
+ break;
+ }
+ }
+
+ if (constellation == MOD_4_12_16APSK) {
+ slots = (frame_size / 5) / 90;
+ pilot_symbols = (slots / 16) * 36;
+ if (!(slots % 16)) {
+ pilot_symbols -= 36;
+ }
+ switch (rate) {
+ case C2_3:
+ if (frame_size == FRAME_SIZE_NORMAL) {
+ modcod = 174;
+ }
+ else {
+ modcod = 246;
+ }
+ break;
+ case C32_45:
+ modcod = 248;
+ break;
+ default:
+ modcod = 0;
+ break;
+ }
+ }
+
+ if (constellation == MOD_4_8_4_16APSK) {
+ slots = (frame_size / 5) / 90;
+ pilot_symbols = (slots / 16) * 36;
+ if (!(slots % 16)) {
+ pilot_symbols -= 36;
+ }
+ switch (rate) {
+ case C128_180:
+ modcod = 178;
+ break;
+ case C132_180:
+ modcod = 180;
+ break;
+ case C140_180:
+ modcod = 182;
+ break;
+ default:
+ modcod = 0;
+ break;
+ }
+ }
+
+ if (constellation == MOD_64APSK) {
+ slots = (frame_size / 6) / 90;
+ pilot_symbols = (slots / 16) * 36;
+ if (!(slots % 16)) {
+ pilot_symbols -= 36;
+ }
+ switch (rate) {
+ case C128_180:
+ modcod = 184;
+ break;
+ default:
+ modcod = 0;
+ break;
+ }
+ }
+
+ if (constellation == MOD_8_16_20_20APSK) {
+ slots = (frame_size / 6) / 90;
+ pilot_symbols = (slots / 16) * 36;
+ if (!(slots % 16)) {
+ pilot_symbols -= 36;
+ }
+ switch (rate) {
+ case C7_9:
+ modcod = 190;
+ break;
+ case C4_5:
+ modcod = 194;
+ break;
+ case C5_6:
+ modcod = 198;
+ break;
+ default:
+ modcod = 0;
+ break;
+ }
+ }
+
+ if (constellation == MOD_4_12_20_28APSK) {
+ slots = (frame_size / 6) / 90;
+ pilot_symbols = (slots / 16) * 36;
+ if (!(slots % 16)) {
+ pilot_symbols -= 36;
+ }
+ switch (rate) {
+ case C132_180:
+ modcod = 186;
+ break;
+ default:
+ modcod = 0;
+ break;
+ }
+ }
+
+ if (constellation == MOD_128APSK) {
+ slots = 103;
+ pilot_symbols = (slots / 16) * 36;
+ if (!(slots % 16)) {
+ pilot_symbols -= 36;
+ }
+ switch (rate) {
+ case C135_180:
+ modcod = 200;
+ break;
+ case C140_180:
+ modcod = 202;
+ break;
+ default:
+ modcod = 0;
+ break;
+ }
+ }
+
+ if (constellation == MOD_256APSK) {
+ slots = (frame_size / 8) / 90;
+ pilot_symbols = (slots / 16) * 36;
+ if (!(slots % 16)) {
+ pilot_symbols -= 36;
+ }
+ switch (rate) {
+ case C116_180:
+ modcod = 204;
+ break;
+ case C20_30:
+ modcod = 206;
+ break;
+ case C124_180:
+ modcod = 208;
+ break;
+ case C128_180:
+ modcod = 210;
+ break;
+ case C22_30:
+ modcod = 212;
+ break;
+ case C135_180:
+ modcod = 214;
+ break;
+ default:
+ modcod = 0;
+ break;
+ }
+ }
+
+ // Now create the PL header.
+ int b[90];
+ // Add the sync sequence SOF
+ for (int i = 0; i < 26; i++) {
+ b[i] = ph_sync_seq[i];
+ }
+ // Add the mode and code
+ pl_header_encode(modcod, type, &b[26]);
+
+ // BPSK modulate and create the header
+ for (int i = 0; i < 26; i++) {
+ m_pl[i] = m_bpsk[i & 1][b[i]];
+ }
+ if (modcod & 0x80) {
+ for (int i = 26; i < 90; i++) {
+ m_pl[i] = m_bpsk[(i & 1) + 2][b[i]];
+ }
+ }
+ else {
+ for (int i = 26; i < 90; i++) {
+ m_pl[i] = m_bpsk[i & 1][b[i]];
+ }
+ }
+ build_symbol_scrambler_table();
+ if (!pilot_mode) {
+ pilot_symbols = 0;
+ }
+ set_output_multiple((((slots * 90) + 90) + pilot_symbols) * 2);
+ }
+
+ /*
+ * Our virtual destructor.
+ */
+ dvbs2_physical_cc_impl::~dvbs2_physical_cc_impl()
+ {
+ }
+
+ void
+ dvbs2_physical_cc_impl::forecast (int noutput_items, gr_vector_int
&ninput_items_required)
+ {
+ ninput_items_required[0] = (noutput_items / ((((slots * 90) + 90) +
pilot_symbols) * 2)) * (slots * 90);
+ }
+
+ void
+ dvbs2_physical_cc_impl::b_64_8_code(unsigned char in, int *out)
+ {
+ unsigned long temp, bit;
+
+ temp = 0;
+
+ if (in & 0x80) {
+ temp ^= g[0];
+ }
+ if (in & 0x40) {
+ temp ^= g[1];
+ }
+ if (in & 0x20) {
+ temp ^= g[2];
+ }
+ if (in & 0x10) {
+ temp ^= g[3];
+ }
+ if (in & 0x08) {
+ temp ^= g[4];
+ }
+ if (in & 0x04) {
+ temp ^= g[5];
+ }
+ if (in & 0x02) {
+ temp ^= g[6];
+ }
+
+ bit = 0x80000000;
+ for (int m = 0; m < 32; m++) {
+ out[(m * 2)] = (temp & bit) ? 1 : 0;
+ out[(m * 2) + 1] = out[m * 2] ^ (in & 0x01);
+ bit >>= 1;
+ }
+ // Randomise it
+ for (int m = 0; m < 64; m++) {
+ out[m] = out[m] ^ ph_scram_tab[m];
+ }
+ }
+
+ void
+ dvbs2_physical_cc_impl::pl_header_encode(unsigned char modcod, unsigned
char type, int *out)
+ {
+ unsigned char code;
+
+ if (modcod & 0x80) {
+ code = modcod | type;
+ }
+ else {
+ code = (modcod << 2) | type;
+ }
+ // Add the modcod and type information and scramble it
+ b_64_8_code (code, out);
+ }
+
+ int
+ dvbs2_physical_cc_impl::parity_chk(long a, long b)
+ {
+ int c = 0;
+ a = a & b;
+ for (int i = 0; i < 18; i++) {
+ if(a & (1L << i)) {
+ c++;
+ }
+ }
+ return c & 1;
+ }
+
+ void
+ dvbs2_physical_cc_impl::build_symbol_scrambler_table(void)
+ {
+ long x, y;
+ int xa, xb, xc, ya, yb, yc;
+ int rn, zna, znb;
+
+ // Initialisation
+ x = 0x00001;
+ y = 0x3FFFF;
+
+ for (int n = 0; n < gold_code; n++) {
+ xa = parity_chk(x, 0x8050);
+ xb = parity_chk(x, 0x0081);
+ xc = x & 1;
+
+ x >>= 1;
+ if (xb) {
+ x |= 0x20000;
+ }
+ }
+
+ for (int i = 0; i < FRAME_SIZE_NORMAL; i++) {
+ xa = parity_chk(x, 0x8050);
+ xb = parity_chk(x, 0x0081);
+ xc = x & 1;
+
+ x >>= 1;
+ if (xb) {
+ x |= 0x20000;
+ }
+
+ ya = parity_chk(y, 0x04A1);
+ yb = parity_chk(y, 0xFF60);
+ yc = y & 1;
+
+ y >>= 1;
+ if (ya) {
+ y |= 0x20000;
+ }
+
+ zna = xc ^ yc;
+ znb = xa ^ yb;
+ rn = (znb << 1) + zna;
+ m_cscram[i] = rn;
+ }
+ }
+
+ int
+ dvbs2_physical_cc_impl::general_work (int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+ {
+ const gr_complex *in = (const gr_complex *) input_items[0];
+ gr_complex *out = (gr_complex *) output_items[0];
+ int consumed = 0;
+ int produced = 0;
+ int slot_count = 0;
+ int n;
+ gr_complex tempin, tempout;
+
+ for (int i = 0; i < noutput_items / 2; i += (((slots * 90) + 90) +
pilot_symbols)) {
+ n = 0;
+ for (int plh = 0; plh < 90; plh++) {
+ out[produced++] = m_pl[plh];
+ out[produced++] = m_zero[0];
+ }
+ for (int j = 0; j < slots; j++) {
+ for (int k = 0; k < 90; k++) {
+ tempin = in[consumed++];
+ switch (m_cscram[n++]) {
+ case 0:
+ tempout.real() = tempin.real();
+ tempout.imag() = tempin.imag();
+ break;
+ case 1:
+ tempout.real() = -tempin.imag();
+ tempout.imag() = tempin.real();
+ break;
+ case 2:
+ tempout.real() = -tempin.real();
+ tempout.imag() = -tempin.imag();
+ break;
+ case 3:
+ tempout.real() = tempin.imag();
+ tempout.imag() = -tempin.real();
+ break;
+ }
+ out[produced++] = tempout;
+ out[produced++] = m_zero[0];
+ }
+ slot_count = (slot_count + 1) % 16;
+ if ((slot_count == 0) && (j < slots - 1)) {
+ if (pilot_mode) {
+ // Add pilots if needed
+ for (int p = 0; p < 36; p++) {
+ tempin = m_bpsk[0][0];
+ switch (m_cscram[n++]) {
+ case 0:
+ tempout.real() = tempin.real();
+ tempout.imag() = tempin.imag();
+ break;
+ case 1:
+ tempout.real() = -tempin.imag();
+ tempout.imag() = tempin.real();
+ break;
+ case 2:
+ tempout.real() = -tempin.real();
+ tempout.imag() = -tempin.imag();
+ break;
+ case 03:
+ tempout.real() = tempin.imag();
+ tempout.imag() = -tempin.real();
+ break;
+ }
+ out[produced++] = tempout;
+ out[produced++] = m_zero[0];
+ }
+ }
+ }
+ }
+ }
+
+ // Tell runtime system how many input items we consumed on
+ // each input stream.
+ consume_each (consumed);
+
+ // Tell runtime system how many output items we produced.
+ return noutput_items;
+ }
+
+ const unsigned long dvbs2_physical_cc_impl::g[7] =
+ {
+ 0x90AC2DDD, 0x55555555, 0x33333333, 0x0F0F0F0F, 0x00FF00FF, 0x0000FFFF,
0xFFFFFFFF
+ };
+
+ const int dvbs2_physical_cc_impl::ph_scram_tab[64] =
+ {
+ 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1,
1, 1, 0, 0, 1, 0, 0, 1,
+ 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1,
1, 1, 1, 1, 1, 0, 1, 0
+ };
+
+ const int dvbs2_physical_cc_impl::ph_sync_seq[26] =
+ {
+ 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0,
1, 0
+ };
+
+ /* for future implementation */
+ const int dvbs2_physical_cc_impl::ph_vlsnr_seq[896] =
+ {
+
1,1,1,1,1,0,1,1,1,1,1,1,0,0,1,0,0,0,1,1,1,1,1,0,1,0,0,0,0,0,1,1,0,1,1,1,1,1,1,1,1,0,0,1,1,0,1,1,1,1,0,0,0,1,0,0,
+
1,0,0,1,1,0,0,0,0,1,1,1,0,0,0,0,1,0,0,0,1,1,1,0,0,0,0,0,1,0,1,1,0,0,1,1,1,0,0,1,0,0,1,1,0,1,0,0,0,1,0,1,1,1,1,0,
+
1,1,1,1,0,1,1,0,1,0,1,0,0,0,1,0,1,1,0,0,1,0,0,1,1,1,1,1,1,1,1,0,0,0,0,1,1,0,1,1,0,0,0,1,0,1,1,1,0,0,1,1,0,1,1,1,
+
1,0,0,0,0,1,0,0,0,0,0,1,1,0,0,0,1,1,0,1,1,0,0,1,0,1,0,1,1,0,1,0,0,1,1,0,1,1,1,1,1,0,0,1,1,0,0,1,0,1,1,1,1,0,1,0,
+
0,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,0,1,1,1,1,0,1,1,0,0,1,1,1,1,1,0,1,0,0,1,1,1,1,1,1,1,0,0,1,0,0,1,1,1,1,0,1,0,1,0,
+
0,1,0,1,1,1,1,0,0,1,1,1,1,0,0,0,1,0,1,1,1,0,1,0,0,0,0,0,0,0,1,1,1,0,1,0,0,1,1,0,1,1,0,1,0,1,0,1,0,0,0,1,1,0,1,0,
+
0,0,1,0,0,1,1,1,1,0,0,1,1,1,0,0,1,1,0,0,0,0,1,0,0,1,1,0,0,1,0,1,0,1,0,0,0,0,1,1,1,1,1,0,1,1,0,0,1,1,0,1,0,0,0,0,
+
0,0,1,1,0,1,0,0,0,0,1,0,1,0,1,1,0,0,0,0,0,1,0,0,1,0,0,1,1,0,0,0,1,0,1,1,1,1,1,1,0,0,1,1,1,1,0,1,0,1,1,1,1,1,0,1,
+
1,0,1,0,1,1,0,1,1,1,0,1,0,0,0,0,0,0,1,1,0,1,1,0,1,1,1,0,1,0,0,1,1,1,0,1,0,1,0,1,0,0,1,1,0,0,0,1,0,0,1,0,1,1,1,1,
+
0,0,0,1,0,0,0,0,0,1,1,0,0,0,0,1,1,1,0,0,0,1,1,0,1,1,0,1,1,1,1,1,1,0,0,0,0,0,1,0,0,1,1,0,0,0,1,0,0,0,1,1,0,1,1,1,
+
0,1,1,1,0,0,1,0,1,1,0,1,0,0,1,1,1,1,1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1,1,1,0,0,1,1,1,0,0,0,0,1,0,0,1,1,0,0,0,1,1,1,
+
0,0,1,1,1,0,1,1,1,1,0,1,0,1,0,1,1,0,1,0,1,1,0,0,1,1,1,0,1,1,1,0,0,0,1,0,0,1,0,1,1,1,1,0,0,0,1,0,1,1,0,0,1,0,0,1,
+
0,1,0,1,1,0,0,1,0,0,0,0,1,0,0,0,0,1,1,1,1,1,0,1,1,0,0,0,0,0,1,0,0,1,1,0,0,0,0,1,0,1,0,1,1,0,1,0,1,1,0,1,1,0,1,0,
+
1,1,1,0,1,0,0,1,1,0,1,0,1,1,1,1,0,0,0,0,0,0,0,1,0,1,1,1,0,0,1,0,1,1,0,0,1,1,1,1,1,0,0,1,1,1,0,1,1,0,1,0,0,1,1,1,
+
0,0,1,1,1,1,1,1,0,1,0,0,1,0,0,0,0,0,1,1,0,1,0,1,1,0,1,0,0,1,0,0,0,0,0,0,0,1,1,0,0,0,1,1,1,1,1,1,0,0,0,0,0,1,1,1,
+
0,0,1,0,0,0,1,1,1,1,0,0,1,0,0,1,1,0,1,0,1,1,1,0,1,1,1,0,1,1,0,0,1,1,1,1,0,0,1,0,1,1,1,0,1,1,0,1,0,1,0,0,0,0,0,1
+ };
+
+ } /* namespace dtv */
+} /* namespace gr */
+
diff --git a/gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.h
b/gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.h
new file mode 100644
index 0000000..8a73cb2
--- /dev/null
+++ b/gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.h
@@ -0,0 +1,68 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This 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.
+ *
+ * This software 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 this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_DTV_DVBS2_PHYSICAL_CC_IMPL_H
+#define INCLUDED_DTV_DVBS2_PHYSICAL_CC_IMPL_H
+
+#include <gnuradio/dtv/dvbs2_physical_cc.h>
+#include "dvb/dvb_defines.h"
+
+namespace gr {
+ namespace dtv {
+
+ class dvbs2_physical_cc_impl : public dvbs2_physical_cc
+ {
+ private:
+ int frame_size;
+ int slots;
+ int pilot_mode;
+ int pilot_symbols;
+ int gold_code;
+ gr_complex m_bpsk[4][2];
+ gr_complex m_pl[90];
+ gr_complex m_zero[1];
+ int m_cscram[FRAME_SIZE_NORMAL];
+ void b_64_8_code(unsigned char, int *);
+ void pl_header_encode(unsigned char, unsigned char, int *);
+ int parity_chk(long, long);
+ void build_symbol_scrambler_table(void);
+
+ const static unsigned long g[7];
+ const static int ph_scram_tab[64];
+ const static int ph_sync_seq[26];
+ const static int ph_vlsnr_seq[896];
+
+ public:
+ dvbs2_physical_cc_impl(dvb_framesize_t framesize, dvb_code_rate_t rate,
dvb_constellation_t constellation, dvbs2_pilots_t pilots, int goldcode);
+ ~dvbs2_physical_cc_impl();
+
+ void forecast (int noutput_items, gr_vector_int &ninput_items_required);
+
+ int general_work(int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+ };
+
+ } // namespace dtv
+} // namespace gr
+
+#endif /* INCLUDED_DTV_DVBS2_PHYSICAL_CC_IMPL_H */
+
diff --git a/gr-dtv/swig/dtv_swig.i b/gr-dtv/swig/dtv_swig.i
index 2194e4e..42a7b0d 100644
--- a/gr-dtv/swig/dtv_swig.i
+++ b/gr-dtv/swig/dtv_swig.i
@@ -59,6 +59,9 @@
#include "gnuradio/dtv/dvbt2_paprtr_cc.h"
#include "gnuradio/dtv/dvbt2_p1insertion_cc.h"
#include "gnuradio/dtv/dvbt2_miso_cc.h"
+#include "gnuradio/dtv/dvbs2_interleaver_bb.h"
+#include "gnuradio/dtv/dvbs2_modulator_bc.h"
+#include "gnuradio/dtv/dvbs2_physical_cc.h"
%}
%include "gnuradio/dtv/atsc_deinterleaver.h"
@@ -92,6 +95,9 @@
%include "gnuradio/dtv/dvbt2_paprtr_cc.h"
%include "gnuradio/dtv/dvbt2_p1insertion_cc.h"
%include "gnuradio/dtv/dvbt2_miso_cc.h"
+%include "gnuradio/dtv/dvbs2_interleaver_bb.h"
+%include "gnuradio/dtv/dvbs2_modulator_bc.h"
+%include "gnuradio/dtv/dvbs2_physical_cc.h"
GR_SWIG_BLOCK_MAGIC2(dtv, atsc_deinterleaver);
GR_SWIG_BLOCK_MAGIC2(dtv, atsc_depad);
@@ -121,3 +127,6 @@ GR_SWIG_BLOCK_MAGIC2(dtv, dvbt2_pilotgenerator_cc);
GR_SWIG_BLOCK_MAGIC2(dtv, dvbt2_paprtr_cc);
GR_SWIG_BLOCK_MAGIC2(dtv, dvbt2_p1insertion_cc);
GR_SWIG_BLOCK_MAGIC2(dtv, dvbt2_miso_cc);
+GR_SWIG_BLOCK_MAGIC2(dtv, dvbs2_interleaver_bb);
+GR_SWIG_BLOCK_MAGIC2(dtv, dvbs2_modulator_bc);
+GR_SWIG_BLOCK_MAGIC2(dtv, dvbs2_physical_cc);
- [Commit-gnuradio] [gnuradio] 14/16: Merge remote-tracking branch 'drmpeg/dvb-s2', (continued)
- [Commit-gnuradio] [gnuradio] 14/16: Merge remote-tracking branch 'drmpeg/dvb-s2', git, 2015/03/28
- [Commit-gnuradio] [gnuradio] 01/16: analog: Made CTCSS squelch find_tone() a static member function, git, 2015/03/28
- [Commit-gnuradio] [gnuradio] 13/16: Merge remote-tracking branch 'tom/iir_filter_stability', git, 2015/03/28
- [Commit-gnuradio] [gnuradio] 11/16: gr-dtv: Fix ATSC compile issue as reported on mailing list., git, 2015/03/28
- [Commit-gnuradio] [gnuradio] 12/16: Merge remote-tracking branch 'jynik/ctcss_squelch_add_freq_getset', git, 2015/03/28
- [Commit-gnuradio] [gnuradio] 16/16: Merge remote-tracking branch 'drmpeg/atsc-fix', git, 2015/03/28
- [Commit-gnuradio] [gnuradio] 05/16: docs: adding better docs for using IIR kernels., git, 2015/03/28
- [Commit-gnuradio] [gnuradio] 09/16: gr-dtv: Add DVB-S2 transmitter update., git, 2015/03/28
- [Commit-gnuradio] [gnuradio] 02/16: analog: Moved CTCSS squelch FFT parameter calculations, git, 2015/03/28
- [Commit-gnuradio] [gnuradio] 04/16: filter: fixes stability issue with IIR filters., git, 2015/03/28
- [Commit-gnuradio] [gnuradio] 07/16: gr-dtv: Add DVB-S2 transmitter.,
git <=