GNU Radio 3.7.1 C++ API
|
00001 /* -*- c++ -*- */ 00002 /* 00003 * Copyright 2013 Free Software Foundation, Inc. 00004 * 00005 * This file is part of GNU Radio 00006 * 00007 * GNU Radio is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 3, or (at your option) 00010 * any later version. 00011 * 00012 * GNU Radio is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with GNU Radio; see the file COPYING. If not, write to 00019 * the Free Software Foundation, Inc., 51 Franklin Street, 00020 * Boston, MA 02110-1301, USA. 00021 */ 00022 00023 #ifndef INCLUDED_CHANNELS_SELECTIVE_FADING_MODEL_H 00024 #define INCLUDED_CHANNELS_SELECTIVE_FADING_MODEL_H 00025 00026 #include <gnuradio/channels/api.h> 00027 #include <gnuradio/sync_block.h> 00028 #include <gnuradio/types.h> 00029 00030 namespace gr { 00031 namespace channels { 00032 00033 const float default_delays[] = {0.0,0.1,0.5}; 00034 const float default_mags[] = {1.0,0.8,0.3}; 00035 00036 /*! 00037 * \brief fading simulator 00038 * \ingroup channel_models_blk 00039 * 00040 * \details 00041 * This block implements a basic fading model simulator that can 00042 * be used to help evaluate, design, and test various signals, 00043 * waveforms, and algorithms. 00044 */ 00045 class CHANNELS_API selective_fading_model : virtual public sync_block 00046 { 00047 public: 00048 // gr::channels::channel_model::sptr 00049 typedef boost::shared_ptr<selective_fading_model> sptr; 00050 00051 /*! \brief Build the channel simulator. 00052 * 00053 * \param N The number of sinusiods to use in simulating the channel; 8 is a good value 00054 * \param fDTs normalized maximum Doppler frequency, fD * Ts 00055 * \param LOS include Line-of-Site path? selects between Rayleigh (NLOS) and Rician (LOS) models 00056 * \param K Rician factor (ratio of the specular power to the scattered power) 00057 * \param seed a random number to seed the noise generators 00058 * \param delays A vector of values the specify the time delay of each impulse 00059 * \param mags A vector of values that specifies the magnitude of each impulse 00060 * \param ntaps The number of filter taps. 00061 */ 00062 static sptr make(unsigned int N, 00063 float fDTs, 00064 bool LOS, 00065 float K, 00066 int seed, 00067 std::vector<float> delays, 00068 std::vector<float> mags, 00069 int ntaps 00070 ); 00071 00072 virtual float fDTs() = 0; 00073 virtual float K() = 0; 00074 virtual float step() = 0; 00075 00076 virtual void set_fDTs(float fDTs) = 0; 00077 virtual void set_K(float K) = 0; 00078 virtual void set_step(float step) = 0; 00079 00080 }; 00081 00082 } /* namespace channels */ 00083 } /* namespace gr */ 00084 00085 #endif /* INCLUDED_CHANNELS_SELECTIVE_FADING_MODEL_H */