GNU Radio Manual and C++ API Reference  3.8.1.0
The Free & Open Software Radio Ecosystem
selective_fading_model2.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_MODEL2_H
24 #define INCLUDED_CHANNELS_SELECTIVE_FADING_MODEL2_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_delays2[] = { 1.0, 1.9, 2.7 };
34 const float default_mags2[] = { 1.0, 0.95, 0.8 };
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_model2::sptr
49  typedef boost::shared_ptr<selective_fading_model2> sptr;
50 
51  /*! \brief Build the channel simulator.
52  *
53  * \param N the number of sinusoids to use in simulating the channel; 8 is a good
54  * value \param fDTs normalized maximum Doppler frequency, fD * Ts \param LOS
55  * 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 that specify the time delay of each impulse
59  * \param delay_std a vector of values that specify the gaussian step size std of
60  * delays \param delay_maxdev a vector of values that specify the max deviation of
61  * each delay component \param mags a vector of values that specify the magnitude of
62  * each impulse \param mags a vector of values that specify the magnitude of each
63  * impulse \param ntaps the number of filter taps
64  */
65  static sptr make(unsigned int N,
66  float fDTs,
67  bool LOS,
68  float K,
69  int seed,
70  std::vector<float> delays,
71  std::vector<float> delay_std,
72  std::vector<float> delay_maxdev,
73  std::vector<float> mags,
74  int ntaps);
75 
76  virtual float fDTs() = 0;
77  virtual float K() = 0;
78  virtual float step() = 0;
79 
80  virtual void set_fDTs(float fDTs) = 0;
81  virtual void set_K(float K) = 0;
82  virtual void set_step(float step) = 0;
83 };
84 
85 } /* namespace channels */
86 } /* namespace gr */
87 
88 #endif /* INCLUDED_CHANNELS_SELECTIVE_FADING_MODEL2_H */
boost::shared_ptr< selective_fading_model2 > sptr
Definition: selective_fading_model2.h:49
const float default_delays2[]
Definition: selective_fading_model2.h:33
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition: basic_block.h:43
fading simulator
Definition: selective_fading_model2.h:45
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_mags2[]
Definition: selective_fading_model2.h:34