RTPC修改

pull/1/head
陈增辉 2024-12-23 10:49:55 +08:00
parent fcd4e5075b
commit 991342383a
1 changed files with 35 additions and 21 deletions

View File

@ -781,6 +781,17 @@ ErrorCode RTPCProcessCls::RTPCMainProcess_GPU( )
HostToDevice((void*)h_demcls, (void*)d_demcls, sizeof(long) * newblokline* tempDemCols);
HostToDevice((void*)h_amp, (void*)d_amp, sizeof(float) * newblokline* tempDemCols);
#ifdef __PRFDEBUG__
testOutAmpArr("h_dem_x.bin", h_dem_x, newblokline, tempDemCols);
testOutAmpArr("h_dem_y.bin", h_dem_y, newblokline, tempDemCols);
testOutAmpArr("h_dem_z.bin", h_dem_z, newblokline, tempDemCols);
testOutClsArr( "h_demcls.bin" , h_demcls, newblokline, tempDemCols);
#endif // __PRFDEBUG__
long pixelcount = newblokline * tempDemCols;
long echoblockline = Memory1MB * 2000 / 8 / 2 / PlusePoint;
@ -812,11 +823,7 @@ ErrorCode RTPCProcessCls::RTPCMainProcess_GPU( )
float antZaxisX = sateOirbtNodes[prfid].AntZaxisX;
float antZaxisY = sateOirbtNodes[prfid].AntZaxisY;
float antZaxisZ = sateOirbtNodes[prfid].AntZaxisZ;//18
#ifdef __PRFDEBUG__
testOutAmpArr("h_dem_x.bin", h_dem_x, newblokline, tempDemCols);
testOutAmpArr("h_dem_y.bin", h_dem_y, newblokline, tempDemCols);
testOutAmpArr("h_dem_z.bin", h_dem_z, newblokline, tempDemCols);
std::cout << "ant Position=[" << antpx << "," << antpy << "," << antpz << "]" << std::endl;
#endif // __PRFDEBUG__
@ -830,13 +837,13 @@ ErrorCode RTPCProcessCls::RTPCMainProcess_GPU( )
antdirectx, antdirecty, antdirectz,
d_dem_theta, d_dem_phi, pixelcount);// ¼ÆËã½Ç¶È
#ifdef __PRFDEBUG__
DeviceToHost(h_RstX, d_RstX, sizeof(float)* pixelcount);
DeviceToHost(h_RstY, d_RstY, sizeof(float)* pixelcount);
DeviceToHost(h_RstZ, d_RstZ, sizeof(float)* pixelcount);
//DeviceToHost(h_RstX, d_RstX, sizeof(float)* pixelcount);
//DeviceToHost(h_RstY, d_RstY, sizeof(float)* pixelcount);
//DeviceToHost(h_RstZ, d_RstZ, sizeof(float)* pixelcount);
testOutAmpArr("h_RstX.bin", h_RstX, newblokline, tempDemCols);
testOutAmpArr("h_RstY.bin", h_RstY, newblokline, tempDemCols);
testOutAmpArr("h_RstZ.bin", h_RstZ, newblokline, tempDemCols);
//testOutAmpArr("h_RstX.bin", h_RstX, newblokline, tempDemCols);
//testOutAmpArr("h_RstY.bin", h_RstY, newblokline, tempDemCols);
//testOutAmpArr("h_RstZ.bin", h_RstZ, newblokline, tempDemCols);
#endif // __PRFDEBUG__
AntPatternInterpGain(d_dem_theta, d_dem_phi, d_TransAnt, d_TantPattern, TstartTheta, TstartPhi, Tdtheta, Tdphi, Tthetanum, Tphinum, pixelcount);
AntPatternInterpGain(d_dem_theta, d_dem_phi, d_ReciveAnt, d_RantPattern, RstartTheta, RstartPhi, Rdtheta, Rdphi, Rthetanum, Rphinum, pixelcount);
@ -845,21 +852,21 @@ ErrorCode RTPCProcessCls::RTPCMainProcess_GPU( )
DeviceToHost(h_dem_phi, d_dem_phi, sizeof(float)* pixelcount);
DeviceToHost(h_localangle, d_localangle, sizeof(float)* pixelcount);
testOutAmpArr("h_localangle.bin", h_localangle, newblokline, tempDemCols);
testOutAmpArr(QString("h_localangle_%1.bin").arg(prfid), h_localangle, newblokline, tempDemCols);
DeviceToHost(h_TransAnt, d_TransAnt, sizeof(float)* pixelcount);
DeviceToHost(h_ReciveAnt, d_ReciveAnt, sizeof(float)* pixelcount);
testOutAmpArr("ant_theta.bin", h_dem_theta, newblokline, tempDemCols);
testOutAmpArr("ant_phi.bin", h_dem_phi, newblokline, tempDemCols);
testOutAmpArr("antPattern_Trans.bin", h_TransAnt, newblokline, tempDemCols);
testOutAmpArr("antPattern_Receive.bin", h_ReciveAnt, newblokline, tempDemCols);
testOutAmpArr(QString("ant_theta_%1.bin").arg(prfid), h_dem_theta, newblokline, tempDemCols);
testOutAmpArr(QString("ant_phi_%1.bin").arg(prfid), h_dem_phi, newblokline, tempDemCols);
testOutAmpArr(QString("antPattern_Trans_%1.bin").arg(prfid), h_TransAnt, newblokline, tempDemCols);
testOutAmpArr(QString("antPattern_Receive_%1.bin").arg(prfid), h_ReciveAnt, newblokline, tempDemCols);
#endif // __PRFDEBUG__
CUDAInterpSigma(d_demcls, d_amp, d_localangle, pixelcount, d_clsSigmaParam, clamapid);
#ifdef __PRFDEBUG__
DeviceToHost(h_amp, d_amp, sizeof(float)* pixelcount);
testOutAmpArr("amp.bin", h_amp,newblokline, tempDemCols);
testOutClsArr("h_demcls.bin", h_demcls,newblokline, tempDemCols);
testOutAmpArr(QString("amp_%1.bin").arg(prfid), h_amp,newblokline, tempDemCols);
#endif // __PRFDEBUG__
@ -877,14 +884,13 @@ ErrorCode RTPCProcessCls::RTPCMainProcess_GPU( )
h_echoAmp_real[freqi] = h_echoAmp[freqi].x;
h_echoAmp_imag[freqi] = h_echoAmp[freqi].y;
}
testOutAmpArr("h_echoAmp_real.bin", h_echoAmp_real, newblokline, tempDemCols);
testOutAmpArr("h_echoAmp_imag.bin", h_echoAmp_imag, newblokline, tempDemCols);
testOutClsArr("h_FreqID.bin", h_FreqID, newblokline, tempDemCols);
testOutAmpArr(QString("h_echoAmp_real_%1.bin").arg(prfid), h_echoAmp_real, newblokline, tempDemCols);
testOutAmpArr(QString("h_echoAmp_imag_%1.bin").arg(prfid), h_echoAmp_imag, newblokline, tempDemCols);
testOutClsArr(QString("h_FreqID_%1.bin").arg(prfid), h_FreqID, newblokline, tempDemCols);
FreeCUDAHost(h_echoAmp_real);
FreeCUDAHost(h_echoAmp_imag);
exit(0);
#endif // __PRFDEBUG__
for (long freqi = 0; freqi < pixelcount; freqi++) {
long pluseid = h_FreqID[freqi];
@ -893,6 +899,14 @@ ErrorCode RTPCProcessCls::RTPCMainProcess_GPU( )
if (prfid % 1000 == 0) {
std::cout << "[" << QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss.zzz").toStdString() << "] dem:\t" << startline << "\t-\t" << startline + newblokline << "\t:\t pluse :\t" << prfid << " / " << pluseCount << std::endl;
}
#ifdef __PRFDEBUG__
//this->EchoSimulationData->saveEchoArr(echotemp, startprfid, templine);
//exit(0);
#endif // __PRFDEBUG__
}
}