rayleighnoisetest_sim.cpp
上传用户:jtjnyq9001
上传日期:2014-11-21
资源大小:3974k
文件大小:3k
源码类别:
3G开发
开发平台:
Visual C++
- //
- // File = rayleighnoisetest_sim.cpp
- //
- #define SIM_NAME "RayleighNoiseTest "
- #define SIM_TITLE "Rayleigh Noise Testbed "
- #include "global_stuff.h"
- #include "rayleigh_theory.h"
- #include "level_gen.h"
- #include "histogram.h"
- #include "ogive.h"
- #include "siganchr.h"
- #include "rayl_gen.h"
- //#include "spec_analyzer.h"
- main()
- {
- #include "sim_preamble.cpp"
- //=========================================================================
- // Misc special processing
- RayleighPdf( 1.0,//standard deviation
- 401,// num pts
- 50, // pts per s.d.
- "rayl_pdf.txt ");
- RayleighCdf( 1.0,//standard deviation
- 400,// num pts
- 50, // pts per s.d.
- "rayl_cdf.txt ");
- //=========================================================================
- // Allocate signals
- FLOAT_SIGNAL(flat_line_sig);
- FLOAT_SIGNAL(noisy_sig);
- FLOAT_SIGNAL(power_meas_sig);
- //============================================================
- // Construct, initialize and connect models
- RayleighNoiseGenerator<float>* noise_source = new RayleighNoiseGenerator<float>(
- "noise_source ",
- CommSystem,
- noisy_sig);
- SignalAnchor* sig_anchr = new SignalAnchor( "sig_anchr ",
- CommSystem,
- noisy_sig );
- // DiscreteAutoCovar* disc_autocovar = new DiscreteAutoCovar( "disc_autocovar ",
- // CommSystem,
- // bit_seq);
- HistogramBuilder<float>* histogram = new HistogramBuilder<float>( "histogram ",
- CommSystem,
- noisy_sig);
- OgiveBuilder<float>* ogive = new OgiveBuilder<float>( "ogive ",
- CommSystem,
- noisy_sig);
- // SpectrumAnalyzer<float>* spec_analyzer =
- // new SpectrumAnalyzer<float>( "spec_analyzer ",
- // CommSystem,
- // noisy_sig );
- //=============================================================
- #include "sim_postamble.cpp"
- return 0;
- }