GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
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  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 
11 #ifndef INCLUDED_CHANNELS_SELECTIVE_FADING_MODEL_H
12 #define INCLUDED_CHANNELS_SELECTIVE_FADING_MODEL_H
13 
14 #include <gnuradio/channels/api.h>
15 #include <gnuradio/sync_block.h>
16 #include <gnuradio/types.h>
17 
18 namespace gr {
19 namespace channels {
20 
21 constexpr float default_delays[] = { 0.0, 0.1, 0.5 };
22 constexpr float default_mags[] = { 1.0, 0.8, 0.3 };
23 
24 /*!
25  * \brief fading simulator
26  * \ingroup channel_models_blk
27  *
28  * \details
29  * This block implements a basic fading model simulator that can
30  * be used to help evaluate, design, and test various signals,
31  * waveforms, and algorithms.
32  */
34 {
35 public:
36  // gr::channels::channel_model::sptr
37  typedef std::shared_ptr<selective_fading_model> sptr;
38 
39  /*! \brief Build the channel simulator.
40  *
41  * \param N the number of sinusoids to use in simulating the channel; 8 is a good
42  * value \param fDTs normalized maximum Doppler frequency, fD * Ts \param LOS
43  * include Line-of-Site path? selects between Rayleigh (NLOS) and Rician (LOS) models
44  * \param K Rician factor (ratio of the specular power to the scattered power)
45  * \param seed a random number to seed the noise generators
46  * \param delays a vector of values that specify the time delay of each impulse
47  * \param mags a vector of values that specify the magnitude of each impulse
48  * \param ntaps the number of filter taps
49  */
50  static sptr make(unsigned int N,
51  float fDTs,
52  bool LOS,
53  float K,
54  int seed,
55  std::vector<float> delays,
56  std::vector<float> mags,
57  int ntaps);
58 
59  virtual float fDTs() = 0;
60  virtual float K() = 0;
61  virtual float step() = 0;
62 
63  virtual void set_fDTs(float fDTs) = 0;
64  virtual void set_K(float K) = 0;
65  virtual void set_step(float step) = 0;
66 };
67 
68 } /* namespace channels */
69 } /* namespace gr */
70 
71 #endif /* INCLUDED_CHANNELS_SELECTIVE_FADING_MODEL_H */
fading simulator
Definition: selective_fading_model.h:34
virtual void set_K(float K)=0
std::shared_ptr< selective_fading_model > sptr
Definition: selective_fading_model.h:37
virtual void set_step(float step)=0
static sptr make(unsigned int N, float fDTs, bool LOS, float K, int seed, std::vector< float > delays, std::vector< float > mags, int ntaps)
Build the channel simulator.
virtual void set_fDTs(float fDTs)=0
synchronous 1:1 input to output with history
Definition: sync_block.h:26
#define CHANNELS_API
Definition: gr-channels/include/gnuradio/channels/api.h:18
constexpr float default_mags[]
Definition: selective_fading_model.h:22
constexpr float default_delays[]
Definition: selective_fading_model.h:21
GNU Radio logging wrapper.
Definition: basic_block.h:29