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 <spuc.h> 00020 #include <complex.h> 00021 namespace SPUC { 00030 00031 00032 00033 00034 00035 00036 00037 class bped { 00038 00039 complex<double>* bit; 00040 int quad_prev; 00041 int oqtstate; 00042 double ang; 00043 char nbpe; 00044 00045 public: 00046 double angle() { return(ang); }; 00047 00048 bped(char len=16); 00050 void clock(const complex<double>& in); 00052 double fq_angle(const complex<double>& pid); 00054 complex<double> refvect(void) {return( polar(1.0, -ang) );} 00055 complex<double> output(const complex<double>& in); 00056 complex<double> output(const complex<long>& in); 00057 }; 00058 } // namespace SPUC