Revision c7dbfcc7 gnuradio-core/src/lib/general/gr_ofdm_correlator.h

b/gnuradio-core/src/lib/general/gr_ofdm_correlator.h
1 1
/* -*- c++ -*- */
2 2
/*
3
 * Copyright 2006 Free Software Foundation, Inc.
3
 * Copyright 2006, 2007 Free Software Foundation, Inc.
4 4
 * 
5 5
 * This file is part of GNU Radio
6 6
 * 
......
31 31
typedef boost::shared_ptr<gr_ofdm_correlator> gr_ofdm_correlator_sptr;
32 32

33 33
gr_ofdm_correlator_sptr 
34
gr_make_ofdm_correlator (unsigned int occupied_carriers, unsigned int vlen,
34
gr_make_ofdm_correlator (unsigned int occupied_carriers, unsigned int fft_length,
35 35
			 unsigned int cplen,
36
			 std::vector<gr_complex> known_symbol1, 
37
			 std::vector<gr_complex> known_symbol2);
36
			 const std::vector<gr_complex> &known_symbol1, 
37
			 const std::vector<gr_complex> &known_symbol2);
38 38

39 39
/*!
40 40
 * \brief take a vector of complex constellation points in from an FFT
......
48 48
 * been corrected and that the samples fall in the middle of one FFT bin.
49 49
 *
50 50
 * It then uses one of those known
51
 * symbosl to estimate the channel response overa all subcarriers and does a simple 
51
 * symbols to estimate the channel response over all subcarriers and does a simple 
52 52
 * 1-tap equalization on all subcarriers. This corrects for the phase and amplitude
53 53
 * distortion caused by the channel.
54 54
 */
......
58 58
  /*! 
59 59
   * \brief Build an OFDM correlator and equalizer.
60 60
   * \param occupied_carriers   The number of subcarriers with data in the received symbol
61
   * \param vlen                The size of the FFT vector (occupied_carriers + unused carriers)
61
   * \param fft_length          The size of the FFT vector (occupied_carriers + unused carriers)
62 62
   * \param known_symbol1       A vector of complex numbers representing a known symbol at the
63 63
   *                            start of a frame (usually a BPSK PN sequence)
64 64
   * \param known_symbol2       A vector of complex numbers representing a known symbol at the
......
67 67
   *                            for phase changes between symbols. 
68 68
   */
69 69
  friend gr_ofdm_correlator_sptr
70
  gr_make_ofdm_correlator (unsigned int occupied_carriers, unsigned int vlen,
70
  gr_make_ofdm_correlator (unsigned int occupied_carriers, unsigned int fft_length,
71 71
			   unsigned int cplen,
72
			   std::vector<gr_complex> known_symbol1, 
73
			   std::vector<gr_complex> known_symbol2);
72
			   const std::vector<gr_complex> &known_symbol1, 
73
			   const std::vector<gr_complex> &known_symbol2);
74 74
  
75 75
 protected:
76
  gr_ofdm_correlator (unsigned int occupied_carriers, unsigned int vlen,
76
  gr_ofdm_correlator (unsigned int occupied_carriers, unsigned int fft_length,
77 77
		      unsigned int cplen,
78
		      std::vector<gr_complex> known_symbol1, 
79
		      std::vector<gr_complex> known_symbol2);
78
		      const std::vector<gr_complex> &known_symbol1, 
79
		      const std::vector<gr_complex> &known_symbol2);
80 80
  
81 81
 private:
82 82
  unsigned char slicer(gr_complex x);
......
86 86
  gr_complex coarse_freq_comp(int freq_delta, int count);
87 87
  
88 88
  unsigned int d_occupied_carriers;  // !< \brief number of subcarriers with data
89
  unsigned int d_vlen;               // !< \brief length of FFT vector
89
  unsigned int d_fft_length;         // !< \brief length of FFT vector
90 90
  unsigned int d_cplen;              // !< \brief length of cyclic prefix in samples
91 91
  unsigned int d_freq_shift_len;     // !< \brief number of surrounding bins to look at for correlation
92 92
  std::vector<gr_complex> d_known_symbol1, d_known_symbol2; // !< \brief known symbols at start of frame
93 93
  std::vector<gr_complex> d_diff_corr_factor; // !< \brief factor used in correlation
94
  std::vector<gr_complex> d_hestimate; // !< channel estimate
95
  signed int d_coarse_freq; // !< \brief search distance in number of bins
96
  unsigned int d_phase_count;        // !< \brief accumulator for coarse freq correction
97
  float d_snr_est;  // !< an estimation of the signal to noise ratio
94
  std::vector<gr_complex> d_hestimate;  // !< channel estimate
95
  signed int d_coarse_freq;             // !< \brief search distance in number of bins
96
  unsigned int d_phase_count;           // !< \brief accumulator for coarse freq correction
97
  float d_snr_est;                      // !< an estimation of the signal to noise ratio
98 98

99 99
  void forecast(int noutput_items, gr_vector_int &ninput_items_required);
100 100

Also available in: Unified diff