Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

GrAtscBitTimingLoop2.h

Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 /*
00003  * Copyright 2002 Free Software Foundation, Inc.
00004  * 
00005  * This file is part of GNU Radio
00006  * 
00007  * GNU Radio is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 2, or (at your option)
00010  * any later version.
00011  * 
00012  * GNU Radio is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  * 
00017  * You should have received a copy of the GNU General Public License
00018  * along with GNU Radio; see the file COPYING.  If not, write to
00019  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00020  * Boston, MA 02111-1307, USA.
00021  */
00022 
00023 #ifndef _GRATSCBITTIMINGLOOP2_H_
00024 #define _GRATSCBITTIMINGLOOP2_H_
00025 
00026 #include <gr_nco.h>
00027 #include <VrSigProc.h>
00028 #include <VrHistoryProc.h>
00029 #include <VrDecimatingSigProc.h>
00030 #include <interleaver_fifo.h>
00031 #include <gr_single_pole_iir.h>
00032 #include <gr_mmse_fir_interpolator.h>
00033 
00040 class GrAtscBitTimingLoop2 : public VrDecimatingSigProc<float,float> {
00041 
00042  public:
00043 
00044   GrAtscBitTimingLoop2 ();
00045   virtual ~GrAtscBitTimingLoop2 () { };
00046 
00047   virtual const char *name () { return "GrAtscBitTimingLoop2"; }
00048 
00049   virtual int forecast (VrSampleRange output,
00050                         VrSampleRange inputs[]);
00051 
00052   virtual int work (VrSampleRange output, void *o[],
00053                     VrSampleRange inputs[], void *i[]);
00054 
00055   // debug
00056   void set_mu (float a_mu) {
00057     assert (0 <= a_mu && a_mu <= 1.9);
00058     use_right_p = a_mu < 1.0;
00059     mu = a_mu - floor (a_mu);
00060     cerr << "BTL2:  mu: " << mu << " use_right_p: " << use_right_p << endl;
00061   }
00062 
00063  protected:
00064 
00065   typedef float iType;
00066   typedef float oType;
00067 
00068   iType produce_sample (const iType *in, unsigned int &index);
00069   float filter_error (float e);
00070 
00071   VrSampleIndex                         next_input;
00072   gr_single_pole_iir<float,float,float> dc;             // used to estimate DC component
00073   gr_mmse_fir_interpolator              intr;
00074   float                                 mu;             // fractional delay
00075   iType                                 last_right;     // last right hand sample
00076 
00077   bool                                  use_right_p;    // ...else middle
00078 };
00079 
00080 #endif // _GRATSCBITTIMINGLOOP2_H_

Generated on Tue Mar 15 23:46:36 2005 for GNU Radio by  doxygen 1.4.0