gnuradio-core: removed gr.dd_mpsk_sync_cc block as obsolete
authorJohnathan Corgan <jcorgan@corganenterprises.com>
Tue, 18 May 2010 20:22:29 +0000 (13:22 -0700)
committerJohnathan Corgan <jcorgan@corganenterprises.com>
Tue, 18 May 2010 20:22:29 +0000 (13:22 -0700)
gnuradio-core/src/lib/general/Makefile.am
gnuradio-core/src/lib/general/general.i
gnuradio-core/src/lib/general/gr_dd_mpsk_sync_cc.cc [deleted file]
gnuradio-core/src/lib/general/gr_dd_mpsk_sync_cc.h [deleted file]
gnuradio-core/src/lib/general/gr_dd_mpsk_sync_cc.i [deleted file]
grc/blocks/Makefile.am
grc/blocks/block_tree.xml
grc/blocks/gr_dd_mpsk_sync_cc.xml [deleted file]

index b5f5c346be4083bf52bf6beb07d3538a24ec9ccd..3d8a42805cd0ce4ad3dafed04b88e55de4575ffe 100644 (file)
@@ -60,7 +60,6 @@ libgeneral_la_SOURCES =               \
        gr_cpfsk_bc.cc                  \
        gr_crc32.cc                     \
        gr_ctcss_squelch_ff.cc          \
-       gr_dd_mpsk_sync_cc.cc           \
        gr_decode_ccsds_27_fb.cc        \
        gr_deinterleave.cc              \
        gr_delay.cc                     \
@@ -215,7 +214,6 @@ grinclude_HEADERS =                         \
        gr_cpfsk_bc.h                   \
        gr_crc32.h                      \
        gr_ctcss_squelch_ff.h           \
-       gr_dd_mpsk_sync_cc.h            \
        gr_decode_ccsds_27_fb.h         \
        gr_diff_decoder_bb.h            \
        gr_diff_encoder_bb.h            \
@@ -386,7 +384,6 @@ swiginclude_HEADERS =                       \
        gr_cpfsk_bc.i                   \
        gr_crc32.i                      \
        gr_ctcss_squelch_ff.i           \
-       gr_dd_mpsk_sync_cc.i            \
        gr_decode_ccsds_27_fb.i         \
        gr_diff_decoder_bb.i            \
        gr_diff_encoder_bb.i            \
index 6929f1e6e832c8fca738c9572a484262bd3cdfe6..68cafce2e6de301ae4ac95f30ca279d7843a27ff 100644 (file)
@@ -80,7 +80,6 @@
 #include <gr_threshold_ff.h>
 #include <gr_clock_recovery_mm_ff.h>
 #include <gr_clock_recovery_mm_cc.h>
-#include <gr_dd_mpsk_sync_cc.h>
 #include <gr_packet_sink.h>
 #include <gr_lms_dfe_cc.h>
 #include <gr_lms_dfe_ff.h>
 %include "gr_threshold_ff.i"
 %include "gr_clock_recovery_mm_ff.i"
 %include "gr_clock_recovery_mm_cc.i"
-%include "gr_dd_mpsk_sync_cc.i"
 %include "gr_packet_sink.i"
 %include "gr_lms_dfe_cc.i"
 %include "gr_lms_dfe_ff.i"
diff --git a/gnuradio-core/src/lib/general/gr_dd_mpsk_sync_cc.cc b/gnuradio-core/src/lib/general/gr_dd_mpsk_sync_cc.cc
deleted file mode 100644 (file)
index d4141ef..0000000
+++ /dev/null
@@ -1,196 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004 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 3, 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gr_dd_mpsk_sync_cc.h>
-#include <gr_io_signature.h>
-#include <gr_sincos.h>
-#include <gri_mmse_fir_interpolator_cc.h>
-#include <math.h>
-#include <stdexcept>
-#include <cstdio>
-
-#include <gr_complex.h>
-
-#define M_TWOPI (2*M_PI)
-
-gr_dd_mpsk_sync_cc_sptr
-gr_make_dd_mpsk_sync_cc (float alpha, float beta, float max_freq, float min_freq, float ref_phase,
-                        float omega, float gain_omega, float mu, float gain_mu)
-{
-    return gr_dd_mpsk_sync_cc_sptr (new gr_dd_mpsk_sync_cc (alpha, beta, max_freq, min_freq,ref_phase,
-                                                           omega,gain_omega,mu,gain_mu));
-}
-
-gr_dd_mpsk_sync_cc::gr_dd_mpsk_sync_cc (float alpha, float beta, float max_freq, float min_freq,
-                                       float ref_phase,
-                                       float omega, float gain_omega, float mu, float gain_mu)
-    : gr_block ("dd_mpsk_sync_cc",
-               gr_make_io_signature (1, 1, sizeof (gr_complex)),
-               gr_make_io_signature (1, 1, sizeof (gr_complex))),
-      d_alpha(alpha), d_beta(beta), 
-      d_max_freq(max_freq), d_min_freq(min_freq),
-      d_ref_phase(ref_phase),d_omega(omega), d_gain_omega(gain_omega), 
-      d_mu(mu), d_gain_mu(gain_mu),
-      d_phase(0), d_freq((max_freq+min_freq)/2), d_last_sample(0), 
-      d_interp(new gri_mmse_fir_interpolator_cc()),
-      d_dl_idx(0)
-{
-    if (omega <= 0.0)
-       throw std::out_of_range ("clock rate must be > 0");
-    if (gain_mu <  0  || gain_omega < 0)
-       throw std::out_of_range ("Gains must be non-negative");
-
-    assert(d_interp->ntaps() <= DLLEN);
-
-    // zero double length delay line.
-    for (unsigned int i = 0; i < 2 * DLLEN; i++)
-      d_dl[i] = gr_complex(0.0,0.0);
-}
-
-gr_dd_mpsk_sync_cc::~gr_dd_mpsk_sync_cc()
-{
-    delete d_interp;
-}
-
-float
-gr_dd_mpsk_sync_cc::phase_detector(gr_complex sample,float ref_phase)
-{
-  return ((sample.real()>0 ? 1.0 : -1.0) * sample.imag() -
-         (sample.imag()>0 ? 1.0 : -1.0) * sample.real());
-}
-
-void
-gr_dd_mpsk_sync_cc::forecast(int noutput_items, gr_vector_int &ninput_items_required)
-{
-  unsigned ninputs = ninput_items_required.size();
-  for (unsigned i=0; i < ninputs; i++)
-    ninput_items_required[i] =
-      (int) ceil((noutput_items * d_omega) + d_interp->ntaps());
-}
-gr_complex
-gr_dd_mpsk_sync_cc::slicer_45deg (gr_complex sample)
-{
-  float real,imag;
-  if(sample.real() > 0)
-    real=1;
-  else
-    real=-1;
-  if(sample.imag() > 0)
-    imag = 1;
-  else
-    imag = -1;
-  return gr_complex(real,imag);
-}
-
-gr_complex
-gr_dd_mpsk_sync_cc::slicer_0deg (gr_complex sample)
-{
-  gr_complex out;
-  if( fabs(sample.real()) > fabs(sample.imag()) ) {
-    if(sample.real() > 0)
-      return gr_complex(1.0,0.0);
-    else
-      return gr_complex(-1.0,0.0);
-  }
-  else {
-    if(sample.imag() > 0)
-      return gr_complex(0.0, 1.0);
-    else
-      return gr_complex(0.0, -1.0);
-  }
-}
-
-int
-gr_dd_mpsk_sync_cc::general_work (int noutput_items, 
-                                 gr_vector_int &ninput_items,
-                                 gr_vector_const_void_star &input_items,
-                                 gr_vector_void_star &output_items)
-{
-  const gr_complex *in = (gr_complex *) input_items[0];
-  gr_complex *out = (gr_complex *) output_items[0];
-  
-  int ii, oo;
-  ii = 0; oo = 0;
-  
-  float error;
-  float t_imag, t_real;
-  gr_complex nco_out;
-  float mm_val;
-
-  while (oo < noutput_items) {
-    // 
-    // generate an output sample by interpolating between the carrier
-    // tracked samples in the delay line.  d_mu, the fractional
-    // interpolation amount (in [0.0, 1.0]) is controlled by the
-    // symbol timing loop below.
-    //
-    out[oo] = d_interp->interpolate (&d_dl[d_dl_idx], d_mu);
-
-    error = phase_detector(out[oo], d_ref_phase);
-    
-    d_freq = d_freq + d_beta * error;
-    d_phase = d_phase + d_alpha * error;
-    while(d_phase>M_TWOPI)
-      d_phase -= M_TWOPI;
-    while(d_phase<-M_TWOPI)
-      d_phase += M_TWOPI;
-      
-    if (d_freq > d_max_freq)
-      d_freq = d_max_freq;
-    else if (d_freq < d_min_freq)
-      d_freq = d_min_freq;
-      
-    mm_val = real(d_last_sample * slicer_0deg(out[oo]) - out[oo] * slicer_0deg(d_last_sample));
-    d_last_sample = out[oo];
-
-    d_omega = d_omega + d_gain_omega * mm_val;
-    d_mu = d_mu + d_omega + d_gain_mu * mm_val;
-    
-    while(d_mu >= 1.0) {
-      //
-      // Generate more carrier tracked samples for the delay line
-      //
-      d_mu -= 1.0;
-      gr_sincosf(d_phase, &t_imag, &t_real);
-      nco_out = gr_complex(t_real, -t_imag);
-      gr_complex new_sample = in[ii] * nco_out;
-
-      d_dl[d_dl_idx] = new_sample;             // overwrite oldest sample
-      d_dl[(d_dl_idx + DLLEN)] = new_sample;   // and second copy
-      d_dl_idx = (d_dl_idx+1) % DLLEN;         // point to the new oldest sample
-      d_phase = d_phase + d_freq;
-      ii++;
-    }
-    oo++;
-    printf("%f\t%f\t%f\t%f\t%f\n",d_mu,d_omega,mm_val,d_freq,d_phase);
-    //printf("%f\t%f\t%f\t%f\t%f\t%f\t%f\n",mple).real(),slicer_0deg(d_last_sample).imag(),mm_val,d_omega,d_mu);
-  }
-
-  assert(ii <= ninput_items[0]);
-
-  consume_each (ii);
-  return noutput_items;
-}
diff --git a/gnuradio-core/src/lib/general/gr_dd_mpsk_sync_cc.h b/gnuradio-core/src/lib/general/gr_dd_mpsk_sync_cc.h
deleted file mode 100644 (file)
index 4ffcd37..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2006 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 3, 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_GR_DD_MPSK_SYNC_CC_H
-#define INCLUDED_GR_DD_MPSK_SYNC_CC_H
-
-#include <gr_sync_block.h>
-
-class gri_mmse_fir_interpolator_cc;
-
-class gr_dd_mpsk_sync_cc;
-typedef boost::shared_ptr<gr_dd_mpsk_sync_cc> gr_dd_mpsk_sync_cc_sptr;
-
-gr_dd_mpsk_sync_cc_sptr 
-gr_make_dd_mpsk_sync_cc (float alpha, float beta,
-                        float max_freq, float min_freq, float ref_phase,
-                        float omega, float gain_omega, float mu, float gain_mu);
-
-/*!
- * \brief Decision directed M-PSK synchronous demod 
- * \ingroup sync_blk
- * This block performs joint carrier tracking and symbol timing recovery.
- *
- * input: complex baseband; output: properly timed complex samples ready for slicing.
- *
- * N.B, at this point, it handles only QPSK.
- */
-
-class gr_dd_mpsk_sync_cc : public gr_block
-{
-  friend gr_dd_mpsk_sync_cc_sptr gr_make_dd_mpsk_sync_cc (float alpha, float beta,
-                                                         float max_freq, float min_freq, float ref_phase,
-                                                         float omega, float gain_omega, float mu, float gain_mu);
-public:
-  ~gr_dd_mpsk_sync_cc ();
-  void forecast(int noutput_items, gr_vector_int &ninput_items_required);
-  float mu() const { return d_mu;}
-  float omega() const { return d_omega;}
-  float gain_mu() const { return d_gain_mu;}
-  float gain_omega() const { return d_gain_omega;}
-  
-  void set_gain_mu (float gain_mu) { d_gain_mu = gain_mu; }
-  void set_gain_omega (float gain_omega) { d_gain_omega = gain_omega; }
-  void set_mu (float mu) { d_mu = mu; }
-  void set_omega (float omega) { d_omega = omega; }
-
-protected:
-  gr_dd_mpsk_sync_cc (float alpha, float beta, float max_freq, float min_freq, float ref_phase,
-                     float omega, float gain_omega, float mu, float gain_mu);
-  
-  int general_work (int noutput_items,
-                   gr_vector_int &ninput_items,
-                   gr_vector_const_void_star &input_items,
-                   gr_vector_void_star &output_items);
-  
-private:
-  static const unsigned int DLLEN = 8; // delay line length.
-
-  float d_alpha,d_beta,d_max_freq,d_min_freq,d_ref_phase;
-  float d_omega, d_gain_omega, d_mu, d_gain_mu;
-  float d_phase, d_freq;
-  gr_complex slicer_45deg (gr_complex sample);
-  gr_complex slicer_0deg (gr_complex sample);
-  gr_complex d_last_sample;
-  gri_mmse_fir_interpolator_cc         *d_interp;
-  
-  gr_complex d_dl[2 * DLLEN];  // Holds post carrier tracking samples.
-                                // double length delay line to avoid wraps.
-  unsigned int d_dl_idx;       // indexes oldest sample in delay line.
-
-  float phase_detector(gr_complex sample,float ref_phase);
-};
-
-#endif
diff --git a/gnuradio-core/src/lib/general/gr_dd_mpsk_sync_cc.i b/gnuradio-core/src/lib/general/gr_dd_mpsk_sync_cc.i
deleted file mode 100644 (file)
index 1773924..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005 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 3, 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-GR_SWIG_BLOCK_MAGIC(gr,dd_mpsk_sync_cc)
-
-  gr_dd_mpsk_sync_cc_sptr gr_make_dd_mpsk_sync_cc (float alpha, float beta, 
-                                                  float max_freq, float min_freq, float ref_phase,
-                                                  float omega, float gain_omega, float mu, float gain_mu);
-
-class gr_dd_mpsk_sync_cc : public gr_block
-{
- private:
-  gr_dd_mpsk_sync_cc (float alpha, float beta, float max_freq, float min_freq, float ref_phase,
-                     float omega, float gain_omega, float mu, float gain_mu);
-};
index 4e3839d27a466a1ea7d0b870eddd3ef9d41cd6f2..2596eae45600c74013af035c18b07594c1368f67 100644 (file)
@@ -91,7 +91,6 @@ dist_ourdata_DATA = \
        gr_correlate_access_code_bb.xml \
        gr_costas_loop_cc.xml \
        gr_cpfsk_bc.xml \
-       gr_dd_mpsk_sync_cc.xml \
        gr_decode_ccsds_27_fb.xml \
        gr_deinterleave.xml \
        gr_delay.xml \
index 04568e19a8e2898e7094900ceddb37ffc875b939..8d91258e516f08417a64f361c0ff2007b57da3db 100644 (file)
                <block>gr_pfb_clock_sync_xxx</block>
 
                <block>gr_costas_loop_cc</block>
-               <block>gr_dd_mpsk_sync_cc</block>
                <block>gr_mpsk_sync_cc</block>
                <block>gr_mpsk_receiver_cc</block>
 
diff --git a/grc/blocks/gr_dd_mpsk_sync_cc.xml b/grc/blocks/gr_dd_mpsk_sync_cc.xml
deleted file mode 100644 (file)
index aed0e8d..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0"?>
-<!--
-###################################################
-##DD MPSK Sync
-###################################################
- -->
-<block>
-       <name>DD MPSK Sync</name>
-       <key>gr_dd_mpsk_sync_cc</key>
-       <import>from gnuradio import gr</import>
-       <make>gr.dd_mpsk_sync_cc($alpha, $beta, $max_freq, $min_freq, $ref_phase, $omega, $gain_omega, $mu, $gain_mu)</make>
-       <param>
-               <name>Alpha</name>
-               <key>alpha</key>
-               <type>real</type>
-       </param>
-       <param>
-               <name>Beta</name>
-               <key>beta</key>
-               <type>real</type>
-       </param>
-       <param>
-               <name>Max Freq</name>
-               <key>max_freq</key>
-               <type>real</type>
-       </param>
-       <param>
-               <name>Min Freq</name>
-               <key>min_freq</key>
-               <type>real</type>
-       </param>
-       <param>
-               <name>Reference Phase</name>
-               <key>ref_phase</key>
-               <type>real</type>
-       </param>
-       <param>
-               <name>Omega</name>
-               <key>omega</key>
-               <type>real</type>
-       </param>
-       <param>
-               <name>Gain Omega</name>
-               <key>gain_omega</key>
-               <type>real</type>
-       </param>
-       <param>
-               <name>Mu</name>
-               <key>mu</key>
-               <type>real</type>
-       </param>
-       <param>
-               <name>Gain Mu</name>
-               <key>gain_mu</key>
-               <type>real</type>
-       </param>
-       <sink>
-               <name>in</name>
-               <type>complex</type>
-       </sink>
-       <source>
-               <name>out</name>
-               <type>complex</type>
-       </source>
-</block>