rayleighnoisetest_sim.cpp
上传用户:jtjnyq9001
上传日期:2014-11-21
资源大小:3974k
文件大小:3k
源码类别:

3G开发

开发平台:

Visual C++

  1. //
  2. //  File = rayleighnoisetest_sim.cpp
  3. //
  4. #define SIM_NAME "RayleighNoiseTest"
  5. #define SIM_TITLE "Rayleigh Noise Testbed"
  6. #include "global_stuff.h" 
  7. #include "rayleigh_theory.h"
  8. #include "level_gen.h"
  9. #include "histogram.h"
  10. #include "ogive.h"
  11. #include "siganchr.h"
  12. #include "rayl_gen.h"
  13. //#include "spec_analyzer.h"
  14. main()
  15. {
  16. #include "sim_preamble.cpp"
  17.   //=========================================================================
  18.   //  Misc special processing
  19.    RayleighPdf(   1.0,//standard deviation
  20.                401,// num pts
  21.                50, // pts per s.d.
  22.                "rayl_pdf.txt");
  23.    RayleighCdf(   1.0,//standard deviation
  24.                400,// num pts
  25.                50, // pts per s.d.
  26.                "rayl_cdf.txt");
  27.   //=========================================================================
  28.   //  Allocate signals
  29.   FLOAT_SIGNAL(flat_line_sig);
  30.   FLOAT_SIGNAL(noisy_sig);
  31.   FLOAT_SIGNAL(power_meas_sig);
  32.   //============================================================
  33.   //  Construct, initialize and connect models
  34.   
  35.    RayleighNoiseGenerator<float>* noise_source = new RayleighNoiseGenerator<float>( 
  36.                                                          "noise_source",
  37.                                                          CommSystem,
  38.                                                          noisy_sig);
  39.    SignalAnchor* sig_anchr = new SignalAnchor(  "sig_anchr",
  40.                                                 CommSystem,
  41.                                                 noisy_sig );
  42. //   DiscreteAutoCovar* disc_autocovar = new DiscreteAutoCovar( "disc_autocovar",
  43. //                                CommSystem,
  44. //                                bit_seq);
  45.    HistogramBuilder<float>* histogram = new HistogramBuilder<float>(   "histogram",
  46.                                                          CommSystem,
  47.                                                          noisy_sig);
  48.    OgiveBuilder<float>* ogive = new OgiveBuilder<float>(   "ogive",
  49.                                                          CommSystem,
  50.                                                          noisy_sig);
  51. //   SpectrumAnalyzer<float>* spec_analyzer = 
  52. //                  new SpectrumAnalyzer<float>(  "spec_analyzer",
  53. //                                                CommSystem,
  54. //                                                noisy_sig );
  55.   //=============================================================
  56.   #include "sim_postamble.cpp"
  57.   return 0;
  58. }