00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef INCLUDED_GR_DD_MPSK_SYNC_CC_H
00024 #define INCLUDED_GR_DD_MPSK_SYNC_CC_H
00025
00026 #include <gr_sync_block.h>
00027
00028 class gri_mmse_fir_interpolator_cc;
00029
00030 class gr_dd_mpsk_sync_cc;
00031 typedef boost::shared_ptr<gr_dd_mpsk_sync_cc> gr_dd_mpsk_sync_cc_sptr;
00032
00033 gr_dd_mpsk_sync_cc_sptr
00034 gr_make_dd_mpsk_sync_cc (float alpha, float beta,
00035 float max_freq, float min_freq, float ref_phase,
00036 float omega, float gain_omega, float mu, float gain_mu);
00037
00047 class gr_dd_mpsk_sync_cc : public gr_block
00048 {
00049 friend gr_dd_mpsk_sync_cc_sptr gr_make_dd_mpsk_sync_cc (float alpha, float beta,
00050 float max_freq, float min_freq, float ref_phase,
00051 float omega, float gain_omega, float mu, float gain_mu);
00052 public:
00053 ~gr_dd_mpsk_sync_cc ();
00054 void forecast(int noutput_items, gr_vector_int &ninput_items_required);
00055 float mu() const { return d_mu;}
00056 float omega() const { return d_omega;}
00057 float gain_mu() const { return d_gain_mu;}
00058 float gain_omega() const { return d_gain_omega;}
00059
00060 void set_gain_mu (float gain_mu) { d_gain_mu = gain_mu; }
00061 void set_gain_omega (float gain_omega) { d_gain_omega = gain_omega; }
00062 void set_mu (float mu) { d_mu = mu; }
00063 void set_omega (float omega) { d_omega = omega; }
00064
00065 protected:
00066 gr_dd_mpsk_sync_cc (float alpha, float beta, float max_freq, float min_freq, float ref_phase,
00067 float omega, float gain_omega, float mu, float gain_mu);
00068
00069 int general_work (int noutput_items,
00070 gr_vector_int &ninput_items,
00071 gr_vector_const_void_star &input_items,
00072 gr_vector_void_star &output_items);
00073
00074 private:
00075 static const unsigned int DLLEN = 8;
00076
00077 float d_alpha,d_beta,d_max_freq,d_min_freq,d_ref_phase;
00078 float d_omega, d_gain_omega, d_mu, d_gain_mu;
00079 float d_phase, d_freq;
00080 gr_complex slicer_45deg (gr_complex sample);
00081 gr_complex slicer_0deg (gr_complex sample);
00082 gr_complex d_last_sample;
00083 gri_mmse_fir_interpolator_cc *d_interp;
00084
00085 gr_complex d_dl[2 * DLLEN];
00086
00087 unsigned int d_dl_idx;
00088
00089 float phase_detector(gr_complex sample,float ref_phase);
00090 };
00091
00092 #endif