diff -urN gnuradio-core.orig/src/lib/filter/filter.i gnuradio-core/src/lib/filter/filter.i
--- gnuradio-core.orig/src/lib/filter/filter.i	2008-01-16 23:09:24.000000000 +0100
+++ gnuradio-core/src/lib/filter/filter.i	2008-01-16 23:10:03.000000000 +0100
@@ -32,6 +32,8 @@
 #include <gr_fractional_interpolator_cc.h>
 #include <gr_goertzel_fc.h>
 #include <gr_cma_equalizer_cc.h>
+#include <gr_cma_phase_array_cc.h>
+#include <gr_recover_phase_array_response_lms_cc.h>
 %}
 
 %include "gr_iir_filter_ffd.i"
@@ -45,5 +47,7 @@
 %include "gr_fractional_interpolator_cc.i"
 %include "gr_goertzel_fc.i"
 %include "gr_cma_equalizer_cc.i"
+%include "gr_cma_phase_array_cc.i"
+%include "gr_recover_phase_array_response_lms_cc.i"
 
 %include "filter_generated.i"
diff -urN gnuradio-core.orig/src/lib/filter/gr_adaptive_phase_array_ccc.cc gnuradio-core/src/lib/filter/gr_adaptive_phase_array_ccc.cc
--- gnuradio-core.orig/src/lib/filter/gr_adaptive_phase_array_ccc.cc	1970-01-01 01:00:00.000000000 +0100
+++ gnuradio-core/src/lib/filter/gr_adaptive_phase_array_ccc.cc	2008-01-16 23:10:03.000000000 +0100
@@ -0,0 +1,93 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2006,2008 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_complex.h>
+#include <gr_adaptive_phase_array_ccc.h>
+#include <gr_io_signature.h>
+
+gr_adaptive_phase_array_ccc::gr_adaptive_phase_array_ccc(char *name, int num_antennas, const std::vector<gr_complex> &taps)
+  : gr_sync_decimator (name,
+		       gr_make_io_signature (num_antennas, num_antennas, sizeof(gr_complex)),
+		       gr_make_io_signature (1, 1, sizeof(gr_complex)),
+		       1),
+    d_updated(false)
+{
+  d_taps = taps;
+  //set_history(d_taps.size());
+}
+
+void gr_adaptive_phase_array_ccc::set_taps(const std::vector<gr_complex> &taps)
+{
+  d_new_taps = taps;
+  d_updated = true;
+}
+
+int gr_adaptive_phase_array_ccc::work(int noutput_items,
+                              gr_vector_const_void_star &input_items,
+                              gr_vector_void_star &output_items)
+{
+  if (d_updated) {
+    d_taps = d_new_taps;
+    //set_history(d_taps.size());
+    d_updated = false;
+    //return 0;		     // history requirements may have changed.
+  }
+  gr_complex *out = (gr_complex *)output_items[0];//The beamformer combines all inputs to a single output
+
+  const int ninputs=input_items.size();//number of antennas in phase-array
+  std::vector<gr_complex *> ins;
+  ins.resize(ninputs);
+  //gr_complex (*ins)[ninputs];//for each antenna a pointer to its input_samples 
+
+  for(int input=0;input<ninputs;input++)
+    ins[input] = (gr_complex *)input_items[input];
+ 
+  assert((int)d_taps.size() >=ninputs);
+
+  for(int i=0;i<noutput_items;i++)
+  {
+    gr_complex sum(0.0, 0.0);
+    for(int input=0;input<ninputs;input++) {
+      // Generic dot product of d_taps[] and in[]
+      sum += (conj(d_taps[input])) * (ins[input][i]);//Here the beamforming is done
+      //sum += d_taps[input]*((gr_complex *)input_items[input])[i];
+    }
+    out[i] = sum;
+ 
+    // Adjust taps
+    d_error = error(sum);//estimate the error
+    for(int input=0;input<ninputs;input++) {
+      //printf("%f ", d_taps[k]);
+      update_tap(d_taps[input], ins[input][i]);
+    }
+      //printf("\n");
+    
+    //for(int input=0;input<ninputs;input++) {
+    //  ins[input]++;//advance input pointers of all antennas to the next sample (next step in time)
+    //}
+  }
+  return noutput_items;
+}
diff -urN gnuradio-core.orig/src/lib/filter/gr_adaptive_phase_array_ccc.h gnuradio-core/src/lib/filter/gr_adaptive_phase_array_ccc.h
--- gnuradio-core.orig/src/lib/filter/gr_adaptive_phase_array_ccc.h	1970-01-01 01:00:00.000000000 +0100
+++ gnuradio-core/src/lib/filter/gr_adaptive_phase_array_ccc.h	2008-01-16 23:10:03.000000000 +0100
@@ -0,0 +1,57 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 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_ADAPTIVE_PHASE_ARRAY_CCC_H
+#define	INCLUDED_GR_ADAPTIVE_PHASE_ARRAY_CCC_H
+
+#include <gr_sync_decimator.h>
+
+/*!
+ * \brief Adaptive beamformer with gr_complex input, gr_complex output and gr_complex taps
+ * \ingroup filter
+ */
+class gr_adaptive_phase_array_ccc : public gr_sync_decimator
+{
+private:
+  std::vector<gr_complex>  d_new_taps;
+  bool                d_updated;
+
+protected:
+  gr_complex		      d_error;
+  std::vector<gr_complex>  d_taps;
+
+  // Override to calculate error signal per output
+  virtual gr_complex error(const gr_complex &out) = 0; 
+
+  // Override to calculate new weight from old, corresponding input
+  virtual void update_tap(gr_complex &tap, const gr_complex &in) = 0;
+  
+public:
+  gr_adaptive_phase_array_ccc(char *name, int num_antennas, const std::vector<gr_complex> &taps);
+  void set_taps(const std::vector<gr_complex> &taps);
+
+  int work(int noutput_items,
+           gr_vector_const_void_star &input_items,
+           gr_vector_void_star &output_items);
+};
+
+#endif
diff -urN gnuradio-core.orig/src/lib/filter/gr_adaptive_phase_array_ccc.i gnuradio-core/src/lib/filter/gr_adaptive_phase_array_ccc.i
--- gnuradio-core.orig/src/lib/filter/gr_adaptive_phase_array_ccc.i	1970-01-01 01:00:00.000000000 +0100
+++ gnuradio-core/src/lib/filter/gr_adaptive_phase_array_ccc.i	2008-01-16 23:10:03.000000000 +0100
@@ -0,0 +1,30 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 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.
+ */
+
+class gr_adaptive_phase_array_ccc : public gr_sync_decimator
+{
+private:
+  gr_adaptive_phase_array_ccc(char *name, int num_antennas, const std::vector<gr_complex> &taps);
+
+public:
+  void set_taps(const std::vector<gr_complex> &taps);
+};
diff -urN gnuradio-core.orig/src/lib/filter/gr_cma_phase_array_cc.cc gnuradio-core/src/lib/filter/gr_cma_phase_array_cc.cc
--- gnuradio-core.orig/src/lib/filter/gr_cma_phase_array_cc.cc	1970-01-01 01:00:00.000000000 +0100
+++ gnuradio-core/src/lib/filter/gr_cma_phase_array_cc.cc	2008-01-16 23:10:03.000000000 +0100
@@ -0,0 +1,47 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 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_cma_phase_array_cc.h>
+
+gr_cma_phase_array_cc_sptr
+gr_make_cma_phase_array_cc(int num_taps, float mu)
+{
+  return gr_cma_phase_array_cc_sptr(new gr_cma_phase_array_cc(num_taps, mu));
+}
+
+gr_cma_phase_array_cc::gr_cma_phase_array_cc(int num_taps, float mu)
+  : gr_adaptive_phase_array_ccc("cma_phase_array_cc", num_taps, std::vector<gr_complex>(num_taps)),
+     d_mu(mu)
+{
+   d_taps[0]=1.0/num_taps;
+   for (int i=1;i<num_taps;i++)
+   {
+     float re=(1.0 + (float)i*0.1)/num_taps;
+     float im=( (float)(num_taps-i)*0.1)/num_taps;
+     d_taps[i] = gr_complex(re,im);
+   }
+}
+
diff -urN gnuradio-core.orig/src/lib/filter/gr_cma_phase_array_cc.h gnuradio-core/src/lib/filter/gr_cma_phase_array_cc.h
--- gnuradio-core.orig/src/lib/filter/gr_cma_phase_array_cc.h	1970-01-01 01:00:00.000000000 +0100
+++ gnuradio-core/src/lib/filter/gr_cma_phase_array_cc.h	2008-01-16 23:10:03.000000000 +0100
@@ -0,0 +1,64 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 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_CMA_PHASE_ARRAY_CC_H
+#define	INCLUDED_GR_CMA_PHASE_ARRAY_CC_H
+
+#include <gr_adaptive_phase_array_ccc.h>
+
+class gr_cma_phase_array_cc;
+typedef boost::shared_ptr<gr_cma_phase_array_cc> gr_cma_phase_array_cc_sptr;
+
+gr_cma_phase_array_cc_sptr 
+gr_make_cma_phase_array_cc(int num_taps, float mu);
+
+/*!
+ * \brief Implements constant modulus adaptive filter on complex stream
+ * \ingroup filter
+ */
+class gr_cma_phase_array_cc : public gr_adaptive_phase_array_ccc
+{
+private:
+  float d_modulus;
+  float d_mu;
+  
+  friend gr_cma_phase_array_cc_sptr gr_make_cma_phase_array_cc(int num_taps, float mu);
+  gr_cma_phase_array_cc(int num_taps, float mu);
+
+protected:
+
+  virtual gr_complex error(const gr_complex &out) 
+  { 
+    //return (d_modulus - norm(out));
+    return (out/abs(out)-out); 
+  }
+
+  virtual void update_tap(gr_complex &tap, const gr_complex &in) 
+  {
+    //tap += d_mu*d_error*abs(in);
+    tap += d_mu*conj(d_error)*in;
+  }
+  
+public:
+};
+
+#endif
diff -urN gnuradio-core.orig/src/lib/filter/gr_cma_phase_array_cc.i gnuradio-core/src/lib/filter/gr_cma_phase_array_cc.i
--- gnuradio-core.orig/src/lib/filter/gr_cma_phase_array_cc.i	1970-01-01 01:00:00.000000000 +0100
+++ gnuradio-core/src/lib/filter/gr_cma_phase_array_cc.i	2008-01-16 23:10:03.000000000 +0100
@@ -0,0 +1,35 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 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,cma_phase_array_cc)
+
+%include <gr_adaptive_phase_array_ccc.i>
+
+gr_cma_phase_array_cc_sptr gr_make_cma_phase_array_cc(int num_taps, float mu);
+
+class gr_cma_phase_array_cc : public gr_adaptive_phase_array_ccc
+{
+private:
+  gr_cma_phase_array_cc(int num_taps, float mu);
+
+public:
+};
diff -urN gnuradio-core.orig/src/lib/filter/gr_recover_phase_array_response_ccc.cc gnuradio-core/src/lib/filter/gr_recover_phase_array_response_ccc.cc
--- gnuradio-core.orig/src/lib/filter/gr_recover_phase_array_response_ccc.cc	1970-01-01 01:00:00.000000000 +0100
+++ gnuradio-core/src/lib/filter/gr_recover_phase_array_response_ccc.cc	2008-01-16 23:10:03.000000000 +0100
@@ -0,0 +1,119 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2006,2008 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_complex.h>
+#include <gr_recover_phase_array_response_ccc.h>
+#include <gr_io_signature.h>
+
+gr_recover_phase_array_response_ccc::gr_recover_phase_array_response_ccc(char *name, int num_antennas, bool remove_ref,const std::vector<gr_complex> &taps)
+  : gr_sync_decimator (name,
+		       gr_make_io_signature (num_antennas+1, num_antennas+1, sizeof(gr_complex)),
+		       gr_make_io_signature (num_antennas, num_antennas, sizeof(gr_complex)),
+		       1),
+    d_updated(false),
+    d_errors(std::vector<gr_complex>(num_antennas)),
+    d_num_antennas(num_antennas),
+    d_remove_ref(remove_ref)
+{
+  d_taps = taps;
+  //set_history(d_taps.size());
+}
+
+void gr_recover_phase_array_response_ccc::set_taps(const std::vector<gr_complex> &taps)
+{
+  d_new_taps = taps;
+  d_updated = true;
+}
+
+int gr_recover_phase_array_response_ccc::work(int noutput_items,
+                              gr_vector_const_void_star &input_items,
+                              gr_vector_void_star &output_items)
+{
+  const int ninputs=input_items.size();//number of antennas in phase-array +1
+  const int noutputs=output_items.size();//number of antennas in phase-array
+  if (d_updated) {
+    d_taps = d_new_taps;
+    assert((int)d_taps.size() >=(ninputs-1));
+    //set_history(d_taps.size());
+    d_updated = false;
+    //return 0;		     // history requirements may have changed.
+  }
+  //  ^                             ^    ^     ^_
+  //  a1(k+1) =a1(k) + mulms * [xk -a1(k)s1(k)]s1(k)
+  gr_complex *ref = (gr_complex *)input_items[0];//first input is the (estimated) reference signal
+
+
+  assert(ninputs==(d_num_antennas+1));
+  assert(noutputs==d_num_antennas);
+  std::vector<gr_complex *> ins(ninputs-1);
+  std::vector<gr_complex *> outs(ninputs-1);//outputs are the reference signal multiplied with the corresponsing taps
+                                     //These should correspond to the input antenna signals but then without interference or other signals
+                                     //These can be used to subtract from the input signals to try to recover additional signals  
+  //ins.resize(ninputs-1);
+
+  for(int input=0;input<d_num_antennas;input++)
+  {
+    ins[input] = (gr_complex *)input_items[input+1];
+    outs[input] = (gr_complex *)output_items[input];
+  }
+ 
+
+
+  for(int i=0;i<noutput_items;i++)
+  {
+ 
+    // Adjust taps
+    for(int input=0;input<d_num_antennas;input++) {
+      d_errors[input] = error( d_taps[input] ,
+                                ref[i] ,
+                                ins[input][i] );//estimate the error
+      //printf("%f ", d_taps[input]);
+      update_tap(d_taps[input], d_errors[input], ref[i]);
+    }
+      //printf("\n");
+    
+    //for(int input=0;input<ninputs;input++) {
+    //  ins[input]++;//advance input pointers of all antennas to the next sample (next step in time)
+    //}
+   if(d_remove_ref) //remove ref signal from antenna signals
+   {
+     //Remove (accordingly phase-shifted) ref signal from the input signals
+     //These signals (with the ref-signal removed) can be used to try to recover additional signals  
+     for(int input=0;input<d_num_antennas;input++) {
+      outs[input][i]=ins[input][i] - ref[i]*d_taps[input];
+     }
+   }
+   else
+   {  //output reconstructed (phase-shifted) ref_signal
+      //outputs are the reference signal multiplied with the corresponsing taps
+      //These should correspond to the input antenna signals but then without interference or other signals
+     for(int input=0;input<d_num_antennas;input++) {
+      outs[input][i]=ref[i]*d_taps[input];
+     }
+   }
+  }
+  return noutput_items;
+}
diff -urN gnuradio-core.orig/src/lib/filter/gr_recover_phase_array_response_ccc.h gnuradio-core/src/lib/filter/gr_recover_phase_array_response_ccc.h
--- gnuradio-core.orig/src/lib/filter/gr_recover_phase_array_response_ccc.h	1970-01-01 01:00:00.000000000 +0100
+++ gnuradio-core/src/lib/filter/gr_recover_phase_array_response_ccc.h	2008-01-16 23:10:03.000000000 +0100
@@ -0,0 +1,94 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 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_RECOVER_PHASE_ARRAY_RESPONSE_CCC_H
+#define	INCLUDED_GR_RECOVER_PHASE_ARRAY_RESPONSE_CCC_H
+
+#include <gr_sync_decimator.h>
+
+/*!
+ * \brief Adaptive phase array antenna response reconstructor with gr_complex input, gr_complex output and gr_complex taps
+ * \ingroup filter
+ */
+class gr_recover_phase_array_response_ccc : public gr_sync_decimator
+{
+private:
+  std::vector<gr_complex>  d_new_taps;
+  bool                d_updated;
+
+protected:
+  std::vector<gr_complex>  d_errors;
+  std::vector<gr_complex>  d_taps;
+  int                      d_num_antennas;
+  bool                     d_remove_ref;
+
+  // Override to calculate error signal per input/per tap
+  /*!
+   * determine one vector element of the error estimate
+   *
+   * \param tap    one vector element of a, the estimated phase-array antenna response to the reference signal.
+   * \param ref    one vector-element of s1, the (estimated) reference signal
+   * \param in     one vector-element of x, the signal of one of the antennas
+   */
+  virtual gr_complex error( gr_complex &tap ,
+                            const gr_complex &ref ,
+                            const gr_complex &in ) = 0;
+
+
+  // Override to calculate new weight from old, corresponding input
+  /*!
+   * update one tap 
+   *
+   * \param tap    one vector element of a, the estimated phase-array antenna response to the reference signal.
+   * \param ref    one vector-element of s1, the (estimated) reference signal
+   * \param in     one vector-element of x = the signal of one of the antennas
+   */
+  virtual void update_tap(gr_complex &tap, const gr_complex &error, const gr_complex &ref) = 0;
+  
+public:
+  /*!
+   * \param name           name of this filter (fill in name of the subclass here)
+   * \param num_antennas   number of antennas in the phase_array, this should correspons to number of taps and number of inputs-1
+   * \param remove_ref     boolean, if True the ref-signal is removed from the inputs, otherwise the (phase-shifted) ref-signals are output
+   * \param taps           the initial antenna responses, (number of taps should be num_antennas)  
+   */
+  gr_recover_phase_array_response_ccc(char *name, int num_antennas, bool remove_ref,const std::vector<gr_complex> &taps);
+  /*!
+   * set new taps
+   *
+   * \param taps   set initial a, the estimated phase-array antenna response to the reference signal. 
+   *               Number of taps must be num_antennas.
+   */
+  void set_taps(const std::vector<gr_complex> &taps);
+  /*!
+   * get taps, a the estimated phase-array antenna response to the reference signal.  
+   * Number of taps is num_antennas.
+   */
+  std::vector<gr_complex> taps(){return d_taps;}
+  int num_antennas(){return d_num_antennas;}
+
+  int work(int noutput_items,
+           gr_vector_const_void_star &input_items,
+           gr_vector_void_star &output_items);
+};
+
+#endif
diff -urN gnuradio-core.orig/src/lib/filter/gr_recover_phase_array_response_ccc.i gnuradio-core/src/lib/filter/gr_recover_phase_array_response_ccc.i
--- gnuradio-core.orig/src/lib/filter/gr_recover_phase_array_response_ccc.i	1970-01-01 01:00:00.000000000 +0100
+++ gnuradio-core/src/lib/filter/gr_recover_phase_array_response_ccc.i	2008-01-16 23:10:03.000000000 +0100
@@ -0,0 +1,32 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 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.
+ */
+
+class gr_recover_phase_array_response_ccc : public gr_sync_decimator
+{
+private:
+  gr_recover_phase_array_response_ccc(char *name, int num_antennas, bool remove_ref,const std::vector<gr_complex> &taps);
+
+public:
+  void set_taps(const std::vector<gr_complex> &taps);
+  std::vector<gr_complex> taps(){return d_taps;}
+  int num_antennas(){return d_num_antennas;}
+};
diff -urN gnuradio-core.orig/src/lib/filter/gr_recover_phase_array_response_lms_cc.cc gnuradio-core/src/lib/filter/gr_recover_phase_array_response_lms_cc.cc
--- gnuradio-core.orig/src/lib/filter/gr_recover_phase_array_response_lms_cc.cc	1970-01-01 01:00:00.000000000 +0100
+++ gnuradio-core/src/lib/filter/gr_recover_phase_array_response_lms_cc.cc	2008-01-16 23:10:03.000000000 +0100
@@ -0,0 +1,48 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 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_recover_phase_array_response_lms_cc.h>
+
+gr_recover_phase_array_response_lms_cc_sptr
+gr_make_recover_phase_array_response_lms_cc(int num_taps, float mu, bool remove_ref)
+{
+  return gr_recover_phase_array_response_lms_cc_sptr(new gr_recover_phase_array_response_lms_cc(num_taps, mu, remove_ref));
+}
+
+gr_recover_phase_array_response_lms_cc::gr_recover_phase_array_response_lms_cc(int num_taps, float mu,bool remove_ref)
+  : gr_recover_phase_array_response_ccc("recover_phase_array_response_lms_cc", num_taps,remove_ref, std::vector<gr_complex>(num_taps)),
+     d_mu(mu)
+{
+   d_taps[0]=gr_complex(1.0,0.0);
+   for (int i=1;i<num_taps;i++)
+   {
+     //float re=(1.0 + (float)i*0.1)/num_taps;
+     //float im=( (float)(num_taps-i)*0.1)/num_taps;
+     //d_taps[i] = gr_complex(re,im);
+     d_taps[i]=gr_complex(1.0,0.0);
+   }
+}
+
diff -urN gnuradio-core.orig/src/lib/filter/gr_recover_phase_array_response_lms_cc.h gnuradio-core/src/lib/filter/gr_recover_phase_array_response_lms_cc.h
--- gnuradio-core.orig/src/lib/filter/gr_recover_phase_array_response_lms_cc.h	1970-01-01 01:00:00.000000000 +0100
+++ gnuradio-core/src/lib/filter/gr_recover_phase_array_response_lms_cc.h	2008-01-16 23:10:03.000000000 +0100
@@ -0,0 +1,87 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 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_RECOVER_PHASE_ARRAY_TRANSFER_LMS_CC_H
+#define	INCLUDED_GR_RECOVER_PHASE_ARRAY_TRANSFER_LMS_CC_H
+
+#include <gr_recover_phase_array_response_ccc.h>
+
+class gr_recover_phase_array_response_lms_cc;
+typedef boost::shared_ptr<gr_recover_phase_array_response_lms_cc> gr_recover_phase_array_response_lms_cc_sptr;
+
+gr_recover_phase_array_response_lms_cc_sptr 
+gr_make_recover_phase_array_response_lms_cc(int num_taps, float mu, bool remove_ref=false);
+
+/*!
+ * \brief Implements constant modulus adaptive filter on complex stream
+ * \ingroup filter
+ * ^                             ^    ^     ^_
+ * a1(k+1) =a1(k) + mulms * [xk -a1(k)s1(k)]s1(k)
+ */
+class gr_recover_phase_array_response_lms_cc : public gr_recover_phase_array_response_ccc
+{
+private:
+  float d_modulus;
+  float d_mu;
+  
+  friend gr_recover_phase_array_response_lms_cc_sptr gr_make_recover_phase_array_response_lms_cc(int num_taps, float mu, bool remove_ref);
+  /*!
+   * \param num_taps       number of antennas in the phase_array, this should correspons to number of taps and number of inputs-1
+   * \param mu             the update_rate of the adaptive LMS algorithm, should be small ( < 0.1) 
+   * \param remove_ref     boolean, if True the ref-signal is removed from the inputs, otherwise the (phase-shifted) ref-signals are output
+   */
+  gr_recover_phase_array_response_lms_cc(int num_taps, float mu, bool remove_ref);
+
+protected:
+  /*!
+   * determine one vector element of the error estimate
+   *
+   * \param tap    one vector element of a, the estimated phase-array antenna response to the reference signal.
+   * \param ref    one vector-element of s1, the (estimated) reference signal
+   * \param in     one vector-element of x, the signal of one of the antennas
+   */
+  virtual gr_complex error( gr_complex &tap ,
+                                 const gr_complex &ref ,
+                                 const gr_complex &in ) 
+  { 
+    //return (d_modulus - norm(out));
+
+    return (in - tap*ref); 
+  }
+
+  /*!
+   * update one tap 
+   *
+   * \param tap    one vector element of a, the estimated phase-array antenna response to the reference signal.
+   * \param ref    one vector-element of s1, the (estimated) reference signal
+   * \param in     one vector-element of x = the signal of one of the antennas
+   */
+  virtual void update_tap(gr_complex &tap, const gr_complex &error, const gr_complex &ref) 
+  {
+    //tap += d_mu*d_error*abs(in);
+    tap += d_mu*error*conj(ref);
+  }
+  
+public:
+};
+
+#endif
diff -urN gnuradio-core.orig/src/lib/filter/gr_recover_phase_array_response_lms_cc.i gnuradio-core/src/lib/filter/gr_recover_phase_array_response_lms_cc.i
--- gnuradio-core.orig/src/lib/filter/gr_recover_phase_array_response_lms_cc.i	1970-01-01 01:00:00.000000000 +0100
+++ gnuradio-core/src/lib/filter/gr_recover_phase_array_response_lms_cc.i	2008-01-16 23:10:03.000000000 +0100
@@ -0,0 +1,35 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 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,recover_phase_array_response_lms_cc)
+
+%include <gr_adaptive_phase_array_ccc.i>
+
+gr_recover_phase_array_response_lms_cc_sptr gr_make_recover_phase_array_response_lms_cc(int num_taps, float mu, bool remove_ref=true);
+
+class gr_recover_phase_array_response_lms_cc : public gr_adaptive_phase_array_ccc
+{
+private:
+  gr_recover_phase_array_response_lms_cc(int num_taps, float mu, bool remove_ref);
+
+public:
+};
diff -urN gnuradio-core.orig/src/lib/filter/Makefile.am gnuradio-core/src/lib/filter/Makefile.am
--- gnuradio-core.orig/src/lib/filter/Makefile.am	2008-01-16 23:09:24.000000000 +0100
+++ gnuradio-core/src/lib/filter/Makefile.am	2008-01-16 23:10:03.000000000 +0100
@@ -165,7 +165,11 @@
 libfilter_la_common_SOURCES = 		\
 	$(GENERATED_CC)			\
 	gr_adaptive_fir_ccf.cc		\
+	gr_adaptive_phase_array_ccc.cc		\
+	gr_recover_phase_array_response_ccc.cc		\
+	gr_recover_phase_array_response_lms_cc.cc		\
 	gr_cma_equalizer_cc.cc		\
+	gr_cma_phase_array_cc.cc		\
 	gr_fft_filter_ccc.cc		\
 	gr_fft_filter_fff.cc		\
 	gr_goertzel_fc.cc		\
@@ -225,7 +229,11 @@
 	float_dotprod_generic.h		\
 	float_dotprod_x86.h		\
 	gr_adaptive_fir_ccf.h		\
+	gr_adaptive_phase_array_ccc.h		\
+	gr_recover_phase_array_response_ccc.h		\
+	gr_recover_phase_array_response_lms_cc.h		\
 	gr_cma_equalizer_cc.h		\
+	gr_cma_phase_array_cc.h		\
 	gr_cpu.h			\
 	gr_fft_filter_ccc.h		\
 	gr_fft_filter_fff.h		\
@@ -291,7 +299,11 @@
 	filter.i			\
 	filter_generated.i		\
 	gr_adaptive_fir_ccf.i		\
+	gr_adaptive_phase_array_ccc.i		\
+	gr_recover_phase_array_response_ccc.i		\
+	gr_recover_phase_array_response_lms_cc.i		\
 	gr_cma_equalizer_cc.i		\
+	gr_cma_phase_array_cc.i		\
 	gr_fft_filter_ccc.i		\
 	gr_fft_filter_fff.i		\
 	gr_filter_delay_fc.i		\

