123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- #include "radarsiggen.h"
- RadarSigGen::RadarSigGen(QObject *parent) : QObject(parent)
- {
- SigMutex = new QMutex();
- sig = new double();
- fs = new double();
- PRF = new double();
- len = new double();
- coderSig = new coder::array<double,1U>();
- }
- void RadarSigGen::SlotRadarGen(int order)
- {
- qDebug() << QString::fromLocal8Bit("生成信号")<<order;
- sig = new double();
- len = new double();
- SigMutex->lock();
- if (nullptr != sig)
- {
- delete sig;
- }
- switch (order) {
- case 1:
- sig = new double[400000];
- RadarSignalGenerator001(sig,fs,PRF);
- break;
- case 2:
- coderSig = new coder::array<double,1U>[400000];
- sig = new double[400000];
- RadarSignalGenerator101(coderSig[0],fs,PRF,len);
- sig = coderSig->data();
- break;
- case 3:
- sig = new double[400000];
- coderSig = new coder::array<double,1U>[400000];
- RadarSignalGenerator102(coderSig[0],fs,PRF,len);
- sig = coderSig->data();
- break;
- case 4:
- sig = new double[400000];
- coderSig = new coder::array<double,1U>[400000];
- RadarSignalGenerator103(coderSig[0],fs,PRF,len);
- sig = coderSig->data();
- break;
- case 5:
- sig = new double[400000];
- coderSig = new coder::array<double,1U>[400000];
- RadarSignalGenerator201(coderSig[0],fs,PRF,len);
- sig = coderSig->data();
- break;
- case 6:
- sig = new double[400000];
- coderSig = new coder::array<double,1U>[400000];
- RadarSignalGenerator202(coderSig[0],fs,PRF,len);
- sig = coderSig->data();
- break;
- case 7:
- sig = new double[400000];
- coderSig = new coder::array<double,1U>[400000];
- RadarSignalGenerator203(coderSig[0],fs,PRF,len);
- sig = coderSig->data();
- break;
- case 8:
- sig = new double[400000];
- coderSig = new coder::array<double,1U>[400000];
- RadarSignalGenerator301(coderSig[0],fs,PRF,len);
- sig = coderSig->data();
- break;
- case 9:
- sig = new double[400000];
- coderSig = new coder::array<double,1U>[400000];
- RadarSignalGenerator302(coderSig[0],fs,PRF,len);
- sig = coderSig->data();
- break;
- case 10:
- sig = new double[400000];
- coderSig = new coder::array<double,1U>[400000];
- RadarSignalGenerator303(coderSig[0],fs,PRF,len);
- sig = coderSig->data();
- break;
- case 11:
- sig = new double[400000];
- coderSig = new coder::array<double,1U>[400000];
- RadarSignalGenerator401(coderSig[0],fs,PRF,len);
- sig = coderSig->data();
- break;
- case 12:
- sig = new double[400000];
- coderSig = new coder::array<double,1U>[400000];
- RadarSignalGenerator402(coderSig[0],fs,PRF,len);
- sig = coderSig->data();
- break;
- case 13:
- sig = new double[400000];
- coderSig = new coder::array<double,1U>[400000];
- RadarSignalGenerator403(coderSig[0],fs,PRF,len);
- sig = coderSig->data();
- break;
- default:
- sig = new double[20];
- break;
- }
- // for (int i = 10000;i < 10050;i++)
- // {
- // std::cout << sig[i] << std::endl;
- // }
- SigMutex->unlock();
- }
|