bartpdgm_sim.cpp
上传用户:jtjnyq9001
上传日期:2014-11-21
资源大小:3974k
文件大小:2k
- //
- // File = bartpdgm_sim.cpp
- //
- #define SIM_NAME "BartPdgm "
- #define SIM_TITLE "Bartlett Periodogram Testbed "
- #include "global_stuff.h"
- #include "siganchr.h"
- #include "ar_proc_gen.h"
- #include "bart_pdgm.h"
- #include "ar_spec.h"
- main()
- {
- #include "sim_preamble.cpp"
- //=========================================================================
- // Misc special processing
- double a_coeffs[3];
- a_coeffs[0] = 1.0;
- a_coeffs[1] = -0.65;
- a_coeffs[2] = 0.75;
- ArSpectrum *ar_spectrum = new ArSpectrum( 2,//true_ar_order,
- a_coeffs,
- 0.125,//0.0009765625, //samp interval
- 0.3, //true_ar_drv_var );
- 512,
- 0.5);
- ar_spectrum->DumpSpectrum( "ar_true_spec.txt ",
- true);
- //=========================================================================
- // Allocate signals
- FLOAT_SIGNAL(test_sig);
- //============================================================
- // Construct, initialize and connect models
-
- ArProcessGenerator<float>* ar_sig_source = new ArProcessGenerator<float>(
- "ar_sig_source ",
- CommSystem,
- test_sig);
- SignalAnchor* sig_anchr = new SignalAnchor( "sig_anchr ",
- CommSystem,
- test_sig );
- BartlettPeriodogram<float>* spec_estimator =
- new BartlettPeriodogram<float>( "spec_estimator ",
- CommSystem,
- test_sig );
- //=============================================================
- #include "sim_postamble.cpp"
- return 0;
- }