summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt119
-rw-r--r--gnuradio-runtime/include/gnuradio/math.h18
-rw-r--r--gnuradio-runtime/include/gnuradio/nco.h24
-rw-r--r--gnuradio-runtime/lib/math/qa_fxpt.cc17
-rw-r--r--gnuradio-runtime/lib/math/qa_fxpt_nco.cc12
-rw-r--r--gnuradio-runtime/lib/math/random.cc8
-rw-r--r--gnuradio-runtime/lib/math/vco.h14
-rw-r--r--gr-analog/lib/cpfsk_bc_impl.cc15
-rw-r--r--gr-analog/lib/cpm.cc15
-rw-r--r--gr-analog/lib/fmdet_cf_impl.cc4
-rw-r--r--gr-analog/lib/frequency_modulator_fc_impl.cc5
-rw-r--r--gr-analog/lib/pll_carriertracking_cc_impl.cc17
-rw-r--r--gr-analog/lib/pll_freqdet_cf_impl.cc17
-rw-r--r--gr-analog/lib/pll_refout_cc_impl.cc14
-rw-r--r--gr-analog/lib/sig_source_X_impl.cc.t49
-rw-r--r--gr-analog/lib/squelch_base_cc_impl.cc7
-rw-r--r--gr-analog/lib/squelch_base_ff_impl.cc7
-rw-r--r--gr-blocks/lib/control_loop.cc4
-rw-r--r--gr-blocks/lib/qa_rotator.cc23
-rw-r--r--gr-blocks/tests/benchmark_nco.cc30
-rw-r--r--gr-blocks/tests/benchmark_vco.cc24
-rw-r--r--gr-channels/lib/cfo_model_impl.cc9
-rw-r--r--gr-channels/lib/channel_model2_impl.cc7
-rw-r--r--gr-channels/lib/flat_fader_impl.cc21
-rw-r--r--gr-channels/lib/selective_fading_model2_impl.cc12
-rw-r--r--gr-channels/lib/selective_fading_model_impl.cc12
-rw-r--r--gr-channels/lib/sincostable.h8
-rw-r--r--gr-digital/lib/constellation.cc41
-rw-r--r--gr-digital/lib/constellation_receiver_cb_impl.cc3
-rw-r--r--gr-digital/lib/constellation_receiver_cb_impl.h5
-rw-r--r--gr-digital/lib/cpmmod_bc_impl.cc5
-rw-r--r--gr-digital/lib/ofdm_cyclic_prefixer_impl.cc9
-rw-r--r--gr-digital/lib/ofdm_frame_acquisition_impl.cc11
-rw-r--r--gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.cc13
-rw-r--r--gr-digital/lib/ofdm_frame_sink_impl.cc8
-rw-r--r--gr-dtv/lib/atsc/atsc_fpll_impl.cc6
-rw-r--r--gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.cc1461
-rw-r--r--gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.cc21
-rw-r--r--gr-dtv/lib/dvbt/dvbt_ofdm_sym_acquisition_impl.cc24
-rw-r--r--gr-dtv/lib/dvbt/dvbt_reference_signals_impl.cc12
-rw-r--r--gr-dtv/lib/dvbt2/dvbt2_modulator_bc_impl.cc15
-rw-r--r--gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.cc7
-rw-r--r--gr-dtv/lib/dvbt2/dvbt2_pilotgenerator_cc_impl.cc7
-rw-r--r--gr-fec/include/gnuradio/fec/viterbi.h52
-rw-r--r--gr-fec/lib/ccsds_encoder_impl.cc2
-rw-r--r--gr-fec/lib/decode_ccsds_27_fb_impl.h3
-rw-r--r--gr-fec/lib/encode_ccsds_27_bb_impl.cc2
-rw-r--r--gr-fec/lib/viterbi/CMakeLists.txt1
-rw-r--r--gr-fec/lib/viterbi/decode.cc12
-rw-r--r--gr-fec/lib/viterbi/encode.cc4
-rw-r--r--gr-fec/lib/viterbi/metrics.c131
-rw-r--r--gr-fec/lib/viterbi/viterbi.c487
-rw-r--r--gr-fft/lib/goertzel.cc7
-rw-r--r--gr-fft/lib/window.cc19
-rw-r--r--gr-filter/lib/firdes.cc81
-rw-r--r--gr-filter/lib/freq_xlating_fir_filter_XXX_impl.cc.t5
-rw-r--r--gr-filter/lib/pfb_arb_resampler.cc29
-rw-r--r--gr-filter/lib/pfb_decimator_ccf_impl.cc5
-rw-r--r--gr-filter/lib/qa_mmse_fir_interpolator_cc.cc15
-rw-r--r--gr-filter/lib/qa_mmse_fir_interpolator_ff.cc9
-rw-r--r--gr-filter/lib/qa_mmse_interp_differentiator_cc.cc23
-rw-r--r--gr-filter/lib/qa_mmse_interp_differentiator_ff.cc23
62 files changed, 1557 insertions, 1513 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9ca5f4f3fb..fb8c3951da 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,31 +38,31 @@ include(GrBuildTypes)
# Select the release build type by default to get optimization flags
if(NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE "Release")
+ SET(CMAKE_BUILD_TYPE "Release")
message(STATUS "Build type not specified: defaulting to release.")
endif(NOT CMAKE_BUILD_TYPE)
GR_CHECK_BUILD_TYPE(${CMAKE_BUILD_TYPE})
-set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
+SET(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
message(STATUS "Build type set to ${CMAKE_BUILD_TYPE}.")
# Set the version information here
-set(VERSION_INFO_MAJOR_VERSION 3)
-set(VERSION_INFO_API_COMPAT 8)
-set(VERSION_INFO_MINOR_VERSION git)
-set(VERSION_INFO_MAINT_VERSION 0)
+SET(VERSION_INFO_MAJOR_VERSION 3)
+SET(VERSION_INFO_API_COMPAT 8)
+SET(VERSION_INFO_MINOR_VERSION git)
+SET(VERSION_INFO_MAINT_VERSION 0)
include(GrVersion) #setup version info
# Minimum dependency versions for central dependencies:
-set(GR_BOOST_MIN_VERSION "1.54")
-set(GR_SWIG_MIN_VERSION "2.0.11")
-set(GR_CMAKE_MIN_VERSION "2.8.12")
-set(GR_MAKO_MIN_VERSION "0.4.2")
-set(GR_PYTHON_MIN_VERSION "2.7")
-set(GR_PYTHON3_MIN_VERSION "3.4")
-set(GR_CPPUNIT_MIN_VERSION "1.12.1")
-set(GCC_MIN_VERSION "4.8.4")
-set(CLANG_MIN_VERSION "3.4.0")
-set(APPLECLANG_MIN_VERSION "500")
+SET(GR_BOOST_MIN_VERSION "1.54")
+SET(GR_SWIG_MIN_VERSION "2.0.11")
+SET(GR_CMAKE_MIN_VERSION "2.8.12")
+SET(GR_MAKO_MIN_VERSION "0.4.2")
+SET(GR_PYTHON_MIN_VERSION "2.7")
+SET(GR_PYTHON3_MIN_VERSION "3.4")
+SET(GR_CPPUNIT_MIN_VERSION "1.12.1")
+SET(GCC_MIN_VERSION "4.8.4")
+SET(CLANG_MIN_VERSION "3.4.0")
+SET(APPLECLANG_MIN_VERSION "500")
########################################################################
# Configure CMake policies
@@ -135,6 +135,9 @@ ENDIF()
# set after CppUnit check below). Use the variable CMAKE_CXX_STANDARD
# since it will actually be used for this purposes starting in CMake 3.1.
+SET(CMAKE_C_EXTENSIONS OFF)
+SET(CMAKE_CXX_EXTENSIONS OFF)
+
IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
SET(CMAKE_CXX_STANDARD 11)
ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
@@ -158,6 +161,7 @@ ENDIF()
# if cmake version is < 3.1, explicitly set C standard to use.
IF(${CMAKE_VERSION} VERSION_LESS "3.1")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c${CMAKE_C_STANDARD}")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++${CMAKE_CXX_STANDARD}")
ENDIF()
########################################################################
@@ -176,7 +180,7 @@ if(IMPORT_EXECUTABLES)
endif(IMPORT_EXECUTABLES)
#set file that the native build will fill with exports
-set(EXPORT_FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake)
+SET(EXPORT_FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake)
file(WRITE ${EXPORT_FILE}) #blank the file (subdirs will append)
########################################################################
@@ -227,7 +231,7 @@ endif(WIN32)
# Record Compiler Info for record
STRING(TOUPPER ${CMAKE_BUILD_TYPE} GRCBTU)
-set(COMPILER_INFO "")
+SET(COMPILER_INFO "")
IF(MSVC)
IF(MSVC90) #Visual Studio 9
SET(cmake_c_compiler_version "Microsoft Visual Studio 9.0")
@@ -251,7 +255,7 @@ ELSE()
execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
OUTPUT_VARIABLE cmake_cxx_compiler_version)
ENDIF(MSVC)
-set(COMPILER_INFO "${CMAKE_C_COMPILER}:::${CMAKE_C_FLAGS_${GRCBTU}} ${CMAKE_C_FLAGS}\n${CMAKE_CXX_COMPILER}:::${CMAKE_CXX_FLAGS_${GRCBTU}} ${CMAKE_CXX_FLAGS}\n" )
+SET(COMPILER_INFO "${CMAKE_C_COMPILER}:::${CMAKE_C_FLAGS_${GRCBTU}} ${CMAKE_C_FLAGS}\n${CMAKE_CXX_COMPILER}:::${CMAKE_CXX_FLAGS_${GRCBTU}} ${CMAKE_CXX_FLAGS}\n" )
# Convert to a C string to compile and display properly
string(STRIP "${cmake_c_compiler_version}" cmake_c_compiler_version)
@@ -267,30 +271,30 @@ string(REPLACE "\n" " \\n" COMPILER_INFO ${COMPILER_INFO})
# Install directories
########################################################################
include(GrPlatform) #define LIB_SUFFIX
-set(GR_RUNTIME_DIR bin CACHE PATH "Path to install all binaries")
-set(GR_LIBRARY_DIR lib${LIB_SUFFIX} CACHE PATH "Path to install libraries")
-set(GR_INCLUDE_DIR include CACHE PATH "Path to install header files")
-set(GR_DATA_DIR share CACHE PATH "Base location for data")
-set(GR_PKG_DATA_DIR ${GR_DATA_DIR}/${CMAKE_PROJECT_NAME} CACHE PATH "Path to install package data")
-set(GR_DOC_DIR ${GR_DATA_DIR}/doc CACHE PATH "Path to install documentation")
-set(GR_PKG_DOC_DIR ${GR_DOC_DIR}/${CMAKE_PROJECT_NAME}-${DOCVER} CACHE PATH "Path to install package docs")
-set(GR_LIBEXEC_DIR libexec CACHE PATH "Path to install libexec files")
-set(GR_PKG_LIBEXEC_DIR ${GR_LIBEXEC_DIR}/${CMAKE_PROJECT_NAME} CACHE PATH "Path to install package libexec files")
-set(GRC_BLOCKS_DIR ${GR_PKG_DATA_DIR}/grc/blocks CACHE PATH "Path to install GRC blocks")
-set(GR_THEMES_DIR ${GR_PKG_DATA_DIR}/themes CACHE PATH "Path to install QTGUI themes")
+SET(GR_RUNTIME_DIR bin CACHE PATH "Path to install all binaries")
+SET(GR_LIBRARY_DIR lib${LIB_SUFFIX} CACHE PATH "Path to install libraries")
+SET(GR_INCLUDE_DIR include CACHE PATH "Path to install header files")
+SET(GR_DATA_DIR share CACHE PATH "Base location for data")
+SET(GR_PKG_DATA_DIR ${GR_DATA_DIR}/${CMAKE_PROJECT_NAME} CACHE PATH "Path to install package data")
+SET(GR_DOC_DIR ${GR_DATA_DIR}/doc CACHE PATH "Path to install documentation")
+SET(GR_PKG_DOC_DIR ${GR_DOC_DIR}/${CMAKE_PROJECT_NAME}-${DOCVER} CACHE PATH "Path to install package docs")
+SET(GR_LIBEXEC_DIR libexec CACHE PATH "Path to install libexec files")
+SET(GR_PKG_LIBEXEC_DIR ${GR_LIBEXEC_DIR}/${CMAKE_PROJECT_NAME} CACHE PATH "Path to install package libexec files")
+SET(GRC_BLOCKS_DIR ${GR_PKG_DATA_DIR}/grc/blocks CACHE PATH "Path to install GRC blocks")
+SET(GR_THEMES_DIR ${GR_PKG_DATA_DIR}/themes CACHE PATH "Path to install QTGUI themes")
# Set location of config/prefs files in /etc
# Special exception if prefix is /usr so we don't make a /usr/etc.
-set(GR_CONF_DIR etc CACHE PATH "Path to install config files")
+SET(GR_CONF_DIR etc CACHE PATH "Path to install config files")
string(COMPARE EQUAL "${CMAKE_INSTALL_PREFIX}" "/usr" isusr)
if(isusr)
- set(SYSCONFDIR "/${GR_CONF_DIR}" CACHE PATH "System configuration directory")
+ SET(SYSCONFDIR "/${GR_CONF_DIR}" CACHE PATH "System configuration directory")
else(isusr)
- set(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/${GR_CONF_DIR}" CACHE PATH "System configuration directory" FORCE)
+ SET(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/${GR_CONF_DIR}" CACHE PATH "System configuration directory" FORCE)
endif(isusr)
-set(GR_PKG_CONF_DIR ${SYSCONFDIR}/${CMAKE_PROJECT_NAME}/conf.d CACHE PATH "Path to install package configs")
-set(GR_PREFSDIR ${SYSCONFDIR}/${CMAKE_PROJECT_NAME}/conf.d CACHE PATH "Path to install preference files")
+SET(GR_PKG_CONF_DIR ${SYSCONFDIR}/${CMAKE_PROJECT_NAME}/conf.d CACHE PATH "Path to install package configs")
+SET(GR_PREFSDIR ${SYSCONFDIR}/${CMAKE_PROJECT_NAME}/conf.d CACHE PATH "Path to install preference files")
OPTION(ENABLE_PERFORMANCE_COUNTERS "Enable block performance counters" ON)
if(ENABLE_PERFORMANCE_COUNTERS)
@@ -320,17 +324,17 @@ file(TO_NATIVE_PATH "${GR_PREFSDIR}" GR_PREFSDIR)
########################################################################
if(APPLE)
if(NOT CMAKE_INSTALL_NAME_DIR)
- set(CMAKE_INSTALL_NAME_DIR
+ SET(CMAKE_INSTALL_NAME_DIR
${CMAKE_INSTALL_PREFIX}/${GR_LIBRARY_DIR} CACHE
PATH "Library Install Name Destination Directory" FORCE)
endif(NOT CMAKE_INSTALL_NAME_DIR)
if(NOT CMAKE_INSTALL_RPATH)
- set(CMAKE_INSTALL_RPATH
+ SET(CMAKE_INSTALL_RPATH
${CMAKE_INSTALL_PREFIX}/${GR_LIBRARY_DIR} CACHE
PATH "Library Install RPath" FORCE)
endif(NOT CMAKE_INSTALL_RPATH)
if(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
- set(CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE
+ SET(CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE
BOOL "Do Build Using Library Install RPath" FORCE)
endif(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
endif(APPLE)
@@ -359,10 +363,10 @@ find_package(PythonLibs ${GR_PYTHON_MIN_VERSION})
find_package(SWIG)
if(SWIG_FOUND)
- set(SWIG_VERSION_CHECK FALSE)
+ SET(SWIG_VERSION_CHECK FALSE)
if("${SWIG_VERSION}" VERSION_EQUAL ${GR_SWIG_MIN_VERSION} OR
"${SWIG_VERSION}" VERSION_GREATER ${GR_SWIG_MIN_VERSION})
- set(SWIG_VERSION_CHECK TRUE)
+ SET(SWIG_VERSION_CHECK TRUE)
endif()
endif(SWIG_FOUND)
@@ -378,19 +382,6 @@ GR_REGISTER_COMPONENT("testing-support" ENABLE_TESTING
CPPUNIT_FOUND
)
-# check if CppUnit version is 1.14.0 or greater; requires c++11 ...
-
-if(CPPUNIT_FOUND AND NOT "${CPPUNIT_VERSION}" VERSION_LESS "1.14.0")
- message(WARNING "\nWarning: CppUnit version is ${CPPUNIT_VERSION} which requires C++11 for building. Trying to set CMake internally to use C++11 ...")
- SET(CMAKE_CXX_STANDARD 11)
-endif()
-
-# if cmake version is < 3.1, explicitly set C++ standard to use.
-
-if(${CMAKE_VERSION} VERSION_LESS "3.1")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++${CMAKE_CXX_STANDARD}")
-endif()
-
if(${CMAKE_BUILD_TYPE} STREQUAL "Coverage")
include(CodeCoverage)
setup_target_for_coverage(coverage "ctest || exit 0" coverage)
@@ -404,7 +395,7 @@ message(STATUS "")
message(STATUS "Configuring VOLK support...")
OPTION(ENABLE_INTERNAL_VOLK "Enable internal VOLK only" ON)
-unset(VOLK_FOUND)
+unSET(VOLK_FOUND)
if(NOT ENABLE_INTERNAL_VOLK)
find_package(Volk)
if(NOT VOLK_FOUND)
@@ -438,21 +429,21 @@ if(NOT VOLK_FOUND)
include(GrComponent)
GR_REGISTER_COMPONENT("volk" ENABLE_VOLK)
- set(VOLK_INCLUDE_DIRS
+ SET(VOLK_INCLUDE_DIRS
${CMAKE_CURRENT_SOURCE_DIR}/volk/include
${CMAKE_CURRENT_BINARY_DIR}/volk/include
)
- set(VOLK_LIBRARIES volk)
+ SET(VOLK_LIBRARIES volk)
- set(VOLK_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_PREFIX}/lib)
- set(VOLK_INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include)
+ SET(VOLK_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_PREFIX}/lib)
+ SET(VOLK_INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include)
else()
message(STATUS " An external VOLK has been found and will be used for build.")
- set(ENABLE_VOLK TRUE)
+ SET(ENABLE_VOLK TRUE)
get_filename_component(VOLK_INSTALL_LIBRARY_DIR "${VOLK_LIBRARIES}" DIRECTORY)
- set(VOLK_INSTALL_INCLUDE_DIR ${VOLK_INCLUDE_DIRS})
+ SET(VOLK_INSTALL_INCLUDE_DIR ${VOLK_INCLUDE_DIRS})
endif(NOT VOLK_FOUND)
message(STATUS " Override with -DENABLE_INTERNAL_VOLK=ON/OFF")
@@ -511,14 +502,14 @@ add_subdirectory(grc)
# Defining GR_CTRLPORT for gnuradio/config.h
if(ENABLE_GR_CTRLPORT)
- set(GR_CTRLPORT True)
+ SET(GR_CTRLPORT True)
add_definitions(-DGR_CTRLPORT)
if(CTRLPORT_BACKENDS GREATER 0)
- set(GR_RPCSERVER_ENABLED True)
+ SET(GR_RPCSERVER_ENABLED True)
if(THRIFT_FOUND)
- set(GR_RPCSERVER_THRIFT True)
+ SET(GR_RPCSERVER_THRIFT True)
endif(THRIFT_FOUND)
endif(CTRLPORT_BACKENDS GREATER 0)
endif(ENABLE_GR_CTRLPORT)
@@ -543,7 +534,7 @@ SET(cmake_configs
)
if(NOT CMAKE_MODULES_DIR)
- set(CMAKE_MODULES_DIR lib${LIB_SUFFIX}/cmake)
+ SET(CMAKE_MODULES_DIR lib${LIB_SUFFIX}/cmake)
endif(NOT CMAKE_MODULES_DIR)
# Install all other cmake files into same directory
diff --git a/gnuradio-runtime/include/gnuradio/math.h b/gnuradio-runtime/include/gnuradio/math.h
index e60f56b594..ce37f6ca84 100644
--- a/gnuradio-runtime/include/gnuradio/math.h
+++ b/gnuradio-runtime/include/gnuradio/math.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2003,2005,2008,2013 Free Software Foundation, Inc.
+ * Copyright 2003,2005,2008,2013,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -31,6 +31,22 @@
#include <gnuradio/api.h>
#include <gnuradio/gr_complex.h>
+/*
+ * \brief Define commonly used mathematical constants
+ * \ingroup misc
+ *
+ * Mathematical constants are neither defined in the C standard
+ * nor the C++ standard. For -std=c{++}11 M_LOG2E and M_SQRT2 won't
+ * compile. GR_M_PI actually works with C++ but is defined here for the sake
+ * of consistency.
+ */
+#define GR_M_LOG2E 1.4426950408889634074 /* log_2 e */
+#define GR_M_PI 3.14159265358979323846 /* pi */
+#define GR_M_PI_4 0.78539816339744830961566084582 /* pi/4 */
+#define GR_M_TWOPI (2*GR_M_PI) /* 2*pi */
+#define GR_M_SQRT2 1.41421356237309504880 /* sqrt(2) */
+
+
namespace gr {
static inline bool
diff --git a/gnuradio-runtime/include/gnuradio/nco.h b/gnuradio-runtime/include/gnuradio/nco.h
index aff72068b9..e2256c3b70 100644
--- a/gnuradio-runtime/include/gnuradio/nco.h
+++ b/gnuradio-runtime/include/gnuradio/nco.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2002,2013 Free Software Foundation, Inc.
+ * Copyright 2002,2013,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -25,6 +25,8 @@
#include <gnuradio/sincos.h>
#include <gnuradio/gr_complex.h>
+#include <gnuradio/math.h>
+
#include <vector>
#include <cmath>
@@ -69,24 +71,24 @@ namespace gr {
void step()
{
phase += phase_inc;
- if(fabs(phase) > M_PI) {
- while(phase > M_PI)
- phase -= 2*M_PI;
+ if(fabs(phase) > GR_M_PI) {
+ while(phase > GR_M_PI)
+ phase -= 2*GR_M_PI;
- while(phase < -M_PI)
- phase += 2*M_PI;
+ while(phase < -GR_M_PI)
+ phase += 2*GR_M_PI;
}
}
void step(int n)
{
phase += phase_inc * n;
- if(fabs(phase) > M_PI){
- while(phase > M_PI)
- phase -= 2*M_PI;
+ if(fabs(phase) > GR_M_PI){
+ while(phase > GR_M_PI)
+ phase -= 2*GR_M_PI;
- while(phase < -M_PI)
- phase += 2*M_PI;
+ while(phase < -GR_M_PI)
+ phase += 2*GR_M_PI;
}
}
diff --git a/gnuradio-runtime/lib/math/qa_fxpt.cc b/gnuradio-runtime/lib/math/qa_fxpt.cc
index d3aadf85b1..5b045a69a1 100644
--- a/gnuradio-runtime/lib/math/qa_fxpt.cc
+++ b/gnuradio-runtime/lib/math/qa_fxpt.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2013 Free Software Foundation, Inc.
+ * Copyright 2004,2013,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -26,6 +26,7 @@
#include <qa_fxpt.h>
#include <gnuradio/fxpt.h>
+#include <gnuradio/math.h>
#include <cppunit/TestAssert.h>
#include <iostream>
#include <stdio.h>
@@ -37,9 +38,9 @@ static const float SIN_COS_TOLERANCE = 1e-5;
void
qa_fxpt::t0()
{
- CPPUNIT_ASSERT_DOUBLES_EQUAL(M_PI/2, gr::fxpt::fixed_to_float(0x40000000), SIN_COS_TOLERANCE);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(GR_M_PI/2, gr::fxpt::fixed_to_float(0x40000000), SIN_COS_TOLERANCE);
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, gr::fxpt::fixed_to_float(0x00000000), SIN_COS_TOLERANCE);
- CPPUNIT_ASSERT_DOUBLES_EQUAL(-M_PI, gr::fxpt::fixed_to_float(0x80000000), SIN_COS_TOLERANCE);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(-GR_M_PI, gr::fxpt::fixed_to_float(0x80000000), SIN_COS_TOLERANCE);
if(0) {
/*
@@ -51,9 +52,9 @@ qa_fxpt::t0()
* sometimes the answer is off by a few bits at the bottom.
* Hence, the disabled check.
*/
- CPPUNIT_ASSERT_EQUAL((int32_t)0x40000000, gr::fxpt::float_to_fixed(M_PI/2));
+ CPPUNIT_ASSERT_EQUAL((int32_t)0x40000000, gr::fxpt::float_to_fixed(GR_M_PI/2));
CPPUNIT_ASSERT_EQUAL((int32_t)0, gr::fxpt::float_to_fixed(0));
- CPPUNIT_ASSERT_EQUAL((int32_t)0x80000000, gr::fxpt::float_to_fixed(-M_PI));
+ CPPUNIT_ASSERT_EQUAL((int32_t)0x80000000, gr::fxpt::float_to_fixed(-GR_M_PI));
}
}
@@ -70,7 +71,7 @@ qa_fxpt::t1()
CPPUNIT_ASSERT_DOUBLES_EQUAL(-1, gr::fxpt::sin(-0x40000000), SIN_COS_TOLERANCE);
CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.707106781, gr::fxpt::sin(-0x20000000), SIN_COS_TOLERANCE);
- for(float p = -M_PI; p < M_PI; p += 2 * M_PI / 3600) {
+ for(float p = -GR_M_PI; p < GR_M_PI; p += 2 * GR_M_PI / 3600) {
float expected = sin(p);
float actual = gr::fxpt::sin(gr::fxpt::float_to_fixed (p));
CPPUNIT_ASSERT_DOUBLES_EQUAL(expected, actual, SIN_COS_TOLERANCE);
@@ -80,7 +81,7 @@ qa_fxpt::t1()
void
qa_fxpt::t2()
{
- for(float p = -M_PI; p < M_PI; p += 2 * M_PI / 3600) {
+ for(float p = -GR_M_PI; p < GR_M_PI; p += 2 * GR_M_PI / 3600) {
float expected = cos(p);
float actual = gr::fxpt::cos(gr::fxpt::float_to_fixed(p));
CPPUNIT_ASSERT_DOUBLES_EQUAL(expected, actual, SIN_COS_TOLERANCE);
@@ -90,7 +91,7 @@ qa_fxpt::t2()
void
qa_fxpt::t3()
{
- for(float p = -M_PI; p < M_PI; p += 2 * M_PI / 3600) {
+ for(float p = -GR_M_PI; p < GR_M_PI; p += 2 * GR_M_PI / 3600) {
float expected_sin = sin(p);
float expected_cos = cos(p);
float actual_sin;
diff --git a/gnuradio-runtime/lib/math/qa_fxpt_nco.cc b/gnuradio-runtime/lib/math/qa_fxpt_nco.cc
index 16ea120381..0b1ef16dd9 100644
--- a/gnuradio-runtime/lib/math/qa_fxpt_nco.cc
+++ b/gnuradio-runtime/lib/math/qa_fxpt_nco.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2013 Free Software Foundation, Inc.
+ * Copyright 2004,2013,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -27,6 +27,8 @@
#include <qa_fxpt_nco.h>
#include <gnuradio/fxpt_nco.h>
#include <gnuradio/nco.h>
+#include <gnuradio/math.h>
+
#include <cppunit/TestAssert.h>
#include <iostream>
#include <stdio.h>
@@ -52,8 +54,8 @@ qa_fxpt_nco::t0()
gr::fxpt_nco new_nco;
double max_error = 0, max_phase_error = 0;
- ref_nco.set_freq((float)(2 * M_PI / SIN_COS_FREQ));
- new_nco.set_freq((float)(2 * M_PI / SIN_COS_FREQ));
+ ref_nco.set_freq((float)(2 * GR_M_PI / SIN_COS_FREQ));
+ new_nco.set_freq((float)(2 * GR_M_PI / SIN_COS_FREQ));
CPPUNIT_ASSERT_DOUBLES_EQUAL(ref_nco.get_freq(), new_nco.get_freq(), SIN_COS_TOLERANCE);
@@ -90,8 +92,8 @@ qa_fxpt_nco::t1()
gr_complex* new_block = new gr_complex[SIN_COS_BLOCK_SIZE];
double max_error = 0;
- ref_nco.set_freq((float)(2 * M_PI / SIN_COS_FREQ));
- new_nco.set_freq((float)(2 * M_PI / SIN_COS_FREQ));
+ ref_nco.set_freq((float)(2 * GR_M_PI / SIN_COS_FREQ));
+ new_nco.set_freq((float)(2 * GR_M_PI / SIN_COS_FREQ));
CPPUNIT_ASSERT_DOUBLES_EQUAL(ref_nco.get_freq(), new_nco.get_freq(), SIN_COS_TOLERANCE);
diff --git a/gnuradio-runtime/lib/math/random.cc b/gnuradio-runtime/lib/math/random.cc
index 401ba89735..152db77b78 100644
--- a/gnuradio-runtime/lib/math/random.cc
+++ b/gnuradio-runtime/lib/math/random.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2002, 2015 Free Software Foundation, Inc.
+ * Copyright 2002,2015,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -39,8 +39,10 @@
#include <config.h>
#endif
-#include <math.h>
#include <gnuradio/random.h>
+#include <gnuradio/math.h>
+
+#include <cmath>
namespace gr {
@@ -151,7 +153,7 @@ namespace gr {
float
random::impulse(float factor = 5)
{
- float z = -M_SQRT2 * logf(ran1());
+ float z = -GR_M_SQRT2 * logf(ran1());
if(fabsf(z) <= factor)
return 0.0;
else
diff --git a/gnuradio-runtime/lib/math/vco.h b/gnuradio-runtime/lib/math/vco.h
index d8a6fbb415..7ac1e1ca6d 100644
--- a/gnuradio-runtime/lib/math/vco.h
+++ b/gnuradio-runtime/lib/math/vco.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2005,2013 Free Software Foundation, Inc.
+ * Copyright 2005,2013,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -25,6 +25,8 @@
#include <gnuradio/sincos.h>
#include <gnuradio/gr_complex.h>
+#include <gnuradio/math.h>
+
#include <vector>
#include <cmath>
@@ -49,13 +51,13 @@ namespace gr {
void adjust_phase(double delta_phase) {
d_phase += delta_phase;
- if(fabs (d_phase) > M_PI){
+ if(fabs (d_phase) > GR_M_PI){
- while(d_phase > M_PI)
- d_phase -= 2*M_PI;
+ while(d_phase > GR_M_PI)
+ d_phase -= 2*GR_M_PI;
- while(d_phase < -M_PI)
- d_phase += 2*M_PI;
+ while(d_phase < -GR_M_PI)
+ d_phase += 2*GR_M_PI;
}
}
diff --git a/gr-analog/lib/cpfsk_bc_impl.cc b/gr-analog/lib/cpfsk_bc_impl.cc
index 3c1674aaa4..01b3ae3ebd 100644
--- a/gr-analog/lib/cpfsk_bc_impl.cc
+++ b/gr-analog/lib/cpfsk_bc_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2008,2010,2012 Free Software Foundation, Inc.
+ * Copyright 2008,2010,2012,2018 Free Software Foundation, Inc.
*
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -25,12 +25,11 @@
#include "cpfsk_bc_impl.h"
#include <gnuradio/io_signature.h>
#include <gnuradio/expj.h>
+#include <gnuradio/math.h>
namespace gr {
namespace analog {
-#define M_TWOPI (2*M_PI)
-
cpfsk_bc::sptr
cpfsk_bc::make(float k, float ampl, int samples_per_sym)
{
@@ -45,7 +44,7 @@ namespace gr {
samples_per_sym)
{
d_samples_per_sym = samples_per_sym;
- d_freq = k*M_PI/samples_per_sym;
+ d_freq = k*GR_M_PI/samples_per_sym;
d_ampl = ampl;
d_phase = 0.0;
}
@@ -69,10 +68,10 @@ namespace gr {
else
d_phase -= d_freq;
- while(d_phase > M_TWOPI)
- d_phase -= M_TWOPI;
- while(d_phase < -M_TWOPI)
- d_phase += M_TWOPI;
+ while(d_phase > GR_M_TWOPI)
+ d_phase -= GR_M_TWOPI;
+ while(d_phase < -GR_M_TWOPI)
+ d_phase += GR_M_TWOPI;
*out++ = gr_expj(d_phase)*d_ampl;
}
diff --git a/gr-analog/lib/cpm.cc b/gr-analog/lib/cpm.cc
index ccac42cd0c..163588682d 100644
--- a/gr-analog/lib/cpm.cc
+++ b/gr-analog/lib/cpm.cc
@@ -25,17 +25,14 @@
#endif
#include <gnuradio/analog/cpm.h>
+#include <gnuradio/math.h>
+
#include <cmath>
#include <cfloat>
-
namespace gr {
namespace analog {
-#ifndef M_TWOPI
-# define M_TWOPI (2*M_PI)
-#endif
-
//! Normalised sinc function, sinc(x)=std::sin(pi*x)/pi*x
inline double
sinc(double x)
@@ -43,7 +40,7 @@ namespace gr {
if(x == 0) {
return 1.0;
}
- return std::sin(M_PI * x) / (M_PI * x);
+ return std::sin(GR_M_PI * x) / (GR_M_PI * x);
}
@@ -53,7 +50,7 @@ namespace gr {
{
std::vector<float> taps(samples_per_sym * L, 1.0/L/samples_per_sym);
for(unsigned i = 0; i < samples_per_sym * L; i++) {
- taps[i] *= 1 - std::cos(M_TWOPI * i / L / samples_per_sym);
+ taps[i] *= 1 - std::cos(GR_M_TWOPI * i / L / samples_per_sym);
}
return taps;
@@ -97,7 +94,7 @@ namespace gr {
}
else {
double tmp = 4.0 * beta * k / Ls;
- taps_d[i] *= std::cos(beta * M_TWOPI * k / Ls) / (1 - tmp * tmp);
+ taps_d[i] *= std::cos(beta * GR_M_TWOPI * k / Ls) / (1 - tmp * tmp);
}
sum += taps_d[i];
}
@@ -124,7 +121,7 @@ namespace gr {
}
const double pi2_24 = 0.411233516712057; // pi^2/24
- double f = M_PI * k / sps;
+ double f = GR_M_PI * k / sps;
return sinc(k/sps) - pi2_24 * (2 * std::sin(f) - 2*f*std::cos(f) - f*f*std::sin(f)) / (f*f*f);
}
diff --git a/gr-analog/lib/fmdet_cf_impl.cc b/gr-analog/lib/fmdet_cf_impl.cc
index 38496d189b..5151f027d4 100644
--- a/gr-analog/lib/fmdet_cf_impl.cc
+++ b/gr-analog/lib/fmdet_cf_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2008,2010,2012 Free Software Foundation, Inc.
+ * Copyright 2008,2010,2012,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -31,7 +31,7 @@
namespace gr {
namespace analog {
-#define M_TWOPI (2*M_PI)
+#define M_TWOPI (2*GR_M_PI)
fmdet_cf::sptr
fmdet_cf::make(float samplerate, float freq_low,
diff --git a/gr-analog/lib/frequency_modulator_fc_impl.cc b/gr-analog/lib/frequency_modulator_fc_impl.cc
index 56fa0f7c17..0c7f9873b1 100644
--- a/gr-analog/lib/frequency_modulator_fc_impl.cc
+++ b/gr-analog/lib/frequency_modulator_fc_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2010-2012 Free Software Foundation, Inc.
+ * Copyright 2004,2010-2012,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -27,6 +27,7 @@
#include "frequency_modulator_fc_impl.h"
#include <gnuradio/io_signature.h>
#include <gnuradio/fxpt.h>
+#include <gnuradio/math.h>
#include <cmath>
namespace gr {
@@ -63,7 +64,7 @@ namespace gr {
d_phase = d_phase + d_sensitivity * in[i];
//place phase in [-pi, +pi[
- #define F_PI ((float)(M_PI))
+ #define F_PI ((float)(GR_M_PI))
d_phase = std::fmod(d_phase + F_PI, 2.0f * F_PI) - F_PI;
float oi, oq;
diff --git a/gr-analog/lib/pll_carriertracking_cc_impl.cc b/gr-analog/lib/pll_carriertracking_cc_impl.cc
index 0cc3f8b8ec..bf8b219189 100644
--- a/gr-analog/lib/pll_carriertracking_cc_impl.cc
+++ b/gr-analog/lib/pll_carriertracking_cc_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2006,2010-2013 Free Software Foundation, Inc.
+ * Copyright 2006,2010-2013,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -27,16 +27,13 @@
#include "pll_carriertracking_cc_impl.h"
#include <gnuradio/io_signature.h>
#include <gnuradio/sincos.h>
-#include <math.h>
#include <gnuradio/math.h>
+#include <cmath>
+
namespace gr {
namespace analog {
-#ifndef M_TWOPI
-#define M_TWOPI (2.0f*M_PI)
-#endif
-
pll_carriertracking_cc::sptr
pll_carriertracking_cc::make(float loop_bw, float max_freq, float min_freq)
{
@@ -62,10 +59,10 @@ namespace gr {
float
pll_carriertracking_cc_impl::mod_2pi(float in)
{
- if(in>M_PI)
- return in-M_TWOPI;
- else if(in<-M_PI)
- return in+M_TWOPI;
+ if(in>GR_M_PI)
+ return in-GR_M_TWOPI;
+ else if(in<-GR_M_PI)
+ return in+GR_M_TWOPI;
else
return in;
}
diff --git a/gr-analog/lib/pll_freqdet_cf_impl.cc b/gr-analog/lib/pll_freqdet_cf_impl.cc
index 42caa0bfd5..46c9a9f954 100644
--- a/gr-analog/lib/pll_freqdet_cf_impl.cc
+++ b/gr-analog/lib/pll_freqdet_cf_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2010,2011 Free Software Foundation, Inc.
+ * Copyright 2004,2010,2011,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -26,16 +26,13 @@
#include "pll_freqdet_cf_impl.h"
#include <gnuradio/io_signature.h>
-#include <math.h>
#include <gnuradio/math.h>
+#include <cmath>
+
namespace gr {
namespace analog {
-#ifndef M_TWOPI
-#define M_TWOPI (2.0f*M_PI)
-#endif
-
pll_freqdet_cf::sptr
pll_freqdet_cf::make(float loop_bw, float max_freq, float min_freq)
{
@@ -58,10 +55,10 @@ namespace gr {
float
pll_freqdet_cf_impl::mod_2pi(float in)
{
- if(in > M_PI)
- return in - M_TWOPI;
- else if(in < -M_PI)
- return in + M_TWOPI;
+ if(in > GR_M_PI)
+ return in - GR_M_TWOPI;
+ else if(in < -GR_M_PI)
+ return in + GR_M_TWOPI;
else
return in;
}
diff --git a/gr-analog/lib/pll_refout_cc_impl.cc b/gr-analog/lib/pll_refout_cc_impl.cc
index 4822263a9c..4cf3574bc7 100644
--- a/gr-analog/lib/pll_refout_cc_impl.cc
+++ b/gr-analog/lib/pll_refout_cc_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2010-2013 Free Software Foundation, Inc.
+ * Copyright 2004,2010-2013,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -33,10 +33,6 @@
namespace gr {
namespace analog {
-#ifndef M_TWOPI
-#define M_TWOPI (2.0f*M_PI)
-#endif
-
pll_refout_cc::sptr
pll_refout_cc::make(float loop_bw, float max_freq, float min_freq)
{
@@ -59,10 +55,10 @@ namespace gr {
float
pll_refout_cc_impl::mod_2pi(float in)
{
- if(in > M_PI)
- return in - M_TWOPI;
- else if(in < -M_PI)
- return in+ M_TWOPI;
+ if(in > GR_M_PI)
+ return in - GR_M_TWOPI;
+ else if(in < -GR_M_PI)
+ return in+ GR_M_TWOPI;
else
return in;
}
diff --git a/gr-analog/lib/sig_source_X_impl.cc.t b/gr-analog/lib/sig_source_X_impl.cc.t
index 017177eae0..18a45f5801 100644
--- a/gr-analog/lib/sig_source_X_impl.cc.t
+++ b/gr-analog/lib/sig_source_X_impl.cc.t
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2010,2012 Free Software Foundation, Inc.
+ * Copyright 2004,2010,2012,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -27,11 +27,12 @@
#endif
#include "@IMPL_NAME@.h"
-#include <algorithm>
#include <gnuradio/io_signature.h>
+#include <gnuradio/gr_complex.h>
+#include <gnuradio/math.h>
+
#include <stdexcept>
#include <algorithm>
-#include <gnuradio/gr_complex.h>
namespace gr {
namespace analog {
@@ -125,11 +126,11 @@ namespace gr {
*/
case GR_SQR_WAVE:
for(int i = 0; i < noutput_items; i++) {
- if(d_nco.get_phase() < -1*M_PI/2)
+ if(d_nco.get_phase() < -1*GR_M_PI/2)
optr[i] = gr_complex(d_ampl, 0) + d_offset;
else if(d_nco.get_phase() < 0)
optr[i] = gr_complex(d_ampl, d_ampl) + d_offset;
- else if(d_nco.get_phase() < M_PI/2)
+ else if(d_nco.get_phase() < GR_M_PI/2)
optr[i] = gr_complex(0, d_ampl) + d_offset;
else
optr[i] = d_offset;
@@ -143,21 +144,21 @@ namespace gr {
*/
case GR_TRI_WAVE:
for(int i = 0; i < noutput_items; i++) {
- if(d_nco.get_phase() < -1*M_PI/2){
- optr[i] = gr_complex(d_ampl*d_nco.get_phase()/M_PI + d_ampl,
- -1*d_ampl*d_nco.get_phase()/M_PI - d_ampl/2) + d_offset;
+ if(d_nco.get_phase() < -1*GR_M_PI/2){
+ optr[i] = gr_complex(d_ampl*d_nco.get_phase()/GR_M_PI + d_ampl,
+ -1*d_ampl*d_nco.get_phase()/GR_M_PI - d_ampl/2) + d_offset;
}
else if(d_nco.get_phase() < 0) {
- optr[i] = gr_complex(d_ampl*d_nco.get_phase()/M_PI + d_ampl,
- d_ampl*d_nco.get_phase()/M_PI + d_ampl/2) + d_offset;
+ optr[i] = gr_complex(d_ampl*d_nco.get_phase()/GR_M_PI + d_ampl,
+ d_ampl*d_nco.get_phase()/GR_M_PI + d_ampl/2) + d_offset;
}
- else if(d_nco.get_phase() < M_PI/2) {
- optr[i] = gr_complex(-1*d_ampl*d_nco.get_phase()/M_PI + d_ampl,
- d_ampl*d_nco.get_phase()/M_PI + d_ampl/2) + d_offset;
+ else if(d_nco.get_phase() < GR_M_PI/2) {
+ optr[i] = gr_complex(-1*d_ampl*d_nco.get_phase()/GR_M_PI + d_ampl,
+ d_ampl*d_nco.get_phase()/GR_M_PI + d_ampl/2) + d_offset;
}
else {
- optr[i] = gr_complex(-1*d_ampl*d_nco.get_phase()/M_PI + d_ampl,
- -1*d_ampl*d_nco.get_phase()/M_PI + 3*d_ampl/2) + d_offset;
+ optr[i] = gr_complex(-1*d_ampl*d_nco.get_phase()/GR_M_PI + d_ampl,
+ -1*d_ampl*d_nco.get_phase()/GR_M_PI + 3*d_ampl/2) + d_offset;
}
d_nco.step();
}
@@ -168,13 +169,13 @@ namespace gr {
*/
case GR_SAW_WAVE:
for(int i = 0; i < noutput_items; i++) {
- if(d_nco.get_phase() < -1*M_PI/2) {
- optr[i] = gr_complex(d_ampl*d_nco.get_phase()/(2*M_PI) + d_ampl/2,
- d_ampl*d_nco.get_phase()/(2*M_PI) + 5*d_ampl/4) + d_offset;
+ if(d_nco.get_phase() < -1*GR_M_PI/2) {
+ optr[i] = gr_complex(d_ampl*d_nco.get_phase()/(2*GR_M_PI) + d_ampl/2,
+ d_ampl*d_nco.get_phase()/(2*GR_M_PI) + 5*d_ampl/4) + d_offset;
}
else {
- optr[i] = gr_complex(d_ampl*d_nco.get_phase()/(2*M_PI) + d_ampl/2,
- d_ampl*d_nco.get_phase()/(2*M_PI) + d_ampl/4) + d_offset;
+ optr[i] = gr_complex(d_ampl*d_nco.get_phase()/(2*GR_M_PI) + d_ampl/2,
+ d_ampl*d_nco.get_phase()/(2*GR_M_PI) + d_ampl/4) + d_offset;
}
d_nco.step();
}
@@ -222,7 +223,7 @@ namespace gr {
/* The triangle wave rises from -PI to 0 and falls from 0 to PI. */
case GR_TRI_WAVE:
for(int i = 0; i < noutput_items; i++) {
- double t = d_ampl*d_nco.get_phase()/M_PI;
+ double t = d_ampl*d_nco.get_phase()/GR_M_PI;
if (d_nco.get_phase() < 0)
optr[i] = static_cast<@TYPE@>(t + d_ampl + d_offset);
else
@@ -234,7 +235,7 @@ namespace gr {
/* The saw tooth wave rises from -PI to PI. */
case GR_SAW_WAVE:
for(int i = 0; i < noutput_items; i++) {
- t = static_cast<@TYPE@>(d_ampl*d_nco.get_phase()/(2*M_PI)
+ t = static_cast<@TYPE@>(d_ampl*d_nco.get_phase()/(2*GR_M_PI)
+ d_ampl/2 + d_offset);
optr[i] = t;
d_nco.step();
@@ -254,7 +255,7 @@ namespace gr {
@NAME@::set_sampling_freq(double sampling_freq)
{
d_sampling_freq = sampling_freq;
- d_nco.set_freq (2 * M_PI * d_frequency / d_sampling_freq);
+ d_nco.set_freq (2 * GR_M_PI * d_frequency / d_sampling_freq);
}
void
@@ -267,7 +268,7 @@ namespace gr {
@NAME@::set_frequency(double frequency)
{
d_frequency = frequency;
- d_nco.set_freq(2 * M_PI * d_frequency / d_sampling_freq);
+ d_nco.set_freq(2 * GR_M_PI * d_frequency / d_sampling_freq);
}
void
diff --git a/gr-analog/lib/squelch_base_cc_impl.cc b/gr-analog/lib/squelch_base_cc_impl.cc
index b5c153558b..0873d81acc 100644
--- a/gr-analog/lib/squelch_base_cc_impl.cc
+++ b/gr-analog/lib/squelch_base_cc_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2006,2012 Free Software Foundation, Inc.
+ * Copyright 2004,2006,2012,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -26,6 +26,7 @@
#include "squelch_base_cc_impl.h"
#include <gnuradio/io_signature.h>
+#include <gnuradio/math.h>
namespace gr {
namespace analog {
@@ -120,7 +121,7 @@ namespace gr {
break;
case ST_ATTACK:
- d_envelope = 0.5-std::cos(M_PI*(++d_ramped)/d_ramp)/2.0; // FIXME: precalculate window for speed
+ d_envelope = 0.5-std::cos(GR_M_PI*(++d_ramped)/d_ramp)/2.0; // FIXME: precalculate window for speed
if(d_ramped >= d_ramp) { // use >= in case d_ramp is set to lower value elsewhere
d_state = ST_UNMUTED;
d_tag_next_unmuted = true;
@@ -129,7 +130,7 @@ namespace gr {
break;
case ST_DECAY:
- d_envelope = 0.5-std::cos(M_PI*(--d_ramped)/d_ramp)/2.0; // FIXME: precalculate window for speed
+ d_envelope = 0.5-std::cos(GR_M_PI*(--d_ramped)/d_ramp)/2.0; // FIXME: precalculate window for speed
if(d_ramped == 0.0) {
d_state = ST_MUTED;
add_item_tag(0, nitems_written(0) + j, d_eob_key, pmt::PMT_NIL);
diff --git a/gr-analog/lib/squelch_base_ff_impl.cc b/gr-analog/lib/squelch_base_ff_impl.cc
index ea2d29bd97..2f164be363 100644
--- a/gr-analog/lib/squelch_base_ff_impl.cc
+++ b/gr-analog/lib/squelch_base_ff_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2006,2012 Free Software Foundation, Inc.
+ * Copyright 2004,2006,2012,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -26,6 +26,7 @@
#include "squelch_base_ff_impl.h"
#include <gnuradio/io_signature.h>
+#include <gnuradio/math.h>
#include <pmt/pmt.h>
namespace gr {
@@ -120,7 +121,7 @@ namespace gr {
case ST_ATTACK:
// FIXME: precalculate window for speed
- d_envelope = 0.5-std::cos(M_PI*(++d_ramped)/d_ramp)/2.0;
+ d_envelope = 0.5-std::cos(GR_M_PI*(++d_ramped)/d_ramp)/2.0;
// use >= in case d_ramp is set to lower value elsewhere
if(d_ramped >= d_ramp) {
@@ -132,7 +133,7 @@ namespace gr {
case ST_DECAY:
// FIXME: precalculate window for speed
- d_envelope = 0.5-std::cos(M_PI*(--d_ramped)/d_ramp)/2.0;
+ d_envelope = 0.5-std::cos(GR_M_PI*(--d_ramped)/d_ramp)/2.0;
if(d_ramped == 0.0) {
d_state = ST_MUTED;
add_item_tag(0, nitems_written(0) + j, d_eob_key, pmt::PMT_NIL);
diff --git a/gr-blocks/lib/control_loop.cc b/gr-blocks/lib/control_loop.cc
index 7104e7439e..30260b5646 100644
--- a/gr-blocks/lib/control_loop.cc
+++ b/gr-blocks/lib/control_loop.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2011,2013 Free Software Foundation, Inc.
+ * Copyright 2011,2013,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -31,7 +31,7 @@
namespace gr {
namespace blocks {
-#define M_TWOPI (2.0f*M_PI)
+#define M_TWOPI (2.0f*GR_M_PI)
control_loop::control_loop(float loop_bw,
float max_freq, float min_freq)
diff --git a/gr-blocks/lib/qa_rotator.cc b/gr-blocks/lib/qa_rotator.cc
index c63d150113..829d6e26eb 100644
--- a/gr-blocks/lib/qa_rotator.cc
+++ b/gr-blocks/lib/qa_rotator.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2002,2013 Free Software Foundation, Inc.
+ * Copyright 2002,2013,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -24,13 +24,16 @@
#include <config.h>
#endif
+#include <qa_rotator.h>
+
#include <gnuradio/attributes.h>
#include <cppunit/TestAssert.h>
-#include <qa_rotator.h>
#include <gnuradio/blocks/rotator.h>
-#include <stdio.h>
-#include <cmath>
#include <gnuradio/expj.h>
+#include <gnuradio/math.h>
+
+#include <cstdio>
+#include <cmath>
// error vector magnitude
__GR_ATTR_UNUSED static float
@@ -46,7 +49,7 @@ qa_rotator::t1()
gr::blocks::rotator r;
- double phase_incr = 2*M_PI / 1003;
+ double phase_incr = 2*GR_M_PI / 1003;
double phase = 0;
// Old code: We increment then return the rotated value, thus we
@@ -69,8 +72,8 @@ qa_rotator::t1()
CPPUNIT_ASSERT_COMPLEXES_EQUAL(expected, actual, 0.0001);
phase += phase_incr;
- if(phase >= 2*M_PI)
- phase -= 2*M_PI;
+ if(phase >= 2*GR_M_PI)
+ phase -= 2*GR_M_PI;
}
}
@@ -83,7 +86,7 @@ qa_rotator::t2()
gr_complex *input = new gr_complex[N];
gr_complex *output = new gr_complex[N];
- double phase_incr = 2*M_PI / 1003;
+ double phase_incr = 2*GR_M_PI / 1003;
double phase = 0;
r.set_phase(gr_complex(1,0));
@@ -110,8 +113,8 @@ qa_rotator::t2()
CPPUNIT_ASSERT_COMPLEXES_EQUAL(expected, actual, 0.0001);
phase += phase_incr;
- if(phase >= 2*M_PI)
- phase -= 2*M_PI;
+ if(phase >= 2*GR_M_PI)
+ phase -= 2*GR_M_PI;
}
delete[] output;
diff --git a/gr-blocks/tests/benchmark_nco.cc b/gr-blocks/tests/benchmark_nco.cc
index a71d6f3b4d..ac172bf79d 100644
--- a/gr-blocks/tests/benchmark_nco.cc
+++ b/gr-blocks/tests/benchmark_nco.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2002,2004,2013 Free Software Foundation, Inc.
+ * Copyright 2002,2004,2013,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -24,18 +24,20 @@
#include "config.h"
#endif
-#include <stdio.h>
-#include <stdlib.h>
+#include <gnuradio/nco.h>
+#include <gnuradio/fxpt_nco.h>
+#include <gnuradio/math.h>
+
#include <sys/time.h>
+#include <unistd.h>
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
-#include <unistd.h>
-#include <gnuradio/nco.h>
-#include <gnuradio/fxpt_nco.h>
-#include <string.h>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#define ITERATIONS 20000000
#define BLOCK_SIZE (10 * 1000) // fits in cache
@@ -114,7 +116,7 @@ void basic_sincos_vec(float *x, float *y)
{
gr::blocks::nco<float,float> nco;
- nco.set_freq(2 * M_PI / FREQ);
+ nco.set_freq(2 * GR_M_PI / FREQ);
for(int i = 0; i < ITERATIONS/BLOCK_SIZE; i++) {
for(int j = 0; j < BLOCK_SIZE; j++) {
@@ -128,7 +130,7 @@ void native_sincos_vec(float *x, float *y)
{
gr::blocks::nco<float,float> nco;
- nco.set_freq(2 * M_PI / FREQ);
+ nco.set_freq(2 * GR_M_PI / FREQ);
for(int i = 0; i < ITERATIONS/BLOCK_SIZE; i++) {
nco.sincos((gr_complex*)x, BLOCK_SIZE);
@@ -139,7 +141,7 @@ void fxpt_sincos_vec(float *x, float *y)
{
gr::blocks::fxpt_nco nco;
- nco.set_freq (2 * M_PI / FREQ);
+ nco.set_freq (2 * GR_M_PI / FREQ);
for(int i = 0; i < ITERATIONS/BLOCK_SIZE; i++) {
nco.sincos((gr_complex*)x, BLOCK_SIZE);
@@ -152,7 +154,7 @@ void native_sincos(float *x, float *y)
{
gr::blocks::nco<float,float> nco;
- nco.set_freq(2 * M_PI / FREQ);
+ nco.set_freq(2 * GR_M_PI / FREQ);
for(int i = 0; i < ITERATIONS; i++) {
nco.sincos(x, y);
@@ -164,7 +166,7 @@ void fxpt_sincos(float *x, float *y)
{
gr::blocks::fxpt_nco nco;
- nco.set_freq(2 * M_PI / FREQ);
+ nco.set_freq(2 * GR_M_PI / FREQ);
for(int i = 0; i < ITERATIONS; i++) {
nco.sincos(x, y);
@@ -178,7 +180,7 @@ void native_sin(float *x, float *y)
{
gr::blocks::nco<float,float> nco;
- nco.set_freq(2 * M_PI / FREQ);
+ nco.set_freq(2 * GR_M_PI / FREQ);
for(int i = 0; i < ITERATIONS; i++) {
*x = nco.sin();
@@ -190,7 +192,7 @@ void fxpt_sin(float *x, float *y)
{
gr::blocks::fxpt_nco nco;
- nco.set_freq(2 * M_PI / FREQ);
+ nco.set_freq(2 * GR_M_PI / FREQ);
for(int i = 0; i < ITERATIONS; i++) {
*x = nco.sin();
diff --git a/gr-blocks/tests/benchmark_vco.cc b/gr-blocks/tests/benchmark_vco.cc
index a5eb19a416..5c5aad30fc 100644
--- a/gr-blocks/tests/benchmark_vco.cc
+++ b/gr-blocks/tests/benchmark_vco.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2002,2004,2005,2013 Free Software Foundation, Inc.
+ * Copyright 2002,2004,2005,2013,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -24,18 +24,20 @@
#include "config.h"
#endif
-#include <stdio.h>
-#include <stdlib.h>
+#include <gnuradio/vco.h>
+#include <gnuradio/fxpt_vco.h>
+#include <gnuradio/math.h>
+
#include <sys/time.h>
+#include <unistd.h>
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
-#include <unistd.h>
-#include <gnuradio/vco.h>
-#include <gnuradio/fxpt_vco.h>
-#include <string.h>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#define ITERATIONS 5000000
#define BLOCK_SIZE (10 * 1000) // fits in cache
@@ -122,11 +124,11 @@ void basic_vco(float *output, const float *input)
output[i] = cos(phase) * AMPLITUDE;
phase += input[i] * K;
- while(phase > 2 * M_PI)
- phase -= 2 * M_PI;
+ while(phase > 2 * GR_M_PI)
+ phase -= 2 * GR_M_PI;
- while(phase < -2 * M_PI)
- phase += 2 * M_PI;
+ while(phase < -2 * GR_M_PI)
+ phase += 2 * GR_M_PI;
}
}
}
diff --git a/gr-channels/lib/cfo_model_impl.cc b/gr-channels/lib/cfo_model_impl.cc
index 81d2c59fb1..8b3d069323 100644
--- a/gr-channels/lib/cfo_model_impl.cc
+++ b/gr-channels/lib/cfo_model_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2009,2012 Free Software Foundation, Inc.
+ * Copyright 2009,2012,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -22,6 +22,7 @@
#include "cfo_model_impl.h"
#include <gnuradio/io_signature.h>
+#include <gnuradio/math.h>
#include <iostream>
namespace gr {
@@ -77,9 +78,9 @@ namespace gr {
d_cfo = std::min( d_cfo, d_max_dev_hz );
d_cfo = std::max( d_cfo, -d_max_dev_hz );
// update and wrap angle
- d_angle += 2*M_PI*d_cfo/d_samp_rate;
- d_angle = d_angle > 2*M_PI ? d_angle - 2*M_PI : d_angle;
- d_angle = d_angle < -2*M_PI ? d_angle + 2*M_PI : d_angle;
+ d_angle += 2*GR_M_PI*d_cfo/d_samp_rate;
+ d_angle = d_angle > 2*GR_M_PI ? d_angle - 2*GR_M_PI : d_angle;
+ d_angle = d_angle < -2*GR_M_PI ? d_angle + 2*GR_M_PI : d_angle;
out[i] = in[i] * gr_complex(d_table.cos(d_angle), d_table.sin(d_angle));
}
return noutput_items;
diff --git a/gr-channels/lib/channel_model2_impl.cc b/gr-channels/lib/channel_model2_impl.cc
index 59524fb83a..d548244ea0 100644
--- a/gr-channels/lib/channel_model2_impl.cc
+++ b/gr-channels/lib/channel_model2_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2009,2012,2013 Free Software Foundation, Inc.
+ * Copyright 2009,2012,2013,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -20,10 +20,9 @@
* Boston, MA 02110-1301, USA.
*/
- #define _USE_MATH_DEFINES
-
#include "channel_model2_impl.h"
#include <gnuradio/io_signature.h>
+#include <gnuradio/math.h>
#include <iostream>
namespace gr {
@@ -66,7 +65,7 @@ namespace gr {
d_noise_adder = blocks::add_cc::make();
d_noise = analog::fastnoise_source_c::make(analog::GR_GAUSSIAN,
noise_voltage, noise_seed);
- d_freq_gen = blocks::vco_c::make(1.0, 2*M_PI, 1.0);
+ d_freq_gen = blocks::vco_c::make(1.0, 2*GR_M_PI, 1.0);
d_mixer_offset = blocks::multiply_cc::make();
diff --git a/gr-channels/lib/flat_fader_impl.cc b/gr-channels/lib/flat_fader_impl.cc
index 47834175f3..ee84d8b7b9 100644
--- a/gr-channels/lib/flat_fader_impl.cc
+++ b/gr-channels/lib/flat_fader_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2016 Free Software Foundation, Inc.
+ * Copyright 2016,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -21,13 +21,14 @@
*/
#include <flat_fader_impl.h>
+#include <gnuradio/math.h>
namespace gr {
namespace channels {
flat_fader_impl::flat_fader_impl(unsigned int N, float fDTs, bool LOS, float K, int seed ) :
seed_1((int)seed),
- dist_1(-M_PI, M_PI),
+ dist_1(-GR_M_PI, GR_M_PI),
rv_1( seed_1, dist_1 ), // U(-pi,pi)
seed_2((int)seed+1),
@@ -75,16 +76,16 @@ namespace gr {
for(int i = 0; i < n_samples; i++){
gr_complex H(0,0);
for(int n=1; n<d_N+1; n++){
- float alpha_n = (2*M_PI*n - M_PI + d_theta)/(4*d_N);
- d_psi[n] = fmod(d_psi[n] + 2*M_PI*d_fDTs*_GRFASTCOS(alpha_n), 2*M_PI);
- d_phi[n] = fmod(d_phi[n] + 2*M_PI*d_fDTs*_GRFASTCOS(alpha_n), 2*M_PI);
+ float alpha_n = (2*GR_M_PI*n - GR_M_PI + d_theta)/(4*d_N);
+ d_psi[n] = fmod(d_psi[n] + 2*GR_M_PI*d_fDTs*_GRFASTCOS(alpha_n), 2*GR_M_PI);
+ d_phi[n] = fmod(d_phi[n] + 2*GR_M_PI*d_fDTs*_GRFASTCOS(alpha_n), 2*GR_M_PI);
float s_i = scale_sin*_GRFASTCOS(d_psi[n]);
float s_q = scale_sin*_GRFASTSIN(d_phi[n]);
H += gr_complex(s_i, s_q);
}
if(d_LOS){
- d_psi[0] = fmod(d_psi[0] + 2*M_PI*d_fDTs*_GRFASTCOS(d_theta_los), 2*M_PI);
+ d_psi[0] = fmod(d_psi[0] + 2*GR_M_PI*d_fDTs*_GRFASTCOS(d_theta_los), 2*GR_M_PI);
float los_i = scale_los*_GRFASTCOS(d_psi[0]);
float los_q = scale_los*_GRFASTSIN(d_psi[0]);
H = H*scale_nlos + gr_complex(los_i,los_q);
@@ -105,10 +106,10 @@ namespace gr {
void flat_fader_impl::update_theta()
{
d_theta += (d_step*rv_2());
- if(d_theta > M_PI){
- d_theta = M_PI; d_step = -d_step;
- } else if(d_theta < -M_PI){
- d_theta = -M_PI; d_step = -d_step;
+ if(d_theta > GR_M_PI){
+ d_theta = GR_M_PI; d_step = -d_step;
+ } else if(d_theta < -GR_M_PI){
+ d_theta = -GR_M_PI; d_step = -d_step;
}
}
diff --git a/gr-channels/lib/selective_fading_model2_impl.cc b/gr-channels/lib/selective_fading_model2_impl.cc
index c9b9d62b1b..a311a837d8 100644
--- a/gr-channels/lib/selective_fading_model2_impl.cc
+++ b/gr-channels/lib/selective_fading_model2_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2013 Free Software Foundation, Inc.
+ * Copyright 2013,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -21,14 +21,16 @@
*/
#include "selective_fading_model2_impl.h"
+#include <sincostable.h>
+
#include <gnuradio/io_signature.h>
-#include <iostream>
+#include <gnuradio/fxpt.h>
+#include <gnuradio/math.h>
#include <boost/format.hpp>
#include <boost/random.hpp>
-#include <gnuradio/fxpt.h>
-#include <sincostable.h>
+#include <iostream>
// FASTSINCOS: 0 = slow native, 1 = gr::fxpt impl, 2 = sincostable.h
@@ -124,7 +126,7 @@ namespace gr {
//gr_complex ff_H(d_faders[j]->next_sample());
for(size_t k=0; k<d_taps.size(); k++){
float dist = k-d_delays[j];
- float interpmag = d_sintable.sinc(2*M_PI*dist);
+ float interpmag = d_sintable.sinc(2*GR_M_PI*dist);
d_taps[k] += ff_H * interpmag * d_mags[j];
}
}
diff --git a/gr-channels/lib/selective_fading_model_impl.cc b/gr-channels/lib/selective_fading_model_impl.cc
index be9c0b1f3a..3a6285f0c8 100644
--- a/gr-channels/lib/selective_fading_model_impl.cc
+++ b/gr-channels/lib/selective_fading_model_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2013 Free Software Foundation, Inc.
+ * Copyright 2013,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -21,14 +21,16 @@
*/
#include "selective_fading_model_impl.h"
+#include <sincostable.h>
+
#include <gnuradio/io_signature.h>
-#include <iostream>
+#include <gnuradio/fxpt.h>
+#include <gnuradio/math.h>
#include <boost/format.hpp>
#include <boost/random.hpp>
-#include <gnuradio/fxpt.h>
-#include <sincostable.h>
+#include <iostream>
// FASTSINCOS: 0 = slow native, 1 = gr::fxpt impl, 2 = sincostable.h
@@ -103,7 +105,7 @@ namespace gr {
//gr_complex ff_H(d_faders[j]->next_sample());
for(size_t k=0; k<d_taps.size(); k++){
float dist = k-d_delays[j];
- float interpmag = d_sintable.sinc(2*M_PI*dist);
+ float interpmag = d_sintable.sinc(2*GR_M_PI*dist);
d_taps[k] += ff_H * interpmag * d_mags[j];
}
}
diff --git a/gr-channels/lib/sincostable.h b/gr-channels/lib/sincostable.h
index 2a5adb6f4c..6ae857412e 100644
--- a/gr-channels/lib/sincostable.h
+++ b/gr-channels/lib/sincostable.h
@@ -1,8 +1,8 @@
#ifndef SINCOSTABLE_H
#define SINCOSTABLE_H
-#define _USE_MATH_DEFINES
-#include <math.h>
+#include <gnuradio/math.h>
+#include <cmath>
class sincostable {
std::vector<float> d_cos;
@@ -12,10 +12,10 @@ class sincostable {
sincostable(size_t tbl_size) :
d_cos(tbl_size,1),
d_sz(tbl_size),
- d_scale(tbl_size/(M_PI*2))
+ d_scale(tbl_size/(GR_M_PI*2))
{
for(size_t i=0; i<tbl_size; i++){
- d_cos[i] = ::cos(2*M_PI*i/tbl_size);
+ d_cos[i] = ::cos(2*GR_M_PI*i/tbl_size);
}
}
const float sin(float x){
diff --git a/gr-digital/lib/constellation.cc b/gr-digital/lib/constellation.cc
index a09a9e5fb9..cf7039b313 100644
--- a/gr-digital/lib/constellation.cc
+++ b/gr-digital/lib/constellation.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2010-2012,2014 Free Software Foundation, Inc.
+ * Copyright 2010-2012,2014,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -28,18 +28,17 @@
#include <gnuradio/digital/constellation.h>
#include <gnuradio/math.h>
#include <gnuradio/gr_complex.h>
+
+#include <boost/format.hpp>
+
#include <cstdlib>
#include <cfloat>
#include <stdexcept>
-#include <boost/format.hpp>
#include <iostream>
namespace gr {
namespace digital {
-#define M_TWOPI (2*M_PI)
-#define SQRT_TWO 0.707107
-
// Base Constellation Class
constellation::constellation(std::vector<gr_complex> constell,
std::vector<int> pre_diff_code,
@@ -624,7 +623,7 @@ namespace gr {
constellation_psk::get_sector(const gr_complex *sample)
{
float phase = arg(*sample);
- float width = M_TWOPI / n_sectors;
+ float width = GR_M_TWOPI / n_sectors;
int sector = floor(phase/width + 0.5);
if(sector < 0)
sector += n_sectors;
@@ -634,7 +633,7 @@ namespace gr {
unsigned int
constellation_psk::calc_sector_value(unsigned int sector)
{
- float phase = sector * M_TWOPI / n_sectors;
+ float phase = sector * GR_M_TWOPI / n_sectors;
gr_complex sector_center = gr_complex(cos(phase), sin(phase));
unsigned int closest_point = get_closest_point(&sector_center);
return closest_point;
@@ -684,16 +683,16 @@ namespace gr {
{
d_constellation.resize(4);
// Gray-coded
- d_constellation[0] = gr_complex(-SQRT_TWO, -SQRT_TWO);
- d_constellation[1] = gr_complex(SQRT_TWO, -SQRT_TWO);
- d_constellation[2] = gr_complex(-SQRT_TWO, SQRT_TWO);
- d_constellation[3] = gr_complex(SQRT_TWO, SQRT_TWO);
+ d_constellation[0] = gr_complex(-GR_M_SQRT2, -GR_M_SQRT2);
+ d_constellation[1] = gr_complex(GR_M_SQRT2, -GR_M_SQRT2);
+ d_constellation[2] = gr_complex(-GR_M_SQRT2, GR_M_SQRT2);
+ d_constellation[3] = gr_complex(GR_M_SQRT2, GR_M_SQRT2);
/*
- d_constellation[0] = gr_complex(SQRT_TWO, SQRT_TWO);
- d_constellation[1] = gr_complex(-SQRT_TWO, SQRT_TWO);
- d_constellation[2] = gr_complex(SQRT_TWO, -SQRT_TWO);
- d_constellation[3] = gr_complex(SQRT_TWO, -SQRT_TWO);
+ d_constellation[0] = gr_complex(GR_M_SQRT2, GR_M_SQRT2);
+ d_constellation[1] = gr_complex(-GR_M_SQRT2, GR_M_SQRT2);
+ d_constellation[2] = gr_complex(GR_M_SQRT2, -GR_M_SQRT2);
+ d_constellation[3] = gr_complex(GR_M_SQRT2, -GR_M_SQRT2);
*/
d_pre_diff_code.resize(4);
@@ -752,10 +751,10 @@ namespace gr {
// us to use differential encodings (through diff_encode and
// diff_decode) on the symbols.
d_constellation.resize(4);
- d_constellation[0] = gr_complex(+SQRT_TWO, +SQRT_TWO);
- d_constellation[1] = gr_complex(-SQRT_TWO, +SQRT_TWO);
- d_constellation[2] = gr_complex(-SQRT_TWO, -SQRT_TWO);
- d_constellation[3] = gr_complex(+SQRT_TWO, -SQRT_TWO);
+ d_constellation[0] = gr_complex(+GR_M_SQRT2, +GR_M_SQRT2);
+ d_constellation[1] = gr_complex(-GR_M_SQRT2, +GR_M_SQRT2);
+ d_constellation[2] = gr_complex(-GR_M_SQRT2, -GR_M_SQRT2);
+ d_constellation[3] = gr_complex(+GR_M_SQRT2, -GR_M_SQRT2);
// Use this mapping to convert to gray code before diff enc.
d_pre_diff_code.resize(4);
@@ -808,7 +807,7 @@ namespace gr {
constellation_8psk::constellation_8psk()
{
- float angle = M_PI/8.0;
+ float angle = GR_M_PI/8.0;
d_constellation.resize(8);
// Gray-coded
d_constellation[0] = gr_complex(cos( 1*angle), sin( 1*angle));
@@ -858,7 +857,7 @@ namespace gr {
constellation_8psk_natural::constellation_8psk_natural()
{
- float angle = M_PI/8.0;
+ float angle = GR_M_PI/8.0;
d_constellation.resize(8);
// Natural-mapping
d_constellation[0] = gr_complex(cos( 15*angle), sin( 15*angle));
diff --git a/gr-digital/lib/constellation_receiver_cb_impl.cc b/gr-digital/lib/constellation_receiver_cb_impl.cc
index 97c4d8389a..a8911e8a17 100644
--- a/gr-digital/lib/constellation_receiver_cb_impl.cc
+++ b/gr-digital/lib/constellation_receiver_cb_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2011,2012,2013 Free Software Foundation, Inc.
+ * Copyright 2011,2012,2013,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -34,7 +34,6 @@
namespace gr {
namespace digital {
-#define M_TWOPI (2*M_PI)
#define VERBOSE_MM 0 // Used for debugging symbol timing loop
#define VERBOSE_COSTAS 0 // Used for debugging phase and frequency tracking
diff --git a/gr-digital/lib/constellation_receiver_cb_impl.h b/gr-digital/lib/constellation_receiver_cb_impl.h
index 398d74004c..b07f2ff8f5 100644
--- a/gr-digital/lib/constellation_receiver_cb_impl.h
+++ b/gr-digital/lib/constellation_receiver_cb_impl.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2011,2012 Free Software Foundation, Inc.
+ * Copyright 2011,2012,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -26,6 +26,7 @@
#include <gnuradio/digital/constellation_receiver_cb.h>
#include <gnuradio/attributes.h>
#include <gnuradio/gr_complex.h>
+#include <gnuradio/math.h>
namespace gr {
namespace digital {
@@ -68,7 +69,7 @@ namespace gr {
* Message handler port to update the phase of the rotator. The
* phase should be a real number (float or double) that is added
* to the current phase. So we can rotate the constellation by
- * 90 degress by passing a value of pmt::from_double(M_PI/2).
+ * 90 degress by passing a value of pmt::from_double(GR_M_PI/2).
*/
void handle_rotate_phase(pmt::pmt_t rotation);
diff --git a/gr-digital/lib/cpmmod_bc_impl.cc b/gr-digital/lib/cpmmod_bc_impl.cc
index 4b2457f90e..915881b09f 100644
--- a/gr-digital/lib/cpmmod_bc_impl.cc
+++ b/gr-digital/lib/cpmmod_bc_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2010,2012 Free Software Foundation, Inc.
+ * Copyright 2010,2012,2018 Free Software Foundation, Inc.
*
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,6 +24,7 @@
#include "cpmmod_bc_impl.h"
#include <gnuradio/io_signature.h>
+#include <gnuradio/math.h>
namespace gr {
namespace digital {
@@ -62,7 +63,7 @@ namespace gr {
d_taps(analog::cpm::phase_response(type, samples_per_sym, L, beta)),
d_char_to_float(blocks::char_to_float::make()),
d_pulse_shaper(filter::interp_fir_filter_fff::make(samples_per_sym, d_taps)),
- d_fm(analog::frequency_modulator_fc::make(M_PI * h))
+ d_fm(analog::frequency_modulator_fc::make(GR_M_PI * h))
{
switch(type) {
case analog::cpm::LRC:
diff --git a/gr-digital/lib/ofdm_cyclic_prefixer_impl.cc b/gr-digital/lib/ofdm_cyclic_prefixer_impl.cc
index 9db7273e26..205c2b044c 100644
--- a/gr-digital/lib/ofdm_cyclic_prefixer_impl.cc
+++ b/gr-digital/lib/ofdm_cyclic_prefixer_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2013 Free Software Foundation, Inc.
+ * Copyright 2013,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -24,8 +24,9 @@
#include "config.h"
#endif
-#include <gnuradio/io_signature.h>
#include "ofdm_cyclic_prefixer_impl.h"
+#include <gnuradio/io_signature.h>
+#include <gnuradio/math.h>
namespace gr {
namespace digital {
@@ -64,8 +65,8 @@ namespace gr {
// The actual flanks are one sample shorter than d_rolloff_len, because the
// first sample of the up- and down flank is always zero and one, respectively
for (int i = 1; i < d_rolloff_len; i++) {
- d_up_flank[i-1] = 0.5 * (1 + cos(M_PI * i/rolloff_len - M_PI));
- d_down_flank[i-1] = 0.5 * (1 + cos(M_PI * (rolloff_len-i)/rolloff_len - M_PI));
+ d_up_flank[i-1] = 0.5 * (1 + cos(GR_M_PI * i/rolloff_len - GR_M_PI));
+ d_down_flank[i-1] = 0.5 * (1 + cos(GR_M_PI * (rolloff_len-i)/rolloff_len - GR_M_PI));
}
}
diff --git a/gr-digital/lib/ofdm_frame_acquisition_impl.cc b/gr-digital/lib/ofdm_frame_acquisition_impl.cc
index 02b587c1de..0f44650fe0 100644
--- a/gr-digital/lib/ofdm_frame_acquisition_impl.cc
+++ b/gr-digital/lib/ofdm_frame_acquisition_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2006-2008,2010,2011 Free Software Foundation, Inc.
+ * Copyright 2006-2008,2010,2011,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -34,7 +34,6 @@ namespace gr {
namespace digital {
#define VERBOSE 0
-#define M_TWOPI (2*M_PI)
#define MAX_NUM_SYMBOLS 1000
ofdm_frame_acquisition::sptr
@@ -81,7 +80,7 @@ namespace gr {
d_phase_lut = new gr_complex[(2*d_freq_shift_len+1) * MAX_NUM_SYMBOLS];
for(i = 0; i <= 2*d_freq_shift_len; i++) {
for(j = 0; j < MAX_NUM_SYMBOLS; j++) {
- d_phase_lut[j + i*MAX_NUM_SYMBOLS] = gr_expj(-M_TWOPI*d_cplen/d_fft_length*(i-d_freq_shift_len)*j);
+ d_phase_lut[j + i*MAX_NUM_SYMBOLS] = gr_expj(-GR_M_TWOPI*d_cplen/d_fft_length*(i-d_freq_shift_len)*j);
}
}
}
@@ -102,10 +101,10 @@ namespace gr {
gr_complex
ofdm_frame_acquisition_impl::coarse_freq_comp(int freq_delta, int symbol_count)
{
- // return gr_complex(cos(-M_TWOPI*freq_delta*d_cplen/d_fft_length*symbol_count),
- // sin(-M_TWOPI*freq_delta*d_cplen/d_fft_length*symbol_count));
+ // return gr_complex(cos(-GR_M_TWOPI*freq_delta*d_cplen/d_fft_length*symbol_count),
+ // sin(-GR_M_TWOPI*freq_delta*d_cplen/d_fft_length*symbol_count));
- return gr_expj(-M_TWOPI*freq_delta*d_cplen/d_fft_length*symbol_count);
+ return gr_expj(-GR_M_TWOPI*freq_delta*d_cplen/d_fft_length*symbol_count);
//return d_phase_lut[MAX_NUM_SYMBOLS * (d_freq_shift_len + freq_delta) + symbol_count];
}
diff --git a/gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.cc b/gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.cc
index 1b0dee4055..2463c31157 100644
--- a/gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.cc
+++ b/gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.cc
@@ -1,5 +1,5 @@
/* -*- c++ -*- */
-/* Copyright 2012 Free Software Foundation, Inc.
+/* Copyright 2012,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -23,11 +23,10 @@
#include "config.h"
#endif
-#include <gnuradio/expj.h>
-#include <gnuradio/io_signature.h>
#include "ofdm_frame_equalizer_vcvc_impl.h"
-
-#define M_TWOPI (2*M_PI)
+#include <gnuradio/io_signature.h>
+#include <gnuradio/expj.h>
+#include <gnuradio/math.h>
static const pmt::pmt_t CARR_OFFSET_KEY = pmt::mp("ofdm_sync_carr_offset");
static const pmt::pmt_t CHAN_TAPS_KEY = pmt::mp("ofdm_sync_chan_taps");
@@ -146,7 +145,7 @@ namespace gr {
// Correct the frequency shift on the symbols
gr_complex phase_correction;
for (int i = 0; i < frame_len; i++) {
- phase_correction = gr_expj(-M_TWOPI * carrier_offset * d_cp_len / d_fft_len * (i+1));
+ phase_correction = gr_expj(-GR_M_TWOPI * carrier_offset * d_cp_len / d_fft_len * (i+1));
for (int k = 0; k < d_fft_len; k++) {
out[i*d_fft_len+k] *= phase_correction;
}
@@ -158,7 +157,7 @@ namespace gr {
d_eq->get_channel_state(d_channel_state);
// Update the channel state regarding the frequency offset
- phase_correction = gr_expj(M_TWOPI * carrier_offset * d_cp_len / d_fft_len * frame_len);
+ phase_correction = gr_expj(GR_M_TWOPI * carrier_offset * d_cp_len / d_fft_len * frame_len);
for (int k = 0; k < d_fft_len; k++) {
d_channel_state[k] *= phase_correction;
}
diff --git a/gr-digital/lib/ofdm_frame_sink_impl.cc b/gr-digital/lib/ofdm_frame_sink_impl.cc
index 2493667255..b00646f935 100644
--- a/gr-digital/lib/ofdm_frame_sink_impl.cc
+++ b/gr-digital/lib/ofdm_frame_sink_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2007,2008,2010-2012 Free Software Foundation, Inc.
+ * Copyright 2007,2008,2010-2012,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -171,10 +171,10 @@ namespace gr {
d_freq = d_freq - d_freq_gain*angle;
d_phase = d_phase + d_freq - d_phase_gain*angle;
- if(d_phase >= 2*M_PI)
- d_phase -= 2*M_PI;
+ if(d_phase >= 2*GR_M_PI)
+ d_phase -= 2*GR_M_PI;
if(d_phase <0)
- d_phase += 2*M_PI;
+ d_phase += 2*GR_M_PI;
//if(VERBOSE)
// std::cerr << angle << "\t" << d_freq << "\t" << d_phase << "\t" << std::endl;
diff --git a/gr-dtv/lib/atsc/atsc_fpll_impl.cc b/gr-dtv/lib/atsc/atsc_fpll_impl.cc
index 2015e350ef..a552004972 100644
--- a/gr-dtv/lib/atsc/atsc_fpll_impl.cc
+++ b/gr-dtv/lib/atsc/atsc_fpll_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2014 Free Software Foundation, Inc.
+ * Copyright 2014,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -45,7 +45,7 @@ namespace gr {
io_signature::make(1, 1, sizeof(float)))
{
d_afc.set_taps(1.0-exp(-1.0/rate/5e-6));
- d_nco.set_freq((-3e6 + 0.309e6)/rate*2*M_PI);
+ d_nco.set_freq((-3e6 + 0.309e6)/rate*2*GR_M_PI);
d_nco.set_phase(0.0);
}
@@ -76,7 +76,7 @@ namespace gr {
float x = gr::fast_atan2f(filtered.imag(), filtered.real());
// avoid slamming filter with big transitions
- static const float limit = M_PI/2.0;
+ static const float limit = GR_M_PI/2.0;
if (x > limit)
x = limit;
else if (x < -limit)
diff --git a/gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.cc b/gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.cc
index 4ceefa1503..e40e602494 100644
--- a/gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.cc
+++ b/gr-dtv/lib/dvbs2/dvbs2_modulator_bc_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2015-2017 Free Software Foundation, Inc.
+ * Copyright 2015-2018 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
@@ -22,8 +22,9 @@
#include "config.h"
#endif
-#include <gnuradio/io_signature.h>
#include "dvbs2_modulator_bc_impl.h"
+#include <gnuradio/io_signature.h>
+#include <gnuradio/math.h>
namespace gr {
namespace dtv {
@@ -49,26 +50,26 @@ namespace gr {
switch (constellation) {
case MOD_BPSK:
case MOD_BPSK_SF2:
- m_bpsk[0][0] = gr_complex((r1 * cos(M_PI / 4.0)), (r1 * sin(M_PI / 4.0)));
- m_bpsk[0][1] = gr_complex((r1 * cos(5.0 * M_PI / 4.0)), (r1 * sin(5.0 * M_PI / 4.0)));
- m_bpsk[1][0] = gr_complex((r1 * cos(5.0 * M_PI / 4.0)), (r1 * sin(M_PI / 4.0)));
- m_bpsk[1][1] = gr_complex((r1 * cos(M_PI / 4.0)), (r1 * sin(5.0 * M_PI /4.0)));
+ m_bpsk[0][0] = gr_complex((r1 * cos(GR_M_PI / 4.0)), (r1 * sin(GR_M_PI / 4.0)));
+ m_bpsk[0][1] = gr_complex((r1 * cos(5.0 * GR_M_PI / 4.0)), (r1 * sin(5.0 * GR_M_PI / 4.0)));
+ m_bpsk[1][0] = gr_complex((r1 * cos(5.0 * GR_M_PI / 4.0)), (r1 * sin(GR_M_PI / 4.0)));
+ m_bpsk[1][1] = gr_complex((r1 * cos(GR_M_PI / 4.0)), (r1 * sin(5.0 * GR_M_PI /4.0)));
break;
case MOD_QPSK:
- m_qpsk[0] = gr_complex((r1 * cos(M_PI / 4.0)), (r1 * sin(M_PI / 4.0)));
- m_qpsk[1] = gr_complex((r1 * cos(7 * M_PI / 4.0)), (r1 * sin(7 * M_PI / 4.0)));
- m_qpsk[2] = gr_complex((r1 * cos(3 * M_PI / 4.0)), (r1 * sin(3 * M_PI / 4.0)));
- m_qpsk[3] = gr_complex((r1 * cos(5 * M_PI / 4.0)), (r1 * sin(5 * M_PI / 4.0)));
+ m_qpsk[0] = gr_complex((r1 * cos(GR_M_PI / 4.0)), (r1 * sin(GR_M_PI / 4.0)));
+ m_qpsk[1] = gr_complex((r1 * cos(7 * GR_M_PI / 4.0)), (r1 * sin(7 * GR_M_PI / 4.0)));
+ m_qpsk[2] = gr_complex((r1 * cos(3 * GR_M_PI / 4.0)), (r1 * sin(3 * GR_M_PI / 4.0)));
+ m_qpsk[3] = gr_complex((r1 * cos(5 * GR_M_PI / 4.0)), (r1 * sin(5 * GR_M_PI / 4.0)));
break;
case MOD_8PSK:
- m_8psk[0] = gr_complex((r1 * cos(M_PI / 4.0)), (r1 * sin(M_PI / 4.0)));
+ m_8psk[0] = gr_complex((r1 * cos(GR_M_PI / 4.0)), (r1 * sin(GR_M_PI / 4.0)));
m_8psk[1] = gr_complex((r1 * cos(0.0)), (r1 * sin(0.0)));
- m_8psk[2] = gr_complex((r1 * cos(4 * M_PI / 4.0)), (r1 * sin(4 * M_PI / 4.0)));
- m_8psk[3] = gr_complex((r1 * cos(5 * M_PI / 4.0)), (r1 * sin(5 * M_PI / 4.0)));
- m_8psk[4] = gr_complex((r1 * cos(2 * M_PI / 4.0)), (r1 * sin(2 * M_PI / 4.0)));
- m_8psk[5] = gr_complex((r1 * cos(7 * M_PI / 4.0)), (r1 * sin(7 * M_PI / 4.0)));
- m_8psk[6] = gr_complex((r1 * cos(3 * M_PI / 4.0)), (r1 * sin(3 * M_PI / 4.0)));
- m_8psk[7] = gr_complex((r1 * cos(6 * M_PI / 4.0)), (r1 * sin(6 * M_PI / 4.0)));
+ m_8psk[2] = gr_complex((r1 * cos(4 * GR_M_PI / 4.0)), (r1 * sin(4 * GR_M_PI / 4.0)));
+ m_8psk[3] = gr_complex((r1 * cos(5 * GR_M_PI / 4.0)), (r1 * sin(5 * GR_M_PI / 4.0)));
+ m_8psk[4] = gr_complex((r1 * cos(2 * GR_M_PI / 4.0)), (r1 * sin(2 * GR_M_PI / 4.0)));
+ m_8psk[5] = gr_complex((r1 * cos(7 * GR_M_PI / 4.0)), (r1 * sin(7 * GR_M_PI / 4.0)));
+ m_8psk[6] = gr_complex((r1 * cos(3 * GR_M_PI / 4.0)), (r1 * sin(3 * GR_M_PI / 4.0)));
+ m_8psk[7] = gr_complex((r1 * cos(6 * GR_M_PI / 4.0)), (r1 * sin(6 * GR_M_PI / 4.0)));
break;
case MOD_8APSK:
r3 = m;
@@ -86,13 +87,13 @@ namespace gr {
r2 = 0;
break;
}
- m_8psk[0] = gr_complex((r1 * cos(M_PI)), (r1 * sin(M_PI)));
- m_8psk[1] = gr_complex((r2 * cos(M_PI * 1.352)), (r2 * sin(M_PI * 1.352)));
- m_8psk[2] = gr_complex((r2 * cos(M_PI * -1.352)), (r2 * sin(M_PI * -1.352)));
- m_8psk[3] = gr_complex((r3 * cos(M_PI)), (r3 * sin(M_PI)));
+ m_8psk[0] = gr_complex((r1 * cos(GR_M_PI)), (r1 * sin(GR_M_PI)));
+ m_8psk[1] = gr_complex((r2 * cos(GR_M_PI * 1.352)), (r2 * sin(GR_M_PI * 1.352)));
+ m_8psk[2] = gr_complex((r2 * cos(GR_M_PI * -1.352)), (r2 * sin(GR_M_PI * -1.352)));
+ m_8psk[3] = gr_complex((r3 * cos(GR_M_PI)), (r3 * sin(GR_M_PI)));
m_8psk[4] = gr_complex((r1 * cos(0.0)), (r1 * sin(0.0)));
- m_8psk[5] = gr_complex((r2 * cos(M_PI * -0.352)), (r2 * sin(M_PI * -0.352)));
- m_8psk[6] = gr_complex((r2 * cos(M_PI * 0.352)), (r2 * sin(M_PI * 0.352)));
+ m_8psk[5] = gr_complex((r2 * cos(GR_M_PI * -0.352)), (r2 * sin(GR_M_PI * -0.352)));
+ m_8psk[6] = gr_complex((r2 * cos(GR_M_PI * 0.352)), (r2 * sin(GR_M_PI * 0.352)));
m_8psk[7] = gr_complex((r3 * cos(0.0)), (r3 * sin(0.0)));
break;
case MOD_16APSK:
@@ -177,22 +178,22 @@ namespace gr {
break;
}
}
- m_16apsk[0] = gr_complex((r2 * cos(M_PI / 4.0)), (r2 * sin(M_PI / 4.0)));
- m_16apsk[1] = gr_complex((r2 * cos(-M_PI / 4.0)), (r2 * sin(-M_PI / 4.0)));
- m_16apsk[2] = gr_complex((r2 * cos(3 * M_PI / 4.0)), (r2 * sin(3 * M_PI / 4.0)));
- m_16apsk[3] = gr_complex((r2 * cos(-3 * M_PI / 4.0)), (r2 * sin(-3 * M_PI / 4.0)));
- m_16apsk[4] = gr_complex((r2 * cos(M_PI / 12.0)), (r2 * sin(M_PI / 12.0)));
- m_16apsk[5] = gr_complex((r2 * cos(-M_PI / 12.0)), (r2 * sin(-M_PI / 12.0)));
- m_16apsk[6] = gr_complex((r2 * cos(11 * M_PI / 12.0)), (r2 * sin(11 * M_PI / 12.0)));
- m_16apsk[7] = gr_complex((r2 * cos(-11 * M_PI / 12.0)), (r2 * sin(-11 * M_PI / 12.0)));
- m_16apsk[8] = gr_complex((r2 * cos(5 * M_PI / 12.0)), (r2 * sin(5 * M_PI / 12.0)));
- m_16apsk[9] = gr_complex((r2 * cos(-5 * M_PI / 12.0)), (r2 * sin(-5 * M_PI / 12.0)));
- m_16apsk[10] = gr_complex((r2 * cos(7 * M_PI / 12.0)), (r2 * sin(7 * M_PI / 12.0)));
- m_16apsk[11] = gr_complex((r2 * cos(-7 * M_PI / 12.0)), (r2 * sin(-7 * M_PI / 12.0)));
- m_16apsk[12] = gr_complex((r1 * cos(M_PI / 4.0)), (r1 * sin(M_PI / 4.0)));
- m_16apsk[13] = gr_complex((r1 * cos(-M_PI / 4.0)), (r1 * sin(-M_PI / 4.0)));
- m_16apsk[14] = gr_complex((r1 * cos(3 * M_PI / 4.0)), (r1 * sin(3 * M_PI / 4.0)));
- m_16apsk[15] = gr_complex((r1 * cos(-3 * M_PI / 4.0)), (r1 * sin(-3 * M_PI / 4.0)));
+ m_16apsk[0] = gr_complex((r2 * cos(GR_M_PI / 4.0)), (r2 * sin(GR_M_PI / 4.0)));
+ m_16apsk[1] = gr_complex((r2 * cos(-GR_M_PI / 4.0)), (r2 * sin(-GR_M_PI / 4.0)));
+ m_16apsk[2] = gr_complex((r2 * cos(3 * GR_M_PI / 4.0)), (r2 * sin(3 * GR_M_PI / 4.0)));
+ m_16apsk[3] = gr_complex((r2 * cos(-3 * GR_M_PI / 4.0)), (r2 * sin(-3 * GR_M_PI / 4.0)));
+ m_16apsk[4] = gr_complex((r2 * cos(GR_M_PI / 12.0)), (r2 * sin(GR_M_PI / 12.0)));
+ m_16apsk[5] = gr_complex((r2 * cos(-GR_M_PI / 12.0)), (r2 * sin(-GR_M_PI / 12.0)));
+ m_16apsk[6] = gr_complex((r2 * cos(11 * GR_M_PI / 12.0)), (r2 * sin(11 * GR_M_PI / 12.0)));
+ m_16apsk[7] = gr_complex((r2 * cos(-11 * GR_M_PI / 12.0)), (r2 * sin(-11 * GR_M_PI / 12.0)));
+ m_16apsk[8] = gr_complex((r2 * cos(5 * GR_M_PI / 12.0)), (r2 * sin(5 * GR_M_PI / 12.0)));
+ m_16apsk[9] = gr_complex((r2 * cos(-5 * GR_M_PI / 12.0)), (r2 * sin(-5 * GR_M_PI / 12.0)));
+ m_16apsk[10] = gr_complex((r2 * cos(7 * GR_M_PI / 12.0)), (r2 * sin(7 * GR_M_PI / 12.0)));
+ m_16apsk[11] = gr_complex((r2 * cos(-7 * GR_M_PI / 12.0)), (r2 * sin(-7 * GR_M_PI / 12.0)));
+ m_16apsk[12] = gr_complex((r1 * cos(GR_M_PI / 4.0)), (r1 * sin(GR_M_PI / 4.0)));
+ m_16apsk[13] = gr_complex((r1 * cos(-GR_M_PI / 4.0)), (r1 * sin(-GR_M_PI / 4.0)));
+ m_16apsk[14] = gr_complex((r1 * cos(3 * GR_M_PI / 4.0)), (r1 * sin(3 * GR_M_PI / 4.0)));
+ m_16apsk[15] = gr_complex((r1 * cos(-3 * GR_M_PI / 4.0)), (r1 * sin(-3 * GR_M_PI / 4.0)));
break;
case MOD_8_8APSK:
if (rate == C18_30) {
@@ -243,22 +244,22 @@ namespace gr {
r1 = 0;
break;
}
- m_16apsk[0] = gr_complex((r1 * cos(M_PI / 8.0)), (r1 * sin(M_PI / 8.0)));
- m_16apsk[1] = gr_complex((r1 * cos(3 * M_PI / 8.0)), (r1 * sin(3 * M_PI / 8.0)));
- m_16apsk[2] = gr_complex((r1 * cos(7 * M_PI / 8.0)), (r1 * sin(7 * M_PI / 8.0)));
- m_16apsk[3] = gr_complex((r1 * cos(5 * M_PI / 8.0)), (r1 * sin(5 * M_PI / 8.0)));
- m_16apsk[4] = gr_complex((r1 * cos(15 * M_PI / 8.0)), (r1 * sin(15 * M_PI / 8.0)));
- m_16apsk[5] = gr_complex((r1 * cos(13 * M_PI / 8.0)), (r1 * sin(13 * M_PI / 8.0)));
- m_16apsk[6] = gr_complex((r1 * cos(9 * M_PI / 8.0)), (r1 * sin(9 * M_PI / 8.0)));
- m_16apsk[7] = gr_complex((r1 * cos(11 * M_PI / 8.0)), (r1 * sin(11 * M_PI / 8.0)));
- m_16apsk[8] = gr_complex((r2 * cos(M_PI / 8.0)), (r2 * sin(M_PI / 8.0)));
- m_16apsk[9] = gr_complex((r2 * cos(3 * M_PI / 8.0)), (r2 * sin(3 * M_PI / 8.0)));
- m_16apsk[10] = gr_complex((r2 * cos(7 * M_PI / 8.0)), (r2 * sin(7 * M_PI / 8.0)));
- m_16apsk[11] = gr_complex((r2 * cos(5 * M_PI / 8.0)), (r2 * sin(5 * M_PI / 8.0)));
- m_16apsk[12] = gr_complex((r2 * cos(15 * M_PI / 8.0)), (r2 * sin(15 * M_PI / 8.0)));
- m_16apsk[13] = gr_complex((r2 * cos(13 * M_PI / 8.0)), (r2 * sin(13 * M_PI / 8.0)));
- m_16apsk[14] = gr_complex((r2 * cos(9 * M_PI / 8.0)), (r2 * sin(9 * M_PI / 8.0)));
- m_16apsk[15] = gr_complex((r2 * cos(11 * M_PI / 8.0)), (r2 * sin(11 * M_PI / 8.0)));
+ m_16apsk[0] = gr_complex((r1 * cos(GR_M_PI / 8.0)), (r1 * sin(GR_M_PI / 8.0)));
+ m_16apsk[1] = gr_complex((r1 * cos(3 * GR_M_PI / 8.0)), (r1 * sin(3 * GR_M_PI / 8.0)));
+ m_16apsk[2] = gr_complex((r1 * cos(7 * GR_M_PI / 8.0)), (r1 * sin(7 * GR_M_PI / 8.0)));
+ m_16apsk[3] = gr_complex((r1 * cos(5 * GR_M_PI / 8.0)), (r1 * sin(5 * GR_M_PI / 8.0)));
+ m_16apsk[4] = gr_complex((r1 * cos(15 * GR_M_PI / 8.0)), (r1 * sin(15 * GR_M_PI / 8.0)));
+ m_16apsk[5] = gr_complex((r1 * cos(13 * GR_M_PI / 8.0)), (r1 * sin(13 * GR_M_PI / 8.0)));
+ m_16apsk[6] = gr_complex((r1 * cos(9 * GR_M_PI / 8.0)), (r1 * sin(9 * GR_M_PI / 8.0)));
+ m_16apsk[7] = gr_complex((r1 * cos(11 * GR_M_PI / 8.0)), (r1 * sin(11 * GR_M_PI / 8.0)));
+ m_16apsk[8] = gr_complex((r2 * cos(GR_M_PI / 8.0)), (r2 * sin(GR_M_PI / 8.0)));
+ m_16apsk[9] = gr_complex((r2 * cos(3 * GR_M_PI / 8.0)), (r2 * sin(3 * GR_M_PI / 8.0)));
+ m_16apsk[10] = gr_complex((r2 * cos(7 * GR_M_PI / 8.0)), (r2 * sin(7 * GR_M_PI / 8.0)));
+ m_16apsk[11] = gr_complex((r2 * cos(5 * GR_M_PI / 8.0)), (r2 * sin(5 * GR_M_PI / 8.0)));
+ m_16apsk[12] = gr_complex((r2 * cos(15 * GR_M_PI / 8.0)), (r2 * sin(15 * GR_M_PI / 8.0)));
+ m_16apsk[13] = gr_complex((r2 * cos(13 * GR_M_PI / 8.0)), (r2 * sin(13 * GR_M_PI / 8.0)));
+ m_16apsk[14] = gr_complex((r2 * cos(9 * GR_M_PI / 8.0)), (r2 * sin(9 * GR_M_PI / 8.0)));
+ m_16apsk[15] = gr_complex((r2 * cos(11 * GR_M_PI / 8.0)), (r2 * sin(11 * GR_M_PI / 8.0)));
}
break;
case MOD_32APSK:
@@ -289,38 +290,38 @@ namespace gr {
r2 = 0;
break;
}
- m_32apsk[0] = gr_complex((r2 * cos(M_PI / 4.0)), (r2 * sin(M_PI / 4.0)));
- m_32apsk[1] = gr_complex((r2 * cos(5 * M_PI / 12.0)), (r2 * sin(5 * M_PI / 12.0)));
- m_32apsk[2] = gr_complex((r2 * cos(-M_PI / 4.0)), (r2 * sin(-M_PI / 4.0)));
- m_32apsk[3] = gr_complex((r2 * cos(-5 * M_PI / 12.0)), (r2 * sin(-5 * M_PI / 12.0)));
- m_32apsk[4] = gr_complex((r2 * cos(3 * M_PI / 4.0)), (r2 * sin(3 * M_PI / 4.0)));
- m_32apsk[5] = gr_complex((r2 * cos(7 * M_PI / 12.0)), (r2 * sin(7 * M_PI / 12.0)));
- m_32apsk[6] = gr_complex((r2 * cos(-3 * M_PI / 4.0)), (r2 * sin(-3 * M_PI / 4.0)));
- m_32apsk[7] = gr_complex((r2 * cos(-7 * M_PI / 12.0)), (r2 * sin(-7 * M_PI / 12.0)));
- m_32apsk[8] = gr_complex((r3 * cos(M_PI / 8.0)), (r3 * sin(M_PI / 8.0)));
- m_32apsk[9] = gr_complex((r3 * cos(3 * M_PI / 8.0)), (r3 * sin(3 * M_PI / 8.0)));
- m_32apsk[10] = gr_complex((r3 * cos(-M_PI / 4.0)), (r3 * sin(-M_PI / 4.0)));
- m_32apsk[11] = gr_complex((r3 * cos(-M_PI / 2.0)), (r3 * sin(-M_PI / 2.0)));
- m_32apsk[12] = gr_complex((r3 * cos(3 * M_PI / 4.0)), (r3 * sin(3 * M_PI / 4.0)));
- m_32apsk[13] = gr_complex((r3 * cos(M_PI / 2.0)), (r3 * sin(M_PI / 2.0)));
- m_32apsk[14] = gr_complex((r3 * cos(-7 * M_PI / 8.0)), (r3 * sin(-7 * M_PI / 8.0)));
- m_32apsk[15] = gr_complex((r3 * cos(-5 * M_PI / 8.0)), (r3 * sin(-5 * M_PI / 8.0)));
- m_32apsk[16] = gr_complex((r2 * cos(M_PI / 12.0)), (r2 * sin(M_PI / 12.0)));
- m_32apsk[17] = gr_complex((r1 * cos(M_PI / 4.0)), (r1 * sin(M_PI / 4.0)));
- m_32apsk[18] = gr_complex((r2 * cos(-M_PI / 12.0)), (r2 * sin(-M_PI / 12.0)));
- m_32apsk[19] = gr_complex((r1 * cos(-M_PI / 4.0)), (r1 * sin(-M_PI / 4.0)));
- m_32apsk[20] = gr_complex((r2 * cos(11 * M_PI / 12.0)), (r2 * sin(11 * M_PI / 12.0)));
- m_32apsk[21] = gr_complex((r1 * cos(3 * M_PI / 4.0)), (r1 * sin(3 * M_PI / 4.0)));
- m_32apsk[22] = gr_complex((r2 * cos(-11 * M_PI / 12.0)), (r2 * sin(-11 * M_PI / 12.0)));
- m_32apsk[23] = gr_complex((r1 * cos(-3 * M_PI / 4.0)), (r1 * sin(-3 * M_PI / 4.0)));
+ m_32apsk[0] = gr_complex((r2 * cos(GR_M_PI / 4.0)), (r2 * sin(GR_M_PI / 4.0)));
+ m_32apsk[1] = gr_complex((r2 * cos(5 * GR_M_PI / 12.0)), (r2 * sin(5 * GR_M_PI / 12.0)));
+ m_32apsk[2] = gr_complex((r2 * cos(-GR_M_PI / 4.0)), (r2 * sin(-GR_M_PI / 4.0)));
+ m_32apsk[3] = gr_complex((r2 * cos(-5 * GR_M_PI / 12.0)), (r2 * sin(-5 * GR_M_PI / 12.0)));
+ m_32apsk[4] = gr_complex((r2 * cos(3 * GR_M_PI / 4.0)), (r2 * sin(3 * GR_M_PI / 4.0)));
+ m_32apsk[5] = gr_complex((r2 * cos(7 * GR_M_PI / 12.0)), (r2 * sin(7 * GR_M_PI / 12.0)));
+ m_32apsk[6] = gr_complex((r2 * cos(-3 * GR_M_PI / 4.0)), (r2 * sin(-3 * GR_M_PI / 4.0)));
+ m_32apsk[7] = gr_complex((r2 * cos(-7 * GR_M_PI / 12.0)), (r2 * sin(-7 * GR_M_PI / 12.0)));
+ m_32apsk[8] = gr_complex((r3 * cos(GR_M_PI / 8.0)), (r3 * sin(GR_M_PI / 8.0)));
+ m_32apsk[9] = gr_complex((r3 * cos(3 * GR_M_PI / 8.0)), (r3 * sin(3 * GR_M_PI / 8.0)));
+ m_32apsk[10] = gr_complex((r3 * cos(-GR_M_PI / 4.0)), (r3 * sin(-GR_M_PI / 4.0)));
+ m_32apsk[11] = gr_complex((r3 * cos(-GR_M_PI / 2.0)), (r3 * sin(-GR_M_PI / 2.0)));
+ m_32apsk[12] = gr_complex((r3 * cos(3 * GR_M_PI / 4.0)), (r3 * sin(3 * GR_M_PI / 4.0)));
+ m_32apsk[13] = gr_complex((r3 * cos(GR_M_PI / 2.0)), (r3 * sin(GR_M_PI / 2.0)));
+ m_32apsk[14] = gr_complex((r3 * cos(-7 * GR_M_PI / 8.0)), (r3 * sin(-7 * GR_M_PI / 8.0)));
+ m_32apsk[15] = gr_complex((r3 * cos(-5 * GR_M_PI / 8.0)), (r3 * sin(-5 * GR_M_PI / 8.0)));
+ m_32apsk[16] = gr_complex((r2 * cos(GR_M_PI / 12.0)), (r2 * sin(GR_M_PI / 12.0)));
+ m_32apsk[17] = gr_complex((r1 * cos(GR_M_PI / 4.0)), (r1 * sin(GR_M_PI / 4.0)));
+ m_32apsk[18] = gr_complex((r2 * cos(-GR_M_PI / 12.0)), (r2 * sin(-GR_M_PI / 12.0)));
+ m_32apsk[19] = gr_complex((r1 * cos(-GR_M_PI / 4.0)), (r1 * sin(-GR_M_PI / 4.0)));
+ m_32apsk[20] = gr_complex((r2 * cos(11 * GR_M_PI / 12.0)), (r2 * sin(11 * GR_M_PI / 12.0)));
+ m_32apsk[21] = gr_complex((r1 * cos(3 * GR_M_PI / 4.0)), (r1 * sin(3 * GR_M_PI / 4.0)));
+ m_32apsk[22] = gr_complex((r2 * cos(-11 * GR_M_PI / 12.0)), (r2 * sin(-11 * GR_M_PI / 12.0)));
+ m_32apsk[23] = gr_complex((r1 * cos(-3 * GR_M_PI / 4.0)), (r1 * sin(-3 * GR_M_PI / 4.0)));
m_32apsk[24] = gr_complex((r3 * cos(0.0)), (r3 * sin(0.0)));
- m_32apsk[25] = gr_complex((r3 * cos(M_PI / 4.0)), (r3 * sin(M_PI / 4.0)));
- m_32apsk[26] = gr_complex((r3 * cos(-M_PI / 8.0)), (r3 * sin(-M_PI / 8.0)));
- m_32apsk[27] = gr_complex((r3 * cos(-3 * M_PI / 8.0)), (r3 * sin(-3 * M_PI / 8.0)));
- m_32apsk[28] = gr_complex((r3 * cos(7 * M_PI / 8.0)), (r3 * sin(7 * M_PI / 8.0)));
- m_32apsk[29] = gr_complex((r3 * cos(5 * M_PI / 8.0)), (r3 * sin(5 * M_PI / 8.0)));
- m_32apsk[30] = gr_complex((r3 * cos(M_PI)), (r3 * sin(M_PI)));
- m_32apsk[31] = gr_complex((r3 * cos(-3 * M_PI / 4.0)), (r3 * sin(-3 * M_PI / 4.0)));
+ m_32apsk[25] = gr_complex((r3 * cos(GR_M_PI / 4.0)), (r3 * sin(GR_M_PI / 4.0)));
+ m_32apsk[26] = gr_complex((r3 * cos(-GR_M_PI / 8.0)), (r3 * sin(-GR_M_PI / 8.0)));
+ m_32apsk[27] = gr_complex((r3 * cos(-3 * GR_M_PI / 8.0)), (r3 * sin(-3 * GR_M_PI / 8.0)));
+ m_32apsk[28] = gr_complex((r3 * cos(7 * GR_M_PI / 8.0)), (r3 * sin(7 * GR_M_PI / 8.0)));
+ m_32apsk[29] = gr_complex((r3 * cos(5 * GR_M_PI / 8.0)), (r3 * sin(5 * GR_M_PI / 8.0)));
+ m_32apsk[30] = gr_complex((r3 * cos(GR_M_PI)), (r3 * sin(GR_M_PI)));
+ m_32apsk[31] = gr_complex((r3 * cos(-3 * GR_M_PI / 4.0)), (r3 * sin(-3 * GR_M_PI / 4.0)));
break;
case MOD_4_12_16APSK:
r3 = m;
@@ -352,38 +353,38 @@ namespace gr {
break;
}
}
- m_32apsk[0] = gr_complex((r3 * cos(11 * M_PI / 16.0)), (r3 * sin(11 * M_PI / 16.0)));
- m_32apsk[1] = gr_complex((r3 * cos(9 * M_PI / 16.0)), (r3 * sin(9 * M_PI / 16.0)));
- m_32apsk[2] = gr_complex((r3 * cos(5 * M_PI / 16.0)), (r3 * sin(5 * M_PI / 16.0)));
- m_32apsk[3] = gr_complex((r3 * cos(7 * M_PI / 16.0)), (r3 * sin(7 * M_PI / 16.0)));
- m_32apsk[4] = gr_complex((r2 * cos(3 * M_PI / 4.0)), (r2 * sin(3 * M_PI / 4.0)));
- m_32apsk[5] = gr_complex((r2 * cos(7 * M_PI / 12.0)), (r2 * sin(7 * M_PI / 12.0)));
- m_32apsk[6] = gr_complex((r2 * cos(M_PI / 4.0)), (r2 * sin(M_PI / 4.0)));
- m_32apsk[7] = gr_complex((r2 * cos(5 * M_PI / 12.0)), (r2 * sin(5 * M_PI / 12.0)));
- m_32apsk[8] = gr_complex((r3 * cos(13 * M_PI / 16.0)), (r3 * sin(13 * M_PI / 16.0)));
- m_32apsk[9] = gr_complex((r3 * cos(15 * M_PI / 16.0)), (r3 * sin(15 * M_PI / 16.0)));
- m_32apsk[10] = gr_complex((r3 * cos(3 * M_PI / 16.0)), (r3 * sin(3 * M_PI / 16.0)));
- m_32apsk[11] = gr_complex((r3 * cos(M_PI / 16.0)), (r3 * sin(M_PI / 16.0)));
- m_32apsk[12] = gr_complex((r2 * cos(11 * M_PI / 12.0)), (r2 * sin(11 * M_PI / 12.0)));
- m_32apsk[13] = gr_complex((r1 * cos(3 * M_PI / 4.0)), (r1 * sin(3 * M_PI / 4.0)));
- m_32apsk[14] = gr_complex((r2 * cos(M_PI / 12.0)), (r2 * sin(M_PI / 12.0)));
- m_32apsk[15] = gr_complex((r1 * cos(M_PI / 4.0)), (r1 * sin(M_PI / 4.0)));
- m_32apsk[16] = gr_complex((r3 * cos(21 * M_PI / 16.0)), (r3 * sin(21 * M_PI / 16.0)));
- m_32apsk[17] = gr_complex((r3 * cos(23 * M_PI / 16.0)), (r3 * sin(23 * M_PI / 16.0)));
- m_32apsk[18] = gr_complex((r3 * cos(27 * M_PI / 16.0)), (r3 * sin(27 * M_PI / 16.0)));
- m_32apsk[19] = gr_complex((r3 * cos(25 * M_PI / 16.0)), (r3 * sin(25 * M_PI / 16.0)));
- m_32apsk[20] = gr_complex((r2 * cos(5 * M_PI / 4.0)), (r2 * sin(5 * M_PI / 4.0)));
- m_32apsk[21] = gr_complex((r2 * cos(17 * M_PI / 12.0)), (r2 * sin(17 * M_PI / 12.0)));
- m_32apsk[22] = gr_complex((r2 * cos(7 * M_PI / 4.0)), (r2 * sin(7 * M_PI / 4.0)));
- m_32apsk[23] = gr_complex((r2 * cos(19 * M_PI / 12.0)), (r2 * sin(19 * M_PI / 12.0)));
- m_32apsk[24] = gr_complex((r3 * cos(19 * M_PI / 16.0)), (r3 * sin(19 * M_PI / 16.0)));
- m_32apsk[25] = gr_complex((r3 * cos(17 * M_PI / 16.0)), (r3 * sin(17 * M_PI / 16.0)));
- m_32apsk[26] = gr_complex((r3 * cos(29 * M_PI / 16.0)), (r3 * sin(29 * M_PI / 16.0)));
- m_32apsk[27] = gr_complex((r3 * cos(31 * M_PI / 16.0)), (r3 * sin(31 * M_PI / 16.0)));
- m_32apsk[28] = gr_complex((r2 * cos(13 * M_PI / 12.0)), (r2 * sin(13 * M_PI / 12.0)));
- m_32apsk[29] = gr_complex((r1 * cos(5 * M_PI / 4.0)), (r1 * sin(5 * M_PI / 4.0)));
- m_32apsk[30] = gr_complex((r2 * cos(23 * M_PI / 12.0)), (r2 * sin(23 * M_PI / 12.0)));
- m_32apsk[31] = gr_complex((r1 * cos(7 * M_PI / 4.0)), (r1 * sin(7 * M_PI / 4.0)));
+ m_32apsk[0] = gr_complex((r3 * cos(11 * GR_M_PI / 16.0)), (r3 * sin(11 * GR_M_PI / 16.0)));
+ m_32apsk[1] = gr_complex((r3 * cos(9 * GR_M_PI / 16.0)), (r3 * sin(9 * GR_M_PI / 16.0)));
+ m_32apsk[2] = gr_complex((r3 * cos(5 * GR_M_PI / 16.0)), (r3 * sin(5 * GR_M_PI / 16.0)));
+ m_32apsk[3] = gr_complex((r3 * cos(7 * GR_M_PI / 16.0)), (r3 * sin(7 * GR_M_PI / 16.0)));
+ m_32apsk[4] = gr_complex((r2 * cos(3 * GR_M_PI / 4.0)), (r2 * sin(3 * GR_M_PI / 4.0)));
+ m_32apsk[5] = gr_complex((r2 * cos(7 * GR_M_PI / 12.0)), (r2 * sin(7 * GR_M_PI / 12.0)));
+ m_32apsk[6] = gr_complex((r2 * cos(GR_M_PI / 4.0)), (r2 * sin(GR_M_PI / 4.0)));
+ m_32apsk[7] = gr_complex((r2 * cos(5 * GR_M_PI / 12.0)), (r2 * sin(5 * GR_M_PI / 12.0)));
+ m_32apsk[8] = gr_complex((r3 * cos(13 * GR_M_PI / 16.0)), (r3 * sin(13 * GR_M_PI / 16.0)));
+ m_32apsk[9] = gr_complex((r3 * cos(15 * GR_M_PI / 16.0)), (r3 * sin(15 * GR_M_PI / 16.0)));
+ m_32apsk[10] = gr_complex((r3 * cos(3 * GR_M_PI / 16.0)), (r3 * sin(3 * GR_M_PI / 16.0)));
+ m_32apsk[11] = gr_complex((r3 * cos(GR_M_PI / 16.0)), (r3 * sin(GR_M_PI / 16.0)));
+ m_32apsk[12] = gr_complex((r2 * cos(11 * GR_M_PI / 12.0)), (r2 * sin(11 * GR_M_PI / 12.0)));
+ m_32apsk[13] = gr_complex((r1 * cos(3 * GR_M_PI / 4.0)), (r1 * sin(3 * GR_M_PI / 4.0)));
+ m_32apsk[14] = gr_complex((r2 * cos(GR_M_PI / 12.0)), (r2 * sin(GR_M_PI / 12.0)));
+ m_32apsk[15] = gr_complex((r1 * cos(GR_M_PI / 4.0)), (r1 * sin(GR_M_PI / 4.0)));
+ m_32apsk[16] = gr_complex((r3 * cos(21 * GR_M_PI / 16.0)), (r3 * sin(21 * GR_M_PI / 16.0)));
+ m_32apsk[17] = gr_complex((r3 * cos(23 * GR_M_PI / 16.0)), (r3 * sin(23 * GR_M_PI / 16.0)));
+ m_32apsk[18] = gr_complex((r3 * cos(27 * GR_M_PI / 16.0)), (r3 * sin(27 * GR_M_PI / 16.0)));
+ m_32apsk[19] = gr_complex((r3 * cos(25 * GR_M_PI / 16.0)), (r3 * sin(25 * GR_M_PI / 16.0)));
+ m_32apsk[20] = gr_complex((r2 * cos(5 * GR_M_PI / 4.0)), (r2 * sin(5 * GR_M_PI / 4.0)));
+ m_32apsk[21] = gr_complex((r2 * cos(17 * GR_M_PI / 12.0)), (r2 * sin(17 * GR_M_PI / 12.0)));
+ m_32apsk[22] = gr_complex((r2 * cos(7 * GR_M_PI / 4.0)), (r2 * sin(7 * GR_M_PI / 4.0)));
+ m_32apsk[23] = gr_complex((r2 * cos(19 * GR_M_PI / 12.0)), (r2 * sin(19 * GR_M_PI / 12.0)));
+ m_32apsk[24] = gr_complex((r3 * cos(19 * GR_M_PI / 16.0)), (r3 * sin(19 * GR_M_PI / 16.0)));
+ m_32apsk[25] = gr_complex((r3 * cos(17 * GR_M_PI / 16.0)), (r3 * sin(17 * GR_M_PI / 16.0)));
+ m_32apsk[26] = gr_complex((r3 * cos(29 * GR_M_PI / 16.0)), (r3 * sin(29 * GR_M_PI / 16.0)));
+ m_32apsk[27] = gr_complex((r3 * cos(31 * GR_M_PI / 16.0)), (r3 * sin(31 * GR_M_PI / 16.0)));
+ m_32apsk[28] = gr_complex((r2 * cos(13 * GR_M_PI / 12.0)), (r2 * sin(13 * GR_M_PI / 12.0)));
+ m_32apsk[29] = gr_complex((r1 * cos(5 * GR_M_PI / 4.0)), (r1 * sin(5 * GR_M_PI / 4.0)));
+ m_32apsk[30] = gr_complex((r2 * cos(23 * GR_M_PI / 12.0)), (r2 * sin(23 * GR_M_PI / 12.0)));
+ m_32apsk[31] = gr_complex((r1 * cos(7 * GR_M_PI / 4.0)), (r1 * sin(7 * GR_M_PI / 4.0)));
break;
case MOD_4_8_4_16APSK:
r4 = m;
@@ -409,38 +410,38 @@ namespace gr {
r3 = 0;
break;
}
- m_32apsk[0] = gr_complex((r1 * cos(M_PI / 4.0)), (r1 * sin(M_PI / 4.0)));
- m_32apsk[1] = gr_complex((r4 * cos(7 * M_PI / 16.0)), (r4 * sin(7 * M_PI / 16.0)));
- m_32apsk[2] = gr_complex((r1 * cos(7 * M_PI / 4.0)), (r1 * sin(7 * M_PI / 4.0)));
- m_32apsk[3] = gr_complex((r4 * cos(25 * M_PI / 16.0)), (r4 * sin(25 * M_PI / 16.0)));
- m_32apsk[4] = gr_complex((r1 * cos(3 * M_PI / 4.0)), (r1 * sin(3 * M_PI / 4.0)));
- m_32apsk[5] = gr_complex((r4 * cos(9 * M_PI / 16.0)), (r4 * sin(9 * M_PI / 16.0)));
- m_32apsk[6] = gr_complex((r1 * cos(5 * M_PI / 4.0)), (r1 * sin(5 * M_PI / 4.0)));
- m_32apsk[7] = gr_complex((r4 * cos(23 * M_PI / 16.0)), (r4 * sin(23 * M_PI / 16.0)));
- m_32apsk[8] = gr_complex((r2 * cos(M_PI / 12.0)), (r2 * sin(M_PI / 12.0)));
- m_32apsk[9] = gr_complex((r4 * cos(M_PI / 16.0)), (r4 * sin(M_PI / 16.0)));
- m_32apsk[10] = gr_complex((r2 * cos(23 * M_PI / 12.0)), (r2 * sin(23 * M_PI / 12.0)));
- m_32apsk[11] = gr_complex((r4 * cos(31 * M_PI / 16.0)), (r4 * sin(31 * M_PI / 16.0)));
- m_32apsk[12] = gr_complex((r2 * cos(11 * M_PI / 12.0)), (r2 * sin(11 * M_PI / 12.0)));
- m_32apsk[13] = gr_complex((r4 * cos(15 * M_PI / 16.0)), (r4 * sin(15 * M_PI / 16.0)));
- m_32apsk[14] = gr_complex((r2 * cos(13 * M_PI / 12.0)), (r2 * sin(13 * M_PI / 12.0)));
- m_32apsk[15] = gr_complex((r4 * cos(17 * M_PI / 16.0)), (r4 * sin(17 * M_PI / 16.0)));
- m_32apsk[16] = gr_complex((r2 * cos(5 * M_PI / 12.0)), (r2 * sin(5 * M_PI / 12.0)));
- m_32apsk[17] = gr_complex((r4 * cos(5 * M_PI / 16.0)), (r4 * sin(5 * M_PI / 16.0)));
- m_32apsk[18] = gr_complex((r2 * cos(19 * M_PI / 12.0)), (r2 * sin(19 * M_PI / 12.0)));
- m_32apsk[19] = gr_complex((r4 * cos(27 * M_PI / 16.0)), (r4 * sin(27 * M_PI / 16.0)));
- m_32apsk[20] = gr_complex((r2 * cos(7 * M_PI / 12.0)), (r2 * sin(7 * M_PI / 12.0)));
- m_32apsk[21] = gr_complex((r4 * cos(11 * M_PI / 16.0)), (r4 * sin(11 * M_PI / 16.0)));
- m_32apsk[22] = gr_complex((r2 * cos(17 * M_PI / 12.0)), (r2 * sin(17 * M_PI / 12.0)));
- m_32apsk[23] = gr_complex((r4 * cos(21 * M_PI / 16.0)), (r4 * sin(21 * M_PI / 16.0)));
- m_32apsk[24] = gr_complex((r3 * cos(M_PI / 4.0)), (r3 * sin(M_PI / 4.0)));
- m_32apsk[25] = gr_complex((r4 * cos(3 * M_PI / 16.0)), (r4 * sin(3 * M_PI / 16.0)));
- m_32apsk[26] = gr_complex((r3 * cos(7 * M_PI / 4.0)), (r3 * sin(7 * M_PI / 4.0)));
- m_32apsk[27] = gr_complex((r4 * cos(29 * M_PI / 16.0)), (r4 * sin(29 * M_PI / 16.0)));
- m_32apsk[28] = gr_complex((r3 * cos(3 * M_PI / 4.0)), (r3 * sin(3 * M_PI / 4.0)));
- m_32apsk[29] = gr_complex((r4 * cos(13 * M_PI / 16.0)), (r4 * sin(13 * M_PI / 16.0)));
- m_32apsk[30] = gr_complex((r3 * cos(5 * M_PI / 4.0)), (r3 * sin(5 * M_PI / 4.0)));
- m_32apsk[31] = gr_complex((r4 * cos(19 * M_PI / 16.0)), (r4 * sin(19 * M_PI / 16.0)));
+ m_32apsk[0] = gr_complex((r1 * cos(GR_M_PI / 4.0)), (r1 * sin(GR_M_PI / 4.0)));
+ m_32apsk[1] = gr_complex((r4 * cos(7 * GR_M_PI / 16.0)), (r4 * sin(7 * GR_M_PI / 16.0)));
+ m_32apsk[2] = gr_complex((r1 * cos(7 * GR_M_PI / 4.0)), (r1 * sin(7 * GR_M_PI / 4.0)));
+ m_32apsk[3] = gr_complex((r4 * cos(25 * GR_M_PI / 16.0)), (r4 * sin(25 * GR_M_PI / 16.0)));
+ m_32apsk[4] = gr_complex((r1 * cos(3 * GR_M_PI / 4.0)), (r1 * sin(3 * GR_M_PI / 4.0)));
+ m_32apsk[5] = gr_complex((r4 * cos(9 * GR_M_PI / 16.0)), (r4 * sin(9 * GR_M_PI / 16.0)));
+ m_32apsk[6] = gr_complex((r1 * cos(5 * GR_M_PI / 4.0)), (r1 * sin(5 * GR_M_PI / 4.0)));
+ m_32apsk[7] = gr_complex((r4 * cos(23 * GR_M_PI / 16.0)), (r4 * sin(23 * GR_M_PI / 16.0)));
+ m_32apsk[8] = gr_complex((r2 * cos(GR_M_PI / 12.0)), (r2 * sin(GR_M_PI / 12.0)));
+ m_32apsk[9] = gr_complex((r4 * cos(GR_M_PI / 16.0)), (r4 * sin(GR_M_PI / 16.0)));
+ m_32apsk[10] = gr_complex((r2 * cos(23 * GR_M_PI / 12.0)), (r2 * sin(23 * GR_M_PI / 12.0)));
+ m_32apsk[11] = gr_complex((r4 * cos(31 * GR_M_PI / 16.0)), (r4 * sin(31 * GR_M_PI / 16.0)));
+ m_32apsk[12] = gr_complex((r2 * cos(11 * GR_M_PI / 12.0)), (r2 * sin(11 * GR_M_PI / 12.0)));
+ m_32apsk[13] = gr_complex((r4 * cos(15 * GR_M_PI / 16.0)), (r4 * sin(15 * GR_M_PI / 16.0)));
+ m_32apsk[14] = gr_complex((r2 * cos(13 * GR_M_PI / 12.0)), (r2 * sin(13 * GR_M_PI / 12.0)));
+ m_32apsk[15] = gr_complex((r4 * cos(17 * GR_M_PI / 16.0)), (r4 * sin(17 * GR_M_PI / 16.0)));
+ m_32apsk[16] = gr_complex((r2 * cos(5 * GR_M_PI / 12.0)), (r2 * sin(5 * GR_M_PI / 12.0)));
+ m_32apsk[17] = gr_complex((r4 * cos(5 * GR_M_PI / 16.0)), (r4 * sin(5 * GR_M_PI / 16.0)));
+ m_32apsk[18] = gr_complex((r2 * cos(19 * GR_M_PI / 12.0)), (r2 * sin(19 * GR_M_PI / 12.0)));
+ m_32apsk[19] = gr_complex((r4 * cos(27 * GR_M_PI / 16.0)), (r4 * sin(27 * GR_M_PI / 16.0)));
+ m_32apsk[20] = gr_complex((r2 * cos(7 * GR_M_PI / 12.0)), (r2 * sin(7 * GR_M_PI / 12.0)));
+ m_32apsk[21] = gr_complex((r4 * cos(11 * GR_M_PI / 16.0)), (r4 * sin(11 * GR_M_PI / 16.0)));
+ m_32apsk[22] = gr_complex((r2 * cos(17 * GR_M_PI / 12.0)), (r2 * sin(17 * GR_M_PI / 12.0)));
+ m_32apsk[23] = gr_complex((r4 * cos(21 * GR_M_PI / 16.0)), (r4 * sin(21 * GR_M_PI / 16.0)));
+ m_32apsk[24] = gr_complex((r3 * cos(GR_M_PI / 4.0)), (r3 * sin(GR_M_PI / 4.0)));
+ m_32apsk[25] = gr_complex((r4 * cos(3 * GR_M_PI / 16.0)), (r4 * sin(3 * GR_M_PI / 16.0)));
+ m_32apsk[26] = gr_complex((r3 * cos(7 * GR_M_PI / 4.0)), (r3 * sin(7 * GR_M_PI / 4.0)));
+ m_32apsk[27] = gr_complex((r4 * cos(29 * GR_M_PI / 16.0)), (r4 * sin(29 * GR_M_PI / 16.0)));
+ m_32apsk[28] = gr_complex((r3 * cos(3 * GR_M_PI / 4.0)), (r3 * sin(3 * GR_M_PI / 4.0)));
+ m_32apsk[29] = gr_complex((r4 * cos(13 * GR_M_PI / 16.0)), (r4 * sin(13 * GR_M_PI / 16.0)));
+ m_32apsk[30] = gr_complex((r3 * cos(5 * GR_M_PI / 4.0)), (r3 * sin(5 * GR_M_PI / 4.0)));
+ m_32apsk[31] = gr_complex((r4 * cos(19 * GR_M_PI / 16.0)), (r4 * sin(19 * GR_M_PI / 16.0)));
break;
case MOD_64APSK:
r4 = m;
@@ -456,70 +457,70 @@ namespace gr {
r3 = 0;
break;
}
- m_64apsk[0] = gr_complex((r1 * cos(M_PI / 16.0)), (r1 * sin(M_PI / 16.0)));
- m_64apsk[1] = gr_complex((r1 * cos(3 * M_PI / 16.0)), (r1 * sin(3 * M_PI / 16.0)));
- m_64apsk[2] = gr_complex((r1 * cos(7 * M_PI / 16.0)), (r1 * sin(7 * M_PI / 16.0)));
- m_64apsk[3] = gr_complex((r1 * cos(5 * M_PI / 16.0)), (r1 * sin(5 * M_PI / 16.0)));
- m_64apsk[4] = gr_complex((r1 * cos(31 * M_PI / 16.0)), (r1 * sin(31 * M_PI / 16.0)));
- m_64apsk[5] = gr_complex((r1 * cos(29 * M_PI / 16.0)), (r1 * sin(29 * M_PI / 16.0)));
- m_64apsk[6] = gr_complex((r1 * cos(25 * M_PI / 16.0)), (r1 * sin(25 * M_PI / 16.0)));
- m_64apsk[7] = gr_complex((r1 * cos(27 * M_PI / 16.0)), (r1 * sin(27 * M_PI / 16.0)));
- m_64apsk[8] = gr_complex((r1 * cos(15 * M_PI / 16.0)), (r1 * sin(15 * M_PI / 16.0)));
- m_64apsk[9] = gr_complex((r1 * cos(13 * M_PI / 16.0)), (r1 * sin(13 * M_PI / 16.0)));
- m_64apsk[10] = gr_complex((r1 * cos(9 * M_PI / 16.0)), (r1 * sin(9 * M_PI / 16.0)));
- m_64apsk[11] = gr_complex((r1 * cos(11 * M_PI / 16.0)), (r1 * sin(11 * M_PI / 16.0)));
- m_64apsk[12] = gr_complex((r1 * cos(17 * M_PI / 16.0)), (r1 * sin(17 * M_PI / 16.0)));
- m_64apsk[13] = gr_complex((r1 * cos(19 * M_PI / 16.0)), (r1 * sin(19 * M_PI / 16.0)));
- m_64apsk[14] = gr_complex((r1 * cos(23 * M_PI / 16.0)), (r1 * sin(23 * M_PI / 16.0)));
- m_64apsk[15] = gr_complex((r1 * cos(21 * M_PI / 16.0)), (r1 * sin(21 * M_PI / 16.0)));
- m_64apsk[16] = gr_complex((r2 * cos(M_PI / 16.0)), (r2 * sin(M_PI / 16.0)));
- m_64apsk[17] = gr_complex((r2 * cos(3 * M_PI / 16.0)), (r2 * sin(3 * M_PI / 16.0)));
- m_64apsk[18] = gr_complex((r2 * cos(7 * M_PI / 16.0)), (r2 * sin(7 * M_PI / 16.0)));
- m_64apsk[19] = gr_complex((r2 * cos(5 * M_PI / 16.0)), (r2 * sin(5 * M_PI / 16.0)));
- m_64apsk[20] = gr_complex((r2 * cos(31 * M_PI / 16.0)), (r2 * sin(31* M_PI / 16.0)));
- m_64apsk[21] = gr_complex((r2 * cos(29 * M_PI / 16.0)), (r2 * sin(29 * M_PI / 16.0)));
- m_64apsk[22] = gr_complex((r2 * cos(25 * M_PI / 16.0)), (r2 * sin(25 * M_PI / 16.0)));
- m_64apsk[23] = gr_complex((r2 * cos(27 * M_PI / 16.0)), (r2 * sin(27 * M_PI / 16.0)));
- m_64apsk[24] = gr_complex((r2 * cos(15 * M_PI / 16.0)), (r2 * sin(15 * M_PI / 16.0)));
- m_64apsk[25] = gr_complex((r2 * cos(13 * M_PI / 16.0)), (r2 * sin(13 * M_PI / 16.0)));
- m_64apsk[26] = gr_complex((r2 * cos(9 * M_PI / 16.0)), (r2 * sin(9 * M_PI / 16.0)));
- m_64apsk[27] = gr_complex((r2 * cos(11 * M_PI / 16.0)), (r2 * sin(11 * M_PI / 16.0)));
- m_64apsk[28] = gr_complex((r2 * cos(17 * M_PI / 16.0)), (r2 * sin(17 * M_PI / 16.0)));
- m_64apsk[29] = gr_complex((r2 * cos(19 * M_PI / 16.0)), (r2 * sin(19 * M_PI / 16.0)));
- m_64apsk[30] = gr_complex((r2 * cos(23 * M_PI / 16.0)), (r2 * sin(23 * M_PI / 16.0)));
- m_64apsk[31] = gr_complex((r2 * cos(21 * M_PI / 16.0)), (r2 * sin(21 * M_PI / 16.0)));
- m_64apsk[32] = gr_complex((r4 * cos(M_PI / 16.0)), (r4 * sin(M_PI / 16.0)));
- m_64apsk[33] = gr_complex((r4 * cos(3 * M_PI / 16.0)), (r4 * sin(3 * M_PI / 16.0)));
- m_64apsk[34] = gr_complex((r4 * cos(7 * M_PI / 16.0)), (r4 * sin(7 * M_PI / 16.0)));
- m_64apsk[35] = gr_complex((r4 * cos(5 * M_PI / 16.0)), (r4 * sin(5 * M_PI / 16.0)));
- m_64apsk[36] = gr_complex((r4 * cos(31 * M_PI / 16.0)), (r4 * sin(31 * M_PI / 16.0)));
- m_64apsk[37] = gr_complex((r4 * cos(29 * M_PI / 16.0)), (r4 * sin(29 * M_PI / 16.0)));
- m_64apsk[38] = gr_complex((r4 * cos(25 * M_PI / 16.0)), (r4 * sin(25 * M_PI / 16.0)));
- m_64apsk[39] = gr_complex((r4 * cos(27 * M_PI / 16.0)), (r4 * sin(27 * M_PI / 16.0)));
- m_64apsk[40] = gr_complex((r4 * cos(15 * M_PI / 16.0)), (r4 * sin(15 * M_PI / 16.0)));
- m_64apsk[41] = gr_complex((r4 * cos(13 * M_PI / 16.0)), (r4 * sin(13 * M_PI / 16.0)));
- m_64apsk[42] = gr_complex((r4 * cos(9 * M_PI / 16.0)), (r4 * sin(9 * M_PI / 16.0)));
- m_64apsk[43] = gr_complex((r4 * cos(11 * M_PI / 16.0)), (r4 * sin(11 * M_PI / 16.0)));
- m_64apsk[44] = gr_complex((r4 * cos(17 * M_PI / 16.0)), (r4 * sin(17 * M_PI / 16.0)));
- m_64apsk[45] = gr_complex((r4 * cos(19 * M_PI / 16.0)), (r4 * sin(19 * M_PI / 16.0)));
- m_64apsk[46] = gr_complex((r4 * cos(23 * M_PI / 16.0)), (r4 * sin(23 * M_PI / 16.0)));
- m_64apsk[47] = gr_complex((r4 * cos(21 * M_PI / 16.0)), (r4 * sin(21 * M_PI / 16.0)));
- m_64apsk[48] = gr_complex((r3 * cos(M_PI / 16.0)), (r3 * sin(M_PI / 16.0)));
- m_64apsk[49] = gr_complex((r3 * cos(3 * M_PI / 16.0)), (r3 * sin(3 * M_PI / 16.0)));
- m_64apsk[50] = gr_complex((r3 * cos(7 * M_PI / 16.0)), (r3 * sin(7 * M_PI / 16.0)));
- m_64apsk[51] = gr_complex((r3 * cos(5 * M_PI / 16.0)), (r3 * sin(5 * M_PI / 16.0)));
- m_64apsk[52] = gr_complex((r3 * cos(31 * M_PI / 16.0)), (r3 * sin(31 * M_PI / 16.0)));
- m_64apsk[53] = gr_complex((r3 * cos(29 * M_PI / 16.0)), (r3 * sin(29 * M_PI / 16.0)));
- m_64apsk[54] = gr_complex((r3 * cos(25 * M_PI / 16.0)), (r3 * sin(25 * M_PI / 16.0)));
- m_64apsk[55] = gr_complex((r3 * cos(27 * M_PI / 16.0)), (r3 * sin(27 * M_PI / 16.0)));
- m_64apsk[56] = gr_complex((r3 * cos(15 * M_PI / 16.0)), (r3 * sin(15 * M_PI / 16.0)));
- m_64apsk[57] = gr_complex((r3 * cos(13 * M_PI / 16.0)), (r3 * sin(13 * M_PI / 16.0)));
- m_64apsk[58] = gr_complex((r3 * cos(9 * M_PI / 16.0)), (r3 * sin(9 * M_PI / 16.0)));
- m_64apsk[59] = gr_complex((r3 * cos(11 * M_PI / 16.0)), (r3 * sin(11 * M_PI / 16.0)));
- m_64apsk[60] = gr_complex((r3 * cos(17 * M_PI / 16.0)), (r3 * sin(17 * M_PI / 16.0)));
- m_64apsk[61] = gr_complex((r3 * cos(19 * M_PI / 16.0)), (r3 * sin(19 * M_PI / 16.0)));
- m_64apsk[62] = gr_complex((r3 * cos(23 * M_PI / 16.0)), (r3 * sin(23 * M_PI / 16.0)));
- m_64apsk[63] = gr_complex((r3 * cos(21 * M_PI / 16.0)), (r3 * sin(21 * M_PI / 16.0)));
+ m_64apsk[0] = gr_complex((r1 * cos(GR_M_PI / 16.0)), (r1 * sin(GR_M_PI / 16.0)));
+ m_64apsk[1] = gr_complex((r1 * cos(3 * GR_M_PI / 16.0)), (r1 * sin(3 * GR_M_PI / 16.0)));
+ m_64apsk[2] = gr_complex((r1 * cos(7 * GR_M_PI / 16.0)), (r1 * sin(7 * GR_M_PI / 16.0)));
+ m_64apsk[3] = gr_complex((r1 * cos(5 * GR_M_PI / 16.0)), (r1 * sin(5 * GR_M_PI / 16.0)));
+ m_64apsk[4] = gr_complex((r1 * cos(31 * GR_M_PI / 16.0)), (r1 * sin(31 * GR_M_PI / 16.0)));
+ m_64apsk[5] = gr_complex((r1 * cos(29 * GR_M_PI / 16.0)), (r1 * sin(29 * GR_M_PI / 16.0)));
+ m_64apsk[6] = gr_complex((r1 * cos(25 * GR_M_PI / 16.0)), (r1 * sin(25 * GR_M_PI / 16.0)));
+ m_64apsk[7] = gr_complex((r1 * cos(27 * GR_M_PI / 16.0)), (r1 * sin(27 * GR_M_PI / 16.0)));
+ m_64apsk[8] = gr_complex((r1 * cos(15 * GR_M_PI / 16.0)), (r1 * sin(15 * GR_M_PI / 16.0)));
+ m_64apsk[9] = gr_complex((r1 * cos(13 * GR_M_PI / 16.0)), (r1 * sin(13 * GR_M_PI / 16.0)));
+ m_64apsk[10] = gr_complex((r1 * cos(9 * GR_M_PI / 16.0)), (r1 * sin(9 * GR_M_PI / 16.0)));
+ m_64apsk[11] = gr_complex((r1 * cos(11 * GR_M_PI / 16.0)), (r1 * sin(11 * GR_M_PI / 16.0)));
+ m_64apsk[12] = gr_complex((r1 * cos(17 * GR_M_PI / 16.0)), (r1 * sin(17 * GR_M_PI / 16.0)));
+ m_64apsk[13] = gr_complex((r1 * cos(19 * GR_M_PI / 16.0)), (r1 * sin(19 * GR_M_PI / 16.0)));
+ m_64apsk[14] = gr_complex((r1 * cos(23 * GR_M_PI / 16.0)), (r1 * sin(23 * GR_M_PI / 16.0)));
+ m_64apsk[15] = gr_complex((r1 * cos(21 * GR_M_PI / 16.0)), (r1 * sin(21 * GR_M_PI / 16.0)));
+ m_64apsk[16] = gr_complex((r2 * cos(GR_M_PI / 16.0)), (r2 * sin(GR_M_PI / 16.0)));
+ m_64apsk[17] = gr_complex((r2 * cos(3 * GR_M_PI / 16.0)), (r2 * sin(3 * GR_M_PI / 16.0)));
+ m_64apsk[18] = gr_complex((r2 * cos(7 * GR_M_PI / 16.0)), (r2 * sin(7 * GR_M_PI / 16.0)));
+ m_64apsk[19] = gr_complex((r2 * cos(5 * GR_M_PI / 16.0)), (r2 * sin(5 * GR_M_PI / 16.0)));
+ m_64apsk[20] = gr_complex((r2 * cos(31 * GR_M_PI / 16.0)), (r2 * sin(31* GR_M_PI / 16.0)));
+ m_64apsk[21] = gr_complex((r2 * cos(29 * GR_M_PI / 16.0)), (r2 * sin(29 * GR_M_PI / 16.0)));
+ m_64apsk[22] = gr_complex((r2 * cos(25 * GR_M_PI / 16.0)), (r2 * sin(25 * GR_M_PI / 16.0)));
+ m_64apsk[23] = gr_complex((r2 * cos(27 * GR_M_PI / 16.0)), (r2 * sin(27 * GR_M_PI / 16.0)));
+ m_64apsk[24] = gr_complex((r2 * cos(15 * GR_M_PI / 16.0)), (r2 * sin(15 * GR_M_PI / 16.0)));
+ m_64apsk[25] = gr_complex((r2 * cos(13 * GR_M_PI / 16.0)), (r2 * sin(13 * GR_M_PI / 16.0)));
+ m_64apsk[26] = gr_complex((r2 * cos(9 * GR_M_PI / 16.0)), (r2 * sin(9 * GR_M_PI / 16.0)));
+ m_64apsk[27] = gr_complex((r2 * cos(11 * GR_M_PI / 16.0)), (r2 * sin(11 * GR_M_PI / 16.0)));
+ m_64apsk[28] = gr_complex((r2 * cos(17 * GR_M_PI / 16.0)), (r2 * sin(17 * GR_M_PI / 16.0)));
+ m_64apsk[29] = gr_complex((r2 * cos(19 * GR_M_PI / 16.0)), (r2 * sin(19 * GR_M_PI / 16.0)));
+ m_64apsk[30] = gr_complex((r2 * cos(23 * GR_M_PI / 16.0)), (r2 * sin(23 * GR_M_PI / 16.0)));
+ m_64apsk[31] = gr_complex((r2 * cos(21 * GR_M_PI / 16.0)), (r2 * sin(21 * GR_M_PI / 16.0)));
+ m_64apsk[32] = gr_complex((r4 * cos(GR_M_PI / 16.0)), (r4 * sin(GR_M_PI / 16.0)));
+ m_64apsk[33] = gr_complex((r4 * cos(3 * GR_M_PI / 16.0)), (r4 * sin(3 * GR_M_PI / 16.0)));
+ m_64apsk[34] = gr_complex((r4 * cos(7 * GR_M_PI / 16.0)), (r4 * sin(7 * GR_M_PI / 16.0)));
+ m_64apsk[35] = gr_complex((r4 * cos(5 * GR_M_PI / 16.0)), (r4 * sin(5 * GR_M_PI / 16.0)));
+ m_64apsk[36] = gr_complex((r4 * cos(31 * GR_M_PI / 16.0)), (r4 * sin(31 * GR_M_PI / 16.0)));
+ m_64apsk[37] = gr_complex((r4 * cos(29 * GR_M_PI / 16.0)), (r4 * sin(29 * GR_M_PI / 16.0)));
+ m_64apsk[38] = gr_complex((r4 * cos(25 * GR_M_PI / 16.0)), (r4 * sin(25 * GR_M_PI / 16.0)));
+ m_64apsk[39] = gr_complex((r4 * cos(27 * GR_M_PI / 16.0)), (r4 * sin(27 * GR_M_PI / 16.0)));
+ m_64apsk[40] = gr_complex((r4 * cos(15 * GR_M_PI / 16.0)), (r4 * sin(15 * GR_M_PI / 16.0)));
+ m_64apsk[41] = gr_complex((r4 * cos(13 * GR_M_PI / 16.0)), (r4 * sin(13 * GR_M_PI / 16.0)));
+ m_64apsk[42] = gr_complex((r4 * cos(9 * GR_M_PI / 16.0)), (r4 * sin(9 * GR_M_PI / 16.0)));
+ m_64apsk[43] = gr_complex((r4 * cos(11 * GR_M_PI / 16.0)), (r4 * sin(11 * GR_M_PI / 16.0)));
+ m_64apsk[44] = gr_complex((r4 * cos(17 * GR_M_PI / 16.0)), (r4 * sin(17 * GR_M_PI / 16.0)));
+ m_64apsk[45] = gr_complex((r4 * cos(19 * GR_M_PI / 16.0)), (r4 * sin(19 * GR_M_PI / 16.0)));
+ m_64apsk[46] = gr_complex((r4 * cos(23 * GR_M_PI / 16.0)), (r4 * sin(23 * GR_M_PI / 16.0)));
+ m_64apsk[47] = gr_complex((r4 * cos(21 * GR_M_PI / 16.0)), (r4 * sin(21 * GR_M_PI / 16.0)));
+ m_64apsk[48] = gr_complex((r3 * cos(GR_M_PI / 16.0)), (r3 * sin(GR_M_PI / 16.0)));
+ m_64apsk[49] = gr_complex((r3 * cos(3 * GR_M_PI / 16.0)), (r3 * sin(3 * GR_M_PI / 16.0)));
+ m_64apsk[50] = gr_complex((r3 * cos(7 * GR_M_PI / 16.0)), (r3 * sin(7 * GR_M_PI / 16.0)));
+ m_64apsk[51] = gr_complex((r3 * cos(5 * GR_M_PI / 16.0)), (r3 * sin(5 * GR_M_PI / 16.0)));
+ m_64apsk[52] = gr_complex((r3 * cos(31 * GR_M_PI / 16.0)), (r3 * sin(31 * GR_M_PI / 16.0)));
+ m_64apsk[53] = gr_complex((r3 * cos(29 * GR_M_PI / 16.0)), (r3 * sin(29 * GR_M_PI / 16.0)));
+ m_64apsk[54] = gr_complex((r3 * cos(25 * GR_M_PI / 16.0)), (r3 * sin(25 * GR_M_PI / 16.0)));
+ m_64apsk[55] = gr_complex((r3 * cos(27 * GR_M_PI / 16.0)), (r3 * sin(27 * GR_M_PI / 16.0)));
+ m_64apsk[56] = gr_complex((r3 * cos(15 * GR_M_PI / 16.0)), (r3 * sin(15 * GR_M_PI / 16.0)));
+ m_64apsk[57] = gr_complex((r3 * cos(13 * GR_M_PI / 16.0)), (r3 * sin(13 * GR_M_PI / 16.0)));
+ m_64apsk[58] = gr_complex((r3 * cos(9 * GR_M_PI / 16.0)), (r3 * sin(9 * GR_M_PI / 16.0)));
+ m_64apsk[59] = gr_complex((r3 * cos(11 * GR_M_PI / 16.0)), (r3 * sin(11 * GR_M_PI / 16.0)));
+ m_64apsk[60] = gr_complex((r3 * cos(17 * GR_M_PI / 16.0)), (r3 * sin(17 * GR_M_PI / 16.0)));
+ m_64apsk[61] = gr_complex((r3 * cos(19 * GR_M_PI / 16.0)), (r3 * sin(19 * GR_M_PI / 16.0)));
+ m_64apsk[62] = gr_complex((r3 * cos(23 * GR_M_PI / 16.0)), (r3 * sin(23 * GR_M_PI / 16.0)));
+ m_64apsk[63] = gr_complex((r3 * cos(21 * GR_M_PI / 16.0)), (r3 * sin(21 * GR_M_PI / 16.0)));
break;
case MOD_8_16_20_20APSK:
r4 = m;
@@ -541,70 +542,70 @@ namespace gr {
r3 = 0;
break;
}
- m_64apsk[0] = gr_complex((r2 * cos(25 * M_PI / 16.0)), (r2 * sin(25 * M_PI / 16.0)));
- m_64apsk[1] = gr_complex((r4 * cos(7 * M_PI / 4.0)), (r4 * sin(7 * M_PI / 4.0)));
- m_64apsk[2] = gr_complex((r2 * cos(27 * M_PI / 16.0)), (r2 * sin(27 * M_PI / 16.0)));
- m_64apsk[3] = gr_complex((r3 * cos(7 * M_PI / 4.0)), (r3 * sin(7 * M_PI / 4.0)));
- m_64apsk[4] = gr_complex((r4 * cos(31 * M_PI / 20.0)), (r4 * sin(31 * M_PI / 20.0)));
- m_64apsk[5] = gr_complex((r4 * cos(33 * M_PI / 20.0)), (r4 * sin(33 * M_PI / 20.0)));
- m_64apsk[6] = gr_complex((r3 * cos(31 * M_PI / 20.0)), (r3 * sin(31 * M_PI / 20.0)));
- m_64apsk[7] = gr_complex((r3 * cos(33 * M_PI / 20.0)), (r3 * sin(33 * M_PI / 20.0)));
- m_64apsk[8] = gr_complex((r2 * cos(23 * M_PI / 16.0)), (r2 * sin(23 * M_PI / 16.0)));
- m_64apsk[9] = gr_complex((r4 * cos(5 * M_PI / 4.0)), (r4 * sin(5 * M_PI / 4.0)));
- m_64apsk[10] = gr_complex((r2 * cos(21 * M_PI / 16.0)), (r2 * sin(21 * M_PI / 16.0)));
- m_64apsk[11] = gr_complex((r3 * cos(5 * M_PI / 4.0)), (r3 * sin(5 * M_PI / 4.0)));
- m_64apsk[12] = gr_complex((r4 * cos(29 * M_PI / 20.0)), (r4 * sin(29 * M_PI / 20.0)));
- m_64apsk[13] = gr_complex((r4 * cos(27 * M_PI / 20.0)), (r4 * sin(27 * M_PI / 20.0)));
- m_64apsk[14] = gr_complex((r3 * cos(29 * M_PI / 20.0)), (r3 * sin(29 * M_PI / 20.0)));
- m_64apsk[15] = gr_complex((r3 * cos(27 * M_PI / 20.0)), (r3 * sin(27 * M_PI / 20.0)));
- m_64apsk[16] = gr_complex((r1 * cos(13 * M_PI / 8.0)), (r1 * sin(13 * M_PI / 8.0)));
- m_64apsk[17] = gr_complex((r4 * cos(37 * M_PI / 20.0)), (r4 * sin(37 * M_PI / 20.0)));
- m_64apsk[18] = gr_complex((r2 * cos(29 * M_PI / 16.0)), (r2 * sin(29 * M_PI / 16.0)));
- m_64apsk[19] = gr_complex((r3 * cos(37 * M_PI / 20.0)), (r3 * sin(37 * M_PI / 20.0)));
- m_64apsk[20] = gr_complex((r1 * cos(15 * M_PI / 8.0)), (r1 * sin(15 * M_PI / 8.0)));
- m_64apsk[21] = gr_complex((r4 * cos(39 * M_PI / 20.0)), (r4 * sin(39 * M_PI / 20.0)));
- m_64apsk[22] = gr_complex((r2 * cos(31 * M_PI / 16.0)), (r2 * sin(31 * M_PI / 16.0)));
- m_64apsk[23] = gr_complex((r3 * cos(39 * M_PI / 20.0)), (r3 * sin(39 * M_PI / 20.0)));
- m_64apsk[24] = gr_complex((r1 * cos(11 * M_PI / 8.0)), (r1 * sin(11 * M_PI / 8.0)));
- m_64apsk[25] = gr_complex((r4 * cos(23 * M_PI / 20.0)), (r4 * sin(23 * M_PI / 20.0)));
- m_64apsk[26] = gr_complex((r2 * cos(19 * M_PI / 16.0)), (r2 * sin(19 * M_PI / 16.0)));
- m_64apsk[27] = gr_complex((r3 * cos(23 * M_PI / 20.0)), (r3 * sin(23 * M_PI / 20.0)));
- m_64apsk[28] = gr_complex((r1 * cos(9 * M_PI / 8.0)), (r1 * sin(9 * M_PI / 8.0)));
- m_64apsk[29] = gr_complex((r4 * cos(21 * M_PI / 20.0)), (r4 * sin(21 * M_PI / 20.0)));
- m_64apsk[30] = gr_complex((r2 * cos(17 * M_PI / 16.0)), (r2 * sin(17 * M_PI / 16.0)));
- m_64apsk[31] = gr_complex((r3 * cos(21 * M_PI / 20.0)), (r3 * sin(21 * M_PI / 20.0)));
- m_64apsk[32] = gr_complex((r2 * cos(7 * M_PI / 16.0)), (r2 * sin(7 * M_PI / 16.0)));
- m_64apsk[33] = gr_complex((r4 * cos(M_PI / 4.0)), (r4 * sin(M_PI / 4.0)));
- m_64apsk[34] = gr_complex((r2 * cos(5 * M_PI / 16.0)), (r2 * sin(5 * M_PI / 16.0)));
- m_64apsk[35] = gr_complex((r3 * cos(M_PI / 4.0)), (r3 * sin(M_PI / 4.0)));
- m_64apsk[36] = gr_complex((r4 * cos(9 * M_PI / 20.0)), (r4 * sin(9 * M_PI / 20.0)));
- m_64apsk[37] = gr_complex((r4 * cos(7 * M_PI / 20.0)), (r4 * sin(7 * M_PI / 20.0)));
- m_64apsk[38] = gr_complex((r3 * cos(9 * M_PI / 20.0)), (r3 * sin(9 * M_PI / 20.0)));
- m_64apsk[39] = gr_complex((r3 * cos(7 * M_PI / 20.0)), (r3 * sin(7 * M_PI / 20.0)));
- m_64apsk[40] = gr_complex((r2 * cos(9 * M_PI / 16.0)), (r2 * sin(9 * M_PI / 16.0)));
- m_64apsk[41] = gr_complex((r4 * cos(3 * M_PI / 4.0)), (r4 * sin(3 * M_PI / 4.0)));
- m_64apsk[42] = gr_complex((r2 * cos(11 * M_PI / 16.0)), (r2 * sin(11 * M_PI / 16.0)));
- m_64apsk[43] = gr_complex((r3 * cos(3 * M_PI / 4.0)), (r3 * sin(3 * M_PI / 4.0)));
- m_64apsk[44] = gr_complex((r4 * cos(11 * M_PI / 20.0)), (r4 * sin(11 * M_PI / 20.0)));
- m_64apsk[45] = gr_complex((r4 * cos(13 * M_PI / 20.0)), (r4 * sin(13 * M_PI / 20.0)));
- m_64apsk[46] = gr_complex((r3 * cos(11 * M_PI / 20.0)), (r3 * sin(11 * M_PI / 20.0)));
- m_64apsk[47] = gr_complex((r3 * cos(13 * M_PI / 20.0)), (r3 * sin(13 * M_PI / 20.0)));
- m_64apsk[48] = gr_complex((r1 * cos(3 * M_PI / 8.0)), (r1 * sin(3 * M_PI / 8.0)));
- m_64apsk[49] = gr_complex((r4 * cos(3 * M_PI / 20.0)), (r4 * sin(3 * M_PI / 20.0)));
- m_64apsk[50] = gr_complex((r2 * cos(3 * M_PI / 16.0)), (r2 * sin(3 * M_PI / 16.0)));
- m_64apsk[51] = gr_complex((r3 * cos(3 * M_PI / 20.0)), (r3 * sin(3 * M_PI / 20.0)));
- m_64apsk[52] = gr_complex((r1 * cos(M_PI / 8.0)), (r1 * sin(M_PI / 8.0)));
- m_64apsk[53] = gr_complex((r4 * cos(M_PI / 20.0)), (r4 * sin(M_PI / 20.0)));
- m_64apsk[54] = gr_complex((r2 * cos(M_PI / 16.0)), (r2 * sin(M_PI / 16.0)));
- m_64apsk[55] = gr_complex((r3 * cos(M_PI / 20.0)), (r3 * sin(M_PI / 20.0)));
- m_64apsk[56] = gr_complex((r1 * cos(5 * M_PI / 8.0)), (r1 * sin(5 * M_PI / 8.0)));
- m_64apsk[57] = gr_complex((r4 * cos(17 * M_PI / 20.0)), (r4 * sin(17 * M_PI / 20.0)));
- m_64apsk[58] = gr_complex((r2 * cos(13 * M_PI / 16.0)), (r2 * sin(13 * M_PI / 16.0)));
- m_64apsk[59] = gr_complex((r3 * cos(17 * M_PI / 20.0)), (r3 * sin(17 * M_PI / 20.0)));
- m_64apsk[60] = gr_complex((r1 * cos(7 * M_PI / 8.0)), (r1 * sin(7 * M_PI / 8.0)));
- m_64apsk[61] = gr_complex((r4 * cos(19 * M_PI / 20.0)), (r4 * sin(19 * M_PI / 20.0)));
- m_64apsk[62] = gr_complex((r2 * cos(15 * M_PI / 16.0)), (r2 * sin(15 * M_PI / 16.0)));
- m_64apsk[63] = gr_complex((r3 * cos(19 * M_PI / 20.0)), (r3 * sin(19 * M_PI / 20.0)));
+ m_64apsk[0] = gr_complex((r2 * cos(25 * GR_M_PI / 16.0)), (r2 * sin(25 * GR_M_PI / 16.0)));
+ m_64apsk[1] = gr_complex((r4 * cos(7 * GR_M_PI / 4.0)), (r4 * sin(7 * GR_M_PI / 4.0)));
+ m_64apsk[2] = gr_complex((r2 * cos(27 * GR_M_PI / 16.0)), (r2 * sin(27 * GR_M_PI / 16.0)));
+ m_64apsk[3] = gr_complex((r3 * cos(7 * GR_M_PI / 4.0)), (r3 * sin(7 * GR_M_PI / 4.0)));
+ m_64apsk[4] = gr_complex((r4 * cos(31 * GR_M_PI / 20.0)), (r4 * sin(31 * GR_M_PI / 20.0)));
+ m_64apsk[5] = gr_complex((r4 * cos(33 * GR_M_PI / 20.0)), (r4 * sin(33 * GR_M_PI / 20.0)));
+ m_64apsk[6] = gr_complex((r3 * cos(31 * GR_M_PI / 20.0)), (r3 * sin(31 * GR_M_PI / 20.0)));
+ m_64apsk[7] = gr_complex((r3 * cos(33 * GR_M_PI / 20.0)), (r3 * sin(33 * GR_M_PI / 20.0)));
+ m_64apsk[8] = gr_complex((r2 * cos(23 * GR_M_PI / 16.0)), (r2 * sin(23 * GR_M_PI / 16.0)));
+ m_64apsk[9] = gr_complex((r4 * cos(5 * GR_M_PI / 4.0)), (r4 * sin(5 * GR_M_PI / 4.0)));
+ m_64apsk[10] = gr_complex((r2 * cos(21 * GR_M_PI / 16.0)), (r2 * sin(21 * GR_M_PI / 16.0)));
+ m_64apsk[11] = gr_complex((r3 * cos(5 * GR_M_PI / 4.0)), (r3 * sin(5 * GR_M_PI / 4.0)));
+ m_64apsk[12] = gr_complex((r4 * cos(29 * GR_M_PI / 20.0)), (r4 * sin(29 * GR_M_PI / 20.0)));
+ m_64apsk[13] = gr_complex((r4 * cos(27 * GR_M_PI / 20.0)), (r4 * sin(27 * GR_M_PI / 20.0)));
+ m_64apsk[14] = gr_complex((r3 * cos(29 * GR_M_PI / 20.0)), (r3 * sin(29 * GR_M_PI / 20.0)));
+ m_64apsk[15] = gr_complex((r3 * cos(27 * GR_M_PI / 20.0)), (r3 * sin(27 * GR_M_PI / 20.0)));
+ m_64apsk[16] = gr_complex((r1 * cos(13 * GR_M_PI / 8.0)), (r1 * sin(13 * GR_M_PI / 8.0)));
+ m_64apsk[17] = gr_complex((r4 * cos(37 * GR_M_PI / 20.0)), (r4 * sin(37 * GR_M_PI / 20.0)));
+ m_64apsk[18] = gr_complex((r2 * cos(29 * GR_M_PI / 16.0)), (r2 * sin(29 * GR_M_PI / 16.0)));
+ m_64apsk[19] = gr_complex((r3 * cos(37 * GR_M_PI / 20.0)), (r3 * sin(37 * GR_M_PI / 20.0)));
+ m_64apsk[20] = gr_complex((r1 * cos(15 * GR_M_PI / 8.0)), (r1 * sin(15 * GR_M_PI / 8.0)));
+ m_64apsk[21] = gr_complex((r4 * cos(39 * GR_M_PI / 20.0)), (r4 * sin(39 * GR_M_PI / 20.0)));
+ m_64apsk[22] = gr_complex((r2 * cos(31 * GR_M_PI / 16.0)), (r2 * sin(31 * GR_M_PI / 16.0)));
+ m_64apsk[23] = gr_complex((r3 * cos(39 * GR_M_PI / 20.0)), (r3 * sin(39 * GR_M_PI / 20.0)));
+ m_64apsk[24] = gr_complex((r1 * cos(11 * GR_M_PI / 8.0)), (r1 * sin(11 * GR_M_PI / 8.0)));
+ m_64apsk[25] = gr_complex((r4 * cos(23 * GR_M_PI / 20.0)), (r4 * sin(23 * GR_M_PI / 20.0)));
+ m_64apsk[26] = gr_complex((r2 * cos(19 * GR_M_PI / 16.0)), (r2 * sin(19 * GR_M_PI / 16.0)));
+ m_64apsk[27] = gr_complex((r3 * cos(23 * GR_M_PI / 20.0)), (r3 * sin(23 * GR_M_PI / 20.0)));
+ m_64apsk[28] = gr_complex((r1 * cos(9 * GR_M_PI / 8.0)), (r1 * sin(9 * GR_M_PI / 8.0)));
+ m_64apsk[29] = gr_complex((r4 * cos(21 * GR_M_PI / 20.0)), (r4 * sin(21 * GR_M_PI / 20.0)));
+ m_64apsk[30] = gr_complex((r2 * cos(17 * GR_M_PI / 16.0)), (r2 * sin(17 * GR_M_PI / 16.0)));
+ m_64apsk[31] = gr_complex((r3 * cos(21 * GR_M_PI / 20.0)), (r3 * sin(21 * GR_M_PI / 20.0)));
+ m_64apsk[32] = gr_complex((r2 * cos(7 * GR_M_PI / 16.0)), (r2 * sin(7 * GR_M_PI / 16.0)));
+ m_64apsk[33] = gr_complex((r4 * cos(GR_M_PI / 4.0)), (r4 * sin(GR_M_PI / 4.0)));
+ m_64apsk[34] = gr_complex((r2 * cos(5 * GR_M_PI / 16.0)), (r2 * sin(5 * GR_M_PI / 16.0)));
+ m_64apsk[35] = gr_complex((r3 * cos(GR_M_PI / 4.0)), (r3 * sin(GR_M_PI / 4.0)));
+ m_64apsk[36] = gr_complex((r4 * cos(9 * GR_M_PI / 20.0)), (r4 * sin(9 * GR_M_PI / 20.0)));
+ m_64apsk[37] = gr_complex((r4 * cos(7 * GR_M_PI / 20.0)), (r4 * sin(7 * GR_M_PI / 20.0)));
+ m_64apsk[38] = gr_complex((r3 * cos(9 * GR_M_PI / 20.0)), (r3 * sin(9 * GR_M_PI / 20.0)));
+ m_64apsk[39] = gr_complex((r3 * cos(7 * GR_M_PI / 20.0)), (r3 * sin(7 * GR_M_PI / 20.0)));
+ m_64apsk[40] = gr_complex((r2 * cos(9 * GR_M_PI / 16.0)), (r2 * sin(9 * GR_M_PI / 16.0)));
+ m_64apsk[41] = gr_complex((r4 * cos(3 * GR_M_PI / 4.0)), (r4 * sin(3 * GR_M_PI / 4.0)));
+ m_64apsk[42] = gr_complex((r2 * cos(11 * GR_M_PI / 16.0)), (r2 * sin(11 * GR_M_PI / 16.0)));
+ m_64apsk[43] = gr_complex((r3 * cos(3 * GR_M_PI / 4.0)), (r3 * sin(3 * GR_M_PI / 4.0)));
+ m_64apsk[44] = gr_complex((r4 * cos(11 * GR_M_PI / 20.0)), (r4 * sin(11 * GR_M_PI / 20.0)));
+ m_64apsk[45] = gr_complex((r4 * cos(13 * GR_M_PI / 20.0)), (r4 * sin(13 * GR_M_PI / 20.0)));
+ m_64apsk[46] = gr_complex((r3 * cos(11 * GR_M_PI / 20.0)), (r3 * sin(11 * GR_M_PI / 20.0)));
+ m_64apsk[47] = gr_complex((r3 * cos(13 * GR_M_PI / 20.0)), (r3 * sin(13 * GR_M_PI / 20.0)));
+ m_64apsk[48] = gr_complex((r1 * cos(3 * GR_M_PI / 8.0)), (r1 * sin(3 * GR_M_PI / 8.0)));
+ m_64apsk[49] = gr_complex((r4 * cos(3 * GR_M_PI / 20.0)), (r4 * sin(3 * GR_M_PI / 20.0)));
+ m_64apsk[50] = gr_complex((r2 * cos(3 * GR_M_PI / 16.0)), (r2 * sin(3 * GR_M_PI / 16.0)));
+ m_64apsk[51] = gr_complex((r3 * cos(3 * GR_M_PI / 20.0)), (r3 * sin(3 * GR_M_PI / 20.0)));
+ m_64apsk[52] = gr_complex((r1 * cos(GR_M_PI / 8.0)), (r1 * sin(GR_M_PI / 8.0)));
+ m_64apsk[53] = gr_complex((r4 * cos(GR_M_PI / 20.0)), (r4 * sin(GR_M_PI / 20.0)));
+ m_64apsk[54] = gr_complex((r2 * cos(GR_M_PI / 16.0)), (r2 * sin(GR_M_PI / 16.0)));
+ m_64apsk[55] = gr_complex((r3 * cos(GR_M_PI / 20.0)), (r3 * sin(GR_M_PI / 20.0)));
+ m_64apsk[56] = gr_complex((r1 * cos(5 * GR_M_PI / 8.0)), (r1 * sin(5 * GR_M_PI / 8.0)));
+ m_64apsk[57] = gr_complex((r4 * cos(17 * GR_M_PI / 20.0)), (r4 * sin(17 * GR_M_PI / 20.0)));
+ m_64apsk[58] = gr_complex((r2 * cos(13 * GR_M_PI / 16.0)), (r2 * sin(13 * GR_M_PI / 16.0)));
+ m_64apsk[59] = gr_complex((r3 * cos(17 * GR_M_PI / 20.0)), (r3 * sin(17 * GR_M_PI / 20.0)));
+ m_64apsk[60] = gr_complex((r1 * cos(7 * GR_M_PI / 8.0)), (r1 * sin(7 * GR_M_PI / 8.0)));
+ m_64apsk[61] = gr_complex((r4 * cos(19 * GR_M_PI / 20.0)), (r4 * sin(19 * GR_M_PI / 20.0)));
+ m_64apsk[62] = gr_complex((r2 * cos(15 * GR_M_PI / 16.0)), (r2 * sin(15 * GR_M_PI / 16.0)));
+ m_64apsk[63] = gr_complex((r3 * cos(19 * GR_M_PI / 20.0)), (r3 * sin(19 * GR_M_PI / 20.0)));
break;
case MOD_4_12_20_28APSK:
r4 = m;
@@ -620,70 +621,70 @@ namespace gr {
r3 = 0;
break;
}
- m_64apsk[0] = gr_complex((r4 * cos(M_PI / 4.0)), (r4 * sin(M_PI / 4.0)));
- m_64apsk[1] = gr_complex((r4 * cos(7 * M_PI / 4.0)), (r4 * sin(7 * M_PI / 4.0)));
- m_64apsk[2] = gr_complex((r4 * cos(3 * M_PI / 4.0)), (r4 * sin(3 * M_PI / 4.0)));
- m_64apsk[3] = gr_complex((r4 * cos(5 * M_PI / 4.0)), (r4 * sin(5 * M_PI / 4.0)));
- m_64apsk[4] = gr_complex((r4 * cos(13 * M_PI / 28.0)), (r4 * sin(13 * M_PI / 28.0)));
- m_64apsk[5] = gr_complex((r4 * cos(43 * M_PI / 28.0)), (r4 * sin(43 * M_PI / 28.0)));
- m_64apsk[6] = gr_complex((r4 * cos(15 * M_PI / 28.0)), (r4 * sin(15 * M_PI / 28.0)));
- m_64apsk[7] = gr_complex((r4 * cos(41 * M_PI / 28.0)), (r4 * sin(41 * M_PI / 28.0)));
- m_64apsk[8] = gr_complex((r4 * cos(M_PI / 28.0)), (r4 * sin(M_PI / 28.0)));
- m_64apsk[9] = gr_complex((r4 * cos(55 * M_PI / 28.0)), (r4 * sin(55 * M_PI / 28.0)));
- m_64apsk[10] = gr_complex((r4 * cos(27 * M_PI / 28.0)), (r4 * sin(27 * M_PI / 28.0)));
- m_64apsk[11] = gr_complex((r4 * cos(29 * M_PI / 28.0)), (r4 * sin(29 * M_PI / 28.0)));
- m_64apsk[12] = gr_complex((r1 * cos(M_PI / 4.0)), (r1 * sin(M_PI / 4.0)));
- m_64apsk[13] = gr_complex((r1 * cos(7 * M_PI / 4.0)), (r1 * sin(7 * M_PI / 4.0)));
- m_64apsk[14] = gr_complex((r1 * cos(3 * M_PI / 4.0)), (r1 * sin(3 * M_PI / 4.0)));
- m_64apsk[15] = gr_complex((r1 * cos(5 * M_PI / 4.0)), (r1 * sin(5 * M_PI / 4.0)));
- m_64apsk[16] = gr_complex((r4 * cos(9 * M_PI / 28.0)), (r4 * sin(9 * M_PI / 28.0)));
- m_64apsk[17] = gr_complex((r4 * cos(47 * M_PI / 28.0)), (r4 * sin(47 * M_PI / 28.0)));
- m_64apsk[18] = gr_complex((r4 * cos(19 * M_PI / 28.0)), (r4 * sin(19 * M_PI / 28.0)));
- m_64apsk[19] = gr_complex((r4 * cos(37 * M_PI / 28.0)), (r4 * sin(37 * M_PI / 28.0)));
- m_64apsk[20] = gr_complex((r4 * cos(11 * M_PI / 28.0)), (r4 * sin(11 * M_PI / 28.0)));
- m_64apsk[21] = gr_complex((r4 * cos(45 * M_PI / 28.0)), (r4 * sin(45 * M_PI / 28.0)));
- m_64apsk[22] = gr_complex((r4 * cos(17 * M_PI / 28.0)), (r4 * sin(17 * M_PI / 28.0)));
- m_64apsk[23] = gr_complex((r4 * cos(39 * M_PI / 28.0)), (r4 * sin(39 * M_PI / 28.0)));
- m_64apsk[24] = gr_complex((r3 * cos(M_PI / 20.0)), (r3 * sin(M_PI / 20.0)));
- m_64apsk[25] = gr_complex((r3 * cos(39 * M_PI / 20.0)), (r3 * sin(39 * M_PI / 20.0)));
- m_64apsk[26] = gr_complex((r3 * cos(19 * M_PI / 20.0)), (r3 * sin(19 * M_PI / 20.0)));
- m_64apsk[27] = gr_complex((r3 * cos(21 * M_PI / 20.0)), (r3 * sin(21 * M_PI / 20.0)));
- m_64apsk[28] = gr_complex((r2 * cos(M_PI / 12.0)), (r2 * sin(M_PI / 12.0)));
- m_64apsk[29] = gr_complex((r2 * cos(23 * M_PI / 12.0)), (r2 * sin(23 * M_PI / 12.0)));
- m_64apsk[30] = gr_complex((r2 * cos(11 * M_PI / 12.0)), (r2 * sin(11 * M_PI / 12.0)));
- m_64apsk[31] = gr_complex((r2 * cos(13 * M_PI / 12.0)), (r2 * sin(13 * M_PI / 12.0)));
- m_64apsk[32] = gr_complex((r4 * cos(5 * M_PI / 28.0)), (r4 * sin(5 * M_PI / 28.0)));
- m_64apsk[33] = gr_complex((r4 * cos(51 * M_PI / 28.0)), (r4 * sin(51 * M_PI / 28.0)));
- m_64apsk[34] = gr_complex((r4 * cos(23 * M_PI / 28.0)), (r4 * sin(23 * M_PI / 28.0)));
- m_64apsk[35] = gr_complex((r4 * cos(33 * M_PI / 28.0)), (r4 * sin(33 * M_PI / 28.0)));
- m_64apsk[36] = gr_complex((r3 * cos(9 * M_PI / 20.0)), (r3 * sin(9 * M_PI / 20.0)));
- m_64apsk[37] = gr_complex((r3 * cos(31 * M_PI / 20.0)), (r3 * sin(31 * M_PI / 20.0)));
- m_64apsk[38] = gr_complex((r3 * cos(11 * M_PI / 20.0)), (r3 * sin(11 * M_PI / 20.0)));
- m_64apsk[39] = gr_complex((r3 * cos(29 * M_PI / 20.0)), (r3 * sin(29 * M_PI / 20.0)));
- m_64apsk[40] = gr_complex((r4 * cos(3 * M_PI / 28.0)), (r4 * sin(3 * M_PI / 28.0)));
- m_64apsk[41] = gr_complex((r4 * cos(53 * M_PI / 28.0)), (r4 * sin(53 * M_PI / 28.0)));
- m_64apsk[42] = gr_complex((r4 * cos(25 * M_PI / 28.0)), (r4 * sin(25 * M_PI / 28.0)));
- m_64apsk[43] = gr_complex((r4 * cos(31 * M_PI / 28.0)), (r4 * sin(31 * M_PI / 28.0)));
- m_64apsk[44] = gr_complex((r2 * cos(5 * M_PI / 12.0)), (r2 * sin(5 * M_PI / 12.0)));
- m_64apsk[45] = gr_complex((r2 * cos(19 * M_PI / 12.0)), (r2 * sin(19 * M_PI / 12.0)));
- m_64apsk[46] = gr_complex((r2 * cos(7 * M_PI / 12.0)), (r2 * sin(7 * M_PI / 12.0)));
- m_64apsk[47] = gr_complex((r2 * cos(17 * M_PI / 12.0)), (r2 * sin(17 * M_PI / 12.0)));
- m_64apsk[48] = gr_complex((r3 * cos(M_PI / 4.0)), (r3 * sin(M_PI / 4.0)));
- m_64apsk[49] = gr_complex((r3 * cos(7 * M_PI / 4.0)), (r3 * sin(7 * M_PI / 4.0)));
- m_64apsk[50] = gr_complex((r3 * cos(3 * M_PI / 4.0)), (r3 * sin(3 * M_PI / 4.0)));
- m_64apsk[51] = gr_complex((r3 * cos(5 * M_PI / 4.0)), (r3 * sin(5 * M_PI / 4.0)));
- m_64apsk[52] = gr_complex((r3 * cos(7 * M_PI / 20.0)), (r3 * sin(7 * M_PI / 20.0)));
- m_64apsk[53] = gr_complex((r3 * cos(33 * M_PI / 20.0)), (r3 * sin(33 * M_PI / 20.0)));
- m_64apsk[54] = gr_complex((r3 * cos(13 * M_PI / 20.0)), (r3 * sin(13 * M_PI / 20.0)));
- m_64apsk[55] = gr_complex((r3 * cos(27 * M_PI / 20.0)), (r3 * sin(27 * M_PI / 20.0)));
- m_64apsk[56] = gr_complex((r3 * cos(3 * M_PI / 20.0)), (r3 * sin(3 * M_PI / 20.0)));
- m_64apsk[57] = gr_complex((r3 * cos(37 * M_PI / 20.0)), (r3 * sin(37 * M_PI / 20.0)));
- m_64apsk[58] = gr_complex((r3 * cos(17 * M_PI / 20.0)), (r3 * sin(17 * M_PI / 20.0)));
- m_64apsk[59] = gr_complex((r3 * cos(23 * M_PI / 20.0)), (r3 * sin(23 * M_PI / 20.0)));
- m_64apsk[60] = gr_complex((r2 * cos(M_PI / 4.0)), (r2 * sin(M_PI / 4.0)));
- m_64apsk[61] = gr_complex((r2 * cos(7 * M_PI / 4.0)), (r2 * sin(7 * M_PI / 4.0)));
- m_64apsk[62] = gr_complex((r2 * cos(3 * M_PI / 4.0)), (r2 * sin(3 * M_PI / 4.0)));
- m_64apsk[63] = gr_complex((r2 * cos(5 * M_PI / 4.0)), (r2 * sin(5 * M_PI / 4.0)));
+ m_64apsk[0] = gr_complex((r4 * cos(GR_M_PI / 4.0)), (r4 * sin(GR_M_PI / 4.0)));
+ m_64apsk[1] = gr_complex((r4 * cos(7 * GR_M_PI / 4.0)), (r4 * sin(7 * GR_M_PI / 4.0)));
+ m_64apsk[2] = gr_complex((r4 * cos(3 * GR_M_PI / 4.0)), (r4 * sin(3 * GR_M_PI / 4.0)));
+ m_64apsk[3] = gr_complex((r4 * cos(5 * GR_M_PI / 4.0)), (r4 * sin(5 * GR_M_PI / 4.0)));
+ m_64apsk[4] = gr_complex((r4 * cos(13 * GR_M_PI / 28.0)), (r4 * sin(13 * GR_M_PI / 28.0)));
+ m_64apsk[5] = gr_complex((r4 * cos(43 * GR_M_PI / 28.0)), (r4 * sin(43 * GR_M_PI / 28.0)));
+ m_64apsk[6] = gr_complex((r4 * cos(15 * GR_M_PI / 28.0)), (r4 * sin(15 * GR_M_PI / 28.0)));
+ m_64apsk[7] = gr_complex((r4 * cos(41 * GR_M_PI / 28.0)), (r4 * sin(41 * GR_M_PI / 28.0)));
+ m_64apsk[8] = gr_complex((r4 * cos(GR_M_PI / 28.0)), (r4 * sin(GR_M_PI / 28.0)));
+ m_64apsk[9] = gr_complex((r4 * cos(55 * GR_M_PI / 28.0)), (r4 * sin(55 * GR_M_PI / 28.0)));
+ m_64apsk[10] = gr_complex((r4 * cos(27 * GR_M_PI / 28.0)), (r4 * sin(27 * GR_M_PI / 28.0)));
+ m_64apsk[11] = gr_complex((r4 * cos(29 * GR_M_PI / 28.0)), (r4 * sin(29 * GR_M_PI / 28.0)));
+ m_64apsk[12] = gr_complex((r1 * cos(GR_M_PI / 4.0)), (r1 * sin(GR_M_PI / 4.0)));
+ m_64apsk[13] = gr_complex((r1 * cos(7 * GR_M_PI / 4.0)), (r1 * sin(7 * GR_M_PI / 4.0)));
+ m_64apsk[14] = gr_complex((r1 * cos(3 * GR_M_PI / 4.0)), (r1 * sin(3 * GR_M_PI / 4.0)));
+ m_64apsk[15] = gr_complex((r1 * cos(5 * GR_M_PI / 4.0)), (r1 * sin(5 * GR_M_PI / 4.0)));
+ m_64apsk[16] = gr_complex((r4 * cos(9 * GR_M_PI / 28.0)), (r4 * sin(9 * GR_M_PI / 28.0)));
+ m_64apsk[17] = gr_complex((r4 * cos(47 * GR_M_PI / 28.0)), (r4 * sin(47 * GR_M_PI / 28.0)));
+ m_64apsk[18] = gr_complex((r4 * cos(19 * GR_M_PI / 28.0)), (r4 * sin(19 * GR_M_PI / 28.0)));
+ m_64apsk[19] = gr_complex((r4 * cos(37 * GR_M_PI / 28.0)), (r4 * sin(37 * GR_M_PI / 28.0)));
+ m_64apsk[20] = gr_complex((r4 * cos(11 * GR_M_PI / 28.0)), (r4 * sin(11 * GR_M_PI / 28.0)));
+ m_64apsk[21] = gr_complex((r4 * cos(45 * GR_M_PI / 28.0)), (r4 * sin(45 * GR_M_PI / 28.0)));
+ m_64apsk[22] = gr_complex((r4 * cos(17 * GR_M_PI / 28.0)), (r4 * sin(17 * GR_M_PI / 28.0)));
+ m_64apsk[23] = gr_complex((r4 * cos(39 * GR_M_PI / 28.0)), (r4 * sin(39 * GR_M_PI / 28.0)));
+ m_64apsk[24] = gr_complex((r3 * cos(GR_M_PI / 20.0)), (r3 * sin(GR_M_PI / 20.0)));
+ m_64apsk[25] = gr_complex((r3 * cos(39 * GR_M_PI / 20.0)), (r3 * sin(39 * GR_M_PI / 20.0)));
+ m_64apsk[26] = gr_complex((r3 * cos(19 * GR_M_PI / 20.0)), (r3 * sin(19 * GR_M_PI / 20.0)));
+ m_64apsk[27] = gr_complex((r3 * cos(21 * GR_M_PI / 20.0)), (r3 * sin(21 * GR_M_PI / 20.0)));
+ m_64apsk[28] = gr_complex((r2 * cos(GR_M_PI / 12.0)), (r2 * sin(GR_M_PI / 12.0)));
+ m_64apsk[29] = gr_complex((r2 * cos(23 * GR_M_PI / 12.0)), (r2 * sin(23 * GR_M_PI / 12.0)));
+ m_64apsk[30] = gr_complex((r2 * cos(11 * GR_M_PI / 12.0)), (r2 * sin(11 * GR_M_PI / 12.0)));
+ m_64apsk[31] = gr_complex((r2 * cos(13 * GR_M_PI / 12.0)), (r2 * sin(13 * GR_M_PI / 12.0)));
+ m_64apsk[32] = gr_complex((r4 * cos(5 * GR_M_PI / 28.0)), (r4 * sin(5 * GR_M_PI / 28.0)));
+ m_64apsk[33] = gr_complex((r4 * cos(51 * GR_M_PI / 28.0)), (r4 * sin(51 * GR_M_PI / 28.0)));
+ m_64apsk[34] = gr_complex((r4 * cos(23 * GR_M_PI / 28.0)), (r4 * sin(23 * GR_M_PI / 28.0)));
+ m_64apsk[35] = gr_complex((r4 * cos(33 * GR_M_PI / 28.0)), (r4 * sin(33 * GR_M_PI / 28.0)));
+ m_64apsk[36] = gr_complex((r3 * cos(9 * GR_M_PI / 20.0)), (r3 * sin(9 * GR_M_PI / 20.0)));
+ m_64apsk[37] = gr_complex((r3 * cos(31 * GR_M_PI / 20.0)), (r3 * sin(31 * GR_M_PI / 20.0)));
+ m_64apsk[38] = gr_complex((r3 * cos(11 * GR_M_PI / 20.0)), (r3 * sin(11 * GR_M_PI / 20.0)));
+ m_64apsk[39] = gr_complex((r3 * cos(29 * GR_M_PI / 20.0)), (r3 * sin(29 * GR_M_PI / 20.0)));
+ m_64apsk[40] = gr_complex((r4 * cos(3 * GR_M_PI / 28.0)), (r4 * sin(3 * GR_M_PI / 28.0)));
+ m_64apsk[41] = gr_complex((r4 * cos(53 * GR_M_PI / 28.0)), (r4 * sin(53 * GR_M_PI / 28.0)));
+ m_64apsk[42] = gr_complex((r4 * cos(25 * GR_M_PI / 28.0)), (r4 * sin(25 * GR_M_PI / 28.0)));
+ m_64apsk[43] = gr_complex((r4 * cos(31 * GR_M_PI / 28.0)), (r4 * sin(31 * GR_M_PI / 28.0)));
+ m_64apsk[44] = gr_complex((r2 * cos(5 * GR_M_PI / 12.0)), (r2 * sin(5 * GR_M_PI / 12.0)));
+ m_64apsk[45] = gr_complex((r2 * cos(19 * GR_M_PI / 12.0)), (r2 * sin(19 * GR_M_PI / 12.0)));
+ m_64apsk[46] = gr_complex((r2 * cos(7 * GR_M_PI / 12.0)), (r2 * sin(7 * GR_M_PI / 12.0)));
+ m_64apsk[47] = gr_complex((r2 * cos(17 * GR_M_PI / 12.0)), (r2 * sin(17 * GR_M_PI / 12.0)));
+ m_64apsk[48] = gr_complex((r3 * cos(GR_M_PI / 4.0)), (r3 * sin(GR_M_PI / 4.0)));
+ m_64apsk[49] = gr_complex((r3 * cos(7 * GR_M_PI / 4.0)), (r3 * sin(7 * GR_M_PI / 4.0)));
+ m_64apsk[50] = gr_complex((r3 * cos(3 * GR_M_PI / 4.0)), (r3 * sin(3 * GR_M_PI / 4.0)));
+ m_64apsk[51] = gr_complex((r3 * cos(5 * GR_M_PI / 4.0)), (r3 * sin(5 * GR_M_PI / 4.0)));
+ m_64apsk[52] = gr_complex((r3 * cos(7 * GR_M_PI / 20.0)), (r3 * sin(7 * GR_M_PI / 20.0)));
+ m_64apsk[53] = gr_complex((r3 * cos(33 * GR_M_PI / 20.0)), (r3 * sin(33 * GR_M_PI / 20.0)));
+ m_64apsk[54] = gr_complex((r3 * cos(13 * GR_M_PI / 20.0)), (r3 * sin(13 * GR_M_PI / 20.0)));
+ m_64apsk[55] = gr_complex((r3 * cos(27 * GR_M_PI / 20.0)), (r3 * sin(27 * GR_M_PI / 20.0)));
+ m_64apsk[56] = gr_complex((r3 * cos(3 * GR_M_PI / 20.0)), (r3 * sin(3 * GR_M_PI / 20.0)));
+ m_64apsk[57] = gr_complex((r3 * cos(37 * GR_M_PI / 20.0)), (r3 * sin(37 * GR_M_PI / 20.0)));
+ m_64apsk[58] = gr_complex((r3 * cos(17 * GR_M_PI / 20.0)), (r3 * sin(17 * GR_M_PI / 20.0)));
+ m_64apsk[59] = gr_complex((r3 * cos(23 * GR_M_PI / 20.0)), (r3 * sin(23 * GR_M_PI / 20.0)));
+ m_64apsk[60] = gr_complex((r2 * cos(GR_M_PI / 4.0)), (r2 * sin(GR_M_PI / 4.0)));
+ m_64apsk[61] = gr_complex((r2 * cos(7 * GR_M_PI / 4.0)), (r2 * sin(7 * GR_M_PI / 4.0)));
+ m_64apsk[62] = gr_complex((r2 * cos(3 * GR_M_PI / 4.0)), (r2 * sin(3 * GR_M_PI / 4.0)));
+ m_64apsk[63] = gr_complex((r2 * cos(5 * GR_M_PI / 4.0)), (r2 * sin(5 * GR_M_PI / 4.0)));
break;
case MOD_128APSK:
r6 = m;
@@ -710,134 +711,134 @@ namespace gr {
r5 = 0;
break;
}
- m_128apsk[0] = gr_complex((r1 * cos(83 * M_PI / 1260.0)), (r1 * sin(83 * M_PI / 1260.0)));
- m_128apsk[1] = gr_complex((r6 * cos(11 * M_PI / 105.0)), (r6 * sin(11 * M_PI / 105.0)));
- m_128apsk[2] = gr_complex((r6 * cos(37 * M_PI / 1680.0)), (r6 * sin(37 * M_PI / 1680.0)));
- m_128apsk[3] = gr_complex((r6 * cos(11 * M_PI / 168.0)), (r6 * sin(11 * M_PI / 168.0)));
- m_128apsk[4] = gr_complex((r2 * cos(121 * M_PI / 2520.0)), (r2 * sin(121 * M_PI / 2520.0)));
- m_128apsk[5] = gr_complex((r3 * cos(23 * M_PI / 280.0)), (r3 * sin(23 * M_PI / 280.0)));
- m_128apsk[6] = gr_complex((r5 * cos(19 * M_PI / 720.0)), (r5 * sin(19 * M_PI / 720.0)));
- m_128apsk[7] = gr_complex((r4 * cos(61 * M_PI / 720.0)), (r4 * sin(61 * M_PI / 720.0)));
- m_128apsk[8] = gr_complex((r1 * cos(103 * M_PI / 560.0)), (r1 * sin(103 * M_PI / 560.0)));
- m_128apsk[9] = gr_complex((r6 * cos(61 * M_PI / 420.0)), (r6 * sin(61 * M_PI / 420.0)));
- m_128apsk[10] = gr_complex((r6 * cos(383 * M_PI / 1680.0)), (r6 * sin(383 * M_PI / 1680.0)));
- m_128apsk[11] = gr_complex((r6 * cos(929 * M_PI / 5040.0)), (r6 * sin(929 * M_PI / 5040.0)));
- m_128apsk[12] = gr_complex((r2 * cos(113 * M_PI / 560.0)), (r2 * sin(113 * M_PI / 560.0)));
- m_128apsk[13] = gr_complex((r3 * cos(169 * M_PI / 1008.0)), (r3 * sin(169 * M_PI / 1008.0)));
- m_128apsk[14] = gr_complex((r5 * cos(563 * M_PI / 2520.0)), (r5 * sin(563 * M_PI / 2520.0)));
- m_128apsk[15] = gr_complex((r4 * cos(139 * M_PI / 840.0)), (r4 * sin(139 * M_PI / 840.0)));
- m_128apsk[16] = gr_complex((r1 * cos(243 * M_PI / 560.0)), (r1 * sin(243 * M_PI / 560.0)));
- m_128apsk[17] = gr_complex((r6 * cos(1993 * M_PI / 5040.0)), (r6 * sin(1993 * M_PI / 5040.0)));
- m_128apsk[18] = gr_complex((r6 * cos(43 * M_PI / 90.0)), (r6 * sin(43 * M_PI / 90.0)));
- m_128apsk[19] = gr_complex((r6 * cos(73 * M_PI / 168.0)), (r6 * sin(73 * M_PI / 168.0)));
- m_128apsk[20] = gr_complex((r2 * cos(1139 * M_PI / 2520.0)), (r2 * sin(1139 * M_PI / 2520.0)));
- m_128apsk[21] = gr_complex((r3 * cos(117 * M_PI / 280.0)), (r3 * sin(117 * M_PI / 280.0)));
- m_128apsk[22] = gr_complex((r5 * cos(341 * M_PI / 720.0)), (r5 * sin(341 * M_PI / 720.0)));
- m_128apsk[23] = gr_complex((r4 * cos(349 * M_PI / 840.0)), (r4 * sin(349 * M_PI / 840.0)));
- m_128apsk[24] = gr_complex((r1 * cos(177 * M_PI / 560.0)), (r1 * sin(177 * M_PI / 560.0)));
- m_128apsk[25] = gr_complex((r6 * cos(1789 * M_PI / 5040.0)), (r6 * sin(1789 * M_PI / 5040.0)));
- m_128apsk[26] = gr_complex((r6 * cos(49 * M_PI / 180.0)), (r6 * sin(49 * M_PI / 180.0)));
- m_128apsk[27] = gr_complex((r6 * cos(53 * M_PI / 168.0)), (r6 * sin(53 * M_PI / 168.0)));
- m_128apsk[28] = gr_complex((r2 * cos(167 * M_PI / 560.0)), (r2 * sin(167 * M_PI / 560.0)));
- m_128apsk[29] = gr_complex((r3 * cos(239 * M_PI / 720.0)), (r3 * sin(239 * M_PI / 720.0)));
- m_128apsk[30] = gr_complex((r5 * cos(199 * M_PI / 720.0)), (r5 * sin(199 * M_PI / 720.0)));
- m_128apsk[31] = gr_complex((r4 * cos(281 * M_PI / 840.0)), (r4 * sin(281 * M_PI / 840.0)));
- m_128apsk[32] = gr_complex((r1 * cos(1177 * M_PI / 1260.0)), (r1 * sin(1177 * M_PI / 1260.0)));
- m_128apsk[33] = gr_complex((r6 * cos(94 * M_PI / 105.0)), (r6 * sin(94 * M_PI / 105.0)));
- m_128apsk[34] = gr_complex((r6 * cos(1643 * M_PI / 1680.0)), (r6 * sin(1643 * M_PI / 1680.0)));
- m_128apsk[35] = gr_complex((r6 * cos(157 * M_PI / 168.0)), (r6 * sin(157 * M_PI / 168.0)));
- m_128apsk[36] = gr_complex((r2 * cos(2399 * M_PI / 2520.0)), (r2 * sin(2399 * M_PI / 2520.0)));
- m_128apsk[37] = gr_complex((r3 * cos(257 * M_PI / 280.0)), (r3 * sin(257 * M_PI / 280.0)));
- m_128apsk[38] = gr_complex((r5 * cos(701 * M_PI / 720.0)), (r5 * sin(701 * M_PI / 720.0)));
- m_128apsk[39] = gr_complex((r4 * cos(659 * M_PI / 720.0)), (r4 * sin(659 * M_PI / 720.0)));
- m_128apsk[40] = gr_complex((r1 * cos(457 * M_PI / 560.0)), (r1 * sin(457 * M_PI / 560.0)));
- m_128apsk[41] = gr_complex((r6 * cos(359 * M_PI / 420.0)), (r6 * sin(359 * M_PI / 420.0)));
- m_128apsk[42] = gr_complex((r6 * cos(1297 * M_PI / 1680.0)), (r6 * sin(1297 * M_PI / 1680.0)));
- m_128apsk[43] = gr_complex((r6 * cos(4111 * M_PI / 5040.0)), (r6 * sin(4111 * M_PI / 5040.0)));
- m_128apsk[44] = gr_complex((r2 * cos(447 * M_PI / 560.0)), (r2 * sin(447 * M_PI / 560.0)));
- m_128apsk[45] = gr_complex((r3 * cos(839 * M_PI / 1008.0)), (r3 * sin(839 * M_PI / 1008.0)));
- m_128apsk[46] = gr_complex((r5 * cos(1957 * M_PI / 2520.0)), (r5 * sin(1957 * M_PI / 2520.0)));
- m_128apsk[47] = gr_complex((r4 * cos(701 * M_PI / 840.0)), (r4 * sin(701 * M_PI / 840.0)));
- m_128apsk[48] = gr_complex((r1 * cos(317 * M_PI / 560.0)), (r1 * sin(317 * M_PI / 560.0)));
- m_128apsk[49] = gr_complex((r6 * cos(3047 * M_PI / 5040.0)), (r6 * sin(3047 * M_PI / 5040.0)));
- m_128apsk[50] = gr_complex((r6 * cos(47 * M_PI / 90.0)), (r6 * sin(47 * M_PI / 90.0)));
- m_128apsk[51] = gr_complex((r6 * cos(95 * M_PI / 168.0)), (r6 * sin(95 * M_PI / 168.0)));
- m_128apsk[52] = gr_complex((r2 * cos(1381 * M_PI / 2520.0)), (r2 * sin(1381 * M_PI / 2520.0)));
- m_128apsk[53] = gr_complex((r3 * cos(163 * M_PI / 280.0)), (r3 * sin(163 * M_PI / 280.0)));
- m_128apsk[54] = gr_complex((r5 * cos(379 * M_PI / 720.0)), (r5 * sin(379 * M_PI / 720.0)));
- m_128apsk[55] = gr_complex((r4 * cos(491 * M_PI / 840.0)), (r4 * sin(491 * M_PI / 840.0)));
- m_128apsk[56] = gr_complex((r1 * cos(383 * M_PI / 560.0)), (r1 * sin(383 * M_PI / 560.0)));
- m_128apsk[57] = gr_complex((r6 * cos(3251 * M_PI / 5040.0)), (r6 * sin(3251 * M_PI / 5040.0)));
- m_128apsk[58] = gr_complex((r6 * cos(131 * M_PI / 180.0)), (r6 * sin(131 * M_PI / 180.0)));
- m_128apsk[59] = gr_complex((r6 * cos(115 * M_PI / 168.0)), (r6 * sin(115 * M_PI / 168.0)));
- m_128apsk[60] = gr_complex((r2 * cos(393 * M_PI / 560.0)), (r2 * sin(393 * M_PI / 560.0)));
- m_128apsk[61] = gr_complex((r3 * cos(481 * M_PI / 720.0)), (r3 * sin(481 * M_PI / 720.0)));
- m_128apsk[62] = gr_complex((r5 * cos(521 * M_PI / 720.0)), (r5 * sin(521 * M_PI / 720.0)));
- m_128apsk[63] = gr_complex((r4 * cos(559 * M_PI / 840.0)), (r4 * sin(559 * M_PI / 840.0)));
- m_128apsk[64] = gr_complex((r1 * cos(2437 * M_PI / 1260.0)), (r1 * sin(2437 * M_PI / 1260.0)));
- m_128apsk[65] = gr_complex((r6 * cos(199 * M_PI / 105.0)), (r6 * sin(199 * M_PI / 105.0)));
- m_128apsk[66] = gr_complex((r6 * cos(3323 * M_PI / 1680.0)), (r6 * sin(3323 * M_PI / 1680.0)));
- m_128apsk[67] = gr_complex((r6 * cos(325 * M_PI / 168.0)), (r6 * sin(325 * M_PI / 168.0)));
- m_128apsk[68] = gr_complex((r2 * cos(4919 * M_PI / 2520.0)), (r2 * sin(4919 * M_PI / 2520.0)));
- m_128apsk[69] = gr_complex((r3 * cos(537 * M_PI / 280.0)), (r3 * sin(537 * M_PI / 280.0)));
- m_128apsk[70] = gr_complex((r5 * cos(1421 * M_PI / 720.0)), (r5 * sin(1421 * M_PI / 720.0)));
- m_128apsk[71] = gr_complex((r4 * cos(1379 * M_PI / 720.0)), (r4 * sin(1379 * M_PI / 720.0)));
- m_128apsk[72] = gr_complex((r1 * cos(1017 * M_PI / 560.0)), (r1 * sin(1017 * M_PI / 560.0)));
- m_128apsk[73] = gr_complex((r6 * cos(779 * M_PI / 420.0)), (r6 * sin(779 * M_PI / 420.0)));
- m_128apsk[74] = gr_complex((r6 * cos(2977 * M_PI / 1680.0)), (r6 * sin(2977 * M_PI / 1680.0)));
- m_128apsk[75] = gr_complex((r6 * cos(9151 * M_PI / 5040.0)), (r6 * sin(9151 * M_PI / 5040.0)));
- m_128apsk[76] = gr_complex((r2 * cos(1007 * M_PI / 560.0)), (r2 * sin(1007 * M_PI / 560.0)));
- m_128apsk[77] = gr_complex((r3 * cos(1847 * M_PI / 1008.0)), (r3 * sin(1847 * M_PI / 1008.0)));
- m_128apsk[78] = gr_complex((r5 * cos(4477 * M_PI / 2520.0)), (r5 * sin(4477 * M_PI / 2520.0)));
- m_128apsk[79] = gr_complex((r4 * cos(1541 * M_PI / 840.0)), (r4 * sin(1541 * M_PI / 840.0)));
- m_128apsk[80] = gr_complex((r1 * cos(877 * M_PI / 560.0)), (r1 * sin(877 * M_PI / 560.0)));
- m_128apsk[81] = gr_complex((r6 * cos(8087 * M_PI / 5040.0)), (r6 * sin(8087 * M_PI / 5040.0)));
- m_128apsk[82] = gr_complex((r6 * cos(137 * M_PI / 90.0)), (r6 * sin(137 * M_PI / 90.0)));
- m_128apsk[83] = gr_complex((r6 * cos(263 * M_PI / 168.0)), (r6 * sin(263 * M_PI / 168.0)));
- m_128apsk[84] = gr_complex((r2 * cos(3901 * M_PI / 2520.0)), (r2 * sin(3901 * M_PI / 2520.0)));
- m_128apsk[85] = gr_complex((r3 * cos(443 * M_PI / 280.0)), (r3 * sin(443 * M_PI / 280.0)));
- m_128apsk[86] = gr_complex((r5 * cos(1099 * M_PI / 720.0)), (r5 * sin(1099 * M_PI / 720.0)));
- m_128apsk[87] = gr_complex((r4 * cos(1331 * M_PI / 840.0)), (r4 * sin(1331 * M_PI / 840.0)));
- m_128apsk[88] = gr_complex((r1 * cos(943 * M_PI / 560.0)), (r1 * sin(943 * M_PI / 560.0)));
- m_128apsk[89] = gr_complex((r6 * cos(8291 * M_PI / 5040.0)), (r6 * sin(8291 * M_PI / 5040.0)));
- m_128apsk[90] = gr_complex((r6 * cos(311 * M_PI / 180.0)), (r6 * sin(311 * M_PI / 180.0)));
- m_128apsk[91] = gr_complex((r6 * cos(283 * M_PI / 168.0)), (r6 * sin(283 * M_PI / 168.0)));
- m_128apsk[92] = gr_complex((r2 * cos(953 * M_PI / 560.0)), (r2 * sin(953 * M_PI / 560.0)));
- m_128apsk[93] = gr_complex((r3 * cos(1201 * M_PI / 720.0)), (r3 * sin(1201 * M_PI / 720.0)));
- m_128apsk[94] = gr_complex((r5 * cos(1241 * M_PI / 720.0)), (r5 * sin(1241 * M_PI / 720.0)));
- m_128apsk[95] = gr_complex((r4 * cos(1399 * M_PI / 840.0)), (r4 * sin(1399 * M_PI / 840.0)));
- m_128apsk[96] = gr_complex((r1 * cos(1343 * M_PI / 1260.0)), (r1 * sin(1343 * M_PI / 1260.0)));
- m_128apsk[97] = gr_complex((r6 * cos(116 * M_PI / 105.0)), (r6 * sin(116 * M_PI / 105.0)));
- m_128apsk[98] = gr_complex((r6 * cos(1717 * M_PI / 1680.0)), (r6 * sin(1717 * M_PI / 1680.0)));
- m_128apsk[99] = gr_complex((r6 * cos(179 * M_PI / 168.0)), (r6 * sin(179 * M_PI / 168.0)));
- m_128apsk[100] = gr_complex((r2 * cos(2641 * M_PI / 2520.0)), (r2 * sin(2641 * M_PI / 2520.0)));
- m_128apsk[101] = gr_complex((r3 * cos(303 * M_PI / 280.0)), (r3 * sin(303 * M_PI / 280.0)));
- m_128apsk[102] = gr_complex((r5 * cos(739 * M_PI / 720.0)), (r5 * sin(739 * M_PI / 720.0)));
- m_128apsk[103] = gr_complex((r4 * cos(781 * M_PI / 720.0)), (r4 * sin(781 * M_PI / 720.0)));
- m_128apsk[104] = gr_complex((r1 * cos(663 * M_PI / 560.0)), (r1 * sin(663 * M_PI / 560.0)));
- m_128apsk[105] = gr_complex((r6 * cos(481 * M_PI / 420.0)), (r6 * sin(481 * M_PI / 420.0)));
- m_128apsk[106] = gr_complex((r6 * cos(2063 * M_PI / 1680.0)), (r6 * sin(2063 * M_PI / 1680.0)));
- m_128apsk[107] = gr_complex((r6 * cos(5969 * M_PI / 5040.0)), (r6 * sin(5969 * M_PI / 5040.0)));
- m_128apsk[108] = gr_complex((r2 * cos(673 * M_PI / 560.0)), (r2 * sin(673 * M_PI / 560.0)));
- m_128apsk[109] = gr_complex((r3 * cos(1177 * M_PI / 1008.0)), (r3 * sin(1177 * M_PI / 1008.0)));
- m_128apsk[110] = gr_complex((r5 * cos(3083 * M_PI / 2520.0)), (r5 * sin(3083 * M_PI / 2520.0)));
- m_128apsk[111] = gr_complex((r4 * cos(979 * M_PI / 840.0)), (r4 * sin(979 * M_PI / 840.0)));
- m_128apsk[112] = gr_complex((r1 * cos(803 * M_PI / 560.0)), (r1 * sin(803 * M_PI / 560.0)));
- m_128apsk[113] = gr_complex((r6 * cos(7033 * M_PI / 5040.0)), (r6 * sin(7033 * M_PI / 5040.0)));
- m_128apsk[114] = gr_complex((r6 * cos(133 * M_PI / 90.0)), (r6 * sin(133 * M_PI / 90.0)));
- m_128apsk[115] = gr_complex((r6 * cos(241 * M_PI / 168.0)), (r6 * sin(241 * M_PI / 168.0)));
- m_128apsk[116] = gr_complex((r2 * cos(3659 * M_PI / 2520.0)), (r2 * sin(3659 * M_PI / 2520.0)));
- m_128apsk[117] = gr_complex((r3 * cos(397 * M_PI / 280.0)), (r3 * sin(397 * M_PI / 280.0)));
- m_128apsk[118] = gr_complex((r5 * cos(1061 * M_PI / 720.0)), (r5 * sin(1061 * M_PI / 720.0)));
- m_128apsk[119] = gr_complex((r4 * cos(1189 * M_PI / 840.0)), (r4 * sin(1189 * M_PI / 840.0)));
- m_128apsk[120] = gr_complex((r1 * cos(737 * M_PI / 560.0)), (r1 * sin(737 * M_PI / 560.0)));
- m_128apsk[121] = gr_complex((r6 * cos(6829 * M_PI / 5040.0)), (r6 * sin(6829 * M_PI / 5040.0)));
- m_128apsk[122] = gr_complex((r6 * cos(229 * M_PI / 180.0)), (r6 * sin(229 * M_PI / 180.0)));
- m_128apsk[123] = gr_complex((r6 * cos(221 * M_PI / 168.0)), (r6 * sin(221 * M_PI / 168.0)));
- m_128apsk[124] = gr_complex((r2 * cos(727 * M_PI / 560.0)), (r2 * sin(727 * M_PI / 560.0)));
- m_128apsk[125] = gr_complex((r3 * cos(959 * M_PI / 720.0)), (r3 * sin(959 * M_PI / 720.0)));
- m_128apsk[126] = gr_complex((r5 * cos(919 * M_PI / 720.0)), (r5 * sin(919 * M_PI / 720.0)));
- m_128apsk[127] = gr_complex((r4 * cos(1121 * M_PI / 840.0)), (r4 * sin(1121 * M_PI / 840.0)));
+ m_128apsk[0] = gr_complex((r1 * cos(83 * GR_M_PI / 1260.0)), (r1 * sin(83 * GR_M_PI / 1260.0)));
+ m_128apsk[1] = gr_complex((r6 * cos(11 * GR_M_PI / 105.0)), (r6 * sin(11 * GR_M_PI / 105.0)));
+ m_128apsk[2] = gr_complex((r6 * cos(37 * GR_M_PI / 1680.0)), (r6 * sin(37 * GR_M_PI / 1680.0)));
+ m_128apsk[3] = gr_complex((r6 * cos(11 * GR_M_PI / 168.0)), (r6 * sin(11 * GR_M_PI / 168.0)));
+ m_128apsk[4] = gr_complex((r2 * cos(121 * GR_M_PI / 2520.0)), (r2 * sin(121 * GR_M_PI / 2520.0)));
+ m_128apsk[5] = gr_complex((r3 * cos(23 * GR_M_PI / 280.0)), (r3 * sin(23 * GR_M_PI / 280.0)));
+ m_128apsk[6] = gr_complex((r5 * cos(19 * GR_M_PI / 720.0)), (r5 * sin(19 * GR_M_PI / 720.0)));
+ m_128apsk[7] = gr_complex((r4 * cos(61 * GR_M_PI / 720.0)), (r4 * sin(61 * GR_M_PI / 720.0)));
+ m_128apsk[8] = gr_complex((r1 * cos(103 * GR_M_PI / 560.0)), (r1 * sin(103 * GR_M_PI / 560.0)));
+ m_128apsk[9] = gr_complex((r6 * cos(61 * GR_M_PI / 420.0)), (r6 * sin(61 * GR_M_PI / 420.0)));
+ m_128apsk[10] = gr_complex((r6 * cos(383 * GR_M_PI / 1680.0)), (r6 * sin(383 * GR_M_PI / 1680.0)));
+ m_128apsk[11] = gr_complex((r6 * cos(929 * GR_M_PI / 5040.0)), (r6 * sin(929 * GR_M_PI / 5040.0)));
+ m_128apsk[12] = gr_complex((r2 * cos(113 * GR_M_PI / 560.0)), (r2 * sin(113 * GR_M_PI / 560.0)));
+ m_128apsk[13] = gr_complex((r3 * cos(169 * GR_M_PI / 1008.0)), (r3 * sin(169 * GR_M_PI / 1008.0)));
+ m_128apsk[14] = gr_complex((r5 * cos(563 * GR_M_PI / 2520.0)), (r5 * sin(563 * GR_M_PI / 2520.0)));
+ m_128apsk[15] = gr_complex((r4 * cos(139 * GR_M_PI / 840.0)), (r4 * sin(139 * GR_M_PI / 840.0)));
+ m_128apsk[16] = gr_complex((r1 * cos(243 * GR_M_PI / 560.0)), (r1 * sin(243 * GR_M_PI / 560.0)));
+ m_128apsk[17] = gr_complex((r6 * cos(1993 * GR_M_PI / 5040.0)), (r6 * sin(1993 * GR_M_PI / 5040.0)));
+ m_128apsk[18] = gr_complex((r6 * cos(43 * GR_M_PI / 90.0)), (r6 * sin(43 * GR_M_PI / 90.0)));
+ m_128apsk[19] = gr_complex((r6 * cos(73 * GR_M_PI / 168.0)), (r6 * sin(73 * GR_M_PI / 168.0)));
+ m_128apsk[20] = gr_complex((r2 * cos(1139 * GR_M_PI / 2520.0)), (r2 * sin(1139 * GR_M_PI / 2520.0)));
+ m_128apsk[21] = gr_complex((r3 * cos(117 * GR_M_PI / 280.0)), (r3 * sin(117 * GR_M_PI / 280.0)));
+ m_128apsk[22] = gr_complex((r5 * cos(341 * GR_M_PI / 720.0)), (r5 * sin(341 * GR_M_PI / 720.0)));
+ m_128apsk[23] = gr_complex((r4 * cos(349 * GR_M_PI / 840.0)), (r4 * sin(349 * GR_M_PI / 840.0)));
+ m_128apsk[24] = gr_complex((r1 * cos(177 * GR_M_PI / 560.0)), (r1 * sin(177 * GR_M_PI / 560.0)));
+ m_128apsk[25] = gr_complex((r6 * cos(1789 * GR_M_PI / 5040.0)), (r6 * sin(1789 * GR_M_PI / 5040.0)));
+ m_128apsk[26] = gr_complex((r6 * cos(49 * GR_M_PI / 180.0)), (r6 * sin(49 * GR_M_PI / 180.0)));
+ m_128apsk[27] = gr_complex((r6 * cos(53 * GR_M_PI / 168.0)), (r6 * sin(53 * GR_M_PI / 168.0)));
+ m_128apsk[28] = gr_complex((r2 * cos(167 * GR_M_PI / 560.0)), (r2 * sin(167 * GR_M_PI / 560.0)));
+ m_128apsk[29] = gr_complex((r3 * cos(239 * GR_M_PI / 720.0)), (r3 * sin(239 * GR_M_PI / 720.0)));
+ m_128apsk[30] = gr_complex((r5 * cos(199 * GR_M_PI / 720.0)), (r5 * sin(199 * GR_M_PI / 720.0)));
+ m_128apsk[31] = gr_complex((r4 * cos(281 * GR_M_PI / 840.0)), (r4 * sin(281 * GR_M_PI / 840.0)));
+ m_128apsk[32] = gr_complex((r1 * cos(1177 * GR_M_PI / 1260.0)), (r1 * sin(1177 * GR_M_PI / 1260.0)));
+ m_128apsk[33] = gr_complex((r6 * cos(94 * GR_M_PI / 105.0)), (r6 * sin(94 * GR_M_PI / 105.0)));
+ m_128apsk[34] = gr_complex((r6 * cos(1643 * GR_M_PI / 1680.0)), (r6 * sin(1643 * GR_M_PI / 1680.0)));
+ m_128apsk[35] = gr_complex((r6 * cos(157 * GR_M_PI / 168.0)), (r6 * sin(157 * GR_M_PI / 168.0)));
+ m_128apsk[36] = gr_complex((r2 * cos(2399 * GR_M_PI / 2520.0)), (r2 * sin(2399 * GR_M_PI / 2520.0)));
+ m_128apsk[37] = gr_complex((r3 * cos(257 * GR_M_PI / 280.0)), (r3 * sin(257 * GR_M_PI / 280.0)));
+ m_128apsk[38] = gr_complex((r5 * cos(701 * GR_M_PI / 720.0)), (r5 * sin(701 * GR_M_PI / 720.0)));
+ m_128apsk[39] = gr_complex((r4 * cos(659 * GR_M_PI / 720.0)), (r4 * sin(659 * GR_M_PI / 720.0)));
+ m_128apsk[40] = gr_complex((r1 * cos(457 * GR_M_PI / 560.0)), (r1 * sin(457 * GR_M_PI / 560.0)));
+ m_128apsk[41] = gr_complex((r6 * cos(359 * GR_M_PI / 420.0)), (r6 * sin(359 * GR_M_PI / 420.0)));
+ m_128apsk[42] = gr_complex((r6 * cos(1297 * GR_M_PI / 1680.0)), (r6 * sin(1297 * GR_M_PI / 1680.0)));
+ m_128apsk[43] = gr_complex((r6 * cos(4111 * GR_M_PI / 5040.0)), (r6 * sin(4111 * GR_M_PI / 5040.0)));
+ m_128apsk[44] = gr_complex((r2 * cos(447 * GR_M_PI / 560.0)), (r2 * sin(447 * GR_M_PI / 560.0)));
+ m_128apsk[45] = gr_complex((r3 * cos(839 * GR_M_PI / 1008.0)), (r3 * sin(839 * GR_M_PI / 1008.0)));
+ m_128apsk[46] = gr_complex((r5 * cos(1957 * GR_M_PI / 2520.0)), (r5 * sin(1957 * GR_M_PI / 2520.0)));
+ m_128apsk[47] = gr_complex((r4 * cos(701 * GR_M_PI / 840.0)), (r4 * sin(701 * GR_M_PI / 840.0)));
+ m_128apsk[48] = gr_complex((r1 * cos(317 * GR_M_PI / 560.0)), (r1 * sin(317 * GR_M_PI / 560.0)));
+ m_128apsk[49] = gr_complex((r6 * cos(3047 * GR_M_PI / 5040.0)), (r6 * sin(3047 * GR_M_PI / 5040.0)));
+ m_128apsk[50] = gr_complex((r6 * cos(47 * GR_M_PI / 90.0)), (r6 * sin(47 * GR_M_PI / 90.0)));
+ m_128apsk[51] = gr_complex((r6 * cos(95 * GR_M_PI / 168.0)), (r6 * sin(95 * GR_M_PI / 168.0)));
+ m_128apsk[52] = gr_complex((r2 * cos(1381 * GR_M_PI / 2520.0)), (r2 * sin(1381 * GR_M_PI / 2520.0)));
+ m_128apsk[53] = gr_complex((r3 * cos(163 * GR_M_PI / 280.0)), (r3 * sin(163 * GR_M_PI / 280.0)));
+ m_128apsk[54] = gr_complex((r5 * cos(379 * GR_M_PI / 720.0)), (r5 * sin(379 * GR_M_PI / 720.0)));
+ m_128apsk[55] = gr_complex((r4 * cos(491 * GR_M_PI / 840.0)), (r4 * sin(491 * GR_M_PI / 840.0)));
+ m_128apsk[56] = gr_complex((r1 * cos(383 * GR_M_PI / 560.0)), (r1 * sin(383 * GR_M_PI / 560.0)));
+ m_128apsk[57] = gr_complex((r6 * cos(3251 * GR_M_PI / 5040.0)), (r6 * sin(3251 * GR_M_PI / 5040.0)));
+ m_128apsk[58] = gr_complex((r6 * cos(131 * GR_M_PI / 180.0)), (r6 * sin(131 * GR_M_PI / 180.0)));
+ m_128apsk[59] = gr_complex((r6 * cos(115 * GR_M_PI / 168.0)), (r6 * sin(115 * GR_M_PI / 168.0)));
+ m_128apsk[60] = gr_complex((r2 * cos(393 * GR_M_PI / 560.0)), (r2 * sin(393 * GR_M_PI / 560.0)));
+ m_128apsk[61] = gr_complex((r3 * cos(481 * GR_M_PI / 720.0)), (r3 * sin(481 * GR_M_PI / 720.0)));
+ m_128apsk[62] = gr_complex((r5 * cos(521 * GR_M_PI / 720.0)), (r5 * sin(521 * GR_M_PI / 720.0)));
+ m_128apsk[63] = gr_complex((r4 * cos(559 * GR_M_PI / 840.0)), (r4 * sin(559 * GR_M_PI / 840.0)));
+ m_128apsk[64] = gr_complex((r1 * cos(2437 * GR_M_PI / 1260.0)), (r1 * sin(2437 * GR_M_PI / 1260.0)));
+ m_128apsk[65] = gr_complex((r6 * cos(199 * GR_M_PI / 105.0)), (r6 * sin(199 * GR_M_PI / 105.0)));
+ m_128apsk[66] = gr_complex((r6 * cos(3323 * GR_M_PI / 1680.0)), (r6 * sin(3323 * GR_M_PI / 1680.0)));
+ m_128apsk[67] = gr_complex((r6 * cos(325 * GR_M_PI / 168.0)), (r6 * sin(325 * GR_M_PI / 168.0)));
+ m_128apsk[68] = gr_complex((r2 * cos(4919 * GR_M_PI / 2520.0)), (r2 * sin(4919 * GR_M_PI / 2520.0)));
+ m_128apsk[69] = gr_complex((r3 * cos(537 * GR_M_PI / 280.0)), (r3 * sin(537 * GR_M_PI / 280.0)));
+ m_128apsk[70] = gr_complex((r5 * cos(1421 * GR_M_PI / 720.0)), (r5 * sin(1421 * GR_M_PI / 720.0)));
+ m_128apsk[71] = gr_complex((r4 * cos(1379 * GR_M_PI / 720.0)), (r4 * sin(1379 * GR_M_PI / 720.0)));
+ m_128apsk[72] = gr_complex((r1 * cos(1017 * GR_M_PI / 560.0)), (r1 * sin(1017 * GR_M_PI / 560.0)));
+ m_128apsk[73] = gr_complex((r6 * cos(779 * GR_M_PI / 420.0)), (r6 * sin(779 * GR_M_PI / 420.0)));
+ m_128apsk[74] = gr_complex((r6 * cos(2977 * GR_M_PI / 1680.0)), (r6 * sin(2977 * GR_M_PI / 1680.0)));
+ m_128apsk[75] = gr_complex((r6 * cos(9151 * GR_M_PI / 5040.0)), (r6 * sin(9151 * GR_M_PI / 5040.0)));
+ m_128apsk[76] = gr_complex((r2 * cos(1007 * GR_M_PI / 560.0)), (r2 * sin(1007 * GR_M_PI / 560.0)));
+ m_128apsk[77] = gr_complex((r3 * cos(1847 * GR_M_PI / 1008.0)), (r3 * sin(1847 * GR_M_PI / 1008.0)));
+ m_128apsk[78] = gr_complex((r5 * cos(4477 * GR_M_PI / 2520.0)), (r5 * sin(4477 * GR_M_PI / 2520.0)));
+ m_128apsk[79] = gr_complex((r4 * cos(1541 * GR_M_PI / 840.0)), (r4 * sin(1541 * GR_M_PI / 840.0)));
+ m_128apsk[80] = gr_complex((r1 * cos(877 * GR_M_PI / 560.0)), (r1 * sin(877 * GR_M_PI / 560.0)));
+ m_128apsk[81] = gr_complex((r6 * cos(8087 * GR_M_PI / 5040.0)), (r6 * sin(8087 * GR_M_PI / 5040.0)));
+ m_128apsk[82] = gr_complex((r6 * cos(137 * GR_M_PI / 90.0)), (r6 * sin(137 * GR_M_PI / 90.0)));
+ m_128apsk[83] = gr_complex((r6 * cos(263 * GR_M_PI / 168.0)), (r6 * sin(263 * GR_M_PI / 168.0)));
+ m_128apsk[84] = gr_complex((r2 * cos(3901 * GR_M_PI / 2520.0)), (r2 * sin(3901 * GR_M_PI / 2520.0)));
+ m_128apsk[85] = gr_complex((r3 * cos(443 * GR_M_PI / 280.0)), (r3 * sin(443 * GR_M_PI / 280.0)));
+ m_128apsk[86] = gr_complex((r5 * cos(1099 * GR_M_PI / 720.0)), (r5 * sin(1099 * GR_M_PI / 720.0)));
+ m_128apsk[87] = gr_complex((r4 * cos(1331 * GR_M_PI / 840.0)), (r4 * sin(1331 * GR_M_PI / 840.0)));
+ m_128apsk[88] = gr_complex((r1 * cos(943 * GR_M_PI / 560.0)), (r1 * sin(943 * GR_M_PI / 560.0)));
+ m_128apsk[89] = gr_complex((r6 * cos(8291 * GR_M_PI / 5040.0)), (r6 * sin(8291 * GR_M_PI / 5040.0)));
+ m_128apsk[90] = gr_complex((r6 * cos(311 * GR_M_PI / 180.0)), (r6 * sin(311 * GR_M_PI / 180.0)));
+ m_128apsk[91] = gr_complex((r6 * cos(283 * GR_M_PI / 168.0)), (r6 * sin(283 * GR_M_PI / 168.0)));
+ m_128apsk[92] = gr_complex((r2 * cos(953 * GR_M_PI / 560.0)), (r2 * sin(953 * GR_M_PI / 560.0)));
+ m_128apsk[93] = gr_complex((r3 * cos(1201 * GR_M_PI / 720.0)), (r3 * sin(1201 * GR_M_PI / 720.0)));
+ m_128apsk[94] = gr_complex((r5 * cos(1241 * GR_M_PI / 720.0)), (r5 * sin(1241 * GR_M_PI / 720.0)));
+ m_128apsk[95] = gr_complex((r4 * cos(1399 * GR_M_PI / 840.0)), (r4 * sin(1399 * GR_M_PI / 840.0)));
+ m_128apsk[96] = gr_complex((r1 * cos(1343 * GR_M_PI / 1260.0)), (r1 * sin(1343 * GR_M_PI / 1260.0)));
+ m_128apsk[97] = gr_complex((r6 * cos(116 * GR_M_PI / 105.0)), (r6 * sin(116 * GR_M_PI / 105.0)));
+ m_128apsk[98] = gr_complex((r6 * cos(1717 * GR_M_PI / 1680.0)), (r6 * sin(1717 * GR_M_PI / 1680.0)));
+ m_128apsk[99] = gr_complex((r6 * cos(179 * GR_M_PI / 168.0)), (r6 * sin(179 * GR_M_PI / 168.0)));
+ m_128apsk[100] = gr_complex((r2 * cos(2641 * GR_M_PI / 2520.0)), (r2 * sin(2641 * GR_M_PI / 2520.0)));
+ m_128apsk[101] = gr_complex((r3 * cos(303 * GR_M_PI / 280.0)), (r3 * sin(303 * GR_M_PI / 280.0)));
+ m_128apsk[102] = gr_complex((r5 * cos(739 * GR_M_PI / 720.0)), (r5 * sin(739 * GR_M_PI / 720.0)));
+ m_128apsk[103] = gr_complex((r4 * cos(781 * GR_M_PI / 720.0)), (r4 * sin(781 * GR_M_PI / 720.0)));
+ m_128apsk[104] = gr_complex((r1 * cos(663 * GR_M_PI / 560.0)), (r1 * sin(663 * GR_M_PI / 560.0)));
+ m_128apsk[105] = gr_complex((r6 * cos(481 * GR_M_PI / 420.0)), (r6 * sin(481 * GR_M_PI / 420.0)));
+ m_128apsk[106] = gr_complex((r6 * cos(2063 * GR_M_PI / 1680.0)), (r6 * sin(2063 * GR_M_PI / 1680.0)));
+ m_128apsk[107] = gr_complex((r6 * cos(5969 * GR_M_PI / 5040.0)), (r6 * sin(5969 * GR_M_PI / 5040.0)));
+ m_128apsk[108] = gr_complex((r2 * cos(673 * GR_M_PI / 560.0)), (r2 * sin(673 * GR_M_PI / 560.0)));
+ m_128apsk[109] = gr_complex((r3 * cos(1177 * GR_M_PI / 1008.0)), (r3 * sin(1177 * GR_M_PI / 1008.0)));
+ m_128apsk[110] = gr_complex((r5 * cos(3083 * GR_M_PI / 2520.0)), (r5 * sin(3083 * GR_M_PI / 2520.0)));
+ m_128apsk[111] = gr_complex((r4 * cos(979 * GR_M_PI / 840.0)), (r4 * sin(979 * GR_M_PI / 840.0)));
+ m_128apsk[112] = gr_complex((r1 * cos(803 * GR_M_PI / 560.0)), (r1 * sin(803 * GR_M_PI / 560.0)));
+ m_128apsk[113] = gr_complex((r6 * cos(7033 * GR_M_PI / 5040.0)), (r6 * sin(7033 * GR_M_PI / 5040.0)));
+ m_128apsk[114] = gr_complex((r6 * cos(133 * GR_M_PI / 90.0)), (r6 * sin(133 * GR_M_PI / 90.0)));
+ m_128apsk[115] = gr_complex((r6 * cos(241 * GR_M_PI / 168.0)), (r6 * sin(241 * GR_M_PI / 168.0)));
+ m_128apsk[116] = gr_complex((r2 * cos(3659 * GR_M_PI / 2520.0)), (r2 * sin(3659 * GR_M_PI / 2520.0)));
+ m_128apsk[117] = gr_complex((r3 * cos(397 * GR_M_PI / 280.0)), (r3 * sin(397 * GR_M_PI / 280.0)));
+ m_128apsk[118] = gr_complex((r5 * cos(1061 * GR_M_PI / 720.0)), (r5 * sin(1061 * GR_M_PI / 720.0)));
+ m_128apsk[119] = gr_complex((r4 * cos(1189 * GR_M_PI / 840.0)), (r4 * sin(1189 * GR_M_PI / 840.0)));
+ m_128apsk[120] = gr_complex((r1 * cos(737 * GR_M_PI / 560.0)), (r1 * sin(737 * GR_M_PI / 560.0)));
+ m_128apsk[121] = gr_complex((r6 * cos(6829 * GR_M_PI / 5040.0)), (r6 * sin(6829 * GR_M_PI / 5040.0)));
+ m_128apsk[122] = gr_complex((r6 * cos(229 * GR_M_PI / 180.0)), (r6 * sin(229 * GR_M_PI / 180.0)));
+ m_128apsk[123] = gr_complex((r6 * cos(221 * GR_M_PI / 168.0)), (r6 * sin(221 * GR_M_PI / 168.0)));
+ m_128apsk[124] = gr_complex((r2 * cos(727 * GR_M_PI / 560.0)), (r2 * sin(727 * GR_M_PI / 560.0)));
+ m_128apsk[125] = gr_complex((r3 * cos(959 * GR_M_PI / 720.0)), (r3 * sin(959 * GR_M_PI / 720.0)));
+ m_128apsk[126] = gr_complex((r5 * cos(919 * GR_M_PI / 720.0)), (r5 * sin(919 * GR_M_PI / 720.0)));
+ m_128apsk[127] = gr_complex((r4 * cos(1121 * GR_M_PI / 840.0)), (r4 * sin(1121 * GR_M_PI / 840.0)));
break;
case MOD_256APSK:
if (rate == C20_30) {
@@ -1397,262 +1398,262 @@ namespace gr {
r7 = 0;
break;
}
- m_256apsk[0] = gr_complex((r1 * cos(M_PI / 32.0)), (r1 * sin(M_PI / 32.0)));
- m_256apsk[1] = gr_complex((r1 * cos(3 * M_PI / 32.0)), (r1 * sin(3 * M_PI / 32.0)));
- m_256apsk[2] = gr_complex((r1 * cos(7 * M_PI / 32.0)), (r1 * sin(7 * M_PI / 32.0)));
- m_256apsk[3] = gr_complex((r1 * cos(5 * M_PI / 32.0)), (r1 * sin(5 * M_PI / 32.0)));
- m_256apsk[4] = gr_complex((r1 * cos(15 * M_PI / 32.0)), (r1 * sin(15 * M_PI / 32.0)));
- m_256apsk[5] = gr_complex((r1 * cos(13 * M_PI / 32.0)), (r1 * sin(13 * M_PI / 32.0)));
- m_256apsk[6] = gr_complex((r1 * cos(9 * M_PI / 32.0)), (r1 * sin(9 * M_PI / 32.0)));
- m_256apsk[7] = gr_complex((r1 * cos(11 * M_PI / 32.0)), (r1 * sin(11 * M_PI / 32.0)));
- m_256apsk[8] = gr_complex((r1 * cos(31 * M_PI / 32.0)), (r1 * sin(31 * M_PI / 32.0)));
- m_256apsk[9] = gr_complex((r1 * cos(29 * M_PI / 32.0)), (r1 * sin(29 * M_PI / 32.0)));
- m_256apsk[10] = gr_complex((r1 * cos(25 * M_PI / 32.0)), (r1 * sin(25 * M_PI / 32.0)));
- m_256apsk[11] = gr_complex((r1 * cos(27 * M_PI / 32.0)), (r1 * sin(27 * M_PI / 32.0)));
- m_256apsk[12] = gr_complex((r1 * cos(17 * M_PI / 32.0)), (r1 * sin(17 * M_PI / 32.0)));
- m_256apsk[13] = gr_complex((r1 * cos(19 * M_PI / 32.0)), (r1 * sin(19 * M_PI / 32.0)));
- m_256apsk[14] = gr_complex((r1 * cos(23 * M_PI / 32.0)), (r1 * sin(23 * M_PI / 32.0)));
- m_256apsk[15] = gr_complex((r1 * cos(21 * M_PI / 32.0)), (r1 * sin(21 * M_PI / 32.0)));
- m_256apsk[16] = gr_complex((r1 * cos(-1 * M_PI / 32.0)), (r1 * sin(-1 * M_PI / 32.0)));
- m_256apsk[17] = gr_complex((r1 * cos(-3 * M_PI / 32.0)), (r1 * sin(-3 * M_PI / 32.0)));
- m_256apsk[18] = gr_complex((r1 * cos(-7 * M_PI / 32.0)), (r1 * sin(-7 * M_PI / 32.0)));
- m_256apsk[19] = gr_complex((r1 * cos(-5 * M_PI / 32.0)), (r1 * sin(-5 * M_PI / 32.0)));
- m_256apsk[20] = gr_complex((r1 * cos(-15 * M_PI / 32.0)), (r1 * sin(-15 * M_PI / 32.0)));
- m_256apsk[21] = gr_complex((r1 * cos(-13 * M_PI / 32.0)), (r1 * sin(-13 * M_PI / 32.0)));
- m_256apsk[22] = gr_complex((r1 * cos(-9 * M_PI / 32.0)), (r1 * sin(-9 * M_PI / 32.0)));
- m_256apsk[23] = gr_complex((r1 * cos(-11 * M_PI / 32.0)), (r1 * sin(-11 * M_PI / 32.0)));
- m_256apsk[24] = gr_complex((r1 * cos(33 * M_PI / 32.0)), (r1 * sin(33 * M_PI / 32.0)));
- m_256apsk[25] = gr_complex((r1 * cos(35 * M_PI / 32.0)), (r1 * sin(35 * M_PI / 32.0)));
- m_256apsk[26] = gr_complex((r1 * cos(39 * M_PI / 32.0)), (r1 * sin(39 * M_PI / 32.0)));
- m_256apsk[27] = gr_complex((r1 * cos(37 * M_PI / 32.0)), (r1 * sin(37 * M_PI / 32.0)));
- m_256apsk[28] = gr_complex((r1 * cos(47 * M_PI / 32.0)), (r1 * sin(47 * M_PI / 32.0)));
- m_256apsk[29] = gr_complex((r1 * cos(45 * M_PI / 32.0)), (r1 * sin(45 * M_PI / 32.0)));
- m_256apsk[30] = gr_complex((r1 * cos(41 * M_PI / 32.0)), (r1 * sin(41 * M_PI / 32.0)));
- m_256apsk[31] = gr_complex((r1 * cos(43 * M_PI / 32.0)), (r1 * sin(43 * M_PI / 32.0)));
- m_256apsk[32] = gr_complex((r2 * cos(M_PI / 32.0)), (r2 * sin(M_PI / 32.0)));
- m_256apsk[33] = gr_complex((r2 * cos(3 * M_PI / 32.0)), (r2 * sin(3 * M_PI / 32.0)));
- m_256apsk[34] = gr_complex((r2 * cos(7 * M_PI / 32.0)), (r2 * sin(7 * M_PI / 32.0)));
- m_256apsk[35] = gr_complex((r2 * cos(5 * M_PI / 32.0)), (r2 * sin(5 * M_PI / 32.0)));
- m_256apsk[36] = gr_complex((r2 * cos(15 * M_PI / 32.0)), (r2 * sin(15 * M_PI / 32.0)));
- m_256apsk[37] = gr_complex((r2 * cos(13 * M_PI / 32.0)), (r2 * sin(13 * M_PI / 32.0)));
- m_256apsk[38] = gr_complex((r2 * cos(9 * M_PI / 32.0)), (r2 * sin(9 * M_PI / 32.0)));
- m_256apsk[39] = gr_complex((r2 * cos(11 * M_PI / 32.0)), (r2 * sin(11 * M_PI / 32.0)));
- m_256apsk[40] = gr_complex((r2 * cos(31 * M_PI / 32.0)), (r2 * sin(31 * M_PI / 32.0)));
- m_256apsk[41] = gr_complex((r2 * cos(29 * M_PI / 32.0)), (r2 * sin(29 * M_PI / 32.0)));
- m_256apsk[42] = gr_complex((r2 * cos(25 * M_PI / 32.0)), (r2 * sin(25 * M_PI / 32.0)));
- m_256apsk[43] = gr_complex((r2 * cos(27 * M_PI / 32.0)), (r2 * sin(27 * M_PI / 32.0)));
- m_256apsk[44] = gr_complex((r2 * cos(17 * M_PI / 32.0)), (r2 * sin(17 * M_PI / 32.0)));
- m_256apsk[45] = gr_complex((r2 * cos(19 * M_PI / 32.0)), (r2 * sin(19 * M_PI / 32.0)));
- m_256apsk[46] = gr_complex((r2 * cos(23 * M_PI / 32.0)), (r2 * sin(23 * M_PI / 32.0)));
- m_256apsk[47] = gr_complex((r2 * cos(21 * M_PI / 32.0)), (r2 * sin(21 * M_PI / 32.0)));
- m_256apsk[48] = gr_complex((r2 * cos(-1 * M_PI / 32.0)), (r2 * sin(-1 * M_PI / 32.0)));
- m_256apsk[49] = gr_complex((r2 * cos(-3 * M_PI / 32.0)), (r2 * sin(-3 * M_PI / 32.0)));
- m_256apsk[50] = gr_complex((r2 * cos(-7 * M_PI / 32.0)), (r2 * sin(-7 * M_PI / 32.0)));
- m_256apsk[51] = gr_complex((r2 * cos(-5 * M_PI / 32.0)), (r2 * sin(-5 * M_PI / 32.0)));
- m_256apsk[52] = gr_complex((r2 * cos(-15 * M_PI / 32.0)), (r2 * sin(-15 * M_PI / 32.0)));
- m_256apsk[53] = gr_complex((r2 * cos(-13 * M_PI / 32.0)), (r2 * sin(-13 * M_PI / 32.0)));
- m_256apsk[54] = gr_complex((r2 * cos(-9 * M_PI / 32.0)), (r2 * sin(-9 * M_PI / 32.0)));
- m_256apsk[55] = gr_complex((r2 * cos(-11 * M_PI / 32.0)), (r2 * sin(-11 * M_PI / 32.0)));
- m_256apsk[56] = gr_complex((r2 * cos(33 * M_PI / 32.0)), (r2 * sin(33 * M_PI / 32.0)));
- m_256apsk[57] = gr_complex((r2 * cos(35 * M_PI / 32.0)), (r2 * sin(35 * M_PI / 32.0)));
- m_256apsk[58] = gr_complex((r2 * cos(39 * M_PI / 32.0)), (r2 * sin(39 * M_PI / 32.0)));
- m_256apsk[59] = gr_complex((r2 * cos(37 * M_PI / 32.0)), (r2 * sin(37 * M_PI / 32.0)));
- m_256apsk[60] = gr_complex((r2 * cos(47 * M_PI / 32.0)), (r2 * sin(47 * M_PI / 32.0)));
- m_256apsk[61] = gr_complex((r2 * cos(45 * M_PI / 32.0)), (r2 * sin(45 * M_PI / 32.0)));
- m_256apsk[62] = gr_complex((r2 * cos(41 * M_PI / 32.0)), (r2 * sin(41 * M_PI / 32.0)));
- m_256apsk[63] = gr_complex((r2 * cos(43 * M_PI / 32.0)), (r2 * sin(43 * M_PI / 32.0)));
- m_256apsk[64] = gr_complex((r4 * cos(M_PI / 32.0)), (r4 * sin(M_PI / 32.0)));
- m_256apsk[65] = gr_complex((r4 * cos(3 * M_PI / 32.0)), (r4 * sin(3 * M_PI / 32.0)));
- m_256apsk[66] = gr_complex((r4 * cos(7 * M_PI / 32.0)), (r4 * sin(7 * M_PI / 32.0)));
- m_256apsk[67] = gr_complex((r4 * cos(5 * M_PI / 32.0)), (r4 * sin(5 * M_PI / 32.0)));
- m_256apsk[68] = gr_complex((r4 * cos(15 * M_PI / 32.0)), (r4 * sin(15 * M_PI / 32.0)));
- m_256apsk[69] = gr_complex((r4 * cos(13 * M_PI / 32.0)), (r4 * sin(13 * M_PI / 32.0)));
- m_256apsk[70] = gr_complex((r4 * cos(9 * M_PI / 32.0)), (r4 * sin(9 * M_PI / 32.0)));
- m_256apsk[71] = gr_complex((r4 * cos(11 * M_PI / 32.0)), (r4 * sin(11 * M_PI / 32.0)));
- m_256apsk[72] = gr_complex((r4 * cos(31 * M_PI / 32.0)), (r4 * sin(31 * M_PI / 32.0)));
- m_256apsk[73] = gr_complex((r4 * cos(29 * M_PI / 32.0)), (r4 * sin(29 * M_PI / 32.0)));
- m_256apsk[74] = gr_complex((r4 * cos(25 * M_PI / 32.0)), (r4 * sin(25 * M_PI / 32.0)));
- m_256apsk[75] = gr_complex((r4 * cos(27 * M_PI / 32.0)), (r4 * sin(27 * M_PI / 32.0)));
- m_256apsk[76] = gr_complex((r4 * cos(17 * M_PI / 32.0)), (r4 * sin(17 * M_PI / 32.0)));
- m_256apsk[77] = gr_complex((r4 * cos(19 * M_PI / 32.0)), (r4 * sin(19 * M_PI / 32.0)));
- m_256apsk[78] = gr_complex((r4 * cos(23 * M_PI / 32.0)), (r4 * sin(23 * M_PI / 32.0)));
- m_256apsk[79] = gr_complex((r4 * cos(21 * M_PI / 32.0)), (r4 * sin(21 * M_PI / 32.0)));
- m_256apsk[80] = gr_complex((r4 * cos(-1 * M_PI / 32.0)), (r4 * sin(-1 * M_PI / 32.0)));
- m_256apsk[81] = gr_complex((r4 * cos(-3 * M_PI / 32.0)), (r4 * sin(-3 * M_PI / 32.0)));
- m_256apsk[82] = gr_complex((r4 * cos(-7 * M_PI / 32.0)), (r4 * sin(-7 * M_PI / 32.0)));
- m_256apsk[83] = gr_complex((r4 * cos(-5 * M_PI / 32.0)), (r4 * sin(-5 * M_PI / 32.0)));
- m_256apsk[84] = gr_complex((r4 * cos(-15 * M_PI / 32.0)), (r4 * sin(-15 * M_PI / 32.0)));
- m_256apsk[85] = gr_complex((r4 * cos(-13 * M_PI / 32.0)), (r4 * sin(-13 * M_PI / 32.0)));
- m_256apsk[86] = gr_complex((r4 * cos(-9 * M_PI / 32.0)), (r4 * sin(-9 * M_PI / 32.0)));
- m_256apsk[87] = gr_complex((r4 * cos(-11 * M_PI / 32.0)), (r4 * sin(-11 * M_PI / 32.0)));
- m_256apsk[88] = gr_complex((r4 * cos(33 * M_PI / 32.0)), (r4 * sin(33 * M_PI / 32.0)));
- m_256apsk[89] = gr_complex((r4 * cos(35 * M_PI / 32.0)), (r4 * sin(35 * M_PI / 32.0)));
- m_256apsk[90] = gr_complex((r4 * cos(39 * M_PI / 32.0)), (r4 * sin(39 * M_PI / 32.0)));
- m_256apsk[91] = gr_complex((r4 * cos(37 * M_PI / 32.0)), (r4 * sin(37 * M_PI / 32.0)));
- m_256apsk[92] = gr_complex((r4 * cos(47 * M_PI / 32.0)), (r4 * sin(47 * M_PI / 32.0)));
- m_256apsk[93] = gr_complex((r4 * cos(45 * M_PI / 32.0)), (r4 * sin(45 * M_PI / 32.0)));
- m_256apsk[94] = gr_complex((r4 * cos(41 * M_PI / 32.0)), (r4 * sin(41 * M_PI / 32.0)));
- m_256apsk[95] = gr_complex((r4 * cos(43 * M_PI / 32.0)), (r4 * sin(43 * M_PI / 32.0)));
- m_256apsk[96] = gr_complex((r3 * cos(M_PI / 32.0)), (r3 * sin(M_PI / 32.0)));
- m_256apsk[97] = gr_complex((r3 * cos(3 * M_PI / 32.0)), (r3 * sin(3 * M_PI / 32.0)));
- m_256apsk[98] = gr_complex((r3 * cos(7 * M_PI / 32.0)), (r3 * sin(7 * M_PI / 32.0)));
- m_256apsk[99] = gr_complex((r3 * cos(5 * M_PI / 32.0)), (r3 * sin(5 * M_PI / 32.0)));
- m_256apsk[100] = gr_complex((r3 * cos(15 * M_PI / 32.0)), (r3 * sin(15 * M_PI / 32.0)));
- m_256apsk[101] = gr_complex((r3 * cos(13 * M_PI / 32.0)), (r3 * sin(13 * M_PI / 32.0)));
- m_256apsk[102] = gr_complex((r3 * cos(9 * M_PI / 32.0)), (r3 * sin(9 * M_PI / 32.0)));
- m_256apsk[103] = gr_complex((r3 * cos(11 * M_PI / 32.0)), (r3 * sin(11 * M_PI / 32.0)));
- m_256apsk[104] = gr_complex((r3 * cos(31 * M_PI / 32.0)), (r3 * sin(31 * M_PI / 32.0)));
- m_256apsk[105] = gr_complex((r3 * cos(29 * M_PI / 32.0)), (r3 * sin(29 * M_PI / 32.0)));
- m_256apsk[106] = gr_complex((r3 * cos(25 * M_PI / 32.0)), (r3 * sin(25 * M_PI / 32.0)));
- m_256apsk[107] = gr_complex((r3 * cos(27 * M_PI / 32.0)), (r3 * sin(27 * M_PI / 32.0)));
- m_256apsk[108] = gr_complex((r3 * cos(17 * M_PI / 32.0)), (r3 * sin(17 * M_PI / 32.0)));
- m_256apsk[109] = gr_complex((r3 * cos(19 * M_PI / 32.0)), (r3 * sin(19 * M_PI / 32.0)));
- m_256apsk[110] = gr_complex((r3 * cos(23 * M_PI / 32.0)), (r3 * sin(23 * M_PI / 32.0)));
- m_256apsk[111] = gr_complex((r3 * cos(21 * M_PI / 32.0)), (r3 * sin(21 * M_PI / 32.0)));
- m_256apsk[112] = gr_complex((r3 * cos(-1 * M_PI / 32.0)), (r3 * sin(-1 * M_PI / 32.0)));
- m_256apsk[113] = gr_complex((r3 * cos(-3 * M_PI / 32.0)), (r3 * sin(-3 * M_PI / 32.0)));
- m_256apsk[114] = gr_complex((r3 * cos(-7 * M_PI / 32.0)), (r3 * sin(-7 * M_PI / 32.0)));
- m_256apsk[115] = gr_complex((r3 * cos(-5 * M_PI / 32.0)), (r3 * sin(-5 * M_PI / 32.0)));
- m_256apsk[116] = gr_complex((r3 * cos(-15 * M_PI / 32.0)), (r3 * sin(-15 * M_PI / 32.0)));
- m_256apsk[117] = gr_complex((r3 * cos(-13 * M_PI / 32.0)), (r3 * sin(-13 * M_PI / 32.0)));
- m_256apsk[118] = gr_complex((r3 * cos(-9 * M_PI / 32.0)), (r3 * sin(-9 * M_PI / 32.0)));
- m_256apsk[119] = gr_complex((r3 * cos(-11 * M_PI / 32.0)), (r3 * sin(-11 * M_PI / 32.0)));
- m_256apsk[120] = gr_complex((r3 * cos(33 * M_PI / 32.0)), (r3 * sin(33 * M_PI / 32.0)));
- m_256apsk[121] = gr_complex((r3 * cos(35 * M_PI / 32.0)), (r3 * sin(35 * M_PI / 32.0)));
- m_256apsk[122] = gr_complex((r3 * cos(39 * M_PI / 32.0)), (r3 * sin(39 * M_PI / 32.0)));
- m_256apsk[123] = gr_complex((r3 * cos(37 * M_PI / 32.0)), (r3 * sin(37 * M_PI / 32.0)));
- m_256apsk[124] = gr_complex((r3 * cos(47 * M_PI / 32.0)), (r3 * sin(47 * M_PI / 32.0)));
- m_256apsk[125] = gr_complex((r3 * cos(45 * M_PI / 32.0)), (r3 * sin(45 * M_PI / 32.0)));
- m_256apsk[126] = gr_complex((r3 * cos(41 * M_PI / 32.0)), (r3 * sin(41 * M_PI / 32.0)));
- m_256apsk[127] = gr_complex((r3 * cos(43 * M_PI / 32.0)), (r3 * sin(43 * M_PI / 32.0)));
- m_256apsk[128] = gr_complex((r8 * cos(M_PI / 32.0)), (r8 * sin(M_PI / 32.0)));
- m_256apsk[129] = gr_complex((r8 * cos(3 * M_PI / 32.0)), (r8 * sin(3 * M_PI / 32.0)));
- m_256apsk[130] = gr_complex((r8 * cos(7 * M_PI / 32.0)), (r8 * sin(7 * M_PI / 32.0)));
- m_256apsk[131] = gr_complex((r8 * cos(5 * M_PI / 32.0)), (r8 * sin(5 * M_PI / 32.0)));
- m_256apsk[132] = gr_complex((r8 * cos(15 * M_PI / 32.0)), (r8 * sin(15 * M_PI / 32.0)));
- m_256apsk[133] = gr_complex((r8 * cos(13 * M_PI / 32.0)), (r8 * sin(13 * M_PI / 32.0)));
- m_256apsk[134] = gr_complex((r8 * cos(9 * M_PI / 32.0)), (r8 * sin(9 * M_PI / 32.0)));
- m_256apsk[135] = gr_complex((r8 * cos(11 * M_PI / 32.0)), (r8 * sin(11 * M_PI / 32.0)));
- m_256apsk[136] = gr_complex((r8 * cos(31 * M_PI / 32.0)), (r8 * sin(31 * M_PI / 32.0)));
- m_256apsk[137] = gr_complex((r8 * cos(29 * M_PI / 32.0)), (r8 * sin(29 * M_PI / 32.0)));
- m_256apsk[138] = gr_complex((r8 * cos(25 * M_PI / 32.0)), (r8 * sin(25 * M_PI / 32.0)));
- m_256apsk[139] = gr_complex((r8 * cos(27 * M_PI / 32.0)), (r8 * sin(27 * M_PI / 32.0)));
- m_256apsk[140] = gr_complex((r8 * cos(17 * M_PI / 32.0)), (r8 * sin(17 * M_PI / 32.0)));
- m_256apsk[141] = gr_complex((r8 * cos(19 * M_PI / 32.0)), (r8 * sin(19 * M_PI / 32.0)));
- m_256apsk[142] = gr_complex((r8 * cos(23 * M_PI / 32.0)), (r8 * sin(23 * M_PI / 32.0)));
- m_256apsk[143] = gr_complex((r8 * cos(21 * M_PI / 32.0)), (r8 * sin(21 * M_PI / 32.0)));
- m_256apsk[144] = gr_complex((r8 * cos(-1 * M_PI / 32.0)), (r8 * sin(-1 * M_PI / 32.0)));
- m_256apsk[145] = gr_complex((r8 * cos(-3 * M_PI / 32.0)), (r8 * sin(-3 * M_PI / 32.0)));
- m_256apsk[146] = gr_complex((r8 * cos(-7 * M_PI / 32.0)), (r8 * sin(-7 * M_PI / 32.0)));
- m_256apsk[147] = gr_complex((r8 * cos(-5 * M_PI / 32.0)), (r8 * sin(-5 * M_PI / 32.0)));
- m_256apsk[148] = gr_complex((r8 * cos(-15 * M_PI / 32.0)), (r8 * sin(-15 * M_PI / 32.0)));
- m_256apsk[149] = gr_complex((r8 * cos(-13 * M_PI / 32.0)), (r8 * sin(-13 * M_PI / 32.0)));
- m_256apsk[150] = gr_complex((r8 * cos(-9 * M_PI / 32.0)), (r8 * sin(-9 * M_PI / 32.0)));
- m_256apsk[151] = gr_complex((r8 * cos(-11 * M_PI / 32.0)), (r8 * sin(-11 * M_PI / 32.0)));
- m_256apsk[152] = gr_complex((r8 * cos(33 * M_PI / 32.0)), (r8 * sin(33 * M_PI / 32.0)));
- m_256apsk[153] = gr_complex((r8 * cos(35 * M_PI / 32.0)), (r8 * sin(35 * M_PI / 32.0)));
- m_256apsk[154] = gr_complex((r8 * cos(39 * M_PI / 32.0)), (r8 * sin(39 * M_PI / 32.0)));
- m_256apsk[155] = gr_complex((r8 * cos(37 * M_PI / 32.0)), (r8 * sin(37 * M_PI / 32.0)));
- m_256apsk[156] = gr_complex((r8 * cos(47 * M_PI / 32.0)), (r8 * sin(47 * M_PI / 32.0)));
- m_256apsk[157] = gr_complex((r8 * cos(45 * M_PI / 32.0)), (r8 * sin(45 * M_PI / 32.0)));
- m_256apsk[158] = gr_complex((r8 * cos(41 * M_PI / 32.0)), (r8 * sin(41 * M_PI / 32.0)));
- m_256apsk[159] = gr_complex((r8 * cos(43 * M_PI / 32.0)), (r8 * sin(43 * M_PI / 32.0)));
- m_256apsk[160] = gr_complex((r7 * cos(M_PI / 32.0)), (r7 * sin(M_PI / 32.0)));
- m_256apsk[161] = gr_complex((r7 * cos(3 * M_PI / 32.0)), (r7 * sin(3 * M_PI / 32.0)));
- m_256apsk[162] = gr_complex((r7 * cos(7 * M_PI / 32.0)), (r7 * sin(7 * M_PI / 32.0)));
- m_256apsk[163] = gr_complex((r7 * cos(5 * M_PI / 32.0)), (r7 * sin(5 * M_PI / 32.0)));
- m_256apsk[164] = gr_complex((r7 * cos(15 * M_PI / 32.0)), (r7 * sin(15 * M_PI / 32.0)));
- m_256apsk[165] = gr_complex((r7 * cos(13 * M_PI / 32.0)), (r7 * sin(13 * M_PI / 32.0)));
- m_256apsk[166] = gr_complex((r7 * cos(9 * M_PI / 32.0)), (r7 * sin(9 * M_PI / 32.0)));
- m_256apsk[167] = gr_complex((r7 * cos(11 * M_PI / 32.0)), (r7 * sin(11 * M_PI / 32.0)));
- m_256apsk[168] = gr_complex((r7 * cos(31 * M_PI / 32.0)), (r7 * sin(31 * M_PI / 32.0)));
- m_256apsk[169] = gr_complex((r7 * cos(29 * M_PI / 32.0)), (r7 * sin(29 * M_PI / 32.0)));
- m_256apsk[170] = gr_complex((r7 * cos(25 * M_PI / 32.0)), (r7 * sin(25 * M_PI / 32.0)));
- m_256apsk[171] = gr_complex((r7 * cos(27 * M_PI / 32.0)), (r7 * sin(27 * M_PI / 32.0)));
- m_256apsk[172] = gr_complex((r7 * cos(17 * M_PI / 32.0)), (r7 * sin(17 * M_PI / 32.0)));
- m_256apsk[173] = gr_complex((r7 * cos(19 * M_PI / 32.0)), (r7 * sin(19 * M_PI / 32.0)));
- m_256apsk[174] = gr_complex((r7 * cos(23 * M_PI / 32.0)), (r7 * sin(23 * M_PI / 32.0)));
- m_256apsk[175] = gr_complex((r7 * cos(21 * M_PI / 32.0)), (r7 * sin(21 * M_PI / 32.0)));
- m_256apsk[176] = gr_complex((r7 * cos(-1 * M_PI / 32.0)), (r7 * sin(-1 * M_PI / 32.0)));
- m_256apsk[177] = gr_complex((r7 * cos(-3 * M_PI / 32.0)), (r7 * sin(-3 * M_PI / 32.0)));
- m_256apsk[178] = gr_complex((r7 * cos(-7 * M_PI / 32.0)), (r7 * sin(-7 * M_PI / 32.0)));
- m_256apsk[179] = gr_complex((r7 * cos(-5 * M_PI / 32.0)), (r7 * sin(-5 * M_PI / 32.0)));
- m_256apsk[180] = gr_complex((r7 * cos(-15 * M_PI / 32.0)), (r7 * sin(-15 * M_PI / 32.0)));
- m_256apsk[181] = gr_complex((r7 * cos(-13 * M_PI / 32.0)), (r7 * sin(-13 * M_PI / 32.0)));
- m_256apsk[182] = gr_complex((r7 * cos(-9 * M_PI / 32.0)), (r7 * sin(-9 * M_PI / 32.0)));
- m_256apsk[183] = gr_complex((r7 * cos(-11 * M_PI / 32.0)), (r7 * sin(-11 * M_PI / 32.0)));
- m_256apsk[184] = gr_complex((r7 * cos(33 * M_PI / 32.0)), (r7 * sin(33 * M_PI / 32.0)));
- m_256apsk[185] = gr_complex((r7 * cos(35 * M_PI / 32.0)), (r7 * sin(35 * M_PI / 32.0)));
- m_256apsk[186] = gr_complex((r7 * cos(39 * M_PI / 32.0)), (r7 * sin(39 * M_PI / 32.0)));
- m_256apsk[187] = gr_complex((r7 * cos(37 * M_PI / 32.0)), (r7 * sin(37 * M_PI / 32.0)));
- m_256apsk[188] = gr_complex((r7 * cos(47 * M_PI / 32.0)), (r7 * sin(47 * M_PI / 32.0)));
- m_256apsk[189] = gr_complex((r7 * cos(45 * M_PI / 32.0)), (r7 * sin(45 * M_PI / 32.0)));
- m_256apsk[190] = gr_complex((r7 * cos(41 * M_PI / 32.0)), (r7 * sin(41 * M_PI / 32.0)));
- m_256apsk[191] = gr_complex((r7 * cos(43 * M_PI / 32.0)), (r7 * sin(43 * M_PI / 32.0)));
- m_256apsk[192] = gr_complex((r5 * cos(M_PI / 32.0)), (r5 * sin(M_PI / 32.0)));
- m_256apsk[193] = gr_complex((r5 * cos(3 * M_PI / 32.0)), (r5 * sin(3 * M_PI / 32.0)));
- m_256apsk[194] = gr_complex((r5 * cos(7 * M_PI / 32.0)), (r5 * sin(7 * M_PI / 32.0)));
- m_256apsk[195] = gr_complex((r5 * cos(5 * M_PI / 32.0)), (r5 * sin(5 * M_PI / 32.0)));
- m_256apsk[196] = gr_complex((r5 * cos(15 * M_PI / 32.0)), (r5 * sin(15 * M_PI / 32.0)));
- m_256apsk[197] = gr_complex((r5 * cos(13 * M_PI / 32.0)), (r5 * sin(13 * M_PI / 32.0)));
- m_256apsk[198] = gr_complex((r5 * cos(9 * M_PI / 32.0)), (r5 * sin(9 * M_PI / 32.0)));
- m_256apsk[199] = gr_complex((r5 * cos(11 * M_PI / 32.0)), (r5 * sin(11 * M_PI / 32.0)));
- m_256apsk[200] = gr_complex((r5 * cos(31 * M_PI / 32.0)), (r5 * sin(31 * M_PI / 32.0)));
- m_256apsk[201] = gr_complex((r5 * cos(29 * M_PI / 32.0)), (r5 * sin(29 * M_PI / 32.0)));
- m_256apsk[202] = gr_complex((r5 * cos(25 * M_PI / 32.0)), (r5 * sin(25 * M_PI / 32.0)));
- m_256apsk[203] = gr_complex((r5 * cos(27 * M_PI / 32.0)), (r5 * sin(27 * M_PI / 32.0)));
- m_256apsk[204] = gr_complex((r5 * cos(17 * M_PI / 32.0)), (r5 * sin(17 * M_PI / 32.0)));
- m_256apsk[205] = gr_complex((r5 * cos(19 * M_PI / 32.0)), (r5 * sin(19 * M_PI / 32.0)));
- m_256apsk[206] = gr_complex((r5 * cos(23 * M_PI / 32.0)), (r5 * sin(23 * M_PI / 32.0)));
- m_256apsk[207] = gr_complex((r5 * cos(21 * M_PI / 32.0)), (r5 * sin(21 * M_PI / 32.0)));
- m_256apsk[208] = gr_complex((r5 * cos(-1 * M_PI / 32.0)), (r5 * sin(-1 * M_PI / 32.0)));
- m_256apsk[209] = gr_complex((r5 * cos(-3 * M_PI / 32.0)), (r5 * sin(-3 * M_PI / 32.0)));
- m_256apsk[210] = gr_complex((r5 * cos(-7 * M_PI / 32.0)), (r5 * sin(-7 * M_PI / 32.0)));
- m_256apsk[211] = gr_complex((r5 * cos(-5 * M_PI / 32.0)), (r5 * sin(-5 * M_PI / 32.0)));
- m_256apsk[212] = gr_complex((r5 * cos(-15 * M_PI / 32.0)), (r5 * sin(-15 * M_PI / 32.0)));
- m_256apsk[213] = gr_complex((r5 * cos(-13 * M_PI / 32.0)), (r5 * sin(-13 * M_PI / 32.0)));
- m_256apsk[214] = gr_complex((r5 * cos(-9 * M_PI / 32.0)), (r5 * sin(-9 * M_PI / 32.0)));
- m_256apsk[215] = gr_complex((r5 * cos(-11 * M_PI / 32.0)), (r5 * sin(-11 * M_PI / 32.0)));
- m_256apsk[216] = gr_complex((r5 * cos(33 * M_PI / 32.0)), (r5 * sin(33 * M_PI / 32.0)));
- m_256apsk[217] = gr_complex((r5 * cos(35 * M_PI / 32.0)), (r5 * sin(35 * M_PI / 32.0)));
- m_256apsk[218] = gr_complex((r5 * cos(39 * M_PI / 32.0)), (r5 * sin(39 * M_PI / 32.0)));
- m_256apsk[219] = gr_complex((r5 * cos(37 * M_PI / 32.0)), (r5 * sin(37 * M_PI / 32.0)));
- m_256apsk[220] = gr_complex((r5 * cos(47 * M_PI / 32.0)), (r5 * sin(47 * M_PI / 32.0)));
- m_256apsk[221] = gr_complex((r5 * cos(45 * M_PI / 32.0)), (r5 * sin(45 * M_PI / 32.0)));
- m_256apsk[222] = gr_complex((r5 * cos(41 * M_PI / 32.0)), (r5 * sin(41 * M_PI / 32.0)));
- m_256apsk[223] = gr_complex((r5 * cos(43 * M_PI / 32.0)), (r5 * sin(43 * M_PI / 32.0)));
- m_256apsk[224] = gr_complex((r6 * cos(M_PI / 32.0)), (r6 * sin(M_PI / 32.0)));
- m_256apsk[225] = gr_complex((r6 * cos(3 * M_PI / 32.0)), (r6 * sin(3 * M_PI / 32.0)));
- m_256apsk[226] = gr_complex((r6 * cos(7 * M_PI / 32.0)), (r6 * sin(7 * M_PI / 32.0)));
- m_256apsk[227] = gr_complex((r6 * cos(5 * M_PI / 32.0)), (r6 * sin(5 * M_PI / 32.0)));
- m_256apsk[228] = gr_complex((r6 * cos(15 * M_PI / 32.0)), (r6 * sin(15 * M_PI / 32.0)));
- m_256apsk[229] = gr_complex((r6 * cos(13 * M_PI / 32.0)), (r6 * sin(13 * M_PI / 32.0)));
- m_256apsk[230] = gr_complex((r6 * cos(9 * M_PI / 32.0)), (r6 * sin(9 * M_PI / 32.0)));
- m_256apsk[231] = gr_complex((r6 * cos(11 * M_PI / 32.0)), (r6 * sin(11 * M_PI / 32.0)));
- m_256apsk[232] = gr_complex((r6 * cos(31 * M_PI / 32.0)), (r6 * sin(31 * M_PI / 32.0)));
- m_256apsk[233] = gr_complex((r6 * cos(29 * M_PI / 32.0)), (r6 * sin(29 * M_PI / 32.0)));
- m_256apsk[234] = gr_complex((r6 * cos(25 * M_PI / 32.0)), (r6 * sin(25 * M_PI / 32.0)));
- m_256apsk[235] = gr_complex((r6 * cos(27 * M_PI / 32.0)), (r6 * sin(27 * M_PI / 32.0)));
- m_256apsk[236] = gr_complex((r6 * cos(17 * M_PI / 32.0)), (r6 * sin(17 * M_PI / 32.0)));
- m_256apsk[237] = gr_complex((r6 * cos(19 * M_PI / 32.0)), (r6 * sin(19 * M_PI / 32.0)));
- m_256apsk[238] = gr_complex((r6 * cos(23 * M_PI / 32.0)), (r6 * sin(23 * M_PI / 32.0)));
- m_256apsk[239] = gr_complex((r6 * cos(21 * M_PI / 32.0)), (r6 * sin(21 * M_PI / 32.0)));
- m_256apsk[240] = gr_complex((r6 * cos(-1 * M_PI / 32.0)), (r6 * sin(-1 * M_PI / 32.0)));
- m_256apsk[241] = gr_complex((r6 * cos(-3 * M_PI / 32.0)), (r6 * sin(-3 * M_PI / 32.0)));
- m_256apsk[242] = gr_complex((r6 * cos(-7 * M_PI / 32.0)), (r6 * sin(-7 * M_PI / 32.0)));
- m_256apsk[243] = gr_complex((r6 * cos(-5 * M_PI / 32.0)), (r6 * sin(-5 * M_PI / 32.0)));
- m_256apsk[244] = gr_complex((r6 * cos(-15 * M_PI / 32.0)), (r6 * sin(-15 * M_PI / 32.0)));
- m_256apsk[245] = gr_complex((r6 * cos(-13 * M_PI / 32.0)), (r6 * sin(-13 * M_PI / 32.0)));
- m_256apsk[246] = gr_complex((r6 * cos(-9 * M_PI / 32.0)), (r6 * sin(-9 * M_PI / 32.0)));
- m_256apsk[247] = gr_complex((r6 * cos(-11 * M_PI / 32.0)), (r6 * sin(-11 * M_PI / 32.0)));
- m_256apsk[248] = gr_complex((r6 * cos(33 * M_PI / 32.0)), (r6 * sin(33 * M_PI / 32.0)));
- m_256apsk[249] = gr_complex((r6 * cos(35 * M_PI / 32.0)), (r6 * sin(35 * M_PI / 32.0)));
- m_256apsk[250] = gr_complex((r6 * cos(39 * M_PI / 32.0)), (r6 * sin(39 * M_PI / 32.0)));
- m_256apsk[251] = gr_complex((r6 * cos(37 * M_PI / 32.0)), (r6 * sin(37 * M_PI / 32.0)));
- m_256apsk[252] = gr_complex((r6 * cos(47 * M_PI / 32.0)), (r6 * sin(47 * M_PI / 32.0)));
- m_256apsk[253] = gr_complex((r6 * cos(45 * M_PI / 32.0)), (r6 * sin(45 * M_PI / 32.0)));
- m_256apsk[254] = gr_complex((r6 * cos(41 * M_PI / 32.0)), (r6 * sin(41 * M_PI / 32.0)));
- m_256apsk[255] = gr_complex((r6 * cos(43 * M_PI / 32.0)), (r6 * sin(43 * M_PI / 32.0)));
+ m_256apsk[0] = gr_complex((r1 * cos(GR_M_PI / 32.0)), (r1 * sin(GR_M_PI / 32.0)));
+ m_256apsk[1] = gr_complex((r1 * cos(3 * GR_M_PI / 32.0)), (r1 * sin(3 * GR_M_PI / 32.0)));
+ m_256apsk[2] = gr_complex((r1 * cos(7 * GR_M_PI / 32.0)), (r1 * sin(7 * GR_M_PI / 32.0)));
+ m_256apsk[3] = gr_complex((r1 * cos(5 * GR_M_PI / 32.0)), (r1 * sin(5 * GR_M_PI / 32.0)));
+ m_256apsk[4] = gr_complex((r1 * cos(15 * GR_M_PI / 32.0)), (r1 * sin(15 * GR_M_PI / 32.0)));
+ m_256apsk[5] = gr_complex((r1 * cos(13 * GR_M_PI / 32.0)), (r1 * sin(13 * GR_M_PI / 32.0)));
+ m_256apsk[6] = gr_complex((r1 * cos(9 * GR_M_PI / 32.0)), (r1 * sin(9 * GR_M_PI / 32.0)));
+ m_256apsk[7] = gr_complex((r1 * cos(11 * GR_M_PI / 32.0)), (r1 * sin(11 * GR_M_PI / 32.0)));
+ m_256apsk[8] = gr_complex((r1 * cos(31 * GR_M_PI / 32.0)), (r1 * sin(31 * GR_M_PI / 32.0)));
+ m_256apsk[9] = gr_complex((r1 * cos(29 * GR_M_PI / 32.0)), (r1 * sin(29 * GR_M_PI / 32.0)));
+ m_256apsk[10] = gr_complex((r1 * cos(25 * GR_M_PI / 32.0)), (r1 * sin(25 * GR_M_PI / 32.0)));
+ m_256apsk[11] = gr_complex((r1 * cos(27 * GR_M_PI / 32.0)), (r1 * sin(27 * GR_M_PI / 32.0)));
+ m_256apsk[12] = gr_complex((r1 * cos(17 * GR_M_PI / 32.0)), (r1 * sin(17 * GR_M_PI / 32.0)));
+ m_256apsk[13] = gr_complex((r1 * cos(19 * GR_M_PI / 32.0)), (r1 * sin(19 * GR_M_PI / 32.0)));
+ m_256apsk[14] = gr_complex((r1 * cos(23 * GR_M_PI / 32.0)), (r1 * sin(23 * GR_M_PI / 32.0)));
+ m_256apsk[15] = gr_complex((r1 * cos(21 * GR_M_PI / 32.0)), (r1 * sin(21 * GR_M_PI / 32.0)));
+ m_256apsk[16] = gr_complex((r1 * cos(-1 * GR_M_PI / 32.0)), (r1 * sin(-1 * GR_M_PI / 32.0)));
+ m_256apsk[17] = gr_complex((r1 * cos(-3 * GR_M_PI / 32.0)), (r1 * sin(-3 * GR_M_PI / 32.0)));
+ m_256apsk[18] = gr_complex((r1 * cos(-7 * GR_M_PI / 32.0)), (r1 * sin(-7 * GR_M_PI / 32.0)));
+ m_256apsk[19] = gr_complex((r1 * cos(-5 * GR_M_PI / 32.0)), (r1 * sin(-5 * GR_M_PI / 32.0)));
+ m_256apsk[20] = gr_complex((r1 * cos(-15 * GR_M_PI / 32.0)), (r1 * sin(-15 * GR_M_PI / 32.0)));
+ m_256apsk[21] = gr_complex((r1 * cos(-13 * GR_M_PI / 32.0)), (r1 * sin(-13 * GR_M_PI / 32.0)));
+ m_256apsk[22] = gr_complex((r1 * cos(-9 * GR_M_PI / 32.0)), (r1 * sin(-9 * GR_M_PI / 32.0)));
+ m_256apsk[23] = gr_complex((r1 * cos(-11 * GR_M_PI / 32.0)), (r1 * sin(-11 * GR_M_PI / 32.0)));
+ m_256apsk[24] = gr_complex((r1 * cos(33 * GR_M_PI / 32.0)), (r1 * sin(33 * GR_M_PI / 32.0)));
+ m_256apsk[25] = gr_complex((r1 * cos(35 * GR_M_PI / 32.0)), (r1 * sin(35 * GR_M_PI / 32.0)));
+ m_256apsk[26] = gr_complex((r1 * cos(39 * GR_M_PI / 32.0)), (r1 * sin(39 * GR_M_PI / 32.0)));
+ m_256apsk[27] = gr_complex((r1 * cos(37 * GR_M_PI / 32.0)), (r1 * sin(37 * GR_M_PI / 32.0)));
+ m_256apsk[28] = gr_complex((r1 * cos(47 * GR_M_PI / 32.0)), (r1 * sin(47 * GR_M_PI / 32.0)));
+ m_256apsk[29] = gr_complex((r1 * cos(45 * GR_M_PI / 32.0)), (r1 * sin(45 * GR_M_PI / 32.0)));
+ m_256apsk[30] = gr_complex((r1 * cos(41 * GR_M_PI / 32.0)), (r1 * sin(41 * GR_M_PI / 32.0)));
+ m_256apsk[31] = gr_complex((r1 * cos(43 * GR_M_PI / 32.0)), (r1 * sin(43 * GR_M_PI / 32.0)));
+ m_256apsk[32] = gr_complex((r2 * cos(GR_M_PI / 32.0)), (r2 * sin(GR_M_PI / 32.0)));
+ m_256apsk[33] = gr_complex((r2 * cos(3 * GR_M_PI / 32.0)), (r2 * sin(3 * GR_M_PI / 32.0)));
+ m_256apsk[34] = gr_complex((r2 * cos(7 * GR_M_PI / 32.0)), (r2 * sin(7 * GR_M_PI / 32.0)));
+ m_256apsk[35] = gr_complex((r2 * cos(5 * GR_M_PI / 32.0)), (r2 * sin(5 * GR_M_PI / 32.0)));
+ m_256apsk[36] = gr_complex((r2 * cos(15 * GR_M_PI / 32.0)), (r2 * sin(15 * GR_M_PI / 32.0)));
+ m_256apsk[37] = gr_complex((r2 * cos(13 * GR_M_PI / 32.0)), (r2 * sin(13 * GR_M_PI / 32.0)));
+ m_256apsk[38] = gr_complex((r2 * cos(9 * GR_M_PI / 32.0)), (r2 * sin(9 * GR_M_PI / 32.0)));
+ m_256apsk[39] = gr_complex((r2 * cos(11 * GR_M_PI / 32.0)), (r2 * sin(11 * GR_M_PI / 32.0)));
+ m_256apsk[40] = gr_complex((r2 * cos(31 * GR_M_PI / 32.0)), (r2 * sin(31 * GR_M_PI / 32.0)));
+ m_256apsk[41] = gr_complex((r2 * cos(29 * GR_M_PI / 32.0)), (r2 * sin(29 * GR_M_PI / 32.0)));
+ m_256apsk[42] = gr_complex((r2 * cos(25 * GR_M_PI / 32.0)), (r2 * sin(25 * GR_M_PI / 32.0)));
+ m_256apsk[43] = gr_complex((r2 * cos(27 * GR_M_PI / 32.0)), (r2 * sin(27 * GR_M_PI / 32.0)));
+ m_256apsk[44] = gr_complex((r2 * cos(17 * GR_M_PI / 32.0)), (r2 * sin(17 * GR_M_PI / 32.0)));
+ m_256apsk[45] = gr_complex((r2 * cos(19 * GR_M_PI / 32.0)), (r2 * sin(19 * GR_M_PI / 32.0)));
+ m_256apsk[46] = gr_complex((r2 * cos(23 * GR_M_PI / 32.0)), (r2 * sin(23 * GR_M_PI / 32.0)));
+ m_256apsk[47] = gr_complex((r2 * cos(21 * GR_M_PI / 32.0)), (r2 * sin(21 * GR_M_PI / 32.0)));
+ m_256apsk[48] = gr_complex((r2 * cos(-1 * GR_M_PI / 32.0)), (r2 * sin(-1 * GR_M_PI / 32.0)));
+ m_256apsk[49] = gr_complex((r2 * cos(-3 * GR_M_PI / 32.0)), (r2 * sin(-3 * GR_M_PI / 32.0)));
+ m_256apsk[50] = gr_complex((r2 * cos(-7 * GR_M_PI / 32.0)), (r2 * sin(-7 * GR_M_PI / 32.0)));
+ m_256apsk[51] = gr_complex((r2 * cos(-5 * GR_M_PI / 32.0)), (r2 * sin(-5 * GR_M_PI / 32.0)));
+ m_256apsk[52] = gr_complex((r2 * cos(-15 * GR_M_PI / 32.0)), (r2 * sin(-15 * GR_M_PI / 32.0)));
+ m_256apsk[53] = gr_complex((r2 * cos(-13 * GR_M_PI / 32.0)), (r2 * sin(-13 * GR_M_PI / 32.0)));
+ m_256apsk[54] = gr_complex((r2 * cos(-9 * GR_M_PI / 32.0)), (r2 * sin(-9 * GR_M_PI / 32.0)));
+ m_256apsk[55] = gr_complex((r2 * cos(-11 * GR_M_PI / 32.0)), (r2 * sin(-11 * GR_M_PI / 32.0)));
+ m_256apsk[56] = gr_complex((r2 * cos(33 * GR_M_PI / 32.0)), (r2 * sin(33 * GR_M_PI / 32.0)));
+ m_256apsk[57] = gr_complex((r2 * cos(35 * GR_M_PI / 32.0)), (r2 * sin(35 * GR_M_PI / 32.0)));
+ m_256apsk[58] = gr_complex((r2 * cos(39 * GR_M_PI / 32.0)), (r2 * sin(39 * GR_M_PI / 32.0)));
+ m_256apsk[59] = gr_complex((r2 * cos(37 * GR_M_PI / 32.0)), (r2 * sin(37 * GR_M_PI / 32.0)));
+ m_256apsk[60] = gr_complex((r2 * cos(47 * GR_M_PI / 32.0)), (r2 * sin(47 * GR_M_PI / 32.0)));
+ m_256apsk[61] = gr_complex((r2 * cos(45 * GR_M_PI / 32.0)), (r2 * sin(45 * GR_M_PI / 32.0)));
+ m_256apsk[62] = gr_complex((r2 * cos(41 * GR_M_PI / 32.0)), (r2 * sin(41 * GR_M_PI / 32.0)));
+ m_256apsk[63] = gr_complex((r2 * cos(43 * GR_M_PI / 32.0)), (r2 * sin(43 * GR_M_PI / 32.0)));
+ m_256apsk[64] = gr_complex((r4 * cos(GR_M_PI / 32.0)), (r4 * sin(GR_M_PI / 32.0)));
+ m_256apsk[65] = gr_complex((r4 * cos(3 * GR_M_PI / 32.0)), (r4 * sin(3 * GR_M_PI / 32.0)));
+ m_256apsk[66] = gr_complex((r4 * cos(7 * GR_M_PI / 32.0)), (r4 * sin(7 * GR_M_PI / 32.0)));
+ m_256apsk[67] = gr_complex((r4 * cos(5 * GR_M_PI / 32.0)), (r4 * sin(5 * GR_M_PI / 32.0)));
+ m_256apsk[68] = gr_complex((r4 * cos(15 * GR_M_PI / 32.0)), (r4 * sin(15 * GR_M_PI / 32.0)));
+ m_256apsk[69] = gr_complex((r4 * cos(13 * GR_M_PI / 32.0)), (r4 * sin(13 * GR_M_PI / 32.0)));
+ m_256apsk[70] = gr_complex((r4 * cos(9 * GR_M_PI / 32.0)), (r4 * sin(9 * GR_M_PI / 32.0)));
+ m_256apsk[71] = gr_complex((r4 * cos(11 * GR_M_PI / 32.0)), (r4 * sin(11 * GR_M_PI / 32.0)));
+ m_256apsk[72] = gr_complex((r4 * cos(31 * GR_M_PI / 32.0)), (r4 * sin(31 * GR_M_PI / 32.0)));
+ m_256apsk[73] = gr_complex((r4 * cos(29 * GR_M_PI / 32.0)), (r4 * sin(29 * GR_M_PI / 32.0)));
+ m_256apsk[74] = gr_complex((r4 * cos(25 * GR_M_PI / 32.0)), (r4 * sin(25 * GR_M_PI / 32.0)));
+ m_256apsk[75] = gr_complex((r4 * cos(27 * GR_M_PI / 32.0)), (r4 * sin(27 * GR_M_PI / 32.0)));
+ m_256apsk[76] = gr_complex((r4 * cos(17 * GR_M_PI / 32.0)), (r4 * sin(17 * GR_M_PI / 32.0)));
+ m_256apsk[77] = gr_complex((r4 * cos(19 * GR_M_PI / 32.0)), (r4 * sin(19 * GR_M_PI / 32.0)));
+ m_256apsk[78] = gr_complex((r4 * cos(23 * GR_M_PI / 32.0)), (r4 * sin(23 * GR_M_PI / 32.0)));
+ m_256apsk[79] = gr_complex((r4 * cos(21 * GR_M_PI / 32.0)), (r4 * sin(21 * GR_M_PI / 32.0)));
+ m_256apsk[80] = gr_complex((r4 * cos(-1 * GR_M_PI / 32.0)), (r4 * sin(-1 * GR_M_PI / 32.0)));
+ m_256apsk[81] = gr_complex((r4 * cos(-3 * GR_M_PI / 32.0)), (r4 * sin(-3 * GR_M_PI / 32.0)));
+ m_256apsk[82] = gr_complex((r4 * cos(-7 * GR_M_PI / 32.0)), (r4 * sin(-7 * GR_M_PI / 32.0)));
+ m_256apsk[83] = gr_complex((r4 * cos(-5 * GR_M_PI / 32.0)), (r4 * sin(-5 * GR_M_PI / 32.0)));
+ m_256apsk[84] = gr_complex((r4 * cos(-15 * GR_M_PI / 32.0)), (r4 * sin(-15 * GR_M_PI / 32.0)));
+ m_256apsk[85] = gr_complex((r4 * cos(-13 * GR_M_PI / 32.0)), (r4 * sin(-13 * GR_M_PI / 32.0)));
+ m_256apsk[86] = gr_complex((r4 * cos(-9 * GR_M_PI / 32.0)), (r4 * sin(-9 * GR_M_PI / 32.0)));
+ m_256apsk[87] = gr_complex((r4 * cos(-11 * GR_M_PI / 32.0)), (r4 * sin(-11 * GR_M_PI / 32.0)));
+ m_256apsk[88] = gr_complex((r4 * cos(33 * GR_M_PI / 32.0)), (r4 * sin(33 * GR_M_PI / 32.0)));
+ m_256apsk[89] = gr_complex((r4 * cos(35 * GR_M_PI / 32.0)), (r4 * sin(35 * GR_M_PI / 32.0)));
+ m_256apsk[90] = gr_complex((r4 * cos(39 * GR_M_PI / 32.0)), (r4 * sin(39 * GR_M_PI / 32.0)));
+ m_256apsk[91] = gr_complex((r4 * cos(37 * GR_M_PI / 32.0)), (r4 * sin(37 * GR_M_PI / 32.0)));
+ m_256apsk[92] = gr_complex((r4 * cos(47 * GR_M_PI / 32.0)), (r4 * sin(47 * GR_M_PI / 32.0)));
+ m_256apsk[93] = gr_complex((r4 * cos(45 * GR_M_PI / 32.0)), (r4 * sin(45 * GR_M_PI / 32.0)));
+ m_256apsk[94] = gr_complex((r4 * cos(41 * GR_M_PI / 32.0)), (r4 * sin(41 * GR_M_PI / 32.0)));
+ m_256apsk[95] = gr_complex((r4 * cos(43 * GR_M_PI / 32.0)), (r4 * sin(43 * GR_M_PI / 32.0)));
+ m_256apsk[96] = gr_complex((r3 * cos(GR_M_PI / 32.0)), (r3 * sin(GR_M_PI / 32.0)));
+ m_256apsk[97] = gr_complex((r3 * cos(3 * GR_M_PI / 32.0)), (r3 * sin(3 * GR_M_PI / 32.0)));
+ m_256apsk[98] = gr_complex((r3 * cos(7 * GR_M_PI / 32.0)), (r3 * sin(7 * GR_M_PI / 32.0)));
+ m_256apsk[99] = gr_complex((r3 * cos(5 * GR_M_PI / 32.0)), (r3 * sin(5 * GR_M_PI / 32.0)));
+ m_256apsk[100] = gr_complex((r3 * cos(15 * GR_M_PI / 32.0)), (r3 * sin(15 * GR_M_PI / 32.0)));
+ m_256apsk[101] = gr_complex((r3 * cos(13 * GR_M_PI / 32.0)), (r3 * sin(13 * GR_M_PI / 32.0)));
+ m_256apsk[102] = gr_complex((r3 * cos(9 * GR_M_PI / 32.0)), (r3 * sin(9 * GR_M_PI / 32.0)));
+ m_256apsk[103] = gr_complex((r3 * cos(11 * GR_M_PI / 32.0)), (r3 * sin(11 * GR_M_PI / 32.0)));
+ m_256apsk[104] = gr_complex((r3 * cos(31 * GR_M_PI / 32.0)), (r3 * sin(31 * GR_M_PI / 32.0)));
+ m_256apsk[105] = gr_complex((r3 * cos(29 * GR_M_PI / 32.0)), (r3 * sin(29 * GR_M_PI / 32.0)));
+ m_256apsk[106] = gr_complex((r3 * cos(25 * GR_M_PI / 32.0)), (r3 * sin(25 * GR_M_PI / 32.0)));
+ m_256apsk[107] = gr_complex((r3 * cos(27 * GR_M_PI / 32.0)), (r3 * sin(27 * GR_M_PI / 32.0)));
+ m_256apsk[108] = gr_complex((r3 * cos(17 * GR_M_PI / 32.0)), (r3 * sin(17 * GR_M_PI / 32.0)));
+ m_256apsk[109] = gr_complex((r3 * cos(19 * GR_M_PI / 32.0)), (r3 * sin(19 * GR_M_PI / 32.0)));
+ m_256apsk[110] = gr_complex((r3 * cos(23 * GR_M_PI / 32.0)), (r3 * sin(23 * GR_M_PI / 32.0)));
+ m_256apsk[111] = gr_complex((r3 * cos(21 * GR_M_PI / 32.0)), (r3 * sin(21 * GR_M_PI / 32.0)));
+ m_256apsk[112] = gr_complex((r3 * cos(-1 * GR_M_PI / 32.0)), (r3 * sin(-1 * GR_M_PI / 32.0)));
+ m_256apsk[113] = gr_complex((r3 * cos(-3 * GR_M_PI / 32.0)), (r3 * sin(-3 * GR_M_PI / 32.0)));
+ m_256apsk[114] = gr_complex((r3 * cos(-7 * GR_M_PI / 32.0)), (r3 * sin(-7 * GR_M_PI / 32.0)));
+ m_256apsk[115] = gr_complex((r3 * cos(-5 * GR_M_PI / 32.0)), (r3 * sin(-5 * GR_M_PI / 32.0)));
+ m_256apsk[116] = gr_complex((r3 * cos(-15 * GR_M_PI / 32.0)), (r3 * sin(-15 * GR_M_PI / 32.0)));
+ m_256apsk[117] = gr_complex((r3 * cos(-13 * GR_M_PI / 32.0)), (r3 * sin(-13 * GR_M_PI / 32.0)));
+ m_256apsk[118] = gr_complex((r3 * cos(-9 * GR_M_PI / 32.0)), (r3 * sin(-9 * GR_M_PI / 32.0)));
+ m_256apsk[119] = gr_complex((r3 * cos(-11 * GR_M_PI / 32.0)), (r3 * sin(-11 * GR_M_PI / 32.0)));
+ m_256apsk[120] = gr_complex((r3 * cos(33 * GR_M_PI / 32.0)), (r3 * sin(33 * GR_M_PI / 32.0)));
+ m_256apsk[121] = gr_complex((r3 * cos(35 * GR_M_PI / 32.0)), (r3 * sin(35 * GR_M_PI / 32.0)));
+ m_256apsk[122] = gr_complex((r3 * cos(39 * GR_M_PI / 32.0)), (r3 * sin(39 * GR_M_PI / 32.0)));
+ m_256apsk[123] = gr_complex((r3 * cos(37 * GR_M_PI / 32.0)), (r3 * sin(37 * GR_M_PI / 32.0)));
+ m_256apsk[124] = gr_complex((r3 * cos(47 * GR_M_PI / 32.0)), (r3 * sin(47 * GR_M_PI / 32.0)));
+ m_256apsk[125] = gr_complex((r3 * cos(45 * GR_M_PI / 32.0)), (r3 * sin(45 * GR_M_PI / 32.0)));
+ m_256apsk[126] = gr_complex((r3 * cos(41 * GR_M_PI / 32.0)), (r3 * sin(41 * GR_M_PI / 32.0)));
+ m_256apsk[127] = gr_complex((r3 * cos(43 * GR_M_PI / 32.0)), (r3 * sin(43 * GR_M_PI / 32.0)));
+ m_256apsk[128] = gr_complex((r8 * cos(GR_M_PI / 32.0)), (r8 * sin(GR_M_PI / 32.0)));
+ m_256apsk[129] = gr_complex((r8 * cos(3 * GR_M_PI / 32.0)), (r8 * sin(3 * GR_M_PI / 32.0)));
+ m_256apsk[130] = gr_complex((r8 * cos(7 * GR_M_PI / 32.0)), (r8 * sin(7 * GR_M_PI / 32.0)));
+ m_256apsk[131] = gr_complex((r8 * cos(5 * GR_M_PI / 32.0)), (r8 * sin(5 * GR_M_PI / 32.0)));
+ m_256apsk[132] = gr_complex((r8 * cos(15 * GR_M_PI / 32.0)), (r8 * sin(15 * GR_M_PI / 32.0)));
+ m_256apsk[133] = gr_complex((r8 * cos(13 * GR_M_PI / 32.0)), (r8 * sin(13 * GR_M_PI / 32.0)));
+ m_256apsk[134] = gr_complex((r8 * cos(9 * GR_M_PI / 32.0)), (r8 * sin(9 * GR_M_PI / 32.0)));
+ m_256apsk[135] = gr_complex((r8 * cos(11 * GR_M_PI / 32.0)), (r8 * sin(11 * GR_M_PI / 32.0)));
+ m_256apsk[136] = gr_complex((r8 * cos(31 * GR_M_PI / 32.0)), (r8 * sin(31 * GR_M_PI / 32.0)));
+ m_256apsk[137] = gr_complex((r8 * cos(29 * GR_M_PI / 32.0)), (r8 * sin(29 * GR_M_PI / 32.0)));
+ m_256apsk[138] = gr_complex((r8 * cos(25 * GR_M_PI / 32.0)), (r8 * sin(25 * GR_M_PI / 32.0)));
+ m_256apsk[139] = gr_complex((r8 * cos(27 * GR_M_PI / 32.0)), (r8 * sin(27 * GR_M_PI / 32.0)));
+ m_256apsk[140] = gr_complex((r8 * cos(17 * GR_M_PI / 32.0)), (r8 * sin(17 * GR_M_PI / 32.0)));
+ m_256apsk[141] = gr_complex((r8 * cos(19 * GR_M_PI / 32.0)), (r8 * sin(19 * GR_M_PI / 32.0)));
+ m_256apsk[142] = gr_complex((r8 * cos(23 * GR_M_PI / 32.0)), (r8 * sin(23 * GR_M_PI / 32.0)));
+ m_256apsk[143] = gr_complex((r8 * cos(21 * GR_M_PI / 32.0)), (r8 * sin(21 * GR_M_PI / 32.0)));
+ m_256apsk[144] = gr_complex((r8 * cos(-1 * GR_M_PI / 32.0)), (r8 * sin(-1 * GR_M_PI / 32.0)));
+ m_256apsk[145] = gr_complex((r8 * cos(-3 * GR_M_PI / 32.0)), (r8 * sin(-3 * GR_M_PI / 32.0)));
+ m_256apsk[146] = gr_complex((r8 * cos(-7 * GR_M_PI / 32.0)), (r8 * sin(-7 * GR_M_PI / 32.0)));
+ m_256apsk[147] = gr_complex((r8 * cos(-5 * GR_M_PI / 32.0)), (r8 * sin(-5 * GR_M_PI / 32.0)));
+ m_256apsk[148] = gr_complex((r8 * cos(-15 * GR_M_PI / 32.0)), (r8 * sin(-15 * GR_M_PI / 32.0)));
+ m_256apsk[149] = gr_complex((r8 * cos(-13 * GR_M_PI / 32.0)), (r8 * sin(-13 * GR_M_PI / 32.0)));
+ m_256apsk[150] = gr_complex((r8 * cos(-9 * GR_M_PI / 32.0)), (r8 * sin(-9 * GR_M_PI / 32.0)));
+ m_256apsk[151] = gr_complex((r8 * cos(-11 * GR_M_PI / 32.0)), (r8 * sin(-11 * GR_M_PI / 32.0)));
+ m_256apsk[152] = gr_complex((r8 * cos(33 * GR_M_PI / 32.0)), (r8 * sin(33 * GR_M_PI / 32.0)));
+ m_256apsk[153] = gr_complex((r8 * cos(35 * GR_M_PI / 32.0)), (r8 * sin(35 * GR_M_PI / 32.0)));
+ m_256apsk[154] = gr_complex((r8 * cos(39 * GR_M_PI / 32.0)), (r8 * sin(39 * GR_M_PI / 32.0)));
+ m_256apsk[155] = gr_complex((r8 * cos(37 * GR_M_PI / 32.0)), (r8 * sin(37 * GR_M_PI / 32.0)));
+ m_256apsk[156] = gr_complex((r8 * cos(47 * GR_M_PI / 32.0)), (r8 * sin(47 * GR_M_PI / 32.0)));
+ m_256apsk[157] = gr_complex((r8 * cos(45 * GR_M_PI / 32.0)), (r8 * sin(45 * GR_M_PI / 32.0)));
+ m_256apsk[158] = gr_complex((r8 * cos(41 * GR_M_PI / 32.0)), (r8 * sin(41 * GR_M_PI / 32.0)));
+ m_256apsk[159] = gr_complex((r8 * cos(43 * GR_M_PI / 32.0)), (r8 * sin(43 * GR_M_PI / 32.0)));
+ m_256apsk[160] = gr_complex((r7 * cos(GR_M_PI / 32.0)), (r7 * sin(GR_M_PI / 32.0)));
+ m_256apsk[161] = gr_complex((r7 * cos(3 * GR_M_PI / 32.0)), (r7 * sin(3 * GR_M_PI / 32.0)));
+ m_256apsk[162] = gr_complex((r7 * cos(7 * GR_M_PI / 32.0)), (r7 * sin(7 * GR_M_PI / 32.0)));
+ m_256apsk[163] = gr_complex((r7 * cos(5 * GR_M_PI / 32.0)), (r7 * sin(5 * GR_M_PI / 32.0)));
+ m_256apsk[164] = gr_complex((r7 * cos(15 * GR_M_PI / 32.0)), (r7 * sin(15 * GR_M_PI / 32.0)));
+ m_256apsk[165] = gr_complex((r7 * cos(13 * GR_M_PI / 32.0)), (r7 * sin(13 * GR_M_PI / 32.0)));
+ m_256apsk[166] = gr_complex((r7 * cos(9 * GR_M_PI / 32.0)), (r7 * sin(9 * GR_M_PI / 32.0)));
+ m_256apsk[167] = gr_complex((r7 * cos(11 * GR_M_PI / 32.0)), (r7 * sin(11 * GR_M_PI / 32.0)));
+ m_256apsk[168] = gr_complex((r7 * cos(31 * GR_M_PI / 32.0)), (r7 * sin(31 * GR_M_PI / 32.0)));
+ m_256apsk[169] = gr_complex((r7 * cos(29 * GR_M_PI / 32.0)), (r7 * sin(29 * GR_M_PI / 32.0)));
+ m_256apsk[170] = gr_complex((r7 * cos(25 * GR_M_PI / 32.0)), (r7 * sin(25 * GR_M_PI / 32.0)));
+ m_256apsk[171] = gr_complex((r7 * cos(27 * GR_M_PI / 32.0)), (r7 * sin(27 * GR_M_PI / 32.0)));
+ m_256apsk[172] = gr_complex((r7 * cos(17 * GR_M_PI / 32.0)), (r7 * sin(17 * GR_M_PI / 32.0)));
+ m_256apsk[173] = gr_complex((r7 * cos(19 * GR_M_PI / 32.0)), (r7 * sin(19 * GR_M_PI / 32.0)));
+ m_256apsk[174] = gr_complex((r7 * cos(23 * GR_M_PI / 32.0)), (r7 * sin(23 * GR_M_PI / 32.0)));
+ m_256apsk[175] = gr_complex((r7 * cos(21 * GR_M_PI / 32.0)), (r7 * sin(21 * GR_M_PI / 32.0)));
+ m_256apsk[176] = gr_complex((r7 * cos(-1 * GR_M_PI / 32.0)), (r7 * sin(-1 * GR_M_PI / 32.0)));
+ m_256apsk[177] = gr_complex((r7 * cos(-3 * GR_M_PI / 32.0)), (r7 * sin(-3 * GR_M_PI / 32.0)));
+ m_256apsk[178] = gr_complex((r7 * cos(-7 * GR_M_PI / 32.0)), (r7 * sin(-7 * GR_M_PI / 32.0)));
+ m_256apsk[179] = gr_complex((r7 * cos(-5 * GR_M_PI / 32.0)), (r7 * sin(-5 * GR_M_PI / 32.0)));
+ m_256apsk[180] = gr_complex((r7 * cos(-15 * GR_M_PI / 32.0)), (r7 * sin(-15 * GR_M_PI / 32.0)));
+ m_256apsk[181] = gr_complex((r7 * cos(-13 * GR_M_PI / 32.0)), (r7 * sin(-13 * GR_M_PI / 32.0)));
+ m_256apsk[182] = gr_complex((r7 * cos(-9 * GR_M_PI / 32.0)), (r7 * sin(-9 * GR_M_PI / 32.0)));
+ m_256apsk[183] = gr_complex((r7 * cos(-11 * GR_M_PI / 32.0)), (r7 * sin(-11 * GR_M_PI / 32.0)));
+ m_256apsk[184] = gr_complex((r7 * cos(33 * GR_M_PI / 32.0)), (r7 * sin(33 * GR_M_PI / 32.0)));
+ m_256apsk[185] = gr_complex((r7 * cos(35 * GR_M_PI / 32.0)), (r7 * sin(35 * GR_M_PI / 32.0)));
+ m_256apsk[186] = gr_complex((r7 * cos(39 * GR_M_PI / 32.0)), (r7 * sin(39 * GR_M_PI / 32.0)));
+ m_256apsk[187] = gr_complex((r7 * cos(37 * GR_M_PI / 32.0)), (r7 * sin(37 * GR_M_PI / 32.0)));
+ m_256apsk[188] = gr_complex((r7 * cos(47 * GR_M_PI / 32.0)), (r7 * sin(47 * GR_M_PI / 32.0)));
+ m_256apsk[189] = gr_complex((r7 * cos(45 * GR_M_PI / 32.0)), (r7 * sin(45 * GR_M_PI / 32.0)));
+ m_256apsk[190] = gr_complex((r7 * cos(41 * GR_M_PI / 32.0)), (r7 * sin(41 * GR_M_PI / 32.0)));
+ m_256apsk[191] = gr_complex((r7 * cos(43 * GR_M_PI / 32.0)), (r7 * sin(43 * GR_M_PI / 32.0)));
+ m_256apsk[192] = gr_complex((r5 * cos(GR_M_PI / 32.0)), (r5 * sin(GR_M_PI / 32.0)));
+ m_256apsk[193] = gr_complex((r5 * cos(3 * GR_M_PI / 32.0)), (r5 * sin(3 * GR_M_PI / 32.0)));
+ m_256apsk[194] = gr_complex((r5 * cos(7 * GR_M_PI / 32.0)), (r5 * sin(7 * GR_M_PI / 32.0)));
+ m_256apsk[195] = gr_complex((r5 * cos(5 * GR_M_PI / 32.0)), (r5 * sin(5 * GR_M_PI / 32.0)));
+ m_256apsk[196] = gr_complex((r5 * cos(15 * GR_M_PI / 32.0)), (r5 * sin(15 * GR_M_PI / 32.0)));
+ m_256apsk[197] = gr_complex((r5 * cos(13 * GR_M_PI / 32.0)), (r5 * sin(13 * GR_M_PI / 32.0)));
+ m_256apsk[198] = gr_complex((r5 * cos(9 * GR_M_PI / 32.0)), (r5 * sin(9 * GR_M_PI / 32.0)));
+ m_256apsk[199] = gr_complex((r5 * cos(11 * GR_M_PI / 32.0)), (r5 * sin(11 * GR_M_PI / 32.0)));
+ m_256apsk[200] = gr_complex((r5 * cos(31 * GR_M_PI / 32.0)), (r5 * sin(31 * GR_M_PI / 32.0)));
+ m_256apsk[201] = gr_complex((r5 * cos(29 * GR_M_PI / 32.0)), (r5 * sin(29 * GR_M_PI / 32.0)));
+ m_256apsk[202] = gr_complex((r5 * cos(25 * GR_M_PI / 32.0)), (r5 * sin(25 * GR_M_PI / 32.0)));
+ m_256apsk[203] = gr_complex((r5 * cos(27 * GR_M_PI / 32.0)), (r5 * sin(27 * GR_M_PI / 32.0)));
+ m_256apsk[204] = gr_complex((r5 * cos(17 * GR_M_PI / 32.0)), (r5 * sin(17 * GR_M_PI / 32.0)));
+ m_256apsk[205] = gr_complex((r5 * cos(19 * GR_M_PI / 32.0)), (r5 * sin(19 * GR_M_PI / 32.0)));
+ m_256apsk[206] = gr_complex((r5 * cos(23 * GR_M_PI / 32.0)), (r5 * sin(23 * GR_M_PI / 32.0)));
+ m_256apsk[207] = gr_complex((r5 * cos(21 * GR_M_PI / 32.0)), (r5 * sin(21 * GR_M_PI / 32.0)));
+ m_256apsk[208] = gr_complex((r5 * cos(-1 * GR_M_PI / 32.0)), (r5 * sin(-1 * GR_M_PI / 32.0)));
+ m_256apsk[209] = gr_complex((r5 * cos(-3 * GR_M_PI / 32.0)), (r5 * sin(-3 * GR_M_PI / 32.0)));
+ m_256apsk[210] = gr_complex((r5 * cos(-7 * GR_M_PI / 32.0)), (r5 * sin(-7 * GR_M_PI / 32.0)));
+ m_256apsk[211] = gr_complex((r5 * cos(-5 * GR_M_PI / 32.0)), (r5 * sin(-5 * GR_M_PI / 32.0)));
+ m_256apsk[212] = gr_complex((r5 * cos(-15 * GR_M_PI / 32.0)), (r5 * sin(-15 * GR_M_PI / 32.0)));
+ m_256apsk[213] = gr_complex((r5 * cos(-13 * GR_M_PI / 32.0)), (r5 * sin(-13 * GR_M_PI / 32.0)));
+ m_256apsk[214] = gr_complex((r5 * cos(-9 * GR_M_PI / 32.0)), (r5 * sin(-9 * GR_M_PI / 32.0)));
+ m_256apsk[215] = gr_complex((r5 * cos(-11 * GR_M_PI / 32.0)), (r5 * sin(-11 * GR_M_PI / 32.0)));
+ m_256apsk[216] = gr_complex((r5 * cos(33 * GR_M_PI / 32.0)), (r5 * sin(33 * GR_M_PI / 32.0)));
+ m_256apsk[217] = gr_complex((r5 * cos(35 * GR_M_PI / 32.0)), (r5 * sin(35 * GR_M_PI / 32.0)));
+ m_256apsk[218] = gr_complex((r5 * cos(39 * GR_M_PI / 32.0)), (r5 * sin(39 * GR_M_PI / 32.0)));
+ m_256apsk[219] = gr_complex((r5 * cos(37 * GR_M_PI / 32.0)), (r5 * sin(37 * GR_M_PI / 32.0)));
+ m_256apsk[220] = gr_complex((r5 * cos(47 * GR_M_PI / 32.0)), (r5 * sin(47 * GR_M_PI / 32.0)));
+ m_256apsk[221] = gr_complex((r5 * cos(45 * GR_M_PI / 32.0)), (r5 * sin(45 * GR_M_PI / 32.0)));
+ m_256apsk[222] = gr_complex((r5 * cos(41 * GR_M_PI / 32.0)), (r5 * sin(41 * GR_M_PI / 32.0)));
+ m_256apsk[223] = gr_complex((r5 * cos(43 * GR_M_PI / 32.0)), (r5 * sin(43 * GR_M_PI / 32.0)));
+ m_256apsk[224] = gr_complex((r6 * cos(GR_M_PI / 32.0)), (r6 * sin(GR_M_PI / 32.0)));
+ m_256apsk[225] = gr_complex((r6 * cos(3 * GR_M_PI / 32.0)), (r6 * sin(3 * GR_M_PI / 32.0)));
+ m_256apsk[226] = gr_complex((r6 * cos(7 * GR_M_PI / 32.0)), (r6 * sin(7 * GR_M_PI / 32.0)));
+ m_256apsk[227] = gr_complex((r6 * cos(5 * GR_M_PI / 32.0)), (r6 * sin(5 * GR_M_PI / 32.0)));
+ m_256apsk[228] = gr_complex((r6 * cos(15 * GR_M_PI / 32.0)), (r6 * sin(15 * GR_M_PI / 32.0)));
+ m_256apsk[229] = gr_complex((r6 * cos(13 * GR_M_PI / 32.0)), (r6 * sin(13 * GR_M_PI / 32.0)));
+ m_256apsk[230] = gr_complex((r6 * cos(9 * GR_M_PI / 32.0)), (r6 * sin(9 * GR_M_PI / 32.0)));
+ m_256apsk[231] = gr_complex((r6 * cos(11 * GR_M_PI / 32.0)), (r6 * sin(11 * GR_M_PI / 32.0)));
+ m_256apsk[232] = gr_complex((r6 * cos(31 * GR_M_PI / 32.0)), (r6 * sin(31 * GR_M_PI / 32.0)));
+ m_256apsk[233] = gr_complex((r6 * cos(29 * GR_M_PI / 32.0)), (r6 * sin(29 * GR_M_PI / 32.0)));
+ m_256apsk[234] = gr_complex((r6 * cos(25 * GR_M_PI / 32.0)), (r6 * sin(25 * GR_M_PI / 32.0)));
+ m_256apsk[235] = gr_complex((r6 * cos(27 * GR_M_PI / 32.0)), (r6 * sin(27 * GR_M_PI / 32.0)));
+ m_256apsk[236] = gr_complex((r6 * cos(17 * GR_M_PI / 32.0)), (r6 * sin(17 * GR_M_PI / 32.0)));
+ m_256apsk[237] = gr_complex((r6 * cos(19 * GR_M_PI / 32.0)), (r6 * sin(19 * GR_M_PI / 32.0)));
+ m_256apsk[238] = gr_complex((r6 * cos(23 * GR_M_PI / 32.0)), (r6 * sin(23 * GR_M_PI / 32.0)));
+ m_256apsk[239] = gr_complex((r6 * cos(21 * GR_M_PI / 32.0)), (r6 * sin(21 * GR_M_PI / 32.0)));
+ m_256apsk[240] = gr_complex((r6 * cos(-1 * GR_M_PI / 32.0)), (r6 * sin(-1 * GR_M_PI / 32.0)));
+ m_256apsk[241] = gr_complex((r6 * cos(-3 * GR_M_PI / 32.0)), (r6 * sin(-3 * GR_M_PI / 32.0)));
+ m_256apsk[242] = gr_complex((r6 * cos(-7 * GR_M_PI / 32.0)), (r6 * sin(-7 * GR_M_PI / 32.0)));
+ m_256apsk[243] = gr_complex((r6 * cos(-5 * GR_M_PI / 32.0)), (r6 * sin(-5 * GR_M_PI / 32.0)));
+ m_256apsk[244] = gr_complex((r6 * cos(-15 * GR_M_PI / 32.0)), (r6 * sin(-15 * GR_M_PI / 32.0)));
+ m_256apsk[245] = gr_complex((r6 * cos(-13 * GR_M_PI / 32.0)), (r6 * sin(-13 * GR_M_PI / 32.0)));
+ m_256apsk[246] = gr_complex((r6 * cos(-9 * GR_M_PI / 32.0)), (r6 * sin(-9 * GR_M_PI / 32.0)));
+ m_256apsk[247] = gr_complex((r6 * cos(-11 * GR_M_PI / 32.0)), (r6 * sin(-11 * GR_M_PI / 32.0)));
+ m_256apsk[248] = gr_complex((r6 * cos(33 * GR_M_PI / 32.0)), (r6 * sin(33 * GR_M_PI / 32.0)));
+ m_256apsk[249] = gr_complex((r6 * cos(35 * GR_M_PI / 32.0)), (r6 * sin(35 * GR_M_PI / 32.0)));
+ m_256apsk[250] = gr_complex((r6 * cos(39 * GR_M_PI / 32.0)), (r6 * sin(39 * GR_M_PI / 32.0)));
+ m_256apsk[251] = gr_complex((r6 * cos(37 * GR_M_PI / 32.0)), (r6 * sin(37 * GR_M_PI / 32.0)));
+ m_256apsk[252] = gr_complex((r6 * cos(47 * GR_M_PI / 32.0)), (r6 * sin(47 * GR_M_PI / 32.0)));
+ m_256apsk[253] = gr_complex((r6 * cos(45 * GR_M_PI / 32.0)), (r6 * sin(45 * GR_M_PI / 32.0)));
+ m_256apsk[254] = gr_complex((r6 * cos(41 * GR_M_PI / 32.0)), (r6 * sin(41 * GR_M_PI / 32.0)));
+ m_256apsk[255] = gr_complex((r6 * cos(43 * GR_M_PI / 32.0)), (r6 * sin(43 * GR_M_PI / 32.0)));
}
break;
case MOD_64QAM:
@@ -1990,10 +1991,10 @@ namespace gr {
m_8psk[7] = gr_complex( 7.0 + 1.25, 0.0);
break;
default:
- m_qpsk[0] = gr_complex((r1 * cos(M_PI / 4.0)), (r1 * sin(M_PI / 4.0)));
- m_qpsk[1] = gr_complex((r1 * cos(7 * M_PI / 4.0)), (r1 * sin(7 * M_PI / 4.0)));
- m_qpsk[2] = gr_complex((r1 * cos(3 * M_PI / 4.0)), (r1 * sin(3 * M_PI / 4.0)));
- m_qpsk[3] = gr_complex((r1 * cos(5 * M_PI / 4.0)), (r1 * sin(5 * M_PI / 4.0)));
+ m_qpsk[0] = gr_complex((r1 * cos(GR_M_PI / 4.0)), (r1 * sin(GR_M_PI / 4.0)));
+ m_qpsk[1] = gr_complex((r1 * cos(7 * GR_M_PI / 4.0)), (r1 * sin(7 * GR_M_PI / 4.0)));
+ m_qpsk[2] = gr_complex((r1 * cos(3 * GR_M_PI / 4.0)), (r1 * sin(3 * GR_M_PI / 4.0)));
+ m_qpsk[3] = gr_complex((r1 * cos(5 * GR_M_PI / 4.0)), (r1 * sin(5 * GR_M_PI / 4.0)));
break;
}
signal_constellation = constellation;
diff --git a/gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.cc b/gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.cc
index 5da18b1d21..b441cdc10d 100644
--- a/gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.cc
+++ b/gr-dtv/lib/dvbs2/dvbs2_physical_cc_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2015,2016 Free Software Foundation, Inc.
+ * Copyright 2015,2016,2018 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
@@ -22,8 +22,9 @@
#include "config.h"
#endif
-#include <gnuradio/io_signature.h>
#include "dvbs2_physical_cc_impl.h"
+#include <gnuradio/io_signature.h>
+#include <gnuradio/math.h>
namespace gr {
namespace dtv {
@@ -129,14 +130,14 @@ namespace gr {
break;
}
- m_bpsk[0][0] = gr_complex((r0 * cos(M_PI / 4.0)), (r0 * sin(M_PI / 4.0)));
- m_bpsk[0][1] = gr_complex((r0 * cos(5.0 * M_PI / 4.0)), (r0 * sin(5.0 * M_PI / 4.0)));
- m_bpsk[1][0] = gr_complex((r0 * cos(5.0 * M_PI / 4.0)), (r0 * sin(M_PI / 4.0)));
- m_bpsk[1][1] = gr_complex((r0 * cos(M_PI / 4.0)), (r0 * sin(5.0 * M_PI /4.0)));
- m_bpsk[2][0] = gr_complex((r0 * cos(5.0 * M_PI / 4.0)), (r0 * sin(M_PI / 4.0)));
- m_bpsk[2][1] = gr_complex((r0 * cos(M_PI / 4.0)), (r0 * sin(5.0 * M_PI /4.0)));
- m_bpsk[3][0] = gr_complex((r0 * cos(5.0 * M_PI / 4.0)), (r0 * sin(5.0 * M_PI / 4.0)));
- m_bpsk[3][1] = gr_complex((r0 * cos(M_PI / 4.0)), (r0 * sin(M_PI / 4.0)));
+ m_bpsk[0][0] = gr_complex((r0 * cos(GR_M_PI / 4.0)), (r0 * sin(GR_M_PI / 4.0)));
+ m_bpsk[0][1] = gr_complex((r0 * cos(5.0 * GR_M_PI / 4.0)), (r0 * sin(5.0 * GR_M_PI / 4.0)));
+ m_bpsk[1][0] = gr_complex((r0 * cos(5.0 * GR_M_PI / 4.0)), (r0 * sin(GR_M_PI / 4.0)));
+ m_bpsk[1][1] = gr_complex((r0 * cos(GR_M_PI / 4.0)), (r0 * sin(5.0 * GR_M_PI /4.0)));
+ m_bpsk[2][0] = gr_complex((r0 * cos(5.0 * GR_M_PI / 4.0)), (r0 * sin(GR_M_PI / 4.0)));
+ m_bpsk[2][1] = gr_complex((r0 * cos(GR_M_PI / 4.0)), (r0 * sin(5.0 * GR_M_PI /4.0)));
+ m_bpsk[3][0] = gr_complex((r0 * cos(5.0 * GR_M_PI / 4.0)), (r0 * sin(5.0 * GR_M_PI / 4.0)));
+ m_bpsk[3][1] = gr_complex((r0 * cos(GR_M_PI / 4.0)), (r0 * sin(GR_M_PI / 4.0)));
m_zero = gr_complex(0.0, 0.0);
diff --git a/gr-dtv/lib/dvbt/dvbt_ofdm_sym_acquisition_impl.cc b/gr-dtv/lib/dvbt/dvbt_ofdm_sym_acquisition_impl.cc
index 1a347d3d8d..079d948163 100644
--- a/gr-dtv/lib/dvbt/dvbt_ofdm_sym_acquisition_impl.cc
+++ b/gr-dtv/lib/dvbt/dvbt_ofdm_sym_acquisition_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2015,2016 Free Software Foundation, Inc.
+ * Copyright 2015,2016,2018 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
@@ -22,13 +22,13 @@
#include "config.h"
#endif
-#include <gnuradio/io_signature.h>
#include "dvbt_ofdm_sym_acquisition_impl.h"
-#include <complex>
-#include <limits>
+#include <gnuradio/io_signature.h>
#include <gnuradio/math.h>
#include <gnuradio/expj.h>
#include <volk/volk.h>
+#include <complex>
+#include <limits>
namespace gr {
namespace dtv {
@@ -170,11 +170,11 @@ namespace gr {
// We are interested only in fft_length
d_phase += d_phaseinc;
- while (d_phase > (float)M_PI) {
- d_phase -= (float)(2.0 * M_PI);
+ while (d_phase > (float)GR_M_PI) {
+ d_phase -= (float)(2.0 * GR_M_PI);
}
- while (d_phase < (float)(-M_PI)) {
- d_phase += (float)(2.0 * M_PI);
+ while (d_phase < (float)(-GR_M_PI)) {
+ d_phase += (float)(2.0 * GR_M_PI);
}
derot[i] = gr_expj(d_phase);
@@ -190,11 +190,11 @@ namespace gr {
for (int i = 0; i < (d_cp_length + d_fft_length); i++) {
d_phase += d_phaseinc;
- while (d_phase > (float)M_PI) {
- d_phase -= (float)(2.0 * M_PI);
+ while (d_phase > (float)GR_M_PI) {
+ d_phase -= (float)(2.0 * GR_M_PI);
}
- while (d_phase < (float)(-M_PI)) {
- d_phase += (float)(2.0 * M_PI);
+ while (d_phase < (float)(-GR_M_PI)) {
+ d_phase += (float)(2.0 * GR_M_PI);
}
}
diff --git a/gr-dtv/lib/dvbt/dvbt_reference_signals_impl.cc b/gr-dtv/lib/dvbt/dvbt_reference_signals_impl.cc
index c4d85e65ed..c82c4ebd2b 100644
--- a/gr-dtv/lib/dvbt/dvbt_reference_signals_impl.cc
+++ b/gr-dtv/lib/dvbt/dvbt_reference_signals_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2015,2016 Free Software Foundation, Inc.
+ * Copyright 2015,2016,2018 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
@@ -22,11 +22,11 @@
#include "config.h"
#endif
-#include <gnuradio/io_signature.h>
#include "dvbt_reference_signals_impl.h"
-#include <complex>
+#include <gnuradio/io_signature.h>
#include <gnuradio/expj.h>
#include <gnuradio/math.h>
+#include <complex>
namespace gr {
namespace dtv {
@@ -725,8 +725,8 @@ namespace gr {
int half_size = (d_cpilot_carriers_size - 1) / 2;
// TODO init this in constructor
- float carrier_coeff = 1.0 / (2 * M_PI * (1 + float (d_cp_length) / float (d_fft_length)) * 2);
- float sampling_coeff = 1.0 / (2 * M_PI * ((1 + float (d_cp_length) / float (d_fft_length)) * ((float)d_cpilot_carriers_size / 2.0)));
+ float carrier_coeff = 1.0 / (2 * GR_M_PI * (1 + float (d_cp_length) / float (d_fft_length)) * 2);
+ float sampling_coeff = 1.0 / (2 * GR_M_PI * ((1 + float (d_cp_length) / float (d_fft_length)) * ((float)d_cpilot_carriers_size / 2.0)));
float left_angle, right_angle;
@@ -764,7 +764,7 @@ namespace gr {
float correction = (float)d_freq_offset + d_carrier_freq_correction;
- gr_complex c = gr_expj(-2 * M_PI * correction * \
+ gr_complex c = gr_expj(-2 * GR_M_PI * correction * \
(d_fft_length + d_cp_length) / d_fft_length * symbol_count);
// TODO - vectorize this operation
diff --git a/gr-dtv/lib/dvbt2/dvbt2_modulator_bc_impl.cc b/gr-dtv/lib/dvbt2/dvbt2_modulator_bc_impl.cc
index 05e3382ef9..7435c4ad36 100644
--- a/gr-dtv/lib/dvbt2/dvbt2_modulator_bc_impl.cc
+++ b/gr-dtv/lib/dvbt2/dvbt2_modulator_bc_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2015,2017 Free Software Foundation, Inc.
+ * Copyright 2015,2017,2018 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
@@ -22,8 +22,9 @@
#include "config.h"
#endif
-#include <gnuradio/io_signature.h>
#include "dvbt2_modulator_bc_impl.h"
+#include <gnuradio/io_signature.h>
+#include <gnuradio/math.h>
namespace gr {
namespace dtv {
@@ -98,7 +99,7 @@ namespace gr {
m_qpsk[3] = gr_complex(-1.0 / normalization, -1.0 / normalization);
if (rotation == ROTATION_ON) {
cyclic_delay = TRUE;
- rotation_angle = (2.0 * M_PI * 29.0) / 360.0;
+ rotation_angle = (2.0 * GR_M_PI * 29.0) / 360.0;
temp = std::exp(gr_complexd(0.0, rotation_angle));
for (int i = 0; i < 4; i++) {
m_qpsk[i] *= temp;
@@ -114,7 +115,7 @@ namespace gr {
}
if (rotation == ROTATION_ON) {
cyclic_delay = TRUE;
- rotation_angle = (2.0 * M_PI * 16.8) / 360.0;
+ rotation_angle = (2.0 * GR_M_PI * 16.8) / 360.0;
temp = std::exp(gr_complexd(0.0, rotation_angle));
for (int i = 0; i < 16; i++) {
m_16qam[i] *= temp;
@@ -130,7 +131,7 @@ namespace gr {
}
if (rotation == ROTATION_ON) {
cyclic_delay = TRUE;
- rotation_angle = (2.0 * M_PI * 8.6) / 360.0;
+ rotation_angle = (2.0 * GR_M_PI * 8.6) / 360.0;
temp = std::exp(gr_complexd(0.0, rotation_angle));
for (int i = 0; i < 64; i++) {
m_64qam[i] *= temp;
@@ -146,7 +147,7 @@ namespace gr {
}
if (rotation == ROTATION_ON) {
cyclic_delay = TRUE;
- rotation_angle = (2.0 * M_PI * 3.576334375) / 360.0;
+ rotation_angle = (2.0 * GR_M_PI * 3.576334375) / 360.0;
temp = std::exp(gr_complexd(0.0, rotation_angle));
for (int i = 0; i < 256; i++) {
m_256qam[i] *= temp;
@@ -161,7 +162,7 @@ namespace gr {
m_qpsk[3] = gr_complex(-1.0 / normalization, -1.0 / normalization);
if (rotation == ROTATION_ON) {
cyclic_delay = TRUE;
- rotation_angle = (2.0 * M_PI * 29.0) / 360.0;
+ rotation_angle = (2.0 * GR_M_PI * 29.0) / 360.0;
temp = std::exp(gr_complexd(0.0, rotation_angle));
for (int i = 0; i < 4; i++) {
m_qpsk[i] *= temp;
diff --git a/gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.cc b/gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.cc
index a83c56182e..bcdc4c66ac 100644
--- a/gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.cc
+++ b/gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2015-2017 Free Software Foundation, Inc.
+ * Copyright 2015-2018 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
@@ -22,8 +22,9 @@
#include "config.h"
#endif
-#include <gnuradio/io_signature.h>
#include "dvbt2_paprtr_cc_impl.h"
+#include <gnuradio/io_signature.h>
+#include <gnuradio/math.h>
#include <volk/volk.h>
/* An early exit from the iteration loop is a very effective optimization */
@@ -774,7 +775,7 @@ namespace gr {
u = (in[m] + c[m]) / y;
alpha = y - v_clip;
for (int n = 0; n < N_TR; n++) {
- vtemp = (-2.0 * M_PI * m * ((papr_map[n] + shift) - center)) / papr_fft_size;
+ vtemp = (-2.0 * GR_M_PI * m * ((papr_map[n] + shift) - center)) / papr_fft_size;
ctemp[n] = std::exp(gr_complexd(0.0, vtemp));
}
volk_32fc_s32fc_multiply_32fc(v, ctemp, u, N_TR);
diff --git a/gr-dtv/lib/dvbt2/dvbt2_pilotgenerator_cc_impl.cc b/gr-dtv/lib/dvbt2/dvbt2_pilotgenerator_cc_impl.cc
index 2bb19f5189..3724533b3d 100644
--- a/gr-dtv/lib/dvbt2/dvbt2_pilotgenerator_cc_impl.cc
+++ b/gr-dtv/lib/dvbt2/dvbt2_pilotgenerator_cc_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2015,2016 Free Software Foundation, Inc.
+ * Copyright 2015,2016,2018 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
@@ -22,8 +22,9 @@
#include "config.h"
#endif
-#include <gnuradio/io_signature.h>
#include "dvbt2_pilotgenerator_cc_impl.h"
+#include <gnuradio/io_signature.h>
+#include <gnuradio/math.h>
#include <volk/volk.h>
namespace gr {
@@ -1113,7 +1114,7 @@ namespace gr {
}
fstep = fs / vlength;
for (int i = 0; i < vlength / 2; i++) {
- x = M_PI * f / fs;
+ x = GR_M_PI * f / fs;
if (i == 0) {
sinc = 1.0;
}
diff --git a/gr-fec/include/gnuradio/fec/viterbi.h b/gr-fec/include/gnuradio/fec/viterbi.h
index 5827f1e9b6..4ba64ed1ed 100644
--- a/gr-fec/include/gnuradio/fec/viterbi.h
+++ b/gr-fec/include/gnuradio/fec/viterbi.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2008 Free Software Foundation, Inc.
+ * Copyright 2008,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -24,30 +24,40 @@
* But it fits so nicely into a 32-bit machine word...
*/
+#ifndef INCLUDED_VITERBI_H
+#define INCLUDED_VITERBI_H
+
#include <gnuradio/fec/api.h>
-struct viterbi_state {
- unsigned long path; /* Decoded path to this state */
- long metric; /* Cumulative metric to this state */
-};
+namespace gr {
+ namespace fec {
+
+ struct FEC_API viterbi_state {
+ unsigned long path; /* Decoded path to this state */
+ long metric; /* Cumulative metric to this state */
+ };
+
+ FEC_API
+ void gen_met(int mettab[2][256], /* Metric table */
+ int amp, /* Signal amplitude */
+ double esn0, /* Es/N0 ratio in dB */
+ double bias, /* Metric bias */
+ int scale); /* Scale factor */
-FEC_API
-int gen_met(int mettab[2][256], /* Metric table */
- int amp, /* Signal amplitude */
- double esn0, /* Es/N0 ratio in dB */
- double bias, /* Metric bias */
- int scale); /* Scale factor */
+ FEC_API unsigned char
+ encode(unsigned char *symbols, unsigned char *data,
+ unsigned int nbytes,unsigned char encstate);
-FEC_API unsigned char
-encode(unsigned char *symbols, unsigned char *data,
- unsigned int nbytes,unsigned char encstate);
+ FEC_API void
+ viterbi_chunks_init(struct viterbi_state* state);
-FEC_API void
-viterbi_chunks_init(struct viterbi_state* state);
+ FEC_API void
+ viterbi_butterfly2(unsigned char *symbols, int mettab[2][256],
+ struct viterbi_state *state0, struct viterbi_state *state1);
- FEC_API void
-viterbi_butterfly2(unsigned char *symbols, int mettab[2][256],
- struct viterbi_state *state0, struct viterbi_state *state1);
+ FEC_API unsigned char
+ viterbi_get_output(struct viterbi_state *state, unsigned char *outbuf);
+ }
+}
-FEC_API unsigned char
-viterbi_get_output(struct viterbi_state *state, unsigned char *outbuf);
+#endif /* INCLUDED_VITERBI_H */
diff --git a/gr-fec/lib/ccsds_encoder_impl.cc b/gr-fec/lib/ccsds_encoder_impl.cc
index 2a2228a8ed..4c873a5288 100644
--- a/gr-fec/lib/ccsds_encoder_impl.cc
+++ b/gr-fec/lib/ccsds_encoder_impl.cc
@@ -28,9 +28,7 @@
#include <gnuradio/fec/generic_encoder.h>
#include <cstdio>
-extern "C" {
#include <gnuradio/fec/viterbi.h>
-}
namespace gr {
namespace fec {
diff --git a/gr-fec/lib/decode_ccsds_27_fb_impl.h b/gr-fec/lib/decode_ccsds_27_fb_impl.h
index 83fed604d4..fff01d2374 100644
--- a/gr-fec/lib/decode_ccsds_27_fb_impl.h
+++ b/gr-fec/lib/decode_ccsds_27_fb_impl.h
@@ -24,10 +24,7 @@
#define INCLUDED_FEC_DECODE_CCSDS_27_FB_IMPL_H
#include <gnuradio/fec/decode_ccsds_27_fb.h>
-
-extern "C" {
#include <gnuradio/fec/viterbi.h>
-}
namespace gr {
namespace fec {
diff --git a/gr-fec/lib/encode_ccsds_27_bb_impl.cc b/gr-fec/lib/encode_ccsds_27_bb_impl.cc
index 56518777c7..e81cfaa75e 100644
--- a/gr-fec/lib/encode_ccsds_27_bb_impl.cc
+++ b/gr-fec/lib/encode_ccsds_27_bb_impl.cc
@@ -27,9 +27,7 @@
#include "encode_ccsds_27_bb_impl.h"
#include <gnuradio/io_signature.h>
-extern "C" {
#include <gnuradio/fec/viterbi.h>
-}
namespace gr {
namespace fec {
diff --git a/gr-fec/lib/viterbi/CMakeLists.txt b/gr-fec/lib/viterbi/CMakeLists.txt
index 10c5940246..5bbbc24ebf 100644
--- a/gr-fec/lib/viterbi/CMakeLists.txt
+++ b/gr-fec/lib/viterbi/CMakeLists.txt
@@ -43,6 +43,7 @@ endif(MSVC)
########################################################################
# Append gnuradio-runtime library sources
########################################################################
+SET_SOURCE_FILES_PROPERTIES( ${viterbi_sources} PROPERTIES LANGUAGE CXX )
list(APPEND gnuradio_fec_sources ${viterbi_sources})
########################################################################
diff --git a/gr-fec/lib/viterbi/decode.cc b/gr-fec/lib/viterbi/decode.cc
index 0af0b34483..3b948818fe 100644
--- a/gr-fec/lib/viterbi/decode.cc
+++ b/gr-fec/lib/viterbi/decode.cc
@@ -27,9 +27,7 @@
*
*/
-extern "C" {
#include <gnuradio/fec/viterbi.h>
-}
#include <cstdio>
#include <cmath>
@@ -52,10 +50,10 @@ int main()
gen_met(mettab, amp, esn0, 0.0, 4);
// Initialize decoder state
- struct viterbi_state state0[64];
- struct viterbi_state state1[64];
+ struct gr::fec::viterbi_state state0[64];
+ struct gr::fec::viterbi_state state1[64];
unsigned char viterbi_in[16];
- viterbi_chunks_init(state0);
+ gr::fec::viterbi_chunks_init(state0);
while (!feof(stdin)) {
unsigned int n = fread(syms, 1, MAXENCSIZE, stdin);
@@ -71,11 +69,11 @@ int main()
// Every four symbols, perform the butterfly2 operation
if ((count % 4) == 3) {
- viterbi_butterfly2(viterbi_in, mettab, state0, state1);
+ gr::fec::viterbi_butterfly2(viterbi_in, mettab, state0, state1);
// Every sixteen symbols, perform the readback operation
if ((count > 64) && (count % 16) == 11) {
- viterbi_get_output(state0, out);
+ gr::fec::viterbi_get_output(state0, out);
fwrite(out++, 1, 1, stdout);
}
}
diff --git a/gr-fec/lib/viterbi/encode.cc b/gr-fec/lib/viterbi/encode.cc
index 4e152781f0..bf857ff7b8 100644
--- a/gr-fec/lib/viterbi/encode.cc
+++ b/gr-fec/lib/viterbi/encode.cc
@@ -29,9 +29,7 @@
*
*/
-extern "C" {
#include <gnuradio/fec/viterbi.h>
-}
#include <cstdio>
@@ -46,7 +44,7 @@ int main()
while (!feof(stdin)) {
unsigned int n = fread(data, 1, MAXCHUNKSIZE, stdin);
- encoder_state = encode(syms, data, n, encoder_state);
+ encoder_state = gr::fec::encode(syms, data, n, encoder_state);
fwrite(syms, 1, n*16, stdout);
}
diff --git a/gr-fec/lib/viterbi/metrics.c b/gr-fec/lib/viterbi/metrics.c
index 0d91c301ff..4dd28f8ada 100644
--- a/gr-fec/lib/viterbi/metrics.c
+++ b/gr-fec/lib/viterbi/metrics.c
@@ -39,6 +39,8 @@
*/
#define OFFSET 128
+#include<gnuradio/math.h>
+
#include <stdlib.h>
#include <math.h>
@@ -46,81 +48,86 @@
extern double erf(double x);
/* Normal function integrated from -Inf to x. Range: 0-1 */
-#define normal(x) (0.5 + 0.5*erf((x)/M_SQRT2))
+#define normal(x) (0.5 + 0.5*erf((x)/GR_M_SQRT2))
/* Logarithm base 2 */
-#define gr_log2(x) (log(x)*M_LOG2E)
+#define gr_log2(x) (log(x)*GR_M_LOG2E)
+
+namespace gr{
+ namespace fec{
/* Generate log-likelihood metrics for 8-bit soft quantized channel
* assuming AWGN and BPSK
*/
-void
-gen_met(int mettab[2][256], /* Metric table, [sent sym][rx symbol] */
- int amp, /* Signal amplitude, units */
- double esn0, /* Es/N0 ratio in dB */
- double bias, /* Metric bias; 0 for viterbi, rate for sequential */
- int scale) /* Scale factor */
-{
- double noise;
- int s,bit;
- double metrics[2][256];
- double p0,p1;
-
- /* Es/N0 as power ratio */
- esn0 = pow(10.,esn0/10);
-
- noise = 0.5/esn0; /* only half the noise for BPSK */
- noise = sqrt(noise); /* noise/signal Voltage ratio */
-
- /* Zero is a special value, since this sample includes all
- * lower samples that were clipped to this value, i.e., it
- * takes the whole lower tail of the curve
- */
- p1 = normal(((0-OFFSET+0.5)/amp - 1)/noise); /* P(s|1) */
-
- /* Prob of this value occurring for a 0-bit */ /* P(s|0) */
- p0 = normal(((0-OFFSET+0.5)/amp + 1)/noise);
- metrics[0][0] = gr_log2(2*p0/(p1+p0)) - bias;
- metrics[1][0] = gr_log2(2*p1/(p1+p0)) - bias;
-
- for(s=1;s<255;s++){
- /* P(s|1), prob of receiving s given 1 transmitted */
- p1 = normal(((s-OFFSET+0.5)/amp - 1)/noise) -
- normal(((s-OFFSET-0.5)/amp - 1)/noise);
-
- /* P(s|0), prob of receiving s given 0 transmitted */
- p0 = normal(((s-OFFSET+0.5)/amp + 1)/noise) -
- normal(((s-OFFSET-0.5)/amp + 1)/noise);
+ void
+ gen_met(int mettab[2][256], /* Metric table, [sent sym][rx symbol] */
+ int amp, /* Signal amplitude, units */
+ double esn0, /* Es/N0 ratio in dB */
+ double bias, /* Metric bias; 0 for viterbi, rate for sequential */
+ int scale) /* Scale factor */
+ {
+ double noise;
+ int s,bit;
+ double metrics[2][256];
+ double p0,p1;
+
+ /* Es/N0 as power ratio */
+ esn0 = pow(10.,esn0/10);
+
+ noise = 0.5/esn0; /* only half the noise for BPSK */
+ noise = sqrt(noise); /* noise/signal Voltage ratio */
+
+ /* Zero is a special value, since this sample includes all
+ * lower samples that were clipped to this value, i.e., it
+ * takes the whole lower tail of the curve
+ */
+ p1 = normal(((0-OFFSET+0.5)/amp - 1)/noise); /* P(s|1) */
+
+ /* Prob of this value occurring for a 0-bit */ /* P(s|0) */
+ p0 = normal(((0-OFFSET+0.5)/amp + 1)/noise);
+ metrics[0][0] = gr_log2(2*p0/(p1+p0)) - bias;
+ metrics[1][0] = gr_log2(2*p1/(p1+p0)) - bias;
+
+ for(s=1;s<255;s++){
+ /* P(s|1), prob of receiving s given 1 transmitted */
+ p1 = normal(((s-OFFSET+0.5)/amp - 1)/noise) -
+ normal(((s-OFFSET-0.5)/amp - 1)/noise);
+
+ /* P(s|0), prob of receiving s given 0 transmitted */
+ p0 = normal(((s-OFFSET+0.5)/amp + 1)/noise) -
+ normal(((s-OFFSET-0.5)/amp + 1)/noise);
#ifdef notdef
- printf("P(%d|1) = %lg, P(%d|0) = %lg\n",s,p1,s,p0);
+ printf("P(%d|1) = %lg, P(%d|0) = %lg\n",s,p1,s,p0);
#endif
- metrics[0][s] = gr_log2(2*p0/(p1+p0)) - bias;
- metrics[1][s] = gr_log2(2*p1/(p1+p0)) - bias;
- }
- /* 255 is also a special value */
- /* P(s|1) */
- p1 = 1 - normal(((255-OFFSET-0.5)/amp - 1)/noise);
- /* P(s|0) */
- p0 = 1 - normal(((255-OFFSET-0.5)/amp + 1)/noise);
-
- metrics[0][255] = gr_log2(2*p0/(p1+p0)) - bias;
- metrics[1][255] = gr_log2(2*p1/(p1+p0)) - bias;
+ metrics[0][s] = gr_log2(2*p0/(p1+p0)) - bias;
+ metrics[1][s] = gr_log2(2*p1/(p1+p0)) - bias;
+ }
+ /* 255 is also a special value */
+ /* P(s|1) */
+ p1 = 1 - normal(((255-OFFSET-0.5)/amp - 1)/noise);
+ /* P(s|0) */
+ p0 = 1 - normal(((255-OFFSET-0.5)/amp + 1)/noise);
+
+ metrics[0][255] = gr_log2(2*p0/(p1+p0)) - bias;
+ metrics[1][255] = gr_log2(2*p1/(p1+p0)) - bias;
#ifdef notdef
- /* The probability of a raw symbol error is the probability
- * that a 1-bit would be received as a sample with value
- * 0-128. This is the offset normal curve integrated from -Inf to 0.
- */
- printf("symbol Pe = %lg\n",normal(-1/noise));
+ /* The probability of a raw symbol error is the probability
+ * that a 1-bit would be received as a sample with value
+ * 0-128. This is the offset normal curve integrated from -Inf to 0.
+ */
+ printf("symbol Pe = %lg\n",normal(-1/noise));
#endif
- for(bit=0;bit<2;bit++){
- for(s=0;s<256;s++){
- /* Scale and round to nearest integer */
- mettab[bit][s] = floor(metrics[bit][s] * scale + 0.5);
+ for(bit=0;bit<2;bit++){
+ for(s=0;s<256;s++){
+ /* Scale and round to nearest integer */
+ mettab[bit][s] = floor(metrics[bit][s] * scale + 0.5);
#ifdef notdef
- printf("metrics[%d][%d] = %lg, mettab = %d\n",
- bit,s,metrics[bit][s],mettab[bit][s]);
+ printf("metrics[%d][%d] = %lg, mettab = %d\n",
+ bit,s,metrics[bit][s],mettab[bit][s]);
#endif
+ }
+ }
}
}
}
diff --git a/gr-fec/lib/viterbi/viterbi.c b/gr-fec/lib/viterbi/viterbi.c
index 3c247a3868..11b9f79b9a 100644
--- a/gr-fec/lib/viterbi/viterbi.c
+++ b/gr-fec/lib/viterbi/viterbi.c
@@ -1,6 +1,6 @@
/*
* Copyright 1995 Phil Karn, KA9Q
- * Copyright 2008 Free Software Foundation, Inc.
+ * Copyright 2008,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -86,270 +86,275 @@
extern unsigned char Partab[]; /* Parity lookup table */
-/* Convolutionally encode data into binary symbols */
-unsigned char
-encode(unsigned char *symbols,
- unsigned char *data,
- unsigned int nbytes,
- unsigned char encstate)
-{
- int i;
-
- while(nbytes-- != 0){
- for(i=7;i>=0;i--){
- encstate = (encstate << 1) | ((*data >> i) & 1);
- *symbols++ = Partab[encstate & POLYA];
- *symbols++ = Partab[encstate & POLYB];
+namespace gr {
+ namespace fec {
+
+ /* Convolutionally encode data into binary symbols */
+ unsigned char
+ encode(unsigned char *symbols,
+ unsigned char *data,
+ unsigned int nbytes,
+ unsigned char encstate)
+ {
+ int i;
+
+ while(nbytes-- != 0){
+ for(i=7;i>=0;i--){
+ encstate = (encstate << 1) | ((*data >> i) & 1);
+ *symbols++ = Partab[encstate & POLYA];
+ *symbols++ = Partab[encstate & POLYB];
+ }
+ data++;
+ }
+
+ return encstate;
}
- data++;
- }
- return encstate;
-}
+ /* Viterbi decoder */
+ int
+ viterbi(unsigned long *metric, /* Final path metric (returned value) */
+ unsigned char *data, /* Decoded output data */
+ unsigned char *symbols, /* Raw deinterleaved input symbols */
+ unsigned int nbits, /* Number of output bits */
+ int mettab[2][256] /* Metric table, [sent sym][rx symbol] */
+ ){
+ unsigned int bitcnt = 0;
+ int mets[4];
+ long bestmetric;
+ int beststate,i;
+ struct viterbi_state state0[64],state1[64],*state,*next;
-/* Viterbi decoder */
-int
-viterbi(unsigned long *metric, /* Final path metric (returned value) */
- unsigned char *data, /* Decoded output data */
- unsigned char *symbols, /* Raw deinterleaved input symbols */
- unsigned int nbits, /* Number of output bits */
- int mettab[2][256] /* Metric table, [sent sym][rx symbol] */
- ){
- unsigned int bitcnt = 0;
- int mets[4];
- long bestmetric;
- int beststate,i;
- struct viterbi_state state0[64],state1[64],*state,*next;
-
- state = state0;
- next = state1;
-
- /* Initialize starting metrics to prefer 0 state */
- state[0].metric = 0;
- for(i=1;i<64;i++)
- state[i].metric = -999999;
- state[0].path = 0;
-
- for(bitcnt = 0;bitcnt < nbits;bitcnt++){
- /* Read input symbol pair and compute all possible branch
- * metrics
- */
- mets[0] = mettab[0][symbols[0]] + mettab[0][symbols[1]];
- mets[1] = mettab[0][symbols[0]] + mettab[1][symbols[1]];
- mets[2] = mettab[1][symbols[0]] + mettab[0][symbols[1]];
- mets[3] = mettab[1][symbols[0]] + mettab[1][symbols[1]];
- symbols += 2;
-
- /* These macro calls were generated by genbut.c */
- BUTTERFLY(0,0);
- BUTTERFLY(1,1);
- BUTTERFLY(2,3);
- BUTTERFLY(3,2);
- BUTTERFLY(4,3);
- BUTTERFLY(5,2);
- BUTTERFLY(6,0);
- BUTTERFLY(7,1);
- BUTTERFLY(8,0);
- BUTTERFLY(9,1);
- BUTTERFLY(10,3);
- BUTTERFLY(11,2);
- BUTTERFLY(12,3);
- BUTTERFLY(13,2);
- BUTTERFLY(14,0);
- BUTTERFLY(15,1);
- BUTTERFLY(16,2);
- BUTTERFLY(17,3);
- BUTTERFLY(18,1);
- BUTTERFLY(19,0);
- BUTTERFLY(20,1);
- BUTTERFLY(21,0);
- BUTTERFLY(22,2);
- BUTTERFLY(23,3);
- BUTTERFLY(24,2);
- BUTTERFLY(25,3);
- BUTTERFLY(26,1);
- BUTTERFLY(27,0);
- BUTTERFLY(28,1);
- BUTTERFLY(29,0);
- BUTTERFLY(30,2);
- BUTTERFLY(31,3);
-
- /* Swap current and next states */
- if(bitcnt & 1){
state = state0;
next = state1;
- } else {
- state = state1;
- next = state0;
- }
- // ETTUS
- //if(bitcnt > nbits-7){
- /* In tail, poison non-zero nodes */
- //for(i=1;i<64;i += 2)
- // state[i].metric = -9999999;
- //}
- /* Produce output every 8 bits once path memory is full */
- if((bitcnt % 8) == 5 && bitcnt > 32){
- /* Find current best path */
+
+ /* Initialize starting metrics to prefer 0 state */
+ state[0].metric = 0;
+ for(i=1;i<64;i++)
+ state[i].metric = -999999;
+ state[0].path = 0;
+
+ for(bitcnt = 0;bitcnt < nbits;bitcnt++){
+ /* Read input symbol pair and compute all possible branch
+ * metrics
+ */
+ mets[0] = mettab[0][symbols[0]] + mettab[0][symbols[1]];
+ mets[1] = mettab[0][symbols[0]] + mettab[1][symbols[1]];
+ mets[2] = mettab[1][symbols[0]] + mettab[0][symbols[1]];
+ mets[3] = mettab[1][symbols[0]] + mettab[1][symbols[1]];
+ symbols += 2;
+
+ /* These macro calls were generated by genbut.c */
+ BUTTERFLY(0,0);
+ BUTTERFLY(1,1);
+ BUTTERFLY(2,3);
+ BUTTERFLY(3,2);
+ BUTTERFLY(4,3);
+ BUTTERFLY(5,2);
+ BUTTERFLY(6,0);
+ BUTTERFLY(7,1);
+ BUTTERFLY(8,0);
+ BUTTERFLY(9,1);
+ BUTTERFLY(10,3);
+ BUTTERFLY(11,2);
+ BUTTERFLY(12,3);
+ BUTTERFLY(13,2);
+ BUTTERFLY(14,0);
+ BUTTERFLY(15,1);
+ BUTTERFLY(16,2);
+ BUTTERFLY(17,3);
+ BUTTERFLY(18,1);
+ BUTTERFLY(19,0);
+ BUTTERFLY(20,1);
+ BUTTERFLY(21,0);
+ BUTTERFLY(22,2);
+ BUTTERFLY(23,3);
+ BUTTERFLY(24,2);
+ BUTTERFLY(25,3);
+ BUTTERFLY(26,1);
+ BUTTERFLY(27,0);
+ BUTTERFLY(28,1);
+ BUTTERFLY(29,0);
+ BUTTERFLY(30,2);
+ BUTTERFLY(31,3);
+
+ /* Swap current and next states */
+ if(bitcnt & 1){
+ state = state0;
+ next = state1;
+ } else {
+ state = state1;
+ next = state0;
+ }
+ // ETTUS
+ //if(bitcnt > nbits-7){
+ /* In tail, poison non-zero nodes */
+ //for(i=1;i<64;i += 2)
+ // state[i].metric = -9999999;
+ //}
+ /* Produce output every 8 bits once path memory is full */
+ if((bitcnt % 8) == 5 && bitcnt > 32){
+ /* Find current best path */
+ bestmetric = state[0].metric;
+ beststate = 0;
+ for(i=1;i<64;i++){
+ if(state[i].metric > bestmetric){
+ bestmetric = state[i].metric;
+ beststate = i;
+ }
+ }
+#ifdef notdef
+ printf("metrics[%d] = %d state = %lx\n",beststate,
+ state[beststate].metric,state[beststate].path);
+#endif
+ *data++ = state[beststate].path >> 24;
+ }
+
+ }
+ /* Output remaining bits from 0 state */
+ // ETTUS Find best state instead
bestmetric = state[0].metric;
beststate = 0;
for(i=1;i<64;i++){
- if(state[i].metric > bestmetric){
- bestmetric = state[i].metric;
- beststate = i;
- }
+ if(state[i].metric > bestmetric){
+ bestmetric = state[i].metric;
+ beststate = i;
+ }
}
-#ifdef notdef
- printf("metrics[%d] = %d state = %lx\n",beststate,
- state[beststate].metric,state[beststate].path);
-#endif
+ if((i = bitcnt % 8) != 6)
+ state[beststate].path <<= 6-i;
+
*data++ = state[beststate].path >> 24;
+ *data++ = state[beststate].path >> 16;
+ *data++ = state[beststate].path >> 8;
+ *data = state[beststate].path;
+ //printf ("BS = %d\tBSM = %d\tM0 = %d\n",beststate,state[beststate].metric,state[0].metric);
+ *metric = state[beststate].metric;
+ return 0;
}
- }
- /* Output remaining bits from 0 state */
- // ETTUS Find best state instead
- bestmetric = state[0].metric;
- beststate = 0;
- for(i=1;i<64;i++){
- if(state[i].metric > bestmetric){
- bestmetric = state[i].metric;
- beststate = i;
+
+ void
+ viterbi_chunks_init(struct viterbi_state* state) {
+ // Initialize starting metrics to prefer 0 state
+ int i;
+ state[0].metric = 0;
+ state[0].path = 0;
+ for(i=1;i<64;i++)
+ state[i].metric = -999999;
}
- }
- if((i = bitcnt % 8) != 6)
- state[beststate].path <<= 6-i;
-
- *data++ = state[beststate].path >> 24;
- *data++ = state[beststate].path >> 16;
- *data++ = state[beststate].path >> 8;
- *data = state[beststate].path;
- //printf ("BS = %d\tBSM = %d\tM0 = %d\n",beststate,state[beststate].metric,state[0].metric);
- *metric = state[beststate].metric;
- return 0;
-}
+ void
+ viterbi_butterfly8(unsigned char *symbols, int mettab[2][256], struct viterbi_state *state0, struct viterbi_state *state1)
+ {
+ unsigned int bitcnt;
+ int mets[4];
-void
-viterbi_chunks_init(struct viterbi_state* state) {
- // Initialize starting metrics to prefer 0 state
- int i;
- state[0].metric = 0;
- state[0].path = 0;
- for(i=1;i<64;i++)
- state[i].metric = -999999;
-}
+ struct viterbi_state *state, *next;
+ state = state0;
+ next = state1;
+ // Operate on 16 symbols (8 bits) at a time
+ for(bitcnt = 0;bitcnt < 8;bitcnt++){
+ // Read input symbol pair and compute all possible branch metrics
+ mets[0] = mettab[0][symbols[0]] + mettab[0][symbols[1]];
+ mets[1] = mettab[0][symbols[0]] + mettab[1][symbols[1]];
+ mets[2] = mettab[1][symbols[0]] + mettab[0][symbols[1]];
+ mets[3] = mettab[1][symbols[0]] + mettab[1][symbols[1]];
+ symbols += 2;
+
+ // These macro calls were generated by genbut.c
+ BUTTERFLY(0,0);BUTTERFLY(1,1);BUTTERFLY(2,3);BUTTERFLY(3,2);
+ BUTTERFLY(4,3);BUTTERFLY(5,2);BUTTERFLY(6,0);BUTTERFLY(7,1);
+ BUTTERFLY(8,0);BUTTERFLY(9,1);BUTTERFLY(10,3);BUTTERFLY(11,2);
+ BUTTERFLY(12,3);BUTTERFLY(13,2);BUTTERFLY(14,0);BUTTERFLY(15,1);
+ BUTTERFLY(16,2);BUTTERFLY(17,3);BUTTERFLY(18,1);BUTTERFLY(19,0);
+ BUTTERFLY(20,1);BUTTERFLY(21,0);BUTTERFLY(22,2);BUTTERFLY(23,3);
+ BUTTERFLY(24,2);BUTTERFLY(25,3);BUTTERFLY(26,1);BUTTERFLY(27,0);
+ BUTTERFLY(28,1);BUTTERFLY(29,0);BUTTERFLY(30,2);BUTTERFLY(31,3);
+
+ // Swap current and next states
+ if(bitcnt & 1){
+ state = state0;
+ next = state1;
+ } else {
+ state = state1;
+ next = state0;
+ }
+ }
+ }
+
+ void
+ viterbi_butterfly2(unsigned char *symbols, int mettab[2][256], struct viterbi_state *state0, struct viterbi_state *state1)
+ {
+ //unsigned int bitcnt;
+ int mets[4];
-void
-viterbi_butterfly8(unsigned char *symbols, int mettab[2][256], struct viterbi_state *state0, struct viterbi_state *state1)
-{
- unsigned int bitcnt;
- int mets[4];
-
- struct viterbi_state *state, *next;
- state = state0;
- next = state1;
- // Operate on 16 symbols (8 bits) at a time
- for(bitcnt = 0;bitcnt < 8;bitcnt++){
- // Read input symbol pair and compute all possible branch metrics
- mets[0] = mettab[0][symbols[0]] + mettab[0][symbols[1]];
- mets[1] = mettab[0][symbols[0]] + mettab[1][symbols[1]];
- mets[2] = mettab[1][symbols[0]] + mettab[0][symbols[1]];
- mets[3] = mettab[1][symbols[0]] + mettab[1][symbols[1]];
- symbols += 2;
-
- // These macro calls were generated by genbut.c
- BUTTERFLY(0,0);BUTTERFLY(1,1);BUTTERFLY(2,3);BUTTERFLY(3,2);
- BUTTERFLY(4,3);BUTTERFLY(5,2);BUTTERFLY(6,0);BUTTERFLY(7,1);
- BUTTERFLY(8,0);BUTTERFLY(9,1);BUTTERFLY(10,3);BUTTERFLY(11,2);
- BUTTERFLY(12,3);BUTTERFLY(13,2);BUTTERFLY(14,0);BUTTERFLY(15,1);
- BUTTERFLY(16,2);BUTTERFLY(17,3);BUTTERFLY(18,1);BUTTERFLY(19,0);
- BUTTERFLY(20,1);BUTTERFLY(21,0);BUTTERFLY(22,2);BUTTERFLY(23,3);
- BUTTERFLY(24,2);BUTTERFLY(25,3);BUTTERFLY(26,1);BUTTERFLY(27,0);
- BUTTERFLY(28,1);BUTTERFLY(29,0);BUTTERFLY(30,2);BUTTERFLY(31,3);
-
- // Swap current and next states
- if(bitcnt & 1){
+ struct viterbi_state *state, *next;
state = state0;
next = state1;
- } else {
+ // Operate on 4 symbols (2 bits) at a time
+
+ // Read input symbol pair and compute all possible branch metrics
+ mets[0] = mettab[0][symbols[0]] + mettab[0][symbols[1]];
+ mets[1] = mettab[0][symbols[0]] + mettab[1][symbols[1]];
+ mets[2] = mettab[1][symbols[0]] + mettab[0][symbols[1]];
+ mets[3] = mettab[1][symbols[0]] + mettab[1][symbols[1]];
+
+ // These macro calls were generated by genbut.c
+ BUTTERFLY(0,0);BUTTERFLY(1,1);BUTTERFLY(2,3);BUTTERFLY(3,2);
+ BUTTERFLY(4,3);BUTTERFLY(5,2);BUTTERFLY(6,0);BUTTERFLY(7,1);
+ BUTTERFLY(8,0);BUTTERFLY(9,1);BUTTERFLY(10,3);BUTTERFLY(11,2);
+ BUTTERFLY(12,3);BUTTERFLY(13,2);BUTTERFLY(14,0);BUTTERFLY(15,1);
+ BUTTERFLY(16,2);BUTTERFLY(17,3);BUTTERFLY(18,1);BUTTERFLY(19,0);
+ BUTTERFLY(20,1);BUTTERFLY(21,0);BUTTERFLY(22,2);BUTTERFLY(23,3);
+ BUTTERFLY(24,2);BUTTERFLY(25,3);BUTTERFLY(26,1);BUTTERFLY(27,0);
+ BUTTERFLY(28,1);BUTTERFLY(29,0);BUTTERFLY(30,2);BUTTERFLY(31,3);
+
state = state1;
next = state0;
+
+ // Read input symbol pair and compute all possible branch metrics
+ mets[0] = mettab[0][symbols[2]] + mettab[0][symbols[3]];
+ mets[1] = mettab[0][symbols[2]] + mettab[1][symbols[3]];
+ mets[2] = mettab[1][symbols[2]] + mettab[0][symbols[3]];
+ mets[3] = mettab[1][symbols[2]] + mettab[1][symbols[3]];
+
+ // These macro calls were generated by genbut.c
+ BUTTERFLY(0,0);BUTTERFLY(1,1);BUTTERFLY(2,3);BUTTERFLY(3,2);
+ BUTTERFLY(4,3);BUTTERFLY(5,2);BUTTERFLY(6,0);BUTTERFLY(7,1);
+ BUTTERFLY(8,0);BUTTERFLY(9,1);BUTTERFLY(10,3);BUTTERFLY(11,2);
+ BUTTERFLY(12,3);BUTTERFLY(13,2);BUTTERFLY(14,0);BUTTERFLY(15,1);
+ BUTTERFLY(16,2);BUTTERFLY(17,3);BUTTERFLY(18,1);BUTTERFLY(19,0);
+ BUTTERFLY(20,1);BUTTERFLY(21,0);BUTTERFLY(22,2);BUTTERFLY(23,3);
+ BUTTERFLY(24,2);BUTTERFLY(25,3);BUTTERFLY(26,1);BUTTERFLY(27,0);
+ BUTTERFLY(28,1);BUTTERFLY(29,0);BUTTERFLY(30,2);BUTTERFLY(31,3);
}
- }
-}
-void
-viterbi_butterfly2(unsigned char *symbols, int mettab[2][256], struct viterbi_state *state0, struct viterbi_state *state1)
-{
- //unsigned int bitcnt;
- int mets[4];
-
- struct viterbi_state *state, *next;
- state = state0;
- next = state1;
- // Operate on 4 symbols (2 bits) at a time
-
- // Read input symbol pair and compute all possible branch metrics
- mets[0] = mettab[0][symbols[0]] + mettab[0][symbols[1]];
- mets[1] = mettab[0][symbols[0]] + mettab[1][symbols[1]];
- mets[2] = mettab[1][symbols[0]] + mettab[0][symbols[1]];
- mets[3] = mettab[1][symbols[0]] + mettab[1][symbols[1]];
-
- // These macro calls were generated by genbut.c
- BUTTERFLY(0,0);BUTTERFLY(1,1);BUTTERFLY(2,3);BUTTERFLY(3,2);
- BUTTERFLY(4,3);BUTTERFLY(5,2);BUTTERFLY(6,0);BUTTERFLY(7,1);
- BUTTERFLY(8,0);BUTTERFLY(9,1);BUTTERFLY(10,3);BUTTERFLY(11,2);
- BUTTERFLY(12,3);BUTTERFLY(13,2);BUTTERFLY(14,0);BUTTERFLY(15,1);
- BUTTERFLY(16,2);BUTTERFLY(17,3);BUTTERFLY(18,1);BUTTERFLY(19,0);
- BUTTERFLY(20,1);BUTTERFLY(21,0);BUTTERFLY(22,2);BUTTERFLY(23,3);
- BUTTERFLY(24,2);BUTTERFLY(25,3);BUTTERFLY(26,1);BUTTERFLY(27,0);
- BUTTERFLY(28,1);BUTTERFLY(29,0);BUTTERFLY(30,2);BUTTERFLY(31,3);
-
- state = state1;
- next = state0;
-
- // Read input symbol pair and compute all possible branch metrics
- mets[0] = mettab[0][symbols[2]] + mettab[0][symbols[3]];
- mets[1] = mettab[0][symbols[2]] + mettab[1][symbols[3]];
- mets[2] = mettab[1][symbols[2]] + mettab[0][symbols[3]];
- mets[3] = mettab[1][symbols[2]] + mettab[1][symbols[3]];
-
- // These macro calls were generated by genbut.c
- BUTTERFLY(0,0);BUTTERFLY(1,1);BUTTERFLY(2,3);BUTTERFLY(3,2);
- BUTTERFLY(4,3);BUTTERFLY(5,2);BUTTERFLY(6,0);BUTTERFLY(7,1);
- BUTTERFLY(8,0);BUTTERFLY(9,1);BUTTERFLY(10,3);BUTTERFLY(11,2);
- BUTTERFLY(12,3);BUTTERFLY(13,2);BUTTERFLY(14,0);BUTTERFLY(15,1);
- BUTTERFLY(16,2);BUTTERFLY(17,3);BUTTERFLY(18,1);BUTTERFLY(19,0);
- BUTTERFLY(20,1);BUTTERFLY(21,0);BUTTERFLY(22,2);BUTTERFLY(23,3);
- BUTTERFLY(24,2);BUTTERFLY(25,3);BUTTERFLY(26,1);BUTTERFLY(27,0);
- BUTTERFLY(28,1);BUTTERFLY(29,0);BUTTERFLY(30,2);BUTTERFLY(31,3);
-}
+ unsigned char
+ viterbi_get_output(struct viterbi_state *state, unsigned char *outbuf) {
+ // Produce output every 8 bits once path memory is full
+ // if((bitcnt % 8) == 5 && bitcnt > 32) {
-unsigned char
-viterbi_get_output(struct viterbi_state *state, unsigned char *outbuf) {
- // Produce output every 8 bits once path memory is full
- // if((bitcnt % 8) == 5 && bitcnt > 32) {
-
- // Find current best path
- unsigned int i,beststate;
- int bestmetric;
-
- bestmetric = state[0].metric;
- beststate = 0;
- for(i=1;i<64;i++)
- if(state[i].metric > bestmetric) {
- bestmetric = state[i].metric;
- beststate = i;
+ // Find current best path
+ unsigned int i,beststate;
+ int bestmetric;
+
+ bestmetric = state[0].metric;
+ beststate = 0;
+ for(i=1;i<64;i++)
+ if(state[i].metric > bestmetric) {
+ bestmetric = state[i].metric;
+ beststate = i;
+ }
+ *outbuf = state[beststate].path >> 24;
+ return bestmetric;
}
- *outbuf = state[beststate].path >> 24;
- return bestmetric;
-}
-//printf ("BS = %d\tBSM = %d\tM0 = %d\n",beststate,state[beststate].metric,state[0].metric);
-// In tail, poison non-zero nodes
-//if(bits_out > packet_size-7)
-// for(i=1;i<64;i += 2)
-// state[i].metric = -9999999;
+ //printf ("BS = %d\tBSM = %d\tM0 = %d\n",beststate,state[beststate].metric,state[0].metric);
+ // In tail, poison non-zero nodes
+ //if(bits_out > packet_size-7)
+ // for(i=1;i<64;i += 2)
+ // state[i].metric = -9999999;
+ }
+}
diff --git a/gr-fft/lib/goertzel.cc b/gr-fft/lib/goertzel.cc
index 14098180b5..324d2a76a2 100644
--- a/gr-fft/lib/goertzel.cc
+++ b/gr-fft/lib/goertzel.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2002,2011,2012 Free Software Foundation, Inc.
+ * Copyright 2002,2011,2012,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -24,8 +24,9 @@
#include <config.h>
#endif
-#include <cmath>
#include <gnuradio/fft/goertzel.h>
+#include <gnuradio/math.h>
+#include <cmath>
namespace gr {
namespace fft {
@@ -41,7 +42,7 @@ namespace gr {
d_d1 = 0.0;
d_d2 = 0.0;
- float w = 2.0*M_PI*freq/rate;
+ float w = 2.0*GR_M_PI*freq/rate;
d_wr = 2.0*std::cos(w);
d_wi = std::sin(w);
d_len = len;
diff --git a/gr-fft/lib/window.cc b/gr-fft/lib/window.cc
index cfbdb93dbd..0c1e27f66a 100644
--- a/gr-fft/lib/window.cc
+++ b/gr-fft/lib/window.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2002,2007,2008,2012,2013 Free Software Foundation, Inc.
+ * Copyright 2002,2007,2008,2012,2013,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -25,6 +25,7 @@
#endif
#include <gnuradio/fft/window.h>
+#include <gnuradio/math.h>
#include <stdexcept>
namespace gr {
@@ -66,7 +67,7 @@ namespace gr {
double freq(int ntaps)
{
- return 2.0*M_PI/ntaps;
+ return 2.0*GR_M_PI/ntaps;
}
double rate(int ntaps)
@@ -98,7 +99,7 @@ namespace gr {
float M = static_cast<float>(ntaps - 1);
for(int n = 0; n < ntaps; n++)
- taps[n] = c0 - c1*cosf((2.0f*M_PI*n)/M) + c2*cosf((4.0f*M_PI*n)/M);
+ taps[n] = c0 - c1*cosf((2.0f*GR_M_PI*n)/M) + c2*cosf((4.0f*GR_M_PI*n)/M);
return taps;
}
@@ -109,8 +110,8 @@ namespace gr {
float M = static_cast<float>(ntaps - 1);
for(int n = 0; n < ntaps; n++)
- taps[n] = c0 - c1*cosf((2.0f*M_PI*n)/M) + c2*cosf((4.0f*M_PI*n)/M) \
- - c3*cosf((6.0f*M_PI*n)/M);
+ taps[n] = c0 - c1*cosf((2.0f*GR_M_PI*n)/M) + c2*cosf((4.0f*GR_M_PI*n)/M) \
+ - c3*cosf((6.0f*GR_M_PI*n)/M);
return taps;
}
@@ -121,8 +122,8 @@ namespace gr {
float M = static_cast<float>(ntaps - 1);
for(int n = 0; n < ntaps; n++)
- taps[n] = c0 - c1*cosf((2.0f*M_PI*n)/M) + c2*cosf((4.0f*M_PI*n)/M) \
- - c3*cosf((6.0f*M_PI*n)/M) + c4*cosf((8.0f*M_PI*n)/M);
+ taps[n] = c0 - c1*cosf((2.0f*GR_M_PI*n)/M) + c2*cosf((4.0f*GR_M_PI*n)/M) \
+ - c3*cosf((6.0f*GR_M_PI*n)/M) + c4*cosf((8.0f*GR_M_PI*n)/M);
return taps;
}
@@ -142,7 +143,7 @@ namespace gr {
float M = static_cast<float>(ntaps - 1);
for(int n = 0; n < ntaps; n++)
- taps[n] = 0.54 - 0.46 * cos((2 * M_PI * n) / M);
+ taps[n] = 0.54 - 0.46 * cos((2 * GR_M_PI * n) / M);
return taps;
}
@@ -153,7 +154,7 @@ namespace gr {
float M = static_cast<float>(ntaps - 1);
for(int n = 0; n < ntaps; n++)
- taps[n] = 0.5 - 0.5 * cos((2 * M_PI * n) / M);
+ taps[n] = 0.5 - 0.5 * cos((2 * GR_M_PI * n) / M);
return taps;
}
diff --git a/gr-filter/lib/firdes.cc b/gr-filter/lib/firdes.cc
index 323de42509..cd041336f4 100644
--- a/gr-filter/lib/firdes.cc
+++ b/gr-filter/lib/firdes.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2002,2007,2008,2012,2013 Free Software Foundation, Inc.
+ * Copyright 2002,2007,2008,2012,2013,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -25,6 +25,7 @@
#endif
#include <gnuradio/filter/firdes.h>
+#include <gnuradio/math.h>
#include <stdexcept>
using std::vector;
@@ -64,13 +65,13 @@ namespace gr {
vector<float> w = window(window_type, ntaps, beta);
int M = (ntaps - 1) / 2;
- double fwT0 = 2 * M_PI * cutoff_freq / sampling_freq;
+ double fwT0 = 2 * GR_M_PI * cutoff_freq / sampling_freq;
for(int n = -M; n <= M; n++) {
if (n == 0)
- taps[n + M] = fwT0 / M_PI * w[n + M];
+ taps[n + M] = fwT0 / GR_M_PI * w[n + M];
else {
// a little algebra gets this into the more familiar sin(x)/x form
- taps[n + M] = sin(n * fwT0) / (n * M_PI) * w[n + M];
+ taps[n + M] = sin(n * fwT0) / (n * GR_M_PI) * w[n + M];
}
}
@@ -110,14 +111,14 @@ namespace gr {
vector<float> w = window(window_type, ntaps, beta);
int M = (ntaps - 1) / 2;
- double fwT0 = 2 * M_PI * cutoff_freq / sampling_freq;
+ double fwT0 = 2 * GR_M_PI * cutoff_freq / sampling_freq;
for(int n = -M; n <= M; n++) {
if(n == 0)
- taps[n + M] = fwT0 / M_PI * w[n + M];
+ taps[n + M] = fwT0 / GR_M_PI * w[n + M];
else {
// a little algebra gets this into the more familiar sin(x)/x form
- taps[n + M] = sin(n * fwT0) / (n * M_PI) * w[n + M];
+ taps[n + M] = sin(n * fwT0) / (n * GR_M_PI) * w[n + M];
}
}
@@ -162,14 +163,14 @@ namespace gr {
vector<float> w = window(window_type, ntaps, beta);
int M = (ntaps - 1) / 2;
- double fwT0 = 2 * M_PI * cutoff_freq / sampling_freq;
+ double fwT0 = 2 * GR_M_PI * cutoff_freq / sampling_freq;
for(int n = -M; n <= M; n++) {
if(n == 0)
- taps[n + M] = (1 - (fwT0 / M_PI)) * w[n + M];
+ taps[n + M] = (1 - (fwT0 / GR_M_PI)) * w[n + M];
else {
// a little algebra gets this into the more familiar sin(x)/x form
- taps[n + M] = -sin(n * fwT0) / (n * M_PI) * w[n + M];
+ taps[n + M] = -sin(n * fwT0) / (n * GR_M_PI) * w[n + M];
}
}
@@ -178,7 +179,7 @@ namespace gr {
double fmax = taps[0 + M];
for(int n = 1; n <= M; n++)
- fmax += 2 * taps[n + M] * cos(n * M_PI);
+ fmax += 2 * taps[n + M] * cos(n * GR_M_PI);
gain /= fmax; // normalize
@@ -209,14 +210,14 @@ namespace gr {
vector<float> w = window(window_type, ntaps, beta);
int M = (ntaps - 1) / 2;
- double fwT0 = 2 * M_PI * cutoff_freq / sampling_freq;
+ double fwT0 = 2 * GR_M_PI * cutoff_freq / sampling_freq;
for(int n = -M; n <= M; n++) {
if(n == 0)
- taps[n + M] = (1 - (fwT0 / M_PI)) * w[n + M];
+ taps[n + M] = (1 - (fwT0 / GR_M_PI)) * w[n + M];
else {
// a little algebra gets this into the more familiar sin(x)/x form
- taps[n + M] = -sin(n * fwT0) / (n * M_PI) * w[n + M];
+ taps[n + M] = -sin(n * fwT0) / (n * GR_M_PI) * w[n + M];
}
}
@@ -225,7 +226,7 @@ namespace gr {
double fmax = taps[0 + M];
for(int n = 1; n <= M; n++)
- fmax += 2 * taps[n + M] * cos(n * M_PI);
+ fmax += 2 * taps[n + M] * cos(n * GR_M_PI);
gain /= fmax; // normalize
@@ -261,14 +262,14 @@ namespace gr {
vector<float> w = window(window_type, ntaps, beta);
int M = (ntaps - 1) / 2;
- double fwT0 = 2 * M_PI * low_cutoff_freq / sampling_freq;
- double fwT1 = 2 * M_PI * high_cutoff_freq / sampling_freq;
+ double fwT0 = 2 * GR_M_PI * low_cutoff_freq / sampling_freq;
+ double fwT1 = 2 * GR_M_PI * high_cutoff_freq / sampling_freq;
for(int n = -M; n <= M; n++) {
if (n == 0)
- taps[n + M] = (fwT1 - fwT0) / M_PI * w[n + M];
+ taps[n + M] = (fwT1 - fwT0) / GR_M_PI * w[n + M];
else {
- taps[n + M] = (sin(n * fwT1) - sin(n * fwT0)) / (n * M_PI) * w[n + M];
+ taps[n + M] = (sin(n * fwT1) - sin(n * fwT0)) / (n * GR_M_PI) * w[n + M];
}
}
@@ -312,14 +313,14 @@ namespace gr {
vector<float> w = window(window_type, ntaps, beta);
int M = (ntaps - 1) / 2;
- double fwT0 = 2 * M_PI * low_cutoff_freq / sampling_freq;
- double fwT1 = 2 * M_PI * high_cutoff_freq / sampling_freq;
+ double fwT0 = 2 * GR_M_PI * low_cutoff_freq / sampling_freq;
+ double fwT1 = 2 * GR_M_PI * high_cutoff_freq / sampling_freq;
for(int n = -M; n <= M; n++) {
if (n == 0)
- taps[n + M] = (fwT1 - fwT0) / M_PI * w[n + M];
+ taps[n + M] = (fwT1 - fwT0) / GR_M_PI * w[n + M];
else {
- taps[n + M] = (sin(n * fwT1) - sin(n * fwT0)) / (n * M_PI) * w[n + M];
+ taps[n + M] = (sin(n * fwT1) - sin(n * fwT0)) / (n * GR_M_PI) * w[n + M];
}
}
@@ -372,7 +373,7 @@ namespace gr {
gr_complex *optr = &taps[0];
float *iptr = &lptaps[0];
- float freq = M_PI * (high_cutoff_freq + low_cutoff_freq)/sampling_freq;
+ float freq = GR_M_PI * (high_cutoff_freq + low_cutoff_freq)/sampling_freq;
float phase = 0;
if (lptaps.size() & 01) {
phase = - freq * ( lptaps.size() >> 1 );
@@ -419,7 +420,7 @@ namespace gr {
gr_complex *optr = &taps[0];
float *iptr = &lptaps[0];
- float freq = M_PI * (high_cutoff_freq + low_cutoff_freq)/sampling_freq;
+ float freq = GR_M_PI * (high_cutoff_freq + low_cutoff_freq)/sampling_freq;
float phase = 0;
if(lptaps.size() & 01) {
phase = - freq * ( lptaps.size() >> 1 );
@@ -464,14 +465,14 @@ namespace gr {
vector<float> w = window(window_type, ntaps, beta);
int M = (ntaps - 1) / 2;
- double fwT0 = 2 * M_PI * low_cutoff_freq / sampling_freq;
- double fwT1 = 2 * M_PI * high_cutoff_freq / sampling_freq;
+ double fwT0 = 2 * GR_M_PI * low_cutoff_freq / sampling_freq;
+ double fwT1 = 2 * GR_M_PI * high_cutoff_freq / sampling_freq;
for(int n = -M; n <= M; n++) {
if (n == 0)
- taps[n + M] = 1.0 + ((fwT0 - fwT1) / M_PI * w[n + M]);
+ taps[n + M] = 1.0 + ((fwT0 - fwT1) / GR_M_PI * w[n + M]);
else {
- taps[n + M] = (sin(n * fwT0) - sin(n * fwT1)) / (n * M_PI) * w[n + M];
+ taps[n + M] = (sin(n * fwT0) - sin(n * fwT1)) / (n * GR_M_PI) * w[n + M];
}
}
@@ -514,14 +515,14 @@ namespace gr {
vector<float> w = window(window_type, ntaps, beta);
int M = (ntaps - 1) / 2;
- double fwT0 = 2 * M_PI * low_cutoff_freq / sampling_freq;
- double fwT1 = 2 * M_PI * high_cutoff_freq / sampling_freq;
+ double fwT0 = 2 * GR_M_PI * low_cutoff_freq / sampling_freq;
+ double fwT1 = 2 * GR_M_PI * high_cutoff_freq / sampling_freq;
for(int n = -M; n <= M; n++) {
if (n == 0)
- taps[n + M] = 1.0 + ((fwT0 - fwT1) / M_PI * w[n + M]);
+ taps[n + M] = 1.0 + ((fwT0 - fwT1) / GR_M_PI * w[n + M]);
else {
- taps[n + M] = (sin(n * fwT0) - sin(n * fwT1)) / (n * M_PI) * w[n + M];
+ taps[n + M] = (sin(n * fwT0) - sin(n * fwT1)) / (n * GR_M_PI) * w[n + M];
}
}
@@ -586,7 +587,7 @@ namespace gr {
vector<float> taps(ntaps);
double scale = 0;
double dt = 1.0/spb;
- double s = 1.0/(sqrt(log(2.0)) / (2*M_PI*bt));
+ double s = 1.0/(sqrt(log(2.0)) / (2*GR_M_PI*bt));
double t0 = -0.5 * ntaps;
double ts;
for(int i=0;i<ntaps;i++) {
@@ -621,7 +622,7 @@ namespace gr {
for(int i = 0; i < ntaps; i++) {
double x1,x2,x3,num,den;
double xindx = i - ntaps/2;
- x1 = M_PI * xindx/spb;
+ x1 = GR_M_PI * xindx/spb;
x2 = 4 * alpha * xindx / spb;
x3 = x2*x2 - 1;
@@ -629,8 +630,8 @@ namespace gr {
if(i != ntaps/2)
num = cos((1+alpha)*x1) + sin((1-alpha)*x1)/(4*alpha*xindx/spb);
else
- num = cos((1+alpha)*x1) + (1-alpha) * M_PI / (4*alpha);
- den = x3 * M_PI;
+ num = cos((1+alpha)*x1) + (1-alpha) * GR_M_PI / (4*alpha);
+ den = x3 * GR_M_PI;
}
else {
if(alpha==1) {
@@ -639,10 +640,10 @@ namespace gr {
}
x3 = (1-alpha)*x1;
x2 = (1+alpha)*x1;
- num = (sin(x2)*(1+alpha)*M_PI
- - cos(x3)*((1-alpha)*M_PI*spb)/(4*alpha*xindx)
+ num = (sin(x2)*(1+alpha)*GR_M_PI
+ - cos(x3)*((1-alpha)*GR_M_PI*spb)/(4*alpha*xindx)
+ sin(x3)*spb*spb/(4*alpha*xindx*xindx));
- den = -32 * M_PI * alpha * alpha * xindx/spb;
+ den = -32 * GR_M_PI * alpha * alpha * xindx/spb;
}
taps[i] = 4 * alpha * num / den;
scale += taps[i];
diff --git a/gr-filter/lib/freq_xlating_fir_filter_XXX_impl.cc.t b/gr-filter/lib/freq_xlating_fir_filter_XXX_impl.cc.t
index f45426dafe..fc6ede2bb5 100644
--- a/gr-filter/lib/freq_xlating_fir_filter_XXX_impl.cc.t
+++ b/gr-filter/lib/freq_xlating_fir_filter_XXX_impl.cc.t
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2003,2010,2012 Free Software Foundation, Inc.
+ * Copyright 2003,2010,2012,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -31,6 +31,7 @@
#include "@IMPL_NAME@.h"
#include <gnuradio/io_signature.h>
+#include <gnuradio/math.h>
#include <volk/volk.h>
namespace gr {
@@ -90,7 +91,7 @@ namespace gr {
// center frequency fwT0. We then apply a derotator
// with -fwT0 to downshift the signal to baseband.
- float fwT0 = 2 * M_PI * d_center_freq / d_sampling_freq;
+ float fwT0 = 2 * GR_M_PI * d_center_freq / d_sampling_freq;
for(unsigned int i = 0; i < d_proto_taps.size(); i++) {
ctaps[i] = d_proto_taps[i] * exp(gr_complex(0, i * fwT0));
}
diff --git a/gr-filter/lib/pfb_arb_resampler.cc b/gr-filter/lib/pfb_arb_resampler.cc
index 5c87447149..a311d702ac 100644
--- a/gr-filter/lib/pfb_arb_resampler.cc
+++ b/gr-filter/lib/pfb_arb_resampler.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2013 Free Software Foundation, Inc.
+ * Copyright 2013,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -26,9 +26,10 @@
#include <gnuradio/filter/pfb_arb_resampler.h>
#include <gnuradio/logger.h>
+#include <gnuradio/math.h>
+#include <boost/math/special_functions/round.hpp>
#include <cstdio>
#include <stdexcept>
-#include <boost/math/special_functions/round.hpp>
namespace gr {
namespace filter {
@@ -183,18 +184,18 @@ namespace gr {
void
pfb_arb_resampler_ccf::set_phase(float ph)
{
- if((ph < 0) || (ph >= 2.0*M_PI)) {
+ if((ph < 0) || (ph >= 2.0*GR_M_PI)) {
throw std::runtime_error("pfb_arb_resampler_ccf: set_phase value out of bounds [0, 2pi).\n");
}
- float ph_diff = 2.0*M_PI / (float)d_filters.size();
+ float ph_diff = 2.0*GR_M_PI / (float)d_filters.size();
d_last_filter = static_cast<int>(ph / ph_diff);
}
float
pfb_arb_resampler_ccf::phase() const
{
- float ph_diff = 2.0*M_PI / static_cast<float>(d_filters.size());
+ float ph_diff = 2.0*GR_M_PI / static_cast<float>(d_filters.size());
return d_last_filter * ph_diff;
}
@@ -207,7 +208,7 @@ namespace gr {
float
pfb_arb_resampler_ccf::phase_offset(float freq, float fs)
{
- float adj = (2.0*M_PI)*(freq/fs)/static_cast<float>(d_int_rate);
+ float adj = (2.0*GR_M_PI)*(freq/fs)/static_cast<float>(d_int_rate);
return -adj * d_est_phase_change;
}
@@ -394,18 +395,18 @@ namespace gr {
void
pfb_arb_resampler_ccc::set_phase(float ph)
{
- if((ph < 0) || (ph >= 2.0*M_PI)) {
+ if((ph < 0) || (ph >= 2.0*GR_M_PI)) {
throw std::runtime_error("pfb_arb_resampler_ccc: set_phase value out of bounds [0, 2pi).\n");
}
- float ph_diff = 2.0*M_PI / (float)d_filters.size();
+ float ph_diff = 2.0*GR_M_PI / (float)d_filters.size();
d_last_filter = static_cast<int>(ph / ph_diff);
}
float
pfb_arb_resampler_ccc::phase() const
{
- float ph_diff = 2.0*M_PI / static_cast<float>(d_filters.size());
+ float ph_diff = 2.0*GR_M_PI / static_cast<float>(d_filters.size());
return d_last_filter * ph_diff;
}
@@ -418,7 +419,7 @@ namespace gr {
float
pfb_arb_resampler_ccc::phase_offset(float freq, float fs)
{
- float adj = (2.0*M_PI)*(freq/fs)/static_cast<float>(d_int_rate);
+ float adj = (2.0*GR_M_PI)*(freq/fs)/static_cast<float>(d_int_rate);
return -adj * d_est_phase_change;
}
@@ -605,18 +606,18 @@ namespace gr {
void
pfb_arb_resampler_fff::set_phase(float ph)
{
- if((ph < 0) || (ph >= 2.0*M_PI)) {
+ if((ph < 0) || (ph >= 2.0*GR_M_PI)) {
throw std::runtime_error("pfb_arb_resampler_fff: set_phase value out of bounds [0, 2pi).\n");
}
- float ph_diff = 2.0*M_PI / (float)d_filters.size();
+ float ph_diff = 2.0*GR_M_PI / (float)d_filters.size();
d_last_filter = static_cast<int>(ph / ph_diff);
}
float
pfb_arb_resampler_fff::phase() const
{
- float ph_diff = 2.0*M_PI / static_cast<float>(d_filters.size());
+ float ph_diff = 2.0*GR_M_PI / static_cast<float>(d_filters.size());
return d_last_filter * ph_diff;
}
@@ -629,7 +630,7 @@ namespace gr {
float
pfb_arb_resampler_fff::phase_offset(float freq, float fs)
{
- float adj = (2.0*M_PI)*(freq/fs)/static_cast<float>(d_int_rate);
+ float adj = (2.0*GR_M_PI)*(freq/fs)/static_cast<float>(d_int_rate);
return -adj * d_est_phase_change;
}
diff --git a/gr-filter/lib/pfb_decimator_ccf_impl.cc b/gr-filter/lib/pfb_decimator_ccf_impl.cc
index 9d1d6f6139..8136be7811 100644
--- a/gr-filter/lib/pfb_decimator_ccf_impl.cc
+++ b/gr-filter/lib/pfb_decimator_ccf_impl.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2009,2010,2012,2014 Free Software Foundation, Inc.
+ * Copyright 2009,2010,2012,2014,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -27,6 +27,7 @@
#include "pfb_decimator_ccf_impl.h"
#include <gnuradio/io_signature.h>
#include <gnuradio/expj.h>
+#include <gnuradio/math.h>
#include <volk/volk.h>
namespace gr {
@@ -61,7 +62,7 @@ namespace gr {
d_rate = decim;
d_rotator = new gr_complex[d_rate];
for(unsigned int i = 0; i < d_rate; i++) {
- d_rotator[i] = gr_expj(i*d_chan*2*M_PI/d_rate);
+ d_rotator[i] = gr_expj(i*d_chan*2*GR_M_PI/d_rate);
}
set_relative_rate(1.0/(float)decim);
diff --git a/gr-filter/lib/qa_mmse_fir_interpolator_cc.cc b/gr-filter/lib/qa_mmse_fir_interpolator_cc.cc
index 9766cb93a3..79b058d7e7 100644
--- a/gr-filter/lib/qa_mmse_fir_interpolator_cc.cc
+++ b/gr-filter/lib/qa_mmse_fir_interpolator_cc.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2002,2007,2012 Free Software Foundation, Inc.
+ * Copyright 2002,2007,2012,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -24,15 +24,16 @@
#include <config.h>
#endif
-#include <cppunit/TestAssert.h>
#include <qa_mmse_fir_interpolator_cc.h>
#include <gnuradio/filter/mmse_fir_interpolator_cc.h>
#include <gnuradio/fft/fft.h>
+#include <gnuradio/math.h>
#include <volk/volk.h>
+#include <cppunit/TestAssert.h>
#include <cstdio>
#include <cmath>
#include <stdexcept>
-#include <stdint.h>
+#include <cstdint>
namespace gr {
namespace filter {
@@ -40,15 +41,15 @@ namespace gr {
static float
test_fcn_sin(double index)
{
- return (2 * sin (index * 0.25 * 2 * M_PI + 0.125 * M_PI)
- + 3 * sin (index * 0.077 * 2 * M_PI + 0.3 * M_PI));
+ return (2 * sin (index * 0.25 * 2 * GR_M_PI + 0.125 * GR_M_PI)
+ + 3 * sin (index * 0.077 * 2 * GR_M_PI + 0.3 * GR_M_PI));
}
static float
test_fcn_cos(double index)
{
- return (2 * cos (index * 0.25 * 2 * M_PI + 0.125 * M_PI)
- + 3 * cos (index * 0.077 * 2 * M_PI + 0.3 * M_PI));
+ return (2 * cos (index * 0.25 * 2 * GR_M_PI + 0.125 * GR_M_PI)
+ + 3 * cos (index * 0.077 * 2 * GR_M_PI + 0.3 * GR_M_PI));
}
static gr_complex
diff --git a/gr-filter/lib/qa_mmse_fir_interpolator_ff.cc b/gr-filter/lib/qa_mmse_fir_interpolator_ff.cc
index e9ee937230..56a3a1286d 100644
--- a/gr-filter/lib/qa_mmse_fir_interpolator_ff.cc
+++ b/gr-filter/lib/qa_mmse_fir_interpolator_ff.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2002,2012 Free Software Foundation, Inc.
+ * Copyright 2002,2012,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -24,11 +24,12 @@
#include <config.h>
#endif
-#include <cppunit/TestAssert.h>
#include <qa_mmse_fir_interpolator_ff.h>
#include <gnuradio/filter/mmse_fir_interpolator_ff.h>
#include <gnuradio/fft/fft.h>
+#include <gnuradio/math.h>
#include <volk/volk.h>
+#include <cppunit/TestAssert.h>
#include <cstdio>
#include <cmath>
@@ -38,8 +39,8 @@ namespace gr {
static float
test_fcn(double index)
{
- return (2 * sin(index * 0.25 * 2 * M_PI + 0.125 * M_PI)
- + 3 * sin(index * 0.077 * 2 * M_PI + 0.3 * M_PI));
+ return (2 * sin(index * 0.25 * 2 * GR_M_PI + 0.125 * GR_M_PI)
+ + 3 * sin(index * 0.077 * 2 * GR_M_PI + 0.3 * GR_M_PI));
}
void
diff --git a/gr-filter/lib/qa_mmse_interp_differentiator_cc.cc b/gr-filter/lib/qa_mmse_interp_differentiator_cc.cc
index 55bb4e045b..8b8ec0c175 100644
--- a/gr-filter/lib/qa_mmse_interp_differentiator_cc.cc
+++ b/gr-filter/lib/qa_mmse_interp_differentiator_cc.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright (C) 2002,2007,2012,2017 Free Software Foundation, Inc.
+ * Copyright (C) 2002,2007,2012,2017,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -24,31 +24,32 @@
#include <config.h>
#endif
-#include <cppunit/TestAssert.h>
#include <qa_mmse_interp_differentiator_cc.h>
#include <gnuradio/filter/mmse_interp_differentiator_cc.h>
#include <gnuradio/fft/fft.h>
+#include <gnuradio/math.h>
#include <volk/volk.h>
+#include <cppunit/TestAssert.h>
#include <cstdio>
#include <cmath>
#include <stdexcept>
-#include <stdint.h>
+#include <cstdint>
namespace gr {
namespace filter {
- static const double k1 = 0.25 * 2 * M_PI;
- static const double k2 = 0.125 * M_PI;
- static const double k3 = 0.077 * 2 * M_PI;
- static const double k4 = 0.3 * M_PI;
+ static const double k1 = 0.25 * 2 * GR_M_PI;
+ static const double k2 = 0.125 * GR_M_PI;
+ static const double k3 = 0.077 * 2 * GR_M_PI;
+ static const double k4 = 0.3 * GR_M_PI;
static double
phase_wrap(double arg)
{
- while (arg >= 2.0*M_PI)
- arg -= 2.0*M_PI;
- while (arg <= 2.0*M_PI)
- arg += 2.0*M_PI;
+ while (arg >= 2.0*GR_M_PI)
+ arg -= 2.0*GR_M_PI;
+ while (arg <= 2.0*GR_M_PI)
+ arg += 2.0*GR_M_PI;
return arg;
}
diff --git a/gr-filter/lib/qa_mmse_interp_differentiator_ff.cc b/gr-filter/lib/qa_mmse_interp_differentiator_ff.cc
index 6736d11baa..9801f3e725 100644
--- a/gr-filter/lib/qa_mmse_interp_differentiator_ff.cc
+++ b/gr-filter/lib/qa_mmse_interp_differentiator_ff.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright (C) 2002,2007,2012,2017 Free Software Foundation, Inc.
+ * Copyright (C) 2002,2007,2012,2017,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -24,31 +24,32 @@
#include <config.h>
#endif
-#include <cppunit/TestAssert.h>
#include <qa_mmse_interp_differentiator_ff.h>
#include <gnuradio/filter/mmse_interp_differentiator_ff.h>
#include <gnuradio/fft/fft.h>
+#include <gnuradio/math.h>
#include <volk/volk.h>
+#include <cppunit/TestAssert.h>
#include <cstdio>
#include <cmath>
#include <stdexcept>
-#include <stdint.h>
+#include <cstdint>
namespace gr {
namespace filter {
- static const double k1 = 0.25 * 2 * M_PI;
- static const double k2 = 0.125 * M_PI;
- static const double k3 = 0.077 * 2 * M_PI;
- static const double k4 = 0.3 * M_PI;
+ static const double k1 = 0.25 * 2 * GR_M_PI;
+ static const double k2 = 0.125 * GR_M_PI;
+ static const double k3 = 0.077 * 2 * GR_M_PI;
+ static const double k4 = 0.3 * GR_M_PI;
static double
phase_wrap(double arg)
{
- while (arg >= 2.0*M_PI)
- arg -= 2.0*M_PI;
- while (arg <= 2.0*M_PI)
- arg += 2.0*M_PI;
+ while (arg >= 2.0*GR_M_PI)
+ arg -= 2.0*GR_M_PI;
+ while (arg <= 2.0*GR_M_PI)
+ arg += 2.0*GR_M_PI;
return arg;
}