GNU Radio 3.7.3 C++ API
selective_fading_model.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2013 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * GNU Radio is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3, or (at your option)
10  * any later version.
11  *
12  * GNU Radio is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with GNU Radio; see the file COPYING. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 #ifndef INCLUDED_CHANNELS_SELECTIVE_FADING_MODEL_H
24 #define INCLUDED_CHANNELS_SELECTIVE_FADING_MODEL_H
25 
26 #include <gnuradio/channels/api.h>
27 #include <gnuradio/sync_block.h>
28 #include <gnuradio/types.h>
29 
30 namespace gr {
31  namespace channels {
32 
33  const float default_delays[] = {0.0,0.1,0.5};
34  const float default_mags[] = {1.0,0.8,0.3};
35 
36  /*!
37  * \brief fading simulator
38  * \ingroup channel_models_blk
39  *
40  * \details
41  * This block implements a basic fading model simulator that can
42  * be used to help evaluate, design, and test various signals,
43  * waveforms, and algorithms.
44  */
46  {
47  public:
48  // gr::channels::channel_model::sptr
50 
51  /*! \brief Build the channel simulator.
52  *
53  * \param N The number of sinusiods to use in simulating the channel; 8 is a good value
54  * \param fDTs normalized maximum Doppler frequency, fD * Ts
55  * \param LOS include Line-of-Site path? selects between Rayleigh (NLOS) and Rician (LOS) models
56  * \param K Rician factor (ratio of the specular power to the scattered power)
57  * \param seed a random number to seed the noise generators
58  * \param delays A vector of values the specify the time delay of each impulse
59  * \param mags A vector of values that specifies the magnitude of each impulse
60  * \param ntaps The number of filter taps.
61  */
62  static sptr make(unsigned int N,
63  float fDTs,
64  bool LOS,
65  float K,
66  int seed,
67  std::vector<float> delays,
68  std::vector<float> mags,
69  int ntaps
70  );
71 
72  virtual float fDTs() = 0;
73  virtual float K() = 0;
74  virtual float step() = 0;
75 
76  virtual void set_fDTs(float fDTs) = 0;
77  virtual void set_K(float K) = 0;
78  virtual void set_step(float step) = 0;
79 
80  };
81 
82  } /* namespace channels */
83 } /* namespace gr */
84 
85 #endif /* INCLUDED_CHANNELS_SELECTIVE_FADING_MODEL_H */
shared_ptr documentation stub
Definition: shared_ptr_docstub.h:15
fading simulator
Definition: selective_fading_model.h:45
boost::shared_ptr< selective_fading_model > sptr
Definition: selective_fading_model.h:49
synchronous 1:1 input to output with historyOverride work to provide the signal processing implementa...
Definition: sync_block.h:37
#define CHANNELS_API
Definition: gr-channels/include/gnuradio/channels/api.h:30
const float default_delays[]
Definition: selective_fading_model.h:33
const float default_mags[]
Definition: selective_fading_model.h:34