diff options
71 files changed, 7838 insertions, 153 deletions
diff --git a/docs/doxygen/other/ctrlport.dox b/docs/doxygen/other/ctrlport.dox index 8db156dfbd..64bf9f7d38 100644 --- a/docs/doxygen/other/ctrlport.dox +++ b/docs/doxygen/other/ctrlport.dox @@ -1,6 +1,6 @@ /*! \page page_ctrlport ControlPort -\section Introduction +\section ctrlport_introduction Introduction This is the ControlPort package. It is a tool to create distributed control applications for GNU Radio. It provides blocks that can be diff --git a/docs/doxygen/other/metadata.dox b/docs/doxygen/other/metadata.dox index e29adf306e..4958e08aaa 100644 --- a/docs/doxygen/other/metadata.dox +++ b/docs/doxygen/other/metadata.dox @@ -1,6 +1,6 @@ /*! \page page_metadata Metadata Information -\section Introduction +\section metadata_introduction Introduction Metadata files have extra information in the form of headers that carry metadata about the samples in the file. Raw, binary files carry @@ -54,7 +54,7 @@ it sees a stream tag, so the dictionary will contain and key:value pairs out of tags from the flowgraph. -\subsection types Types of Metadata Files +\subsection metadata_types Types of Metadata Files GNU Radio currently supports two types of metadata files: @@ -67,7 +67,7 @@ header file. The dat file, then, is the standard raw binary format with no interruptions in the data. -\subsection updating Updating Headers +\subsection metadata_updating Updating Headers While there is always a header that starts a metadata file, they are updated throughout as well. There are two events that trigger a new @@ -99,7 +99,7 @@ segment loss is observed, it will generate a new timestamp as a tag of keep the sample times exact. -\subsection implementation Implementation +\subsection metadata_implementation Implementation Metadata files are created using gr::blocks::file_meta_sink. The default behavior is to create a single file with inline headers as @@ -114,7 +114,7 @@ extra header are converted into tags and added to the stream tags interface. -\section structure Structure +\section metadata_structure Structure The file metadata consists of a static mandatory header and a dynamic optional extras header. Each header is a separate PMT @@ -193,7 +193,7 @@ read this many bytes from the file. We can then deserialize and parse this header just like the first. -\subsection header Header Information +\subsection metadata_header Header Information The header is a PMT dictionary with a known structure. This structure may change, but we version the headers, so all headers of version X @@ -225,7 +225,7 @@ enum gr_file_types { }; \endcode -\subsection extras Extras Information +\subsection metadata_extras Extras Information The extras section is an optional segment of the header. If 'strt' == METADATA_HEADER_SIZE, then there is no extras. Otherwise, it is simply @@ -256,7 +256,7 @@ screen. Before converting from a PMT to it's natural data type, it is necessary to know the data type. -\section Utilities +\section metadata_utilities Utilities GNU Radio comes with a couple of utilities to help in debugging and manipulating metadata files. There is a general parser in Python that @@ -293,7 +293,7 @@ files where the file of headers is expected to be the file name of the data with '.hdr' appended to it. -\section Examples +\section metadata_examples Examples Examples are located in: diff --git a/docs/doxygen/other/msg_passing.dox b/docs/doxygen/other/msg_passing.dox index 47d6768ea0..df116c2ba1 100644 --- a/docs/doxygen/other/msg_passing.dox +++ b/docs/doxygen/other/msg_passing.dox @@ -1,6 +1,6 @@ /*! \page page_msg_passing Message Passing -\section intro Introduction +\section msg_passing_introduction Introduction GNU Radio was originally a streaming system with no other mechanism to pass data between blocks. Streams of data are a model that work well @@ -30,7 +30,7 @@ The message passing interface heavily relies on Polymorphic Types (PMTs) in GNU Radio. For further information about these data structures, see the page \ref page_pmt. -\section api Message Passing API +\section msg_passing_api Message Passing API The message passing interface is designed into the gr::basic_block, which is the parent class for all blocks in GNU Radio. Each block has @@ -69,7 +69,7 @@ have subscribed and uses the gr::basic_block::_post method to send the message to that block's message queue. -\subsection msg_handler Message Handler Functions +\subsection msg_passing_msg_handler Message Handler Functions A subscriber block must declare a message handler function to process the messages that are posted to it. After using the @@ -98,7 +98,7 @@ is: We give an example of using this below. -\subsection msg_fg_connect Connecting Messages through the Flowgraph +\subsection msg_passing_fg_connect Connecting Messages through the Flowgraph From the flowgraph level, we have instrumented a gr::hier_block2::msg_connect method to make it easy to subscribe blocks to other blocks' @@ -145,12 +145,12 @@ function. When a new message is pushed onto a port's message queue, it is this function that is used to process the message. -\section python_msg_passing Message Passing in Python Blocks +\section msg_passing_python Message Passing in Python Blocks ADD STUFF HERE -\section examples Code Examples +\section msg_passing_examples Code Examples The following is snippets of code from blocks current in GNU Radio that take advantage of message passing. We will be using @@ -272,7 +272,7 @@ them. The data is then converted into an output stream of items and passed along. The next section describes how PDUs can be passed into a flowgraph using the gr::blocks::pdu_to_tagged_stream block. -\section posting Posting from External Sources +\section msg_passing_posting Posting from External Sources The last feature of the message passing architecture to discuss here is how it can be used to take in messages from an external source. We diff --git a/docs/doxygen/other/ofdm.dox b/docs/doxygen/other/ofdm.dox index 62efa0cce5..9a3a18fab8 100644 --- a/docs/doxygen/other/ofdm.dox +++ b/docs/doxygen/other/ofdm.dox @@ -1,6 +1,6 @@ /*! \page page_ofdm OFDM -\section intro Introduction +\section ofdm_introduction Introduction GNU Radio provides some blocks to transmit and receive OFDM-modulated signals. In the following, we assume the reader is familiar with OFDM and how it works, @@ -15,9 +15,9 @@ very little friction. \ref page_packet_data has an example of how to use OFDM in a packet-based receiver. -\section conventions Conventions and Notations +\section ofdm_conventions Conventions and Notations -\subsection fftshift FFT Shifting +\subsection ofdm_fftshift FFT Shifting In all cases where OFDM symbols are passed between blocks, the default behaviour is to FFT-Shift these symbols, i.e. that the DC carrier is in the middle (to be @@ -30,7 +30,7 @@ consistency's sake, this was chosen as a default for all blocks that pass OFDM symbols. Also, when viewing OFDM symbols, FFT-shifted symbols are in their natural order, i.e. as they appear in the pass band. -\subsection indexing Carrier Indexing +\subsection ofdm_indexing Carrier Indexing Carriers are always index starting at the DC carrier, which has the index 0 (you usually don't want to occupy this carrier). The carriers right of the @@ -42,7 +42,7 @@ The carriers left of the DC carrier (with lower frequencies) can be indexed equivalent. The advantage of using negative carrier indices is that the FFT length can be changed without changing the carrier indexing. -\subsection carrieralloc Carrier and Symbol Allocation +\subsection ofdm_carrieralloc Carrier and Symbol Allocation Many blocks require knowledge of which carriers are allocated, and whether they carry data or pilot symbols. GNU Radio blocks uses three objects for this, typically @@ -81,12 +81,12 @@ Note that \p pilot_symbols is longer than \p pilot_carriers in this example-- this is valid, the symbols in \p pilot_symbols[2] will be mapped according to \p pilot_carriers[0]. -\section detectsync Detection and Synchronisation +\section ofdm_detectsync Detection and Synchronisation Before anything happens, an OFDM frame must be detected, the beginning of OFDM symbols must be identified, and frequency offset must be estimated. -\section tx Transmitting +\section ofdm_tx Transmitting \image html ofdm_tx_core.png "Core elements of an OFDM transmitter" @@ -110,7 +110,7 @@ Finally, the cyclic prefix is added to the OFDM symbols. The gr::digital::ofdm_c can also perform pulse shaping on the OFDM symbols (raised cosine flanks in the time domain). -\section rx Receiving +\section ofdm_rx Receiving On the receiver side, some more effort is necessary. The following flow graph assumes that the input starts at the beginning of an OFDM frame and is prepended diff --git a/docs/doxygen/other/packet_txrx.dox b/docs/doxygen/other/packet_txrx.dox index afe84240ff..2a8aeae51e 100644 --- a/docs/doxygen/other/packet_txrx.dox +++ b/docs/doxygen/other/packet_txrx.dox @@ -1,6 +1,6 @@ /*! \page page_packet_data Packet Data Transmission -\section intro Introduction +\section packet_data_introduction Introduction In many cases, the PHY layer of a digital transceiver uses <em>packets</em>to break down the transmission (as opposed to continuously broadcasting data), and GNU Radio @@ -11,7 +11,7 @@ With the tools provided in GNU Radio, simple digital packet transmission schemes are easily implemented, allowing the creation of packet-based communication links and even -networks. -\section packetstructure Structure of a packet +\section packet_data_structure Structure of a packet Typically, a packet consists of the following elements: @@ -26,7 +26,7 @@ The receiver has to perform a multitude of things to obtain the packet again. Most importantly, it has to convert an infinite stream (coming from the receiver device, e.g. a UHD source block) into a packetized, tagged stream. -\section hpdemuxer The Header/Payload Demuxer and header parser +\section packet_data_hpdemuxer The Header/Payload Demuxer and header parser The key element to return back to packetized state is the gr::digital::header_payload_demux. At its first input, it receives a continuous stream of sample data, coming from @@ -48,7 +48,7 @@ The knowledge of the header structure (i.e. how to turn a sequence of bits into a payload length etc.) is stored in an object of type gr::digital::packet_header_default. This must be passed to the header parser block. -\section ofdm Packet receiver example: OFDM +\section packet_data_ofdm Packet receiver example: OFDM \image html example_ofdm_packet_rx.png "Example: OFDM Packet Receiver" diff --git a/docs/doxygen/other/perf_counters.dox b/docs/doxygen/other/perf_counters.dox index 200d4dcf96..1a5bf40cba 100644 --- a/docs/doxygen/other/perf_counters.dox +++ b/docs/doxygen/other/perf_counters.dox @@ -1,6 +1,6 @@ /*! \page page_perf_counters Performance Counters -\section Introduction +\section pc_introduction Introduction Each block can have a set of Performance Counters that the schedule keeps track of. These counters measure and store information about diff --git a/docs/doxygen/other/pfb_intro.dox b/docs/doxygen/other/pfb_intro.dox index 75652d65bf..43bea77777 100644 --- a/docs/doxygen/other/pfb_intro.dox +++ b/docs/doxygen/other/pfb_intro.dox @@ -1,13 +1,13 @@ /*! \page page_pfb Polyphase Filterbanks -\section Introduction +\section pfb_introduction Introduction Polyphase filterbanks (PFB) are a very powerful set of filtering tools that can efficiently perform many multi-rate signal processing tasks. GNU Radio has a set of polyphase filterbank blocks to be used in all sorts of applications. -\section Usage +\section pfb_Usage See the documentation for the individual blocks for details about what they can do and how they should be used. Furthermore, there are @@ -78,7 +78,7 @@ examples (<b>gr-uhd/examples</b>) use this ability to create a received matched filter or channel filter that also resamples the signal. -\section Examples +\section pfb_examples Examples The following is an example of the using the channelizer. It creates the appropriate filter to channelizer 9 channels out of an original @@ -93,7 +93,7 @@ run this example. \include gr-filter/examples/channelize.py -\section pfb_arb_resampl The PFB Arbitrary Resampler Kernel +\section pfb_arb_resampler The PFB Arbitrary Resampler Kernel GNU Radio has a PFB arbitrary resampler block that can be used to resample a signal to any arbitrary and real resampling rate. The diff --git a/docs/doxygen/other/pmt.dox b/docs/doxygen/other/pmt.dox index 51e1865d39..6805b27a8a 100644 --- a/docs/doxygen/other/pmt.dox +++ b/docs/doxygen/other/pmt.dox @@ -1,6 +1,6 @@ /*! \page page_pmt Polymorphic Types -\section intro Introduction +\section pmt_introduction Introduction Polymorphic Types are opaque data types that are designed as generic containers of data that can be safely passed around between blocks and @@ -138,7 +138,7 @@ data types with the PMT library. -\section datatype PMT Data Type +\section pmt_datatype PMT Data Type All PMTs are of the type pmt::pmt_t. This is an opaque container and PMT functions must be used to manipulate and even do things like @@ -185,7 +185,7 @@ The constants in the PMT library are: - pmt::PMT_F - a PMT False - pmt::PMT_NIL - an empty PMT (think Python's 'None') -\section insert Inserting and Extracting Data +\section pmt_insert Inserting and Extracting Data Use pmt.h for a complete guide to the list of functions used to create PMTs and get the data from a PMT. When using these functions, remember @@ -219,7 +219,7 @@ Pairs, dictionaries, and vectors have different constructors and ways to manipulate them, and these are explained in their own sections. -\section strings Strings +\section pmt_strings Strings PMTs have a way of representing short strings. These strings are actually stored as interned symbols in a hash table, so in other @@ -242,7 +242,7 @@ std::string s = pmt::symbol_to_string(str0); \endcode -\section tests Tests and Comparisons +\section pmt_tests Tests and Comparisons The PMT library comes with a number of functions to test and compare PMT objects. In general, for any PMT data type, there is an equivalent @@ -272,7 +272,7 @@ if(pmt::is_double(pmt_a)) \endcode -\section dict Dictionaries +\section pmt_dict Dictionaries PMT dictionaries and lists of key:value pairs. They have a well-defined interface for creating, adding, removing, and accessing @@ -339,7 +339,7 @@ if(pmt.dict_has_key(a, key0) and pmt.eq(ref, pmt.PMT_NIL)): print "Trouble! We have key0, but it returned PMT_NIL" \endcode -\section vectors Vectors +\section pmt_vectors Vectors PMT vectors come in two forms: vectors of PMTs and vectors of uniform data. The standard PMT vector is a vector of PMTs, and each PMT can be @@ -393,12 +393,12 @@ deal of harm. But it's only unlikely, not impossible. Best to use mutexes whenever manipulating data in a vector. -\subsection blob BLOB +\subsection pmt_blob BLOB A BLOB is a 'binary large object' type. In PMT's, this is actually just a thin wrapper around a u8vector. -\section pairs Pairs +\section pmt_pairs Pairs Pairs are inspired by LISP 'cons' data types, so you will find the language here comes from LISP. A pair is just a pair of PMT @@ -412,7 +412,7 @@ objects. They are manipulated using the following functions: - void pmt::set_cdr(pmt_t pair, pmt_t value): Stores value in the cdr field -\section serdes Serializing and Deserializing +\section pmt_serdes Serializing and Deserializing It is often important to hide the fact that we are working with PMTs to make them easier to transmit, store, write to file, etc. The PMT @@ -461,7 +461,7 @@ readable, but the point of serializing is not to make a human-readable string. This is only done here as a test. -\section printing Printing +\section pmt_printing Printing In Python, the __repr__ function of a PMT object is overloaded to call 'pmt::write_string'. This means that any time we call a formatted diff --git a/docs/doxygen/other/stream_tags.dox b/docs/doxygen/other/stream_tags.dox index d48ec1ddee..01b91f5e21 100644 --- a/docs/doxygen/other/stream_tags.dox +++ b/docs/doxygen/other/stream_tags.dox @@ -1,6 +1,6 @@ /*! \page page_stream_tags Stream Tags -\section Introduction +\section stream_tags_introduction Introduction GNU Radio was originally a streaming system with no other mechanism to pass data between blocks. Streams of data are a model that work well @@ -29,7 +29,7 @@ symbol and is used to identify the block that created the tag (which is usually the block's alias()). -\section block_api_extensions API Extensions to the gr::block +\section stream_tags_block_api_extensions API Extensions to the gr::block To enable the stream tags, we have extended the API of gr::block to understand \a absolute item numbers. In the data stream model, each @@ -88,7 +88,7 @@ key from a particular input port between a certain range of items (in relative item time within the work function). -\subsection add_item_tag Adding a Tag to a Stream +\subsection stream_tags_add_item_tag Adding a Tag to a Stream The two function calls to add items tags are defined here. We add a tag to a particular output stream of the block. We can output them to @@ -125,7 +125,7 @@ of the tag information in the function call: \endcode -\subsection get_item_tags Getting tags from a Stream +\subsection stream_tags_get_item_tags Getting tags from a Stream To get tags from a particular input stream, we again have two functions we can use. Both of these pass back vectors of @@ -155,7 +155,7 @@ key \a key. \endcode -\section tag_propagation Tag Propagation +\section stream_tags_propagation Tag Propagation Tags are propagated downstream from block to block like the normal data streams. How blocks are actually moved depends on a specific @@ -181,7 +181,7 @@ See the gr::block::tag_propagation_policy_t documentation for details on this enum type. -\subsection tags_rate_changes Tag Propagation through Rate Changes +\subsection stream_tags_rate_changes Tag Propagation through Rate Changes When a tag is propagated through a block that has a rate change, the item's offset in the data stream will change. The scheduler uses the @@ -203,7 +203,7 @@ propagation internally. In no case is the value of the tag modified when propagating through a block. This becomes relevent when using \ref page_tagged_stream_blocks. -\section tags_issues Notes on How to Use Tags +\section stream_tags_issues Notes on How to Use Tags Tags can be very useful to an application, and their use is spreading. USRP sources generate tag information on the time, sample diff --git a/docs/doxygen/other/tagged_stream_blocks.dox b/docs/doxygen/other/tagged_stream_blocks.dox index f9cadf8196..4e75b29c6b 100644 --- a/docs/doxygen/other/tagged_stream_blocks.dox +++ b/docs/doxygen/other/tagged_stream_blocks.dox @@ -1,6 +1,6 @@ /*! \page page_tagged_stream_blocks Tagged Stream Blocks -\section intro Introduction +\section tsb_introduction Introduction A tagged stream block is a block that works on streamed, but packetized input data. Think of packet data transmission: A data packet consists of N bytes. However, in @@ -15,7 +15,7 @@ gr::sync_block etc.) in that they are driven by the input: The PDU length tag te operate, whereas other blocks are output-driven (the scheduler tries to fill up the output buffer are much as possible). -\subsection howtheywork How do they work? +\subsection tsb_howtheywork How do they work? As the name implies, tagged stream blocks use tags to identify PDU boundaries. On the first item of a streamed PDU, there \em must be a tag with a specific @@ -26,7 +26,7 @@ The scheduler then takes care of everything. When the work function is called, i is guaranteed to contain exactly one complete PDU and enough space in the output buffer for the output. -\subsection relatestootherblocks How do they relate to other block types (e.g. sync blocks)? +\subsection tsb_relatestootherblocks How do they relate to other block types (e.g. sync blocks)? Tagged stream blocks and sync blocks are really orthogonal concepts, and a block could be both (gr::digital::ofdm_frame_equalizer_vcvc is such a block). However, because the work @@ -41,7 +41,7 @@ The way gr::tagged_stream_block works, it is still beneficial to specify a relat if possible. -\section creating Creating a tagged stream block +\section tsb_creating Creating a tagged stream block To create a tagged stream block, the block must be derived from gr::tagged_stream_block. Here's a minimal example of how the header file could look: @@ -106,7 +106,7 @@ output items. Note how this relates to the fact that these blocks are input-driv These two overrides (\p work() and \p calculate_output_stream_length() ) are what you need for most tagged stream blocks. There are cases when you don't need to override the latter because the default behaviour is enough, and other cases where you have to override more -than these two functions. These are discussed in \ref adv_usage. +than these two functions. These are discussed in \ref tsb_adv_usage. Finally, this is part of the actual block implementation (heavily cropped again, to highlight the relevant parts): \code @@ -179,7 +179,7 @@ signal processing code, the following things must be kept in mind: Don't forget to return WORK_CALLED_PRODUCE in that case. -\subsection note_on_tp A note on tag propagation +\subsection tsb_note_on_tp A note on tag propagation Despite using tags for a special purpose, all tags that are not the length tag are treated exactly as before: use gr::block::set_tag_propagation_policy() in the constructor. @@ -208,7 +208,7 @@ to write the new length tag yourself. The key for the output length tag is the s on the input, if you don't want this, you must override gr::tagged_stream_block::update_length_tags(). -\section connecting Connecting regular streaming blocks and tagged stream blocks +\section tsb_connecting Connecting regular streaming blocks and tagged stream blocks From the scheduler's point of view, all blocks are equivalent, and as long as the I/O signatures are compatible, all of these blocks can be connected. @@ -231,13 +231,13 @@ Mixing block types: This is possible if none of the regular stream blocks change the rate. The ofdm_tx and ofdm_rx hierarchical blocks do this. -\section adv_usage Advanced Usage +\section tsb_adv_usage Advanced Usage It is generally recommended to read the block documentation of gr::tagged_stream_block. A few special cases are described here: -\subsection multiplelentags Multiple length tags +\subsection tsb_multiplelentags Multiple length tags In some cases, a single tag is not enough. One example is the OFDM receiver: one OFDM frame contains a certain number of OFDM symbols, and another number of bytes--these numbers are only very loosely related, and one cannot be calculated from the other. @@ -246,7 +246,7 @@ gr::digital::ofdm_serializer_vcc is such a block. It is driven by the number of but the output is determined by the number of complex symbols. In order to use multiple length tag keys, it overrides gr::tagged_stream_block::update_length_tags(). -\subsection backtogrblock Falling back to gr::block behaviour +\subsection tsb_backtogrblock Falling back to gr::block behaviour If, at compile-time, it is uncertain whether or not a block should be a gr::tagged_stream_block, there is the possibility of falling back to gr::block behaviour. @@ -262,40 +262,40 @@ gr::tagged_stream_block::d_length_tag_key_str is empty is a good choice. gr::digital::ofdm_cyclic_prefixer implements this. -\subsection otherwaysdetermineninput Other ways to determine the number of input items +\subsection tsb_otherwaysdetermineninput Other ways to determine the number of input items If the number of input items is not stored as a pmt::pmt_integer, but there is a way to determine it, gr::tagged_stream_block::parse_length_tags() can be overridden to figure out the length of the PDU. -\section examples Examples +\section tsb_examples Examples -\subsection CRC32 CRC32 +\subsection tsb_CRC32 CRC32 Block: gr::digital::crc32_bb This is a very simple block, and a good example to start with. -\subsection ofdmeq OFDM Frame Equalizer +\subsection tsb_ofdmeq OFDM Frame Equalizer Block: gr::digital::ofdm_frame_equalizer_vcvc This block would be a sync block if tagged stream blocks didn't exist. It also uses more than one tag to determine the output. -\subsection muxer Tagged Stream Muxer +\subsection tsb_muxer Tagged Stream Muxer Block: gr::blocks::tagged_stream_mux Use this to multiplex any number of tagged streams. -\subsection ofdmprefixer Cyclic Prefixer (OFDM) +\subsection tsb_ofdmprefixer Cyclic Prefixer (OFDM) Block: gr::digital::ofdm_cyclic_prefixer This block uses the gr::block behaviour fallback. -\section troubleshooting Troubleshooting +\section tsb_troubleshooting Troubleshooting <b>My flow graph crashes with the error message "Missing length tag".</b> diff --git a/gr-analog/doc/analog.dox b/gr-analog/doc/analog.dox index 437eb05c74..b6ce1c2478 100644 --- a/gr-analog/doc/analog.dox +++ b/gr-analog/doc/analog.dox @@ -1,6 +1,6 @@ /*! \page page_analog Analog Modulation -\section Introduction +\section analog_introduction Introduction This is the gr-analog package. It contains all of the analog modulation blocks, utilities, and examples. To use the analog blocks, the Python namespaces is in gnuradio.analog, which would be normally diff --git a/gr-analog/grc/analog_ctcss_squelch_ff.xml b/gr-analog/grc/analog_ctcss_squelch_ff.xml index 9585835e21..7a2248aa7e 100644 --- a/gr-analog/grc/analog_ctcss_squelch_ff.xml +++ b/gr-analog/grc/analog_ctcss_squelch_ff.xml @@ -32,6 +32,7 @@ <import>from gnuradio import analog</import> <make>analog.ctcss_squelch_ff($rate, $freq, $level, $len, $ramp, $gate)</make> <callback>set_level($level)</callback> + <callback>set_frequency($freq)</callback> <param> <name>Sampling Rate (Hz)</name> <key>rate</key> diff --git a/gr-analog/include/gnuradio/analog/ctcss_squelch_ff.h b/gr-analog/include/gnuradio/analog/ctcss_squelch_ff.h index 6d1b5291d0..2655c845bb 100644 --- a/gr-analog/include/gnuradio/analog/ctcss_squelch_ff.h +++ b/gr-analog/include/gnuradio/analog/ctcss_squelch_ff.h @@ -63,6 +63,8 @@ namespace gr { virtual float level() const = 0; virtual void set_level(float level) = 0; virtual int len() const = 0; + virtual float frequency() const = 0; + virtual void set_frequency(float frequency) = 0; virtual int ramp() const = 0; virtual void set_ramp(int ramp) = 0; diff --git a/gr-analog/lib/ctcss_squelch_ff_impl.cc b/gr-analog/lib/ctcss_squelch_ff_impl.cc index 7714da3fe4..7edda64a1d 100644 --- a/gr-analog/lib/ctcss_squelch_ff_impl.cc +++ b/gr-analog/lib/ctcss_squelch_ff_impl.cc @@ -55,6 +55,36 @@ namespace gr { return -1; } + void + ctcss_squelch_ff_impl::compute_freqs(const float &freq, + float &f_l, float &f_r) + { + int i = find_tone(freq); + + // Non-standard tones or edge tones get 2% guard band, otherwise + // guards are set at adjacent ctcss tone frequencies + if(i == -1 || i == 0) + f_l = freq*0.98; + else + f_l = ctcss_tones[i-1]; + + if(i == -1 || i == max_tone_index) + f_r = freq*1.02; + else + f_r = ctcss_tones[i+1]; + } + + void + ctcss_squelch_ff_impl::update_fft_params() + { + float f_l, f_r; + compute_freqs(d_freq, f_l, f_r); + + d_goertzel_l->set_params(d_rate, d_len, f_l); + d_goertzel_c->set_params(d_rate, d_len, d_freq); + d_goertzel_r->set_params(d_rate, d_len, f_r); + } + ctcss_squelch_ff_impl::ctcss_squelch_ff_impl(int rate, float freq, float level, int len, int ramp, bool gate) : block("ctcss_squelch_ff", @@ -64,31 +94,20 @@ namespace gr { { d_freq = freq; d_level = level; + d_rate = rate; // Default is 100 ms detection time if(len == 0) - d_len = (int)(rate/10.0); + d_len = (int)(d_rate/10.0); else - d_len = len; + d_len = len; - int i = find_tone(freq); - - // Non-standard tones or edge tones get 2% guard band, otherwise - // guards are set at adjacent ctcss tone frequencies float f_l, f_r; - if(i == -1 || i == 0) - f_l = freq*0.98; - else - f_l = ctcss_tones[i-1]; - - if(i == -1 || i == max_tone_index) - f_r = freq*1.02; - else - f_r = ctcss_tones[i+1]; + compute_freqs(d_freq, f_l, f_r); - d_goertzel_l = new fft::goertzel(rate, d_len, f_l); - d_goertzel_c = new fft::goertzel(rate, d_len, freq); - d_goertzel_r = new fft::goertzel(rate, d_len, f_r); + d_goertzel_l = new fft::goertzel(d_rate, d_len, f_l); + d_goertzel_c = new fft::goertzel(d_rate, d_len, freq); + d_goertzel_r = new fft::goertzel(d_rate, d_len, f_r); d_mute = true; } @@ -130,5 +149,20 @@ namespace gr { } } + void + ctcss_squelch_ff_impl::set_level(float level) + { + gr::thread::scoped_lock l(d_setlock); + d_level = level; + } + + void + ctcss_squelch_ff_impl::set_frequency(float frequency) + { + gr::thread::scoped_lock l(d_setlock); + d_freq = frequency; + update_fft_params(); + } + } /* namespace analog */ } /* namespace gr */ diff --git a/gr-analog/lib/ctcss_squelch_ff_impl.h b/gr-analog/lib/ctcss_squelch_ff_impl.h index c0db6030d3..f6e12de766 100644 --- a/gr-analog/lib/ctcss_squelch_ff_impl.h +++ b/gr-analog/lib/ctcss_squelch_ff_impl.h @@ -36,13 +36,17 @@ namespace gr { float d_freq; float d_level; int d_len; + int d_rate; bool d_mute; fft::goertzel *d_goertzel_l; fft::goertzel *d_goertzel_c; fft::goertzel *d_goertzel_r; - int find_tone(float freq); + static int find_tone(float freq); + static void compute_freqs(const float &freq, float &f_l, float &f_r); + + void update_fft_params(); protected: virtual void update_state(const float &in); @@ -55,8 +59,10 @@ namespace gr { std::vector<float> squelch_range() const; float level() const { return d_level; } - void set_level(float level) { d_level = level; } + void set_level(float level); int len() const { return d_len; } + float frequency() const { return d_freq; } + void set_frequency(float frequency); int ramp() const { return squelch_base_ff_impl::ramp(); } void set_ramp(int ramp) { squelch_base_ff_impl::set_ramp(ramp); } diff --git a/gr-analog/lib/pwr_squelch_cc_impl.cc b/gr-analog/lib/pwr_squelch_cc_impl.cc index 1a414ed464..62b9cff5c6 100644 --- a/gr-analog/lib/pwr_squelch_cc_impl.cc +++ b/gr-analog/lib/pwr_squelch_cc_impl.cc @@ -69,5 +69,19 @@ namespace gr { d_pwr = d_iir.filter(in.real()*in.real()+in.imag()*in.imag()); } + void + pwr_squelch_cc_impl::set_threshold(double db) + { + gr::thread::scoped_lock l(d_setlock); + d_threshold = std::pow(10.0, db/10); + } + + void + pwr_squelch_cc_impl::set_alpha(double alpha) + { + gr::thread::scoped_lock l(d_setlock); + d_iir.set_taps(alpha); + } + } /* namespace analog */ } /* namespace gr */ diff --git a/gr-analog/lib/pwr_squelch_cc_impl.h b/gr-analog/lib/pwr_squelch_cc_impl.h index eea881a733..d72ad58c64 100644 --- a/gr-analog/lib/pwr_squelch_cc_impl.h +++ b/gr-analog/lib/pwr_squelch_cc_impl.h @@ -51,8 +51,8 @@ namespace gr { std::vector<float> squelch_range() const; double threshold() const { return 10*log10(d_threshold); } - void set_threshold(double db) { d_threshold = std::pow(10.0, db/10); } - void set_alpha(double alpha) { d_iir.set_taps(alpha); } + void set_threshold(double db); + void set_alpha(double alpha); int ramp() const { return squelch_base_cc_impl::ramp(); } void set_ramp(int ramp) { squelch_base_cc_impl::set_ramp(ramp); } diff --git a/gr-analog/lib/squelch_base_cc_impl.cc b/gr-analog/lib/squelch_base_cc_impl.cc index c62efc339b..3255d3bde4 100644 --- a/gr-analog/lib/squelch_base_cc_impl.cc +++ b/gr-analog/lib/squelch_base_cc_impl.cc @@ -55,6 +55,7 @@ namespace gr { void squelch_base_cc_impl::set_ramp(int ramp) { + gr::thread::scoped_lock l(d_setlock); d_ramp = ramp; } @@ -67,6 +68,7 @@ namespace gr { void squelch_base_cc_impl::set_gate(bool gate) { + gr::thread::scoped_lock l(d_setlock); d_gate = gate; } @@ -87,6 +89,8 @@ namespace gr { int j = 0; + gr::thread::scoped_lock l(d_setlock); + for(int i = 0; i < noutput_items; i++) { update_state(in[i]); diff --git a/gr-audio/doc/audio.dox b/gr-audio/doc/audio.dox index 6b3bbd9ddf..d706bbb6ae 100644 --- a/gr-audio/doc/audio.dox +++ b/gr-audio/doc/audio.dox @@ -1,6 +1,6 @@ /*! \page page_audio Audio Interface -\section Introduction +\section audio_introduction Introduction The gnuradio audio component provides gr::audio::source and gr::audio::sink blocks. The audio blocks stream floating point samples @@ -40,7 +40,7 @@ after importing by using: \endcode -\section Usage +\section audio_usage Usage For an audio source, a typical OptionParser option and it's use looks like: diff --git a/gr-blocks/doc/blocks.dox b/gr-blocks/doc/blocks.dox index 94b4a8e002..fb7d3e67ab 100644 --- a/gr-blocks/doc/blocks.dox +++ b/gr-blocks/doc/blocks.dox @@ -1,6 +1,7 @@ /*! \page page_blocks Standard GNU Radio Blocks -\section Introduction +\section blocks_introduction Introduction + This is the gr-blocks package. It contains many of the generic, standard, or simple blocks used for many aspects of building GNU Radio flowgraphs. To use these blocks, the Python module is diff --git a/gr-channels/doc/channels.dox b/gr-channels/doc/channels.dox index 656d454be6..bb87ed5dc5 100644 --- a/gr-channels/doc/channels.dox +++ b/gr-channels/doc/channels.dox @@ -1,6 +1,6 @@ /*! \page page_channels Channel Model Blocks -\section Introduction +\section channels_introduction Introduction This is the gr-channels package. It contains signal processing blocks to simulate channel models. diff --git a/gr-digital/doc/digital.dox b/gr-digital/doc/digital.dox index 5f2b3bb2fb..08e63008b3 100644 --- a/gr-digital/doc/digital.dox +++ b/gr-digital/doc/digital.dox @@ -1,6 +1,6 @@ /*! \page page_digital Digital Modulation -\section Introduction +\section digtial_introduction Introduction This is the gr-digital package. It contains all of the digital modulation blocks, utilities, and examples. To use the digital blocks, the Python namespaces is in gnuradio.digital, which would be normally @@ -108,7 +108,7 @@ symbols. Each is Gray coded, but for a specific Gray coding that is hard-coded into the class. -\subsection grc_constellations Constellation Objects in GRC +\subsection digital_grc_constellations Constellation Objects in GRC GRC provides two constellation representations that we can use to more easily define and interact with constellation objects. These are diff --git a/gr-dtv/examples/README.dvbs2 b/gr-dtv/examples/README.dvbs2 new file mode 100644 index 0000000000..d9da03ee93 --- /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 0000000000..47daa4cb9d --- /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 93d6b57790..ce2d71883e 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 ba7e3cac5e..770b7ec0fe 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 0000000000..9a6d2ef378 --- /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 0000000000..1f7fef09a3 --- /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 0000000000..ad9eb9ae01 --- /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 7add5a8a53..97264492cb 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 0000000000..3aba9daf86 --- /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 0000000000..68e5403e05 --- /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 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_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 0000000000..0893d0133d --- /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 framesize FEC frame size (normal or short). + * \param rate FEC code rate. + * \param constellation DVB-S2 constellation. + * \param pilots pilot symbols (on/off). + * \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 25838ca006..b72e7a412a 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/atsc/atsc_interleaver_impl.cc b/gr-dtv/lib/atsc/atsc_interleaver_impl.cc index 45f6bfb58b..e628fbf30d 100644 --- a/gr-dtv/lib/atsc/atsc_interleaver_impl.cc +++ b/gr-dtv/lib/atsc/atsc_interleaver_impl.cc @@ -24,6 +24,7 @@ #include "atsc_interleaver_impl.h" #include "gnuradio/dtv/atsc_consts.h" +#include <stdio.h> namespace gr { namespace dtv { 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 0000000000..7abfbe3f79 --- /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 0000000000..36d314c279 --- /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 0000000000..56e2fd0ae3 --- /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 0000000000..8507878b0e --- /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 0000000000..6b58b1558e --- /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 0000000000..8a73cb2aec --- /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 2194e4e186..42a7b0de09 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); diff --git a/gr-fcd/doc/fcd.dox b/gr-fcd/doc/fcd.dox index aca4dadaad..6f57ef9fb5 100644 --- a/gr-fcd/doc/fcd.dox +++ b/gr-fcd/doc/fcd.dox @@ -1,6 +1,6 @@ /*! \page page_fcd FunCube Dongle Source -\section Introduction +\section fcd_introduction Introduction This is the gr-fcd package. It contains a source block for the FunCube Dongle hardware. @@ -20,7 +20,7 @@ after importing by using: help(fcd) \endcode -\section Dependencies +\section fcd_dependencies Dependencies The FCD blocks require the following dependencies. diff --git a/gr-fec/doc/fec.dox b/gr-fec/doc/fec.dox index 7fbbdda6e3..5a3d12d14e 100644 --- a/gr-fec/doc/fec.dox +++ b/gr-fec/doc/fec.dox @@ -1,6 +1,6 @@ /*! \page page_fec Forward Error Correction -\section Introduction +\section fec_introductionIntroduction This is the gr-fec package. It contains all of the forward error correction (FEC) blocks, utilities, and examples. To use the FEC diff --git a/gr-fft/doc/fft.dox b/gr-fft/doc/fft.dox index 5bf612d84e..9ddf30d389 100644 --- a/gr-fft/doc/fft.dox +++ b/gr-fft/doc/fft.dox @@ -1,6 +1,6 @@ /*! \page page_fft FFT Signal Processing Blocks -\section Introduction +\section fft_introduction Introduction This is the gr-fft package. It contains signal processing blocks to perform FFTs and FFT-related functionality. @@ -20,7 +20,7 @@ after importing by using: help(fft) \endcode -\section Dependencies +\section fft_dependencies Dependencies The FFT blocks require the following dependencies. diff --git a/gr-filter/doc/filter.dox b/gr-filter/doc/filter.dox index 8d465ab896..e598d683f1 100644 --- a/gr-filter/doc/filter.dox +++ b/gr-filter/doc/filter.dox @@ -1,6 +1,6 @@ /*! \page page_filter Filter Signal Processing Blocks -\section Introduction +\section filter_introduction Introduction This is the gr-filter package. It contains signal processing blocks to perform filtering operations. @@ -20,12 +20,12 @@ after importing by using: help(filter) \endcode -\section Dependencies +\section filter_dependencies Dependencies The filter blocks depend on \ref page_fft. -\section Usage +\section filter_usage Usage There are many filter blocks and kernels in GNU Radio. Filter blocks are standard GNU Radio blocks that fit into a flowgraph. Filter @@ -56,7 +56,7 @@ filter). \li PFB arbitrary resampler (see pfb_arb_resampler.h): performs arbitrary resampling (i.e., using any real number) using the polyphase -filterbank method. \sa \ref pfb_arb_resampl +filterbank method. \sa \ref pfb_arb_resampler \li Polyphase filterbank (see polyphase_filterbank.h): a set of base classes with standard functions for building many polyphase filterbank diff --git a/gr-filter/include/gnuradio/filter/iir_filter.h b/gr-filter/include/gnuradio/filter/iir_filter.h index bf87ce1d85..0f21472878 100644 --- a/gr-filter/include/gnuradio/filter/iir_filter.h +++ b/gr-filter/include/gnuradio/filter/iir_filter.h @@ -33,10 +33,53 @@ namespace gr { namespace kernel { /*! - * \brief base class template for Infinite Impulse Response filter (IIR) + * \brief Base class template for Infinite Impulse Response filter (IIR) + * + * \details + * + * This class provides a templated kernel for IIR filters. These + * iir_filters can be instantiated with a set of feed-forward + * and feed-back taps in the constructor. We then call the + * iir_filter::filter function to add a new sample to the + * filter, or iir_filter::filter_n to add a vector of samples to + * be filtered. + * + * Instantiating a filter means defining the templates for the + * data types being processed by the filter. There are four templates: + * + * \li i_type the data type of the input data (i.e., float). + * \li o_type the data type of the output data (i.e., float). + * \li tap_type the data type of the filter taps (i.e., double). + * \li acc_type the data type of the internal accumulator (i.e., double). + * + * The acc_type is specified to control how data is handled + * internally in the filter. This should always be the highest + * precision data type of any of the first three. Often, IIR + * filters require double-precision values in the taps for + * stability, and so the internal accumulator should also be + * double precision. + * + * Example: + * + * \code + * gr::filter::kernel::iir_filter<float,float,double,double> iir_filt(fftaps, fbtaps); + * ... + * float y = iir_filt.filter(x); + * + * <or> + * + * iir_filt.filter(y, x, N); // y and x are float arrays + * \endcode + * + * Another example for handling complex samples with + * double-precision taps (see filter::iir_filter_ccz): + * + * \code + * gr:;filter::kernel::iir_filter<gr_complex, gr_complex, gr_complexd, gr_complexd> iir_filt(fftaps, fbtaps); + * \endcode */ - template<class i_type, class o_type, class tap_type> - class iir_filter + template<class i_type, class o_type, class tap_type, class acc_type> + class FILTER_API iir_filter { public: /*! @@ -135,18 +178,18 @@ namespace gr { std::vector<tap_type> d_fbtaps; int d_latest_n; int d_latest_m; - std::vector<o_type> d_prev_output; + std::vector<acc_type> d_prev_output; std::vector<i_type> d_prev_input; }; // // general case. We may want to specialize this // - template<class i_type, class o_type, class tap_type> + template<class i_type, class o_type, class tap_type, class acc_type> o_type - iir_filter<i_type, o_type, tap_type>::filter(const i_type input) + iir_filter<i_type, o_type, tap_type, acc_type>::filter(const i_type input) { - o_type acc; + acc_type acc; unsigned i = 0; unsigned n = ntaps_ff(); unsigned m = ntaps_fb(); @@ -181,9 +224,9 @@ namespace gr { return (o_type)acc; } - template<class i_type, class o_type, class tap_type> + template<class i_type, class o_type, class tap_type, class acc_type> void - iir_filter<i_type, o_type, tap_type>::filter_n(o_type output[], + iir_filter<i_type, o_type, tap_type, acc_type>::filter_n(o_type output[], const i_type input[], long n) { @@ -193,19 +236,18 @@ namespace gr { template<> gr_complex - iir_filter<gr_complex, gr_complex, float>::filter(const gr_complex input); + iir_filter<gr_complex, gr_complex, float, gr_complex>::filter(const gr_complex input); template<> gr_complex - iir_filter<gr_complex, gr_complex, double>::filter(const gr_complex input); + iir_filter<gr_complex, gr_complex, double, gr_complexd>::filter(const gr_complex input); template<> gr_complex - iir_filter<gr_complex, gr_complex, gr_complexd>::filter(const gr_complex input); + iir_filter<gr_complex, gr_complex, gr_complexd, gr_complexd>::filter(const gr_complex input); } /* namespace kernel */ } /* namespace filter */ } /* namespace gr */ #endif /* INCLUDED_IIR_FILTER_H */ - diff --git a/gr-filter/lib/iir_filter.cc b/gr-filter/lib/iir_filter.cc index 0f5ba00bb5..52192827f4 100644 --- a/gr-filter/lib/iir_filter.cc +++ b/gr-filter/lib/iir_filter.cc @@ -28,7 +28,7 @@ namespace gr { template<> gr_complex - iir_filter<gr_complex, gr_complex, float>::filter(const gr_complex input) + iir_filter<gr_complex, gr_complex, float, gr_complex>::filter(const gr_complex input) { gr_complex acc; unsigned i = 0; @@ -67,7 +67,7 @@ namespace gr { template<> gr_complex - iir_filter<gr_complex, gr_complex, double>::filter(const gr_complex input) + iir_filter<gr_complex, gr_complex, double, gr_complexd>::filter(const gr_complex input) { gr_complexd acc; unsigned i = 0; @@ -106,7 +106,7 @@ namespace gr { template<> gr_complex - iir_filter<gr_complex, gr_complex, gr_complexd>::filter(const gr_complex input) + iir_filter<gr_complex, gr_complex, gr_complexd, gr_complexd>::filter(const gr_complex input) { gr_complexd acc; unsigned i = 0; diff --git a/gr-filter/lib/iir_filter_ccc_impl.cc b/gr-filter/lib/iir_filter_ccc_impl.cc index e813cd933d..7e8293cad1 100644 --- a/gr-filter/lib/iir_filter_ccc_impl.cc +++ b/gr-filter/lib/iir_filter_ccc_impl.cc @@ -48,7 +48,7 @@ namespace gr { io_signature::make(1, 1, sizeof(gr_complex))), d_updated(false) { - d_iir = new kernel::iir_filter<gr_complex, gr_complex, gr_complex>(fftaps, fbtaps, oldstyle); + d_iir = new kernel::iir_filter<gr_complex, gr_complex, gr_complex, gr_complex>(fftaps, fbtaps, oldstyle); } iir_filter_ccc_impl::~iir_filter_ccc_impl() diff --git a/gr-filter/lib/iir_filter_ccc_impl.h b/gr-filter/lib/iir_filter_ccc_impl.h index 5b849f9ebd..77e08fdce4 100644 --- a/gr-filter/lib/iir_filter_ccc_impl.h +++ b/gr-filter/lib/iir_filter_ccc_impl.h @@ -33,7 +33,7 @@ namespace gr { { private: bool d_updated; - kernel::iir_filter<gr_complex, gr_complex, gr_complex> *d_iir; + kernel::iir_filter<gr_complex, gr_complex, gr_complex, gr_complex> *d_iir; std::vector<gr_complex> d_new_fftaps; std::vector<gr_complex> d_new_fbtaps; diff --git a/gr-filter/lib/iir_filter_ccd_impl.cc b/gr-filter/lib/iir_filter_ccd_impl.cc index ebe53e925a..a090df0816 100644 --- a/gr-filter/lib/iir_filter_ccd_impl.cc +++ b/gr-filter/lib/iir_filter_ccd_impl.cc @@ -48,7 +48,7 @@ namespace gr { io_signature::make(1, 1, sizeof(gr_complex))), d_updated(false) { - d_iir = new kernel::iir_filter<gr_complex, gr_complex, double>(fftaps, fbtaps, oldstyle); + d_iir = new kernel::iir_filter<gr_complex, gr_complex, double, gr_complexd>(fftaps, fbtaps, oldstyle); } iir_filter_ccd_impl::~iir_filter_ccd_impl() diff --git a/gr-filter/lib/iir_filter_ccd_impl.h b/gr-filter/lib/iir_filter_ccd_impl.h index 2ae2504bb2..6a15d1aa2d 100644 --- a/gr-filter/lib/iir_filter_ccd_impl.h +++ b/gr-filter/lib/iir_filter_ccd_impl.h @@ -33,7 +33,7 @@ namespace gr { { private: bool d_updated; - kernel::iir_filter<gr_complex, gr_complex, double> *d_iir; + kernel::iir_filter<gr_complex, gr_complex, double, gr_complexd> *d_iir; std::vector<double> d_new_fftaps; std::vector<double> d_new_fbtaps; diff --git a/gr-filter/lib/iir_filter_ccf_impl.cc b/gr-filter/lib/iir_filter_ccf_impl.cc index bb19e4550d..9b15c2903d 100644 --- a/gr-filter/lib/iir_filter_ccf_impl.cc +++ b/gr-filter/lib/iir_filter_ccf_impl.cc @@ -48,7 +48,7 @@ namespace gr { io_signature::make(1, 1, sizeof(gr_complex))), d_updated(false) { - d_iir = new kernel::iir_filter<gr_complex, gr_complex, float>(fftaps, fbtaps, oldstyle); + d_iir = new kernel::iir_filter<gr_complex, gr_complex, float, gr_complex>(fftaps, fbtaps, oldstyle); } iir_filter_ccf_impl::~iir_filter_ccf_impl() diff --git a/gr-filter/lib/iir_filter_ccf_impl.h b/gr-filter/lib/iir_filter_ccf_impl.h index 420e35ae0c..67265e76fa 100644 --- a/gr-filter/lib/iir_filter_ccf_impl.h +++ b/gr-filter/lib/iir_filter_ccf_impl.h @@ -33,7 +33,7 @@ namespace gr { { private: bool d_updated; - kernel::iir_filter<gr_complex, gr_complex, float> *d_iir; + kernel::iir_filter<gr_complex, gr_complex, float, gr_complex> *d_iir; std::vector<float> d_new_fftaps; std::vector<float> d_new_fbtaps; diff --git a/gr-filter/lib/iir_filter_ccz_impl.cc b/gr-filter/lib/iir_filter_ccz_impl.cc index cb7b2300f5..4227a3004a 100644 --- a/gr-filter/lib/iir_filter_ccz_impl.cc +++ b/gr-filter/lib/iir_filter_ccz_impl.cc @@ -48,7 +48,7 @@ namespace gr { io_signature::make(1, 1, sizeof(gr_complex))), d_updated(false) { - d_iir = new kernel::iir_filter<gr_complex, gr_complex, gr_complexd>(fftaps, fbtaps, oldstyle); + d_iir = new kernel::iir_filter<gr_complex, gr_complex, gr_complexd, gr_complexd>(fftaps, fbtaps, oldstyle); } iir_filter_ccz_impl::~iir_filter_ccz_impl() diff --git a/gr-filter/lib/iir_filter_ccz_impl.h b/gr-filter/lib/iir_filter_ccz_impl.h index 1e2a984782..59bd53ffc7 100644 --- a/gr-filter/lib/iir_filter_ccz_impl.h +++ b/gr-filter/lib/iir_filter_ccz_impl.h @@ -33,7 +33,7 @@ namespace gr { { private: bool d_updated; - kernel::iir_filter<gr_complex, gr_complex, gr_complexd> *d_iir; + kernel::iir_filter<gr_complex, gr_complex, gr_complexd, gr_complexd> *d_iir; std::vector<gr_complexd> d_new_fftaps; std::vector<gr_complexd> d_new_fbtaps; diff --git a/gr-filter/lib/iir_filter_ffd_impl.cc b/gr-filter/lib/iir_filter_ffd_impl.cc index 5aee5175c1..f70e3a25af 100644 --- a/gr-filter/lib/iir_filter_ffd_impl.cc +++ b/gr-filter/lib/iir_filter_ffd_impl.cc @@ -48,7 +48,7 @@ namespace gr { io_signature::make(1, 1, sizeof (float))), d_updated(false) { - d_iir = new kernel::iir_filter<float,float,double>(fftaps, fbtaps, oldstyle); + d_iir = new kernel::iir_filter<float,float,double,double>(fftaps, fbtaps, oldstyle); } iir_filter_ffd_impl::~iir_filter_ffd_impl() diff --git a/gr-filter/lib/iir_filter_ffd_impl.h b/gr-filter/lib/iir_filter_ffd_impl.h index 5cad8eccdc..a74ac7a949 100644 --- a/gr-filter/lib/iir_filter_ffd_impl.h +++ b/gr-filter/lib/iir_filter_ffd_impl.h @@ -33,7 +33,7 @@ namespace gr { { private: bool d_updated; - kernel::iir_filter<float,float,double> *d_iir; + kernel::iir_filter<float,float,double,double> *d_iir; std::vector<double> d_new_fftaps; std::vector<double> d_new_fbtaps; diff --git a/gr-filter/python/filter/design/filter_design.py b/gr-filter/python/filter/design/filter_design.py index fe90681e34..f94b6b8340 100644 --- a/gr-filter/python/filter/design/filter_design.py +++ b/gr-filter/python/filter/design/filter_design.py @@ -1042,7 +1042,7 @@ class gr_plot_filter(QtGui.QMainWindow): w,h = signal.freqz(self.b,self.a) self.fftdB = 20 * scipy.log10 (abs(h)) self.freq = w/max(w) - self.fftDeg = scipy.unwrap(scipy.arctan2(imag(h),real(h))) + self.fftDeg = scipy.unwrap(scipy.arctan2(scipy.imag(h),scipy.real(h))) self.groupDelay = -scipy.diff(self.fftDeg) self.phaseDelay = -self.fftDeg[1:]/self.freq[1:] if self.gridview: diff --git a/gr-filter/python/filter/gui/polezero_plot.py b/gr-filter/python/filter/gui/polezero_plot.py index 839af0400d..8f35dc8d78 100644 --- a/gr-filter/python/filter/gui/polezero_plot.py +++ b/gr-filter/python/filter/gui/polezero_plot.py @@ -22,7 +22,10 @@ import sys from PyQt4 import Qt, QtCore from math import sin, cos, pi import PyQt4.Qwt5 as Qwt -from PyQt4.Qwt5.anynumpy import * +from numpy import zeros +from numpy import float as Float +from numpy import vectorize +from numpy import delete class PzPlot(Qwt.QwtPlot): @@ -531,4 +534,3 @@ class CanvasPicker(Qt.QObject): self.__showCursor(False) self.__selectedPoint = index self.__showCursor(True) - diff --git a/gr-qtgui/doc/qtgui.dox b/gr-qtgui/doc/qtgui.dox index 63530d4669..1d4c3099a3 100644 --- a/gr-qtgui/doc/qtgui.dox +++ b/gr-qtgui/doc/qtgui.dox @@ -1,6 +1,6 @@ /*! \page page_qtgui QT Graphical User Interface -\section Introduction +\section qtgui_introduction Introduction This is the gr-qtgui package. It contains various QT-based graphical user interface blocks that add graphical sinks to a GNU Radio @@ -22,7 +22,7 @@ by using: help(qtgui) \endcode -\subsection Blocks +\subsection qtgui_blocks Blocks There are a number of available QTGUI blocks for different plotting purposes. These include: @@ -123,7 +123,7 @@ accordingly offering more freedom. This should be a problem in a limited number of scenarios, but a log INFO level message is produced when asking for the delay outside of the available range. -\section Dependencies +\section qtgui_dependencies Dependencies The QT GUI blocks require the following dependencies. @@ -134,7 +134,7 @@ The QT GUI blocks require the following dependencies. \li Qwt (version >= 5.2) \li PyQwt5 for Qt4 (version >= 5.2) -\section Usage +\section qtgui_usage Usage To use the qtgui interface, a bit of boiler-plate lines must be included. First, the sink is defined, then it must be exposed from C++ @@ -181,7 +181,7 @@ style, markers, etc.), the ability to start and stop the display, the ability to save to a file, and other plot-specific controls (FFT size for the frequency and waterfall plots, etc.). -\section Configuration +\section qtgui_configuration Configuration There is currently a single configuration option in the preferences files to set the rendering engine of the QTGUI sinks. Located in diff --git a/gr-qtgui/grc/qtgui_tab_widget.xml b/gr-qtgui/grc/qtgui_tab_widget.xml index 5a99377367..1bbadc8e51 100644 --- a/gr-qtgui/grc/qtgui_tab_widget.xml +++ b/gr-qtgui/grc/qtgui_tab_widget.xml @@ -10,7 +10,10 @@ <import>from PyQt4 import Qt</import> <make>#set $win = 'self.%s'%$id Qt.QTabWidget() -#set $all_labels = [$label0, $label1, $label2, $label3, $label4][:int($num_tabs())] +#set $all_labels = [$label0, $label1, $label2, $label3, $label4, + $label5, $label6, $label7, $label8, $label9, + $label10, $label11, $label12, $label13, $label14, + $label15, $label16, $label17, $label18, $label19][:int($num_tabs())] #for i, label in enumerate($all_labels) self.$(id)_widget_$(i) = Qt.QWidget() self.$(id)_layout_$(i) = Qt.QBoxLayout(Qt.QBoxLayout.TopToBottom, self.$(id)_widget_$(i)) diff --git a/gr-qtgui/lib/FrequencyDisplayPlot.cc b/gr-qtgui/lib/FrequencyDisplayPlot.cc index 41050edfc2..8005be191b 100644 --- a/gr-qtgui/lib/FrequencyDisplayPlot.cc +++ b/gr-qtgui/lib/FrequencyDisplayPlot.cc @@ -90,7 +90,7 @@ FrequencyDisplayPlot::FrequencyDisplayPlot(int nplots, QWidget* parent) d_start_frequency = -1; d_stop_frequency = 1; - d_numPoints = 1024; + d_numPoints = 0; d_min_fft_data = new double[d_numPoints]; d_max_fft_data = new double[d_numPoints]; d_xdata = new double[d_numPoints]; @@ -287,7 +287,6 @@ FrequencyDisplayPlot::setFrequencyRange(const double centerfreq, else startFreq = (centerfreq - bandwidth/2.0f) / units; - d_xdata_multiplier = units; bool reset = false; @@ -396,10 +395,10 @@ FrequencyDisplayPlot::plotNewData(const std::vector<double*> dataPoints, for(int64_t point = 0; point < _npoints_in; point++) { if(dataPoints[n][point] < d_min_fft_data[point]) { - d_min_fft_data[point] = dataPoints[n][point]; + d_min_fft_data[point] = dataPoints[n][point+_in_index]; } if(dataPoints[n][point] > d_max_fft_data[point]) { - d_max_fft_data[point] = dataPoints[n][point]; + d_max_fft_data[point] = dataPoints[n][point+_in_index]; } // Find overall top and bottom values in plot. diff --git a/gr-qtgui/lib/freq_sink_c_impl.cc b/gr-qtgui/lib/freq_sink_c_impl.cc index fa8e38dd9f..adc1f76857 100644 --- a/gr-qtgui/lib/freq_sink_c_impl.cc +++ b/gr-qtgui/lib/freq_sink_c_impl.cc @@ -198,7 +198,10 @@ namespace gr { void freq_sink_c_impl::set_fft_size(const int fftsize) { - d_main_gui->setFFTSize(fftsize); + if((fftsize > 16) && (fftsize < 16384)) + d_main_gui->setFFTSize(fftsize); + else + throw std::runtime_error("freq_sink: FFT size must be > 16 and < 16384."); } int diff --git a/gr-qtgui/lib/freq_sink_f_impl.cc b/gr-qtgui/lib/freq_sink_f_impl.cc index 1df915b32c..1e01208b27 100644 --- a/gr-qtgui/lib/freq_sink_f_impl.cc +++ b/gr-qtgui/lib/freq_sink_f_impl.cc @@ -197,7 +197,10 @@ namespace gr { void freq_sink_f_impl::set_fft_size(const int fftsize) { - d_main_gui->setFFTSize(fftsize); + if((fftsize > 16) && (fftsize < 16384)) + d_main_gui->setFFTSize(fftsize); + else + throw std::runtime_error("freq_sink: FFT size must be > 16 and < 16384."); } int diff --git a/gr-uhd/doc/uhd.dox b/gr-uhd/doc/uhd.dox index 2b7f308984..da6d9d45f5 100644 --- a/gr-uhd/doc/uhd.dox +++ b/gr-uhd/doc/uhd.dox @@ -1,6 +1,7 @@ /*! \page page_uhd UHD Interface -\section Introduction +\section uhd_introduction Introduction + This is the GNU Radio UHD package. It is the interface to the UHD library to connect to and send and receive data between the Ettus Research, LLC product line. To use the UHD blocks, the Python @@ -78,7 +79,7 @@ Command name | Value Type | Description `gain` | double | Sets the Tx or Rx gain (in dB). Defaults to all channels. -\section Configuring a UHD object +\section uhd_configuring Configuring a UHD object A typical option parser setup for a UHD device looks like diff --git a/gr-uhd/include/gnuradio/uhd/usrp_source.h b/gr-uhd/include/gnuradio/uhd/usrp_source.h index 61f63bdf3b..7da39683d1 100644 --- a/gr-uhd/include/gnuradio/uhd/usrp_source.h +++ b/gr-uhd/include/gnuradio/uhd/usrp_source.h @@ -359,6 +359,14 @@ namespace gr { virtual void set_dc_offset(const std::complex<double> &offset, size_t chan = 0) = 0; /*! + * Enable/Disable the RX frontend IQ imbalance correction. + * + * \param enb true to enable automatic IQ imbalance correction + * \param chan the channel index 0 to N-1 + */ + virtual void set_auto_iq_balance(const bool enb, size_t chan = 0) = 0; + + /*! * Set the RX frontend IQ imbalance correction. * Use this to adjust the magnitude and phase of I and Q. * diff --git a/gr-uhd/lib/usrp_source_impl.cc b/gr-uhd/lib/usrp_source_impl.cc index 62ef2f56c7..f04ff3df90 100644 --- a/gr-uhd/lib/usrp_source_impl.cc +++ b/gr-uhd/lib/usrp_source_impl.cc @@ -327,6 +327,18 @@ namespace gr { } void + usrp_source_impl::set_auto_iq_balance(const bool enable, size_t chan) + { + chan = _stream_args.channels[chan]; +#ifdef UHD_USRP_MULTI_USRP_FRONTEND_IQ_AUTO_API + return _dev->set_rx_iq_balance(enable, chan); +#else + throw std::runtime_error("not implemented in this version"); +#endif + } + + + void usrp_source_impl::set_iq_balance(const std::complex<double> &correction, size_t chan) { diff --git a/gr-uhd/lib/usrp_source_impl.h b/gr-uhd/lib/usrp_source_impl.h index d5bd2f4149..0cbbe2b16b 100644 --- a/gr-uhd/lib/usrp_source_impl.h +++ b/gr-uhd/lib/usrp_source_impl.h @@ -103,6 +103,7 @@ namespace gr { ::uhd::freq_range_t get_bandwidth_range(size_t chan); void set_auto_dc_offset(const bool enable, size_t chan); void set_dc_offset(const std::complex<double> &offset, size_t chan); + void set_auto_iq_balance(const bool enable, size_t chan); void set_iq_balance(const std::complex<double> &correction, size_t chan); void set_clock_config(const ::uhd::clock_config_t &clock_config, size_t mboard); void set_time_source(const std::string &source, const size_t mboard); diff --git a/gr-vocoder/doc/vocoder.dox b/gr-vocoder/doc/vocoder.dox index e3be774564..214d652a8b 100644 --- a/gr-vocoder/doc/vocoder.dox +++ b/gr-vocoder/doc/vocoder.dox @@ -1,6 +1,6 @@ /*! \page page_vocoder Voice Coders and Decoders (Vocoders) -\section Introduction +\section vocoder_introduction Introduction This is the gr-vocoder package. It contains all available vocoders in GNU Radio. The Python namespaces is in gnuradio.vocoder, which would be @@ -20,7 +20,7 @@ by using: help(vocoder) \endcode -\section using_vocoders Using the vocoders +\section vocoders_using Using the vocoders Note that most vocoders use short inputs instead of floats. This means you must convert audio signals from float to short by using a type conversion diff --git a/gr-zeromq/docs/zeromq.dox b/gr-zeromq/docs/zeromq.dox index 3709afc4b0..d37d8f5b20 100644 --- a/gr-zeromq/docs/zeromq.dox +++ b/gr-zeromq/docs/zeromq.dox @@ -1,6 +1,6 @@ /*! \page page_zeromq ZeroMQ -\section Introduction +\section zmq_introduction Introduction This is the gr-zeromq package. It contains bindings for ZeroMQ. |