00001 /* 00002 * SPUC - Signal processing using C++ - A DSP library 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2, or (at your option) 00007 * any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00017 */ 00018 00019 #include <complex.h> 00020 #include <max_pn.h> 00021 #include <noise.h> 00022 #include <fir.h> 00023 #include <fir_interp.h> 00024 #include <raised_cosine.h> 00025 #include <lagrange.h> 00026 namespace SPUC { 00036 // 00037 // Samples are generated by a combination of polyphase FIR and lagrange 00038 // interpolation (to allow for a wide range of sampling rates) 00039 class quad_data 00040 { 00041 public: 00042 int symbols; 00043 int over; 00044 max_pn pn_i; 00045 max_pn pn_q; 00046 lagrange <complex<double> > interp; 00047 fir_interp <complex<double> > rcfir; 00048 complex<double> data; 00049 double prev_timing_offset; 00050 00051 quad_data(int total_over); 00052 complex<double> get_fir_output(void); 00053 complex<double> get_sample(double timing_inc); 00054 void set_initial_offset(double timing_init) { 00055 prev_timing_offset=timing_init; 00056 } 00057 }; 00058 } // namespace SPUC