[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] gnuradio-core/src/lib filter/GrRemoveDcFFF.cc f...
From: |
Eric Blossom |
Subject: |
[Commit-gnuradio] gnuradio-core/src/lib filter/GrRemoveDcFFF.cc f... |
Date: |
Sun, 09 Jul 2006 00:01:47 +0000 |
CVSROOT: /sources/gnuradio
Module name: gnuradio-core
Changes by: Eric Blossom <eb> 06/07/09 00:01:47
Removed files:
src/lib/filter : GrRemoveDcFFF.cc GrRemoveDcFFF.h
src/lib/general: GrAGC.h GrArbFunc.h GrCircularSink.h
GrComplexVCOMixer.h
GrFractionalInterpolatingSigProc.h GrLimiter.h
GrMixer.h GrPAMMod.h GrSSBMod.h
GrWeaverModHead.h GrWeaverModTail.h
Log message:
removed seriously dead code
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnuradio-core/src/lib/filter/GrRemoveDcFFF.cc?cvsroot=gnuradio&r1=1.1.1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnuradio-core/src/lib/filter/GrRemoveDcFFF.h?cvsroot=gnuradio&r1=1.1.1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnuradio-core/src/lib/general/GrAGC.h?cvsroot=gnuradio&r1=1.1.1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnuradio-core/src/lib/general/GrArbFunc.h?cvsroot=gnuradio&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnuradio-core/src/lib/general/GrCircularSink.h?cvsroot=gnuradio&r1=1.1.1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnuradio-core/src/lib/general/GrComplexVCOMixer.h?cvsroot=gnuradio&r1=1.1.1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnuradio-core/src/lib/general/GrFractionalInterpolatingSigProc.h?cvsroot=gnuradio&r1=1.1.1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnuradio-core/src/lib/general/GrLimiter.h?cvsroot=gnuradio&r1=1.1.1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnuradio-core/src/lib/general/GrMixer.h?cvsroot=gnuradio&r1=1.1.1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnuradio-core/src/lib/general/GrPAMMod.h?cvsroot=gnuradio&r1=1.1.1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnuradio-core/src/lib/general/GrSSBMod.h?cvsroot=gnuradio&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnuradio-core/src/lib/general/GrWeaverModHead.h?cvsroot=gnuradio&r1=1.1.1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnuradio-core/src/lib/general/GrWeaverModTail.h?cvsroot=gnuradio&r1=1.3&r2=0
Patches:
Index: filter/GrRemoveDcFFF.cc
===================================================================
RCS file: filter/GrRemoveDcFFF.cc
diff -N filter/GrRemoveDcFFF.cc
--- filter/GrRemoveDcFFF.cc 10 Apr 2004 18:00:15 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,51 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2002 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * 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
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <GrRemoveDcFFF.h>
-
-static const int NOUTPUTS = 1;
-
-GrRemoveDcFFF::GrRemoveDcFFF (float alpha)
- : VrHistoryProc<float,float>(NOUTPUTS), d_iir(alpha)
-{
- history = 1;
-}
-
-
-GrRemoveDcFFF::~GrRemoveDcFFF ()
-{
-}
-
-int
-GrRemoveDcFFF::work (VrSampleRange output, void *ao[],
- VrSampleRange inputs[], void *ai[])
-{
- float *in = (float *) ai[0];
- float *out = (float *) ao[0];
-
- sync (output.index); // we have state, must sync.
-
- for (unsigned i = 0; i < output.size; i++)
- out[i] = in[i] - d_iir.filter (in[i]);
-
- return output.size;
-}
Index: filter/GrRemoveDcFFF.h
===================================================================
RCS file: filter/GrRemoveDcFFF.h
diff -N filter/GrRemoveDcFFF.h
--- filter/GrRemoveDcFFF.h 10 Apr 2004 18:00:15 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,50 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2002 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * 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
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef _GRREMOVEDCFFF_H_
-#define _GRREMOVEDCFFF_H_
-
-#include <VrHistoryProc.h>
-#include <gr_single_pole_iir.h>
-
-/*!
- * \brief remove DC component of a signal
- */
-class GrRemoveDcFFF : public VrHistoryProc<float,float>
-{
- public:
- /*!
- * Construct a IIR filter with the given taps
- */
- GrRemoveDcFFF (float alpha = 1e-5);
-
- virtual ~GrRemoveDcFFF ();
-
- virtual const char *name () { return "GrRemoveDcFFF"; }
- virtual int work (VrSampleRange output, void *o[],
- VrSampleRange inputs[], void *i[]);
-
- protected:
- gr_single_pole_iir<float,float,float> d_iir;
-};
-
-#endif /* _GRREMOVEDCFFF_H_ */
Index: general/GrAGC.h
===================================================================
RCS file: general/GrAGC.h
diff -N general/GrAGC.h
--- general/GrAGC.h 10 Apr 2004 18:00:36 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,63 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2002 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * 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
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-#ifndef _GRAGC_H_
-#define _GRAGC_H_
-
-#include <VrSigProc.h>
-
-template<class iType,class oType>
-class GrAGC : public VrSigProc {
-protected:
- double k;
- double power;
- virtual void initialize();
-public:
- virtual const char *name() { return "GrAGC"; }
- virtual int work(VrSampleRange output, void *ao[],
- VrSampleRange inputs[], void *ai[]);
- GrAGC(double k):VrSigProc(1,sizeof(iType),sizeof(oType)),k(k) { }
-};
-
-template<class iType,class oType> int
-GrAGC<iType,oType>::work(VrSampleRange output, void *ao[],
- VrSampleRange inputs[], void *ai[])
-{
- iType **i = (iType **)ai;
- oType **o = (oType **)ao;
- double inv_gain;
- int size = output.size;
- while(size -- > 0) {
- power = power + ((*i[0] * *i[0]) - power)/k;
- inv_gain = sqrt(power);
- *o[0]++ = (*i[0]++ / inv_gain);
- }
- return output.size;
-}
-
-template<class iType,class oType> void
-GrAGC<iType,oType>::initialize()
-{
- power = 1;
-}
-#endif
Index: general/GrArbFunc.h
===================================================================
RCS file: general/GrArbFunc.h
diff -N general/GrArbFunc.h
--- general/GrArbFunc.h 22 Jun 2004 19:22:58 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,72 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2002 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * 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
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef _GRARBFUNC_H_
-#define _GRARBFUNC_H_
-
-#include <VrSigProc.h>
-
-/*!
- * \brief Arbitrary Function Block
- *
- * Pass this block a pointer to a function. The function
- * should return type oType, and take a single argument of
- * type "const iType &"
- * For example, to make a bock which returns the angle of a
- * gr_complex input, invoke:
- * GrArbFunc<gr_complex,float>(&arg)
- */
-
-
-template<class iType, class oType>
-class GrArbFunc : public VrSigProc {
-public:
- GrArbFunc (oType (*f)(const iType&) ) :
- VrSigProc (1, sizeof (iType), sizeof (oType)),
- func(f) {}
-
- virtual const char *name() { return "GrArbFunc"; }
-
- virtual int work(VrSampleRange output, void *o[],
- VrSampleRange inputs[], void *i[]);
-
-protected:
- oType (*func)(const iType&);
-};
-
-template<class iType, class oType> int
-GrArbFunc<iType,oType>::work(VrSampleRange output, void *ao[],
- VrSampleRange inputs[], void *ai[])
-{
- iType **i = ((iType **)ai);
- oType **o = ((oType **)ao);
- unsigned int size = output.size;
-
- for (unsigned int x = 0; x < size; x++)
- o[0][x] = (*func)(reinterpret_cast<const iType &>(i[0][x]));
- // o[0][x] = (*func)(reinterpret_cast<const iType&>(&i[0][x]));
-
- return output.size;
-}
-
-
-#endif /* _GRMAGNITUDE_H_ */
Index: general/GrCircularSink.h
===================================================================
RCS file: general/GrCircularSink.h
diff -N general/GrCircularSink.h
--- general/GrCircularSink.h 10 Apr 2004 18:00:36 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,63 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2002 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * 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
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-#ifndef _GRCIRCULARSINK_H_
-#define _GRCIRCULARSINK_H_
-
-/*
- * diagnostic helper to track down problem in MC4020 driver
- * writes input samples into a circular buffer.
- */
-
-#include <VrSink.h>
-#include <gr_circular_file.h>
-
-
-template <class iType>
-class GrCircularSink : public VrSink<iType>
-{
-private:
- gr_circular_file *d_circ_file;
-
-public:
- GrCircularSink (const char *filename, int buffersize_in_bytes){
- d_circ_file = new gr_circular_file (filename, true, buffersize_in_bytes);
- }
-
- ~GrCircularSink () {
- delete d_circ_file;
- }
-
- const char *name () { return "GrCircularSink.h"; }
-
- virtual int work3 (VrSampleRange output,
- VrSampleRange inputs[], void *ai[]){
-
- iType *in = ((iType **) ai)[0];
-
- d_circ_file->write (in, output.size * sizeof (iType));
- return output.size;
- }
-};
-
-
-
-#endif /* _GRCIRCULARSINK_H_ */
Index: general/GrComplexVCOMixer.h
===================================================================
RCS file: general/GrComplexVCOMixer.h
diff -N general/GrComplexVCOMixer.h
--- general/GrComplexVCOMixer.h 10 Apr 2004 18:00:36 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,65 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2002 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * 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
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef _GRCOMPLEXVCOMIXER_H_
-#define _GRCOMPLEXVCOMIXER_H_
-
-#include <VrSigProc.h>
-
-template<class iType,class oType>
-class GrComplexVCOMixer : public VrSigProc {
-protected:
- double sensitivity;
- double freq;
- double arg;
- double argInc;
- void evaluate(int n);
- virtual void initialize();
-public:
- virtual const char *name() { return "GrComplexVCOMixer"; }
- virtual int work(VrSampleRange output, void *ao[],
- VrSampleRange inputs[], void *ai[]);
- GrComplexVCOMixer(double f,double s)
:VrSigProc(2,sizeof(iType),sizeof(oType)),sensitivity(s),freq(f),arg(0) { }
-};
-
-template<class iType,class oType> int
-GrComplexVCOMixer<iType,oType>::work(VrSampleRange output, void *ao[],
- VrSampleRange inputs[], void *ai[])
-{
- iType **i = (iType**)ai;
- oType **o = (iType**)ao;
- int size = output.size;
- while(size -- > 0) {
- *o[0]++ = (oType) (*i[0] * cos(arg));
- *o[1]++ = (oType) (*i[0]++ * sin(arg));
- arg += argInc;
- argInc = 2*M_PI*(freq + sensitivity * *i[1]++)*(1 /
(double)getInputSamplingFrequencyN(0));
- }
- return output.size;
-}
-
-template<class iType,class oType> void
-GrComplexVCOMixer<iType,oType>::initialize()
-{
- argInc = 2*M_PI*freq*(1 / (double)getInputSamplingFrequencyN(0));
-}
-#endif
Index: general/GrFractionalInterpolatingSigProc.h
===================================================================
RCS file: general/GrFractionalInterpolatingSigProc.h
diff -N general/GrFractionalInterpolatingSigProc.h
--- general/GrFractionalInterpolatingSigProc.h 10 Apr 2004 18:00:36 -0000
1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,89 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2002 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * 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
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef _GRFRACTIONALINTERPOLATINGSIGPROC_H_
-#define _GRFRACTIONALINTERPOLATINGSIGPROC_H_
-
-#include <VrHistoryProc.h>
-#include <stdlib.h>
-#include <gr_math.h>
-#include <gr_mmse_fir_interpolator.h>
-
-/*!
- * \brief base class template for N/M interpolator.
- */
-
-template<class iType, class oType>
-class GrFractionalInterpolatingSigProc : public VrHistoryProc<iType,oType>
-{
- public:
- GrFractionalInterpolatingSigProc (int outputs, int arg_N, int arg_M)
- : VrHistoryProc<iType,oType>(outputs), N(arg_N), M(arg_M) {}
-
- GrFractionalInterpolatingSigProc (int arg_N, int arg_M)
- : VrHistoryProc<iType,oType>(1), N(arg_N), M(arg_M) {}
-
- ~GrFractionalInterpolatingSigProc () {};
-
- void pre_initialize ();
- int forecast (VrSampleRange output, VrSampleRange inputs[]);
-
-protected:
- int N; // numerator of ratio
- int M; // denominator of ratio
- int iratio; // smallest integer multiple of N/M
-};
-
-template<class iType,class oType> int
-GrFractionalInterpolatingSigProc<iType,oType>::forecast(VrSampleRange output,
- VrSampleRange inputs[])
{
- /* 1:iratio ratio */
- /*
- * Note that this code only works correctly if output size of the
- * module (set using setOutputSize(n) in pre_initialize() ) is a multiple
- * of iratio.
- */
- assert ((output.size % iratio) == 0);
-
- for(unsigned int i=0;i<numberInputs;i++) {
- inputs[i].index=output.index/iratio; /* ! do not subtract history ! */
- inputs[i].size=output.size/iratio + history-1;
- }
- return 0;
-}
-
-
-template<class iType,class oType> void
-GrFractionalInterpolatingSigProc<iType,oType>::pre_initialize ()
-{
- if (getSamplingFrequency () == 0.0)
- setSamplingFrequency ((getInputSamplingFrequencyN (0) * N) / M);
-
- // reduce N/M to lowest terms and then use N*M as the size
-
- int d = gr_gcd (N, M);
- iratio = (N * M) / (d * d);
-
- setOutputSize(iratio);
-}
-
-#endif /* _GRFRACTIONALINTERPOLATINGSIGPROC_H_ */
Index: general/GrLimiter.h
===================================================================
RCS file: general/GrLimiter.h
diff -N general/GrLimiter.h
--- general/GrLimiter.h 10 Apr 2004 18:00:36 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,69 +0,0 @@
-/* -*- Mode: c++ -*-
-*******************************************************************************
-*
-* File: GrLimiter.h
-* Description: Saturation
-*
-*******************************************************************************
-*/
-
-/*
- * Copyright 2001 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * 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
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef _GRLIMITER_H_
-#define _GRLIMITER_H_
-
-#include <VrSigProc.h>
-
-template<class iType, class oType>
-class GrLimiter : public VrSigProc {
-
-public:
- virtual const char *name() { return "GrLimiter"; }
- virtual int work(VrSampleRange output, void *o[],
- VrSampleRange inputs[], void *i[]);
- GrLimiter();
-};
-
-template<class iType,class oType> int
-GrLimiter<iType,oType>::work(VrSampleRange output, void *ao[],
- VrSampleRange inputs[], void *ai[])
-{
- iType **i = (iType **)ai;
- oType **o = (oType **)ao;
- iType *ip = i[0];
- oType *op = o[0];
-
- int size = output.size;
-
- while(size-- > 0)
- *op++ = *ip++>0?1:-1;
- return output.size;
-}
-
-template<class iType,class oType>
-GrLimiter<iType,oType>::GrLimiter()
- : VrSigProc(1, sizeof(iType), sizeof(oType))
-{
- setOutputSize (1024);
-}
-
-#endif /* _GRLIMITER_H_ */
Index: general/GrMixer.h
===================================================================
RCS file: general/GrMixer.h
diff -N general/GrMixer.h
--- general/GrMixer.h 10 Apr 2004 18:00:36 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,79 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2002 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * 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
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef _GRMIXER_H_
-#define _GRMIXER_H_
-
-#include <VrSigProc.h>
-#include <gr_nco.h>
-
-template<class iType,class oType>
-class GrMixer : public VrSigProc {
-
-public:
- GrMixer(double carrier_freq, double gain)
- : VrSigProc(1,sizeof(iType), sizeof(oType)),
- carrier_freq (carrier_freq), gain (gain) {}
-
- const char *name() { return "GrMixer"; }
-
- int work (VrSampleRange output, void *ao[],
- VrSampleRange inputs[], void *ai[]);
-
-
-protected:
-
- void initialize ();
-
- double carrier_freq;
- double gain;
- gr_nco<float,float> nco;
-};
-
-template<class iType,class oType> void
-GrMixer<iType,oType>::initialize ()
-{
- double Fs = getSamplingFrequency ();
- nco.set_freq (carrier_freq / Fs * 2 * M_PI);
- nco.set_phase (0);
-}
-
-template<class iType,class oType>
-int
-GrMixer<iType,oType>::work (VrSampleRange output, void *ao[],
- VrSampleRange inputs[], void *ai[])
-{
- iType *in = ((iType**) ai)[0];
- oType *out = ((iType**) ao)[0];
-
- sync (output.index); // we've got state, must compute in order
-
- for (unsigned oo = 0; oo < output.size; oo++){
- out[oo] = (oType) (gain * in[oo] * nco.sin ());
- nco.step ();
- }
-
- return output.size;
-}
-
-
-#endif /* _GRMIXER_H_ */
Index: general/GrPAMMod.h
===================================================================
RCS file: general/GrPAMMod.h
diff -N general/GrPAMMod.h
--- general/GrPAMMod.h 10 Apr 2004 18:00:36 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,67 +0,0 @@
-/* -*- Mode: c++ -*- */
-/*
- * Copyright 2001 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * 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
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-#ifndef _GRPAMMOD_H_
-#define _GRPAMMOD_H_
-
-#include <VrSigProc.h>
-#include <vector>
-
-using std::vector;
-
-template<class iType,class oType>
-class GrPAMMod : public VrSigProc {
-protected:
- vector<oType> constellation;
-public:
- virtual const char *name() { return "GrPAMMod"; }
- virtual int work(VrSampleRange output, void *o[],
- VrSampleRange inputs[], void *i[]);
- GrPAMMod(int bits);
-};
-
-template<class iType,class oType> int
-GrPAMMod<iType,oType>::work(VrSampleRange output, void *ao[],
- VrSampleRange inputs[], void *ai[])
-{
- iType **i = (iType **)ai;
- oType **o = (oType **)ao;
- int size = output.size;
-
- while(size-- > 0) {
- {
- *o[0]++ = constellation[*i[0]++];
- }
- }
- return output.size;
-}
-
-template<class iType,class oType>
-GrPAMMod<iType,oType>::GrPAMMod(int bits)
- : VrSigProc(1, sizeof(iType), sizeof(oType))
-{
- constellation.resize(1<<bits);
- for(int i=0; i< ((1<<bits) ); i++)
- constellation[i] = -(1<<bits) + 2*i + 1; // May need to adjust this order
-}
-#endif
Index: general/GrSSBMod.h
===================================================================
RCS file: general/GrSSBMod.h
diff -N general/GrSSBMod.h
--- general/GrSSBMod.h 22 Jun 2004 19:22:58 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,78 +0,0 @@
-/* -*- Mode: c++ -*- */
-/*
- * Copyright 2001 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * 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
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-#ifndef _GRSSBMOD_H_
-#define _GRSSBMOD_H_
-
-#include <VrSigProc.h>
-#include <gr_complex.h>
-#include <gr_nco.h>
-
-template<class oType>
-class GrSSBMod : public VrSigProc {
-private:
- gr_nco<float,float> d_nco;
- double d_gain;
-public:
- GrSSBMod (double freq, double gain);
-
- virtual const char *name() { return "GrSSBMod"; }
- virtual int work(VrSampleRange output, void *o[],
- VrSampleRange inputs[], void *i[]);
-
- // FIXME scale freq?
- void set_freq (double freq) {
- cerr << "set freq to " << freq << endl;
- d_nco.set_freq (freq);
- };
-
- void set_gain (double g) { d_gain = g; };
-};
-
-template<class oType> int
-GrSSBMod<oType>::work(VrSampleRange output, void *ao[],
- VrSampleRange inputs[], void *ai[])
-{
- gr_complex **i = (gr_complex **)ai;
- oType **o = (oType **)ao;
- int size = output.size;
-
- for(int x = 0; x < size; x++)
- {
- *o[0]++ = (oType) ( d_gain * (i[0]->real() * d_nco.cos()
- + i[0]->imag() * d_nco.sin() ));
- i[0]++;
- d_nco.step();
- }
- return output.size;
-}
-
-template<class oType>
-GrSSBMod<oType>::GrSSBMod (double freq, double gain)
- : VrSigProc(1, sizeof(gr_complex), sizeof(oType)), d_gain (gain)
-{
- // FIXME scale freq?
- d_nco.set_freq (freq);
-}
-
-#endif
Index: general/GrWeaverModHead.h
===================================================================
RCS file: general/GrWeaverModHead.h
diff -N general/GrWeaverModHead.h
--- general/GrWeaverModHead.h 10 Apr 2004 18:00:36 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,85 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2002 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * 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
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-#ifndef _GRWEAVERMODHEAD_H_
-#define _GRWEAVERMODHEAD_H_
-
-#include <VrInterpolatingSigProc.h>
-
-/*!
- * \brief Head block of a Weaver SSB/VSB modulator
- *
- * Let the input rate be Fsym. Complex mix with cos/sin of Fsym/4 &
interpolate
- * by 2. This is typically used like this:
- *
- * |---> matched filter --->|
- * ---> GrWeaverModHead | | GrWeaverTail --->
- * |---> matched filter --->|
- */
-
-template<class iType, class oType>
-class GrWeaverModHead : public VrInterpolatingSigProc<iType,oType> {
-public:
- GrWeaverModHead (int interp_factor) :
- VrInterpolatingSigProc<iType,oType>(2, interp_factor){}
-
- virtual const char *name () { return "GrWeaverModHead"; }
-
- virtual int work (VrSampleRange output, void *o[],
- VrSampleRange inputs[], void *i[]);
-
- void initialize () { setOutputSize (interp * 4); }
-};
-
-
-template<class iType, class oType> int
-GrWeaverModHead<iType,oType>::work (VrSampleRange output, void *ao[],
- VrSampleRange inputs[], void *ai[])
-{
- iType *i = ((iType **) ai)[0];
- oType *oI = ((oType **) ao)[0];
- oType *oQ = ((oType **) ao)[1];
- int size = output.size;
- iType input_symbol;
-
- static const iType nco[4][2] = {
- // cos sin
- { 1, 0 },
- { 0, 1 },
- { -1, 0 },
- { 0, -1 }
- };
-
- assert ((inputs[0].index & 0x3) == 0);
-
- for (int insamp = 0; insamp < size/interp; insamp++){
- input_symbol = i[insamp];
- *oI++ = input_symbol * nco[insamp & 0x3][0];
- *oQ++ = input_symbol * nco[insamp & 0x3][1];
- for (int outsamp = 1; outsamp < interp; outsamp++){
- *oI++ = 0;
- *oQ++ = 0;
- }
- }
- return output.size;
-}
-
-#endif /* _GRWEAVERMODHEAD_H_ */
Index: general/GrWeaverModTail.h
===================================================================
RCS file: general/GrWeaverModTail.h
diff -N general/GrWeaverModTail.h
--- general/GrWeaverModTail.h 31 Jul 2004 22:23:25 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,92 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2002 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * 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
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-#ifndef _GRWEAVERMODTAIL_H_
-#define _GRWEAVERMODTAIL_H_
-
-#include <assert.h>
-
-/*!
- * \brief Tail block of a Weaver SSB/VSB modulator
- *
- * Complex mix with cos/sin of IF_freq & sum components.
- * See also GrSSBMod, which is basically the same as this
- * except it expects I & Q to to be a single gr_complex stream
- *
- * This is typically used like this:
- *
- * |---> matched filter --->|
- * ---> GrWeaverModHead | | GrWeaverTail --->
- * |---> matched filter --->|
- */
-
-template<class iType, class oType>
-class GrWeaverModTail : public VrSigProc {
-
-public:
- GrWeaverModTail (float freq, float gain);
-
- virtual const char *name () { return "GrWeaverModTail"; }
-
- virtual int work (VrSampleRange output, void *o[],
- VrSampleRange inputs[], void *i[]);
-
- //! frequency is in Hz
- void set_freq (float frequency) { freq = frequency; }
- void set_gain (float g) { gain = g; }
-
-protected:
- gr_nco<float,float> nco;
- float gain;
- float freq;
-};
-
-template<class iType, class oType>
-GrWeaverModTail<iType,oType>::GrWeaverModTail (float freq, float gain)
- : VrSigProc(1, sizeof(iType), sizeof(oType)), gain(gain), freq(freq)
-{
-}
-
-template<class iType, class oType> int
-GrWeaverModTail<iType, oType>::work(VrSampleRange output, void *ao[],
- VrSampleRange inputs[], void *ai[])
-{
- assert (numberInputs == 2);
-
- iType *i = ((iType **) ai)[0];
- iType *q = ((iType **) ai)[1];
- oType *o = ((oType **) ao)[0];
- long size = output.size;
-
- sync (output.index);
-
- nco.set_freq (freq / getSamplingFrequency () * 2 * M_PI);
-
- for (long n = 0; n < size; n++) {
- float cosv, sinv;
- nco.sincos (sinv, cosv); // compute them at the same time (faster!)
- o[n] = (oType) (gain * (i[n] * cosv + q[n] * sinv));
- nco.step();
- }
- return output.size;
-}
-
-#endif /* _GRWEAVERMODTAIL_H_ */
- [Commit-gnuradio] gnuradio-core/src/lib filter/GrRemoveDcFFF.cc f...,
Eric Blossom <=