采用原子函数
parent
822c839a40
commit
c0b3f97982
|
@ -14,8 +14,8 @@
|
|||
|
||||
#define __CUDANVCC___ // 定义CUDA函数
|
||||
|
||||
#define __PRFDEBUG__
|
||||
#define __PRFDEBUG_PRFINF__
|
||||
//#define __PRFDEBUG__
|
||||
//#define __PRFDEBUG_PRFINF__
|
||||
//#define __ECHOTIMEDEBUG__
|
||||
|
||||
#define __TBPIMAGEDEBUG__
|
||||
|
|
|
@ -348,6 +348,16 @@ SatelliteAntPos EchoL0Dataset::getSatelliteAntPos(long prf_id)
|
|||
return prfpos;
|
||||
}
|
||||
|
||||
void EchoL0Dataset::setRefPhaseRange(double refRange)
|
||||
{
|
||||
this->refPhaseRange = refRange;
|
||||
}
|
||||
|
||||
double EchoL0Dataset::setRefPhaseRange()
|
||||
{
|
||||
return this->refPhaseRange;
|
||||
}
|
||||
|
||||
// ´òÓ¡ÐÅÏ¢µÄʵÏÖ
|
||||
void EchoL0Dataset::printInfo() {
|
||||
std::cout << "Simulation Task Name: " << this->simulationTaskName.toStdString() << std::endl;
|
||||
|
@ -390,6 +400,7 @@ void EchoL0Dataset::saveToXml() {
|
|||
xmlWriter.writeTextElement("Xmlname", this->xmlname);
|
||||
xmlWriter.writeTextElement("GPSPointFilename", this->GPSPointFilename);
|
||||
xmlWriter.writeTextElement("EchoDataFilename", this->echoDataFilename);
|
||||
xmlWriter.writeTextElement("refPhaseRange", QString::number(this->refPhaseRange));
|
||||
|
||||
xmlWriter.writeEndElement(); // SimulationConfig
|
||||
xmlWriter.writeEndDocument();
|
||||
|
@ -448,6 +459,10 @@ ErrorCode EchoL0Dataset::loadFromXml() {
|
|||
this->Fs = xmlReader.readElementText().toDouble();
|
||||
Fsflag = true;
|
||||
}
|
||||
else if (elementName == "refPhaseRange") {
|
||||
this->refPhaseRange = xmlReader.readElementText().toDouble();
|
||||
Fsflag = true;
|
||||
}
|
||||
else if (elementName == "SimulationTaskName") {
|
||||
this->simulationTaskName = xmlReader.readElementText();
|
||||
}
|
||||
|
|
|
@ -157,6 +157,9 @@ public: //
|
|||
void setBandwidth(double Inbandwidth);
|
||||
|
||||
SatelliteAntPos getSatelliteAntPos(long plusePRFID);
|
||||
|
||||
void setRefPhaseRange(double refRange);
|
||||
double setRefPhaseRange();
|
||||
// 打印信息的成员函数
|
||||
void printInfo() ;
|
||||
|
||||
|
@ -171,7 +174,7 @@ private: //
|
|||
|
||||
double CenterAngle;
|
||||
QString LookSide;
|
||||
|
||||
double refPhaseRange;
|
||||
double bandwidth;
|
||||
|
||||
public: // 读写 XML 的函数
|
||||
|
|
|
@ -0,0 +1,568 @@
|
|||
|
||||
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <cmath>
|
||||
#include <complex>
|
||||
#include <device_launch_parameters.h>
|
||||
#include <cuda_runtime.h>
|
||||
#include <cublas_v2.h>
|
||||
#include <cuComplex.h>
|
||||
|
||||
#include "BaseConstVariable.h"
|
||||
#include "GPURTPC.cuh"
|
||||
|
||||
#ifdef __CUDANVCC___
|
||||
|
||||
|
||||
__device__ float GPU_getSigma0dB(CUDASigmaParam param, float theta) {//线性值
|
||||
float sigma= param.p1 + param.p2 * exp(-param.p3 * theta) + param.p4 * cos(param.p5 * theta + param.p6);
|
||||
return sigma;
|
||||
}
|
||||
|
||||
|
||||
__device__ CUDAVectorEllipsoidal GPU_SatelliteAntDirectNormal(float RstX, float RstY, float RstZ,
|
||||
float antXaxisX, float antXaxisY, float antXaxisZ,
|
||||
float antYaxisX, float antYaxisY, float antYaxisZ,
|
||||
float antZaxisX, float antZaxisY, float antZaxisZ,
|
||||
float antDirectX, float antDirectY, float antDirectZ
|
||||
) {
|
||||
CUDAVectorEllipsoidal result{ 0,0,-1 };
|
||||
float Xst = -1 * RstX; // 卫星 --> 地面
|
||||
float Yst = -1 * RstY;
|
||||
float Zst = -1 * RstZ;
|
||||
float AntXaxisX = antXaxisX;
|
||||
float AntXaxisY = antXaxisY;
|
||||
float AntXaxisZ = antXaxisZ;
|
||||
float AntYaxisX = antYaxisX;
|
||||
float AntYaxisY = antYaxisY;
|
||||
float AntYaxisZ = antYaxisZ;
|
||||
float AntZaxisX = antZaxisX;
|
||||
float AntZaxisY = antZaxisY;
|
||||
float AntZaxisZ = antZaxisZ;
|
||||
// 天线指向在天线坐标系下的值
|
||||
float Xant = (Xst * (AntYaxisY * AntZaxisZ - AntYaxisZ * AntZaxisY) + Xst * (AntXaxisZ * AntZaxisY - AntXaxisY * AntZaxisZ) + Xst * (AntXaxisY * AntYaxisZ - AntXaxisZ * AntYaxisY)) / (AntXaxisX * (AntYaxisY * AntZaxisZ - AntZaxisY * AntYaxisZ) - AntYaxisX * (AntXaxisY * AntZaxisZ - AntXaxisZ * AntZaxisY) + AntZaxisX * (AntXaxisY * AntYaxisZ - AntXaxisZ * AntYaxisY));
|
||||
float Yant = (Yst * (AntYaxisZ * AntZaxisX - AntYaxisX * AntZaxisZ) + Yst * (AntXaxisX * AntZaxisZ - AntXaxisZ * AntZaxisX) + Yst * (AntYaxisX * AntXaxisZ - AntXaxisX * AntYaxisZ)) / (AntXaxisX * (AntYaxisY * AntZaxisZ - AntZaxisY * AntYaxisZ) - AntYaxisX * (AntXaxisY * AntZaxisZ - AntXaxisZ * AntZaxisY) + AntZaxisX * (AntXaxisY * AntYaxisZ - AntXaxisZ * AntYaxisY));
|
||||
float Zant = (Zst * (AntYaxisX * AntZaxisY - AntYaxisY * AntZaxisX) + Zst * (AntXaxisY * AntZaxisX - AntXaxisX * AntZaxisY) + Zst * (AntXaxisX * AntYaxisY - AntYaxisX * AntXaxisY)) / (AntXaxisX * (AntYaxisY * AntZaxisZ - AntZaxisY * AntYaxisZ) - AntYaxisX * (AntXaxisY * AntZaxisZ - AntXaxisZ * AntZaxisY) + AntZaxisX * (AntXaxisY * AntYaxisZ - AntXaxisZ * AntYaxisY));
|
||||
// 计算theta 与 phi
|
||||
float Norm = sqrtf(Xant * Xant + Yant * Yant + Zant * Zant); // 计算 pho
|
||||
float ThetaAnt = acosf(Zant / Norm); // theta 与 Z轴的夹角
|
||||
float YsinTheta = Yant / sinf(ThetaAnt);
|
||||
float PhiAnt = (YsinTheta / abs(YsinTheta)) * acosf(Xant / (Norm * sinf(ThetaAnt)));
|
||||
result.theta = ThetaAnt;
|
||||
result.phi = PhiAnt;
|
||||
result.pho = Norm;
|
||||
return result;
|
||||
}
|
||||
|
||||
__device__ float GPU_BillerInterpAntPattern(float* antpattern,
|
||||
float starttheta, float startphi, float dtheta, float dphi,
|
||||
long thetapoints, long phipoints,
|
||||
float searththeta, float searchphi) {
|
||||
float stheta = searththeta;
|
||||
float sphi = searchphi;
|
||||
if (stheta > 90) {
|
||||
return 0;
|
||||
}
|
||||
else {}
|
||||
|
||||
|
||||
float pthetaid = (stheta - starttheta) / dtheta;//
|
||||
float pphiid = (sphi - startphi) / dphi;
|
||||
|
||||
long lasttheta = floorf(pthetaid);
|
||||
long nextTheta = lasttheta + 1;
|
||||
long lastphi = floorf(pphiid);
|
||||
long nextPhi = lastphi + 1;
|
||||
|
||||
|
||||
if (lasttheta < 0 || nextTheta < 0 || lastphi < 0 || nextPhi < 0 ||
|
||||
lasttheta >= thetapoints || nextTheta >= thetapoints || lastphi >= phipoints || nextPhi >= phipoints)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
float x = stheta;
|
||||
float y = sphi;
|
||||
|
||||
float x1 = lasttheta * dtheta + starttheta;
|
||||
float x2 = nextTheta * dtheta + starttheta;
|
||||
float y1 = lastphi * dphi + startphi;
|
||||
float y2 = nextPhi * dphi + startphi;
|
||||
|
||||
float z11 = antpattern[lasttheta * phipoints + lastphi];
|
||||
float z12 = antpattern[lasttheta * phipoints + nextPhi];
|
||||
float z21 = antpattern[nextTheta * phipoints + lastphi];
|
||||
float z22 = antpattern[nextTheta * phipoints + nextPhi];
|
||||
|
||||
|
||||
//z11 = powf(10, z11 / 10); // dB-> 线性
|
||||
//z12 = powf(10, z12 / 10);
|
||||
//z21 = powf(10, z21 / 10);
|
||||
//z22 = powf(10, z22 / 10);
|
||||
|
||||
float GainValue = (z11 * (x2 - x) * (y2 - y)
|
||||
+ z21 * (x - x1) * (y2 - y)
|
||||
+ z12 * (x2 - x) * (y - y1)
|
||||
+ z22 * (x - x1) * (y - y1));
|
||||
GainValue = GainValue / ((x2 - x1) * (y2 - y1));
|
||||
return GainValue;
|
||||
}
|
||||
}
|
||||
|
||||
__device__ cuComplex GPU_calculationEcho(float sigma0, float TransAnt, float ReciveAnt,
|
||||
float localangle, float R, float slopeangle, float Pt, float lamda) {
|
||||
float amp = Pt * TransAnt * ReciveAnt;
|
||||
amp = amp * sigma0;
|
||||
amp = amp / (powf(4 * LAMP_CUDA_PI, 2) * powf(R, 4)); // 反射强度
|
||||
float phi = (-4 * LAMP_CUDA_PI / lamda) * R;
|
||||
cuComplex echophi = make_cuComplex(0, phi);
|
||||
cuComplex echophiexp = cuCexpf(echophi);
|
||||
cuComplex echo=make_cuComplex(echophiexp.x * amp, echophiexp.y * amp);
|
||||
return echo;
|
||||
}
|
||||
|
||||
|
||||
__global__ void CUDA_SatelliteAntDirectNormal(float* RstX, float* RstY, float* RstZ,
|
||||
float antXaxisX, float antXaxisY, float antXaxisZ,
|
||||
float antYaxisX, float antYaxisY, float antYaxisZ,
|
||||
float antZaxisX, float antZaxisY, float antZaxisZ,
|
||||
float antDirectX, float antDirectY, float antDirectZ,
|
||||
float* thetaAnt, float* phiAnt
|
||||
, long len) {
|
||||
long idx = blockIdx.x * blockDim.x + threadIdx.x;
|
||||
if (idx < len) {
|
||||
float Xst = -1 * RstX[idx]; // 卫星 --> 地面
|
||||
float Yst = -1 * RstY[idx];
|
||||
float Zst = -1 * RstZ[idx];
|
||||
float AntXaxisX = antXaxisX;
|
||||
float AntXaxisY = antXaxisY;
|
||||
float AntXaxisZ = antXaxisZ;
|
||||
float AntYaxisX = antYaxisX;
|
||||
float AntYaxisY = antYaxisY;
|
||||
float AntYaxisZ = antYaxisZ;
|
||||
float AntZaxisX = antZaxisX;
|
||||
float AntZaxisY = antZaxisY;
|
||||
float AntZaxisZ = antZaxisZ;
|
||||
|
||||
// 归一化
|
||||
float RstNorm = sqrtf(Xst * Xst + Yst * Yst + Zst * Zst);
|
||||
float AntXaxisNorm = sqrtf(AntXaxisX * AntXaxisX + AntXaxisY * AntXaxisY + AntXaxisZ * AntXaxisZ);
|
||||
float AntYaxisNorm = sqrtf(AntYaxisX * AntYaxisX + AntYaxisY * AntYaxisY + AntYaxisZ * AntYaxisZ);
|
||||
float AntZaxisNorm = sqrtf(AntZaxisX * AntZaxisX + AntZaxisY * AntZaxisY + AntZaxisZ * AntZaxisZ);
|
||||
|
||||
|
||||
float Rx = Xst / RstNorm;
|
||||
float Ry = Yst / RstNorm;
|
||||
float Rz = Zst / RstNorm;
|
||||
float Xx = AntXaxisX / AntXaxisNorm;
|
||||
float Xy = AntXaxisY / AntXaxisNorm;
|
||||
float Xz = AntXaxisZ / AntXaxisNorm;
|
||||
float Yx = AntYaxisX / AntYaxisNorm;
|
||||
float Yy = AntYaxisY / AntYaxisNorm;
|
||||
float Yz = AntYaxisZ / AntYaxisNorm;
|
||||
float Zx = AntZaxisX / AntZaxisNorm;
|
||||
float Zy = AntZaxisY / AntZaxisNorm;
|
||||
float Zz = AntZaxisZ / AntZaxisNorm;
|
||||
|
||||
float Xant = (Rx * Yy * Zz - Rx * Yz * Zy - Ry * Yx * Zz + Ry * Yz * Zx + Rz * Yx * Zy - Rz * Yy * Zx) / (Xx * Yy * Zz - Xx * Yz * Zy - Xy * Yx * Zz + Xy * Yz * Zx + Xz * Yx * Zy - Xz * Yy * Zx);
|
||||
float Yant = -(Rx * Xy * Zz - Rx * Xz * Zy - Ry * Xx * Zz + Ry * Xz * Zx + Rz * Xx * Zy - Rz * Xy * Zx) / (Xx * Yy * Zz - Xx * Yz * Zy - Xy * Yx * Zz + Xy * Yz * Zx + Xz * Yx * Zy - Xz * Yy * Zx);
|
||||
float Zant = (Rx * Xy * Yz - Rx * Xz * Yy - Ry * Xx * Yz + Ry * Xz * Yx + Rz * Xx * Yy - Rz * Xy * Yx) / (Xx * Yy * Zz - Xx * Yz * Zy - Xy * Yx * Zz + Xy * Yz * Zx + Xz * Yx * Zy - Xz * Yy * Zx);
|
||||
|
||||
|
||||
// 计算theta 与 phi
|
||||
float Norm = sqrtf(Xant * Xant + Yant * Yant + Zant * Zant); // 计算 pho
|
||||
float ThetaAnt = acosf(Zant / Norm); // theta 与 Z轴的夹角
|
||||
float PhiAnt = atanf(Yant / Xant); // -pi/2 ~pi/2
|
||||
|
||||
|
||||
if (abs(Yant) < PRECISIONTOLERANCE) { // X轴上
|
||||
PhiAnt = 0;
|
||||
}
|
||||
else if (abs(Xant) < PRECISIONTOLERANCE) { // Y轴上,原点
|
||||
if (Yant > 0) {
|
||||
PhiAnt = PI / 2;
|
||||
}
|
||||
else {
|
||||
PhiAnt = -PI / 2;
|
||||
}
|
||||
}
|
||||
else if (Xant < 0) {
|
||||
if (Yant > 0) {
|
||||
PhiAnt = PI + PhiAnt;
|
||||
}
|
||||
else {
|
||||
PhiAnt = -PI+PhiAnt ;
|
||||
}
|
||||
}
|
||||
else { // Xant>0 X 正轴
|
||||
|
||||
}
|
||||
|
||||
if (isnan(PhiAnt)) {
|
||||
printf("V=[%f,%f,%f];norm=%f;thetaAnt=%f;phiAnt=%f;\n", Xant, Yant, Zant,Norm, ThetaAnt, PhiAnt);
|
||||
}
|
||||
|
||||
//if (abs(ThetaAnt - 0) < PRECISIONTOLERANCE) {
|
||||
// PhiAnt = 0;
|
||||
//}
|
||||
//else {}
|
||||
|
||||
|
||||
thetaAnt[idx] = ThetaAnt*r2d;
|
||||
phiAnt[idx] = PhiAnt*r2d;
|
||||
//printf("Rst=[%f,%f,%f];AntXaxis = [%f, %f, %f];AntYaxis=[%f,%f,%f];AntZaxis=[%f,%f,%f];phiAnt=%f;thetaAnt=%f;\n", Xst, Yst, Zst
|
||||
// , AntXaxisX, AntXaxisY, AntXaxisZ
|
||||
// , AntYaxisX, AntYaxisY, AntYaxisZ
|
||||
// , AntZaxisX, AntZaxisY, AntZaxisZ
|
||||
// , phiAnt[idx]
|
||||
// , thetaAnt[idx]
|
||||
//);
|
||||
}
|
||||
}
|
||||
|
||||
__global__ void CUDA_BillerInterpAntPattern(float* antpattern,
|
||||
float starttheta, float startphi, float dtheta, float dphi,
|
||||
long thetapoints, long phipoints,
|
||||
float* searththeta, float* searchphi, float* searchantpattern,
|
||||
long len) {
|
||||
long idx = blockIdx.x * blockDim.x + threadIdx.x;
|
||||
if (idx < len) {
|
||||
float stheta = searththeta[idx];
|
||||
float sphi = searchphi[idx];
|
||||
float pthetaid = (stheta - starttheta) / dtheta;//
|
||||
float pphiid = (sphi - startphi) / dphi;
|
||||
|
||||
long lasttheta = floorf(pthetaid);
|
||||
long nextTheta = lasttheta + 1;
|
||||
long lastphi = floorf(pphiid);
|
||||
long nextPhi = lastphi + 1;
|
||||
|
||||
if (lasttheta < 0 || nextTheta < 0 || lastphi < 0 || nextPhi < 0 ||
|
||||
lasttheta >= thetapoints || nextTheta >= thetapoints || lastphi >= phipoints || nextPhi >= phipoints)
|
||||
{
|
||||
searchantpattern[idx] = 0;
|
||||
}
|
||||
else {
|
||||
float x = stheta;
|
||||
float y = sphi;
|
||||
|
||||
float x1 = lasttheta * dtheta + starttheta;
|
||||
float x2 = nextTheta * dtheta + starttheta;
|
||||
float y1 = lastphi * dphi + startphi;
|
||||
float y2 = nextPhi * dphi + startphi;
|
||||
|
||||
float z11 = antpattern[lasttheta * phipoints + lastphi];
|
||||
float z12 = antpattern[lasttheta * phipoints + nextPhi];
|
||||
float z21 = antpattern[nextTheta * phipoints + lastphi];
|
||||
float z22 = antpattern[nextTheta * phipoints + nextPhi];
|
||||
|
||||
|
||||
z11 = powf(10, z11 / 10);
|
||||
z12 = powf(10, z12 / 10);
|
||||
z21 = powf(10, z21 / 10);
|
||||
z22 = powf(10, z22 / 10);
|
||||
|
||||
float GainValue = (z11 * (x2 - x) * (y2 - y)
|
||||
+ z21 * (x - x1) * (y2 - y)
|
||||
+ z12 * (x2 - x) * (y - y1)
|
||||
+ z22 * (x - x1) * (y - y1));
|
||||
GainValue = GainValue / ((x2 - x1) * (y2 - y1));
|
||||
searchantpattern[idx] = GainValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
__global__ void CUDA_calculationEcho(float* sigma0, float* TransAnt, float* ReciveAnt,
|
||||
float* localangle, float* R, float* slopeangle,
|
||||
float nearRange, float Fs, float Pt, float lamda, long FreqIDmax,
|
||||
cuComplex* echoArr, long* FreqID,
|
||||
long len) {
|
||||
long idx = blockIdx.x * blockDim.x + threadIdx.x;
|
||||
if (idx < len) {
|
||||
float r = R[idx];
|
||||
float amp = Pt * TransAnt[idx] * ReciveAnt[idx];
|
||||
amp = amp * sigma0[idx];
|
||||
amp = amp / (powf(4 * LAMP_CUDA_PI, 2) * powf(r, 4)); // 反射强度
|
||||
|
||||
// 处理相位
|
||||
float phi = (-4 * LAMP_CUDA_PI / lamda) * r;
|
||||
cuComplex echophi = make_cuComplex(0, phi);
|
||||
cuComplex echophiexp = cuCexpf(echophi);
|
||||
|
||||
float timeR = 2 * (r - nearRange) / LIGHTSPEED * Fs;
|
||||
long timeID = floorf(timeR);
|
||||
//if (timeID < 0 || timeID >= FreqIDmax) {
|
||||
// timeID = 0;
|
||||
// amp = 0;
|
||||
//}
|
||||
|
||||
cuComplex echo = make_cuComplex(echophiexp.x , echophiexp.y);
|
||||
echoArr[idx] = echo;
|
||||
FreqID[idx] = timeID;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
__global__ void CUDA_AntPatternInterpGain(float* anttheta, float* antphi, float* gain,
|
||||
float* antpattern, float starttheta, float startphi, float dtheta, float dphi, int thetapoints, int phipoints, long len) {
|
||||
int idx = blockIdx.x * blockDim.x + threadIdx.x;
|
||||
|
||||
if (idx < len) {
|
||||
|
||||
float temptheta = anttheta[idx];
|
||||
float tempphi = antphi[idx];
|
||||
float antPatternGain = GPU_BillerInterpAntPattern(antpattern,
|
||||
starttheta, startphi, dtheta, dphi, thetapoints, phipoints,
|
||||
temptheta, tempphi) ;
|
||||
gain[idx] = antPatternGain;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
__global__ void CUDA_InterpSigma(
|
||||
long* demcls, float* sigmaAmp, float* localanglearr, long len,
|
||||
CUDASigmaParam* sigma0Paramslist, long sigmaparamslistlen) {
|
||||
long idx = blockIdx.x * blockDim.x + threadIdx.x;
|
||||
if (idx < len) {
|
||||
long clsid = demcls[idx];
|
||||
float localangle = localanglearr[idx];
|
||||
CUDASigmaParam tempsigma = sigma0Paramslist[clsid];
|
||||
//printf("cls:%d;localangle=%f;\n",clsid, localangle);
|
||||
|
||||
if (localangle < 0 || localangle >= LAMP_CUDA_PI/2) {
|
||||
sigmaAmp[idx] = 0;
|
||||
}
|
||||
else {}
|
||||
|
||||
if (abs(tempsigma.p1)< PRECISIONTOLERANCE&&
|
||||
abs(tempsigma.p2) < PRECISIONTOLERANCE &&
|
||||
abs(tempsigma.p3) < PRECISIONTOLERANCE &&
|
||||
abs(tempsigma.p4) < PRECISIONTOLERANCE&&
|
||||
abs(tempsigma.p5) < PRECISIONTOLERANCE&&
|
||||
abs(tempsigma.p6) < PRECISIONTOLERANCE
|
||||
) {
|
||||
sigmaAmp[idx] = 0;
|
||||
}
|
||||
else {
|
||||
float sigma = GPU_getSigma0dB(tempsigma, localangle);
|
||||
sigma = powf(10.0, sigma / 10.0);// 后向散射系数
|
||||
//printf("cls:%d;localangle=%f;sigma0=%f;\n", clsid, localangle, sigma);
|
||||
sigmaAmp[idx] = sigma;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
__global__ void CUDA_CalculationEchoAmp(float* sigma0, float* TransAnt, float* ReciveAnt, float* R,
|
||||
float Pt,
|
||||
float* ampArr, long len) {
|
||||
long idx = blockIdx.x * blockDim.x + threadIdx.x;
|
||||
if (idx < len) {
|
||||
float r = R[idx];
|
||||
float amptemp = Pt * TransAnt[idx] * ReciveAnt[idx] * sigma0[idx];
|
||||
amptemp = amptemp / (powf(4 * LAMP_CUDA_PI, 2) * powf(r, 4)); // 反射强度
|
||||
ampArr[idx] = amptemp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
__global__ void CUDA_CalculationEchoPhase(float* R, float lamda, float* phaseArr, long len) {
|
||||
long idx = blockIdx.x * blockDim.x + threadIdx.x;
|
||||
if (idx < len) {
|
||||
float r = R[idx];
|
||||
// 处理相位
|
||||
float phi = (-4 * LAMP_CUDA_PI / lamda) * r;
|
||||
phaseArr[idx] = phi;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
__global__ void CUDA_CombinationEchoAmpAndPhase(float* R,
|
||||
float* echoAmp,float* echoPhase,
|
||||
float nearRange, float Fs, long plusepoints,
|
||||
cuComplex* echo, long* FreqID, long len) {
|
||||
long idx = blockIdx.x * blockDim.x + threadIdx.x;
|
||||
if (idx < len) {
|
||||
float r = R[idx];
|
||||
float phase = echoPhase[idx];
|
||||
float amp = echoAmp[idx];
|
||||
cuComplex echophi = make_cuComplex(0, phase);
|
||||
cuComplex echophiexp = cuCexpf(echophi);
|
||||
|
||||
float timeR = 2 * (r - nearRange) / LIGHTSPEED * Fs;
|
||||
long timeID = floorf(timeR);
|
||||
if (timeID < 0 || timeID >= plusepoints) {
|
||||
timeID = 0;
|
||||
amp = 0;
|
||||
}
|
||||
cuComplex echotemp = make_cuComplex(echophiexp.x*amp, echophiexp.y*amp);
|
||||
echo[idx] = echotemp;
|
||||
FreqID[idx] = timeID;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
extern "C" void SatelliteAntDirectNormal(float* RstX, float* RstY, float* RstZ,
|
||||
float antXaxisX, float antXaxisY, float antXaxisZ,
|
||||
float antYaxisX, float antYaxisY, float antYaxisZ,
|
||||
float antZaxisX, float antZaxisY, float antZaxisZ,
|
||||
float antDirectX, float antDirectY, float antDirectZ,
|
||||
float* thetaAnt, float* phiAnt
|
||||
, long len) {
|
||||
|
||||
int blockSize = 256; // 每个块的线程数
|
||||
int numBlocks = (len + blockSize - 1) / blockSize; // 根据 pixelcount 计算网格大小
|
||||
// 调用 CUDA 核函数
|
||||
CUDA_SatelliteAntDirectNormal << <numBlocks, blockSize >> > (RstX, RstY, RstZ,
|
||||
antXaxisX, antXaxisY, antXaxisZ,
|
||||
antYaxisX, antYaxisY, antYaxisZ,
|
||||
antZaxisX, antZaxisY, antZaxisZ,
|
||||
antDirectX, antDirectY, antDirectZ,
|
||||
thetaAnt, phiAnt
|
||||
, len);
|
||||
|
||||
#ifdef __CUDADEBUG__
|
||||
cudaError_t err = cudaGetLastError();
|
||||
if (err != cudaSuccess) {
|
||||
printf("CUDA_RTPC_SiglePRF CUDA Error: %s\n", cudaGetErrorString(err));
|
||||
// Possibly: exit(-1) if program cannot continue....
|
||||
}
|
||||
#endif // __CUDADEBUG__
|
||||
cudaDeviceSynchronize();
|
||||
|
||||
}
|
||||
|
||||
extern "C" void AntPatternInterpGain(float* anttheta, float* antphi, float* gain,
|
||||
float* antpattern, float starttheta, float startphi, float dtheta, float dphi, int thetapoints, int phipoints, long len) {
|
||||
int blockSize = 256; // 每个块的线程数
|
||||
int numBlocks = (len + blockSize - 1) / blockSize; // 根据 pixelcount 计算网格大小
|
||||
//printf("\nCUDA_RTPC_SiglePRF blockSize:%d ,numBlock:%d\n", blockSize, numBlocks);
|
||||
|
||||
CUDA_AntPatternInterpGain << <numBlocks, blockSize >> > ( anttheta,antphi, gain,
|
||||
antpattern,
|
||||
starttheta, startphi, dtheta, dphi, thetapoints, phipoints,
|
||||
len);
|
||||
#ifdef __CUDADEBUG__
|
||||
cudaError_t err = cudaGetLastError();
|
||||
if (err != cudaSuccess) {
|
||||
printf("CUDA_RTPC_SiglePRF CUDA Error: %s\n", cudaGetErrorString(err));
|
||||
// Possibly: exit(-1) if program cannot continue....
|
||||
}
|
||||
#endif // __CUDADEBUG__
|
||||
cudaDeviceSynchronize();
|
||||
}
|
||||
|
||||
|
||||
extern "C" void calculationEcho(float* sigma0, float* TransAnt, float* ReciveAnt,
|
||||
float* localangle, float* R, float* slopeangle,
|
||||
float nearRange, float Fs, float pt, float lamda, long FreqIDmax,
|
||||
cuComplex* echoAmp, long* FreqID,
|
||||
long len)
|
||||
{
|
||||
int blockSize = 256; // 每个块的线程数
|
||||
int numBlocks = (len + blockSize - 1) / blockSize; // 根据 pixelcount 计算网格大小
|
||||
// 调用 CUDA 核函数
|
||||
CUDA_calculationEcho << <numBlocks, blockSize >> > (sigma0, TransAnt, ReciveAnt,
|
||||
localangle, R, slopeangle,
|
||||
nearRange, Fs, pt, lamda, FreqIDmax,
|
||||
echoAmp, FreqID,
|
||||
len);
|
||||
#ifdef __CUDADEBUG__
|
||||
cudaError_t err = cudaGetLastError();
|
||||
if (err != cudaSuccess) {
|
||||
printf("CUDA_RTPC_SiglePRF CUDA Error: %s\n", cudaGetErrorString(err));
|
||||
// Possibly: exit(-1) if program cannot continue....
|
||||
}
|
||||
#endif // __CUDADEBUG__
|
||||
cudaDeviceSynchronize();
|
||||
}
|
||||
|
||||
extern "C" void CUDACalculationEchoAmp(float* sigma0, float* TransAnt, float* ReciveAnt, float* R, float Pt, float* ampArr, long len)
|
||||
{
|
||||
|
||||
int blockSize = 256; // 每个块的线程数
|
||||
int numBlocks = (len + blockSize - 1) / blockSize; // 根据 pixelcount 计算网格大小
|
||||
// 调用 CUDA 核函数
|
||||
CUDA_CalculationEchoAmp << <numBlocks, blockSize >> > (
|
||||
sigma0, TransAnt, ReciveAnt, R, Pt, ampArr, len);
|
||||
#ifdef __CUDADEBUG__
|
||||
cudaError_t err = cudaGetLastError();
|
||||
if (err != cudaSuccess) {
|
||||
printf("CUDA_RTPC_SiglePRF CUDA Error: %s\n", cudaGetErrorString(err));
|
||||
// Possibly: exit(-1) if program cannot continue....
|
||||
}
|
||||
#endif // __CUDADEBUG__
|
||||
cudaDeviceSynchronize();
|
||||
|
||||
}
|
||||
|
||||
extern "C" void CUDACalculationEchoPhase(float* R, float lamda, float* phaseArr, long len)
|
||||
{
|
||||
int blockSize = 256; // 每个块的线程数
|
||||
int numBlocks = (len + blockSize - 1) / blockSize; // 根据 pixelcount 计算网格大小
|
||||
// 调用 CUDA 核函数
|
||||
CUDA_CalculationEchoPhase << <numBlocks, blockSize >> > (
|
||||
R, lamda, phaseArr, len);
|
||||
#ifdef __CUDADEBUG__
|
||||
cudaError_t err = cudaGetLastError();
|
||||
if (err != cudaSuccess) {
|
||||
printf("CUDA_RTPC_SiglePRF CUDA Error: %s\n", cudaGetErrorString(err));
|
||||
// Possibly: exit(-1) if program cannot continue....
|
||||
}
|
||||
#endif // __CUDADEBUG__
|
||||
cudaDeviceSynchronize();
|
||||
|
||||
|
||||
}
|
||||
|
||||
extern "C" void CUDACombinationEchoAmpAndPhase(float* R,
|
||||
float* echoAmp, float* echoPhase,
|
||||
float nearRange, float Fs, long plusepoints, cuComplex* echo, long* FreqID, long len)
|
||||
{
|
||||
|
||||
int blockSize = 256; // 每个块的线程数
|
||||
int numBlocks = (len + blockSize - 1) / blockSize; // 根据 pixelcount 计算网格大小
|
||||
// 调用 CUDA 核函数
|
||||
CUDA_CombinationEchoAmpAndPhase << <numBlocks, blockSize >> > (
|
||||
R,
|
||||
echoAmp, echoPhase,
|
||||
nearRange, Fs, plusepoints, echo, FreqID, len
|
||||
);
|
||||
#ifdef __CUDADEBUG__
|
||||
cudaError_t err = cudaGetLastError();
|
||||
if (err != cudaSuccess) {
|
||||
printf("CUDA_RTPC_SiglePRF CUDA Error: %s\n", cudaGetErrorString(err));
|
||||
// Possibly: exit(-1) if program cannot continue....
|
||||
}
|
||||
#endif // __CUDADEBUG__
|
||||
cudaDeviceSynchronize();
|
||||
|
||||
}
|
||||
|
||||
|
||||
extern "C" void CUDAInterpSigma(
|
||||
long* demcls,float* sigmaAmp, float* localanglearr,long len,
|
||||
CUDASigmaParam* sigma0Paramslist, long sigmaparamslistlen) {// 地表覆盖类型-sigma插值对应函数-ulaby
|
||||
int blockSize = 256; // 每个块的线程数
|
||||
int numBlocks = (len + blockSize - 1) / blockSize; // 根据 pixelcount 计算网格大小
|
||||
// 调用 CUDA 核函数
|
||||
CUDA_InterpSigma << <numBlocks, blockSize >> > (
|
||||
demcls, sigmaAmp, localanglearr, len,
|
||||
sigma0Paramslist, sigmaparamslistlen
|
||||
);
|
||||
#ifdef __CUDADEBUG__
|
||||
cudaError_t err = cudaGetLastError();
|
||||
if (err != cudaSuccess) {
|
||||
printf("CUDA_RTPC_SiglePRF CUDA Error: %s\n", cudaGetErrorString(err));
|
||||
// Possibly: exit(-1) if program cannot continue....
|
||||
}
|
||||
#endif // __CUDADEBUG__
|
||||
cudaDeviceSynchronize();
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
#ifndef _GPURTPC_H_
|
||||
#define _GPURTPC_H_
|
||||
|
||||
#include "BaseConstVariable.h"
|
||||
#include "GPUTool.cuh"
|
||||
#include <cuda_runtime.h>
|
||||
#include <device_launch_parameters.h>
|
||||
#include <cublas_v2.h>
|
||||
#include <cuComplex.h>
|
||||
|
||||
|
||||
extern "C" struct CUDASigmaParam {
|
||||
float p1;
|
||||
float p2;
|
||||
float p3;
|
||||
float p4;
|
||||
float p5;
|
||||
float p6;
|
||||
};
|
||||
|
||||
extern "C" void SatelliteAntDirectNormal(float* RstX, float* RstY, float* RstZ,
|
||||
float antXaxisX, float antXaxisY, float antXaxisZ,
|
||||
float antYaxisX, float antYaxisY, float antYaxisZ,
|
||||
float antZaxisX, float antZaxisY, float antZaxisZ,
|
||||
float antDirectX, float antDirectY, float antDirectZ,
|
||||
float* thetaAnt, float* phiAnt, long len);
|
||||
|
||||
extern "C" void AntPatternInterpGain(float* anttheta, float* antphi, float* gain,
|
||||
float* antpattern,
|
||||
float starttheta, float startphi, float dtheta, float dphi, int thetapoints, int phipoints,
|
||||
long len);
|
||||
|
||||
extern "C" void calculationEcho(float* sigma0, float* TransAnt, float* ReciveAnt,
|
||||
float* localangle, float* R, float* slopeangle,
|
||||
float nearRange, float Fs, float pt, float lamda, long FreqIDmax,
|
||||
cuComplex* echoAmp, long* FreqID,
|
||||
long len);
|
||||
|
||||
extern "C" void CUDACalculationEchoAmp(
|
||||
float* sigma0,
|
||||
float* TransAnt, float* ReciveAnt,
|
||||
float* R,
|
||||
float Pt,
|
||||
float* ampArr,
|
||||
long len
|
||||
);
|
||||
|
||||
extern "C" void CUDACalculationEchoPhase(
|
||||
float* R, float lamda,
|
||||
float* phaseArr,
|
||||
long len
|
||||
);
|
||||
|
||||
|
||||
extern "C" void CUDACombinationEchoAmpAndPhase(float* R, float* echoAmp, float* echoPhase,
|
||||
float nearRange, float Fs,long plusepoints,
|
||||
cuComplex* echo,long* FreqID,
|
||||
long len
|
||||
);
|
||||
|
||||
|
||||
extern "C" void CUDAInterpSigma(
|
||||
long* demcls, float* sigmaAmp, float* localanglearr, long len,
|
||||
CUDASigmaParam* sigma0Paramslist, long sigmaparamslistlen);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,252 @@
|
|||
#include "QImageSARRTPC.h"
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
#include "RTPCProcessCls.h"
|
||||
#include <boost/thread.hpp>
|
||||
#include <thread>
|
||||
|
||||
QImageSARRTPC::QImageSARRTPC(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
|
||||
|
||||
QObject::connect(ui.pushButtonRP, SIGNAL(clicked()), this, SLOT(onpushButtonRPClieck()));
|
||||
QObject::connect(ui.pushButtonTP, SIGNAL(clicked()), this, SLOT(onpushButtonTPClieck()));
|
||||
QObject::connect(ui.pushButtonEcho, SIGNAL(clicked()), this, SLOT(onpushButtonEchoClieck()));
|
||||
QObject::connect(ui.pushButtongpxml, SIGNAL(clicked()), this, SLOT(onpushButtongpxmlClieck()));
|
||||
QObject::connect(ui.pushButtonTaskxml, SIGNAL(clicked()), this, SLOT(onpushButtonTaskxmlClieck()));
|
||||
QObject::connect(ui.pushButtondem, SIGNAL(clicked()), this, SLOT(onpushButtondemClieck()));
|
||||
QObject::connect(ui.pushButtonlandcover, SIGNAL(clicked()), this, SLOT(onpushButtonlandcoverClieck()));
|
||||
QObject::connect(ui.pushButtonHHSigma0, SIGNAL(clicked()), this, SLOT(onpushButtonHHSigma0Clieck()));
|
||||
QObject::connect(ui.pushButtonHVSigma0, SIGNAL(clicked()), this, SLOT(onpushButtonHVSigma0Clieck()));
|
||||
QObject::connect(ui.pushButtonVHSigma0, SIGNAL(clicked()), this, SLOT(onpushButtonVHSigma0Clieck()));
|
||||
QObject::connect(ui.pushButtonVVSigma0, SIGNAL(clicked()), this, SLOT(onpushButtonVVSigma0Clieck()));
|
||||
|
||||
|
||||
QObject::connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(onBtnaccept()));
|
||||
QObject::connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(onBtnReject()));
|
||||
|
||||
|
||||
}
|
||||
|
||||
QImageSARRTPC::~QImageSARRTPC()
|
||||
{}
|
||||
|
||||
void QImageSARRTPC::onpushButtonRPClieck()
|
||||
{
|
||||
// 调用文件选择对话框并选择一个 .tif 文件
|
||||
QString fileName = QFileDialog::getSaveFileName(this,
|
||||
u8"接收方向图", // 对话框标题
|
||||
"", // 初始目录,可以设置为路径
|
||||
u8"csv Files (*.csv);;All Files (*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.receivePatternFilePathEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
}
|
||||
}
|
||||
|
||||
void QImageSARRTPC::onpushButtonTPClieck()
|
||||
{
|
||||
// 调用文件选择对话框并选择一个 .tif 文件
|
||||
QString fileName = QFileDialog::getSaveFileName(this,
|
||||
u8"发射方向图", // 对话框标题
|
||||
"", // 初始目录,可以设置为路径
|
||||
u8"csv Files (*.csv);;All Files (*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.transformPatternFilePathEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
}
|
||||
}
|
||||
|
||||
void QImageSARRTPC::onpushButtonEchoClieck()
|
||||
{
|
||||
// 调用文件选择对话框并选择一个 .tif 文件
|
||||
QString fileName = QFileDialog::getExistingDirectory(this, u8"选择回波存放路径", "");
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.outEchoPathEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件夹", u8"没有选择任何文件夹");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void QImageSARRTPC::onpushButtongpxmlClieck()
|
||||
{
|
||||
// 调用文件选择对话框并选择一个 .tif 文件
|
||||
QString fileName = QFileDialog::getSaveFileName(this,
|
||||
u8"GPS xml", // 对话框标题
|
||||
"", // 初始目录,可以设置为路径
|
||||
u8"xml Files (*.xml);;All Files (*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.gpsXmlPathEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
}
|
||||
}
|
||||
|
||||
void QImageSARRTPC::onpushButtonTaskxmlClieck()
|
||||
{
|
||||
// 调用文件选择对话框并选择一个 .tif 文件
|
||||
QString fileName = QFileDialog::getSaveFileName(this,
|
||||
u8"任务xml", // 对话框标题
|
||||
"", // 初始目录,可以设置为路径
|
||||
u8"xml Files (*.xml);;All Files (*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.taskXmlPathEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
}
|
||||
}
|
||||
|
||||
void QImageSARRTPC::onpushButtondemClieck()
|
||||
{
|
||||
// 调用文件选择对话框并选择一个 .tif 文件
|
||||
QString fileName = QFileDialog::getSaveFileName(this,
|
||||
u8"dem文件", // 对话框标题
|
||||
"", // 初始目录,可以设置为路径
|
||||
u8"Image Files (*.tif);;All Files (*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.demTiffPathEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
}
|
||||
}
|
||||
|
||||
void QImageSARRTPC::onpushButtonlandcoverClieck()
|
||||
{
|
||||
// 调用文件选择对话框并选择一个 .tif 文件
|
||||
QString fileName = QFileDialog::getSaveFileName(this,
|
||||
u8"地表覆盖数据", // 对话框标题
|
||||
"", // 初始目录,可以设置为路径
|
||||
u8"Image Files (*.tif);;All Files (*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.landCoverPathEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
}
|
||||
}
|
||||
|
||||
void QImageSARRTPC::onpushButtonHHSigma0Clieck()
|
||||
{
|
||||
// 调用文件选择对话框并选择一个 .tif 文件
|
||||
QString fileName = QFileDialog::getSaveFileName(this,
|
||||
u8"HH后向散射系数", // 对话框标题
|
||||
"", // 初始目录,可以设置为路径
|
||||
u8"Image Files (*.tif);;All Files (*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.hhSigmaPathEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
}
|
||||
}
|
||||
|
||||
void QImageSARRTPC::onpushButtonHVSigma0Clieck()
|
||||
{
|
||||
// 调用文件选择对话框并选择一个 .tif 文件
|
||||
QString fileName = QFileDialog::getSaveFileName(this,
|
||||
u8"HV后向散射系数", // 对话框标题
|
||||
"", // 初始目录,可以设置为路径
|
||||
u8"Image Files (*.tif);;All Files (*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.hvSigmaPathEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
}
|
||||
}
|
||||
|
||||
void QImageSARRTPC::onpushButtonVHSigma0Clieck()
|
||||
{
|
||||
// 调用文件选择对话框并选择一个 .tif 文件
|
||||
QString fileName = QFileDialog::getSaveFileName(this,
|
||||
u8"VH后向散射系数", // 对话框标题
|
||||
"", // 初始目录,可以设置为路径
|
||||
u8"Image Files (*.tif);;All Files (*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.vhSigmaPathEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
}
|
||||
}
|
||||
|
||||
void QImageSARRTPC::onpushButtonVVSigma0Clieck()
|
||||
{
|
||||
// 调用文件选择对话框并选择一个 .tif 文件
|
||||
QString fileName = QFileDialog::getSaveFileName(this,
|
||||
u8"VV后向散射系数", // 对话框标题
|
||||
"", // 初始目录,可以设置为路径
|
||||
u8"Image Files (*.tif);;All Files (*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.vvSigmaPathEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
}
|
||||
}
|
||||
|
||||
void QImageSARRTPC::onBtnaccept()
|
||||
{
|
||||
|
||||
|
||||
QString GPSXmlPath = ui.gpsXmlPathEdit->text().trimmed();// u8"D:/Programme/vs2022/RasterMergeTest/TestData/GF3_Simulation_GPSNode.xml";
|
||||
QString TaskXmlPath = ui.taskXmlPathEdit->text().trimmed();//u8"D:/Programme/vs2022/RasterMergeTest/TestData/GF3_Simulation_Setting.xml";
|
||||
QString demTiffPath = ui.demTiffPathEdit->text().trimmed();//u8"D:/Programme/vs2022/RasterMergeTest/TestData/115E39N_COP30_clip.tif";
|
||||
QString landConverPath = ui.landCoverPathEdit->text().trimmed();// u8"D:/Programme/vs2022/RasterMergeTest/TestData/landcover_aligned.tiff";
|
||||
QString HHSigmaPath = ui.hhSigmaPathEdit->text().trimmed();// u8"D:/Programme/vs2022/RasterMergeTest/TestData/PALSAR-2/N45E116_23_MOS_F02DAR/N45E116_2023_sl_HH_F02DAR.tif";
|
||||
QString HVSigmaPath = ui.hvSigmaPathEdit->text().trimmed();// u8"D:/Programme/vs2022/RasterMergeTest/TestData/PALSAR-2/N45E116_23_MOS_F02DAR/N45E116_2023_sl_HV_F02DAR.tif";
|
||||
QString VHSigmaPath = ui.vhSigmaPathEdit->text().trimmed();// HVSigmaPath;
|
||||
QString VVSigmaPath = ui.vvSigmaPathEdit->text().trimmed();//HHSigmaPath;
|
||||
QString OutEchoPath = ui.outEchoPathEdit->text().trimmed();// u8"D:/Programme/vs2022/RasterMergeTest/TestData/outData/";
|
||||
QString simulationtaskName = ui.simulationTaskNameEdit->text().trimmed();// u8"GF3_Simulation";
|
||||
// 天线方向图
|
||||
QString TransAntPatternFilePath = ui.transformPatternFilePathEdit->text().trimmed();// "D:/Programme/vs2022/RasterMergeTest/TestData/ant/ant_model_setting_Horn_conical1_FarField-theta.csv"; //
|
||||
QString ReceiveAntPatternFilePath = ui.receivePatternFilePathEdit->text().trimmed();//"D:/Programme/vs2022/RasterMergeTest/TestData/ant/ant_model_setting_Horn_conical1_FarField-phi.csv";
|
||||
|
||||
// 打印参数
|
||||
// 打印解析的参数
|
||||
std::cout << "GPS XML Path: " << GPSXmlPath.toStdString() << "\n"
|
||||
<< "Task XML Path: " << TaskXmlPath.toStdString() << "\n"
|
||||
<< "DEM TIFF Path: " << demTiffPath.toStdString() << "\n"
|
||||
<< "Land Cover Path: " << landConverPath.toStdString() << "\n"
|
||||
<< "HH Sigma Path: " << HHSigmaPath.toStdString() << "\n"
|
||||
<< "HV Sigma Path: " << HVSigmaPath.toStdString() << "\n"
|
||||
<< "VH Sigma Path: " << VHSigmaPath.toStdString() << "\n"
|
||||
<< "VV Sigma Path: " << VVSigmaPath.toStdString() << "\n"
|
||||
<< "Trans AntPattern Path: " << TransAntPatternFilePath.toStdString() << "\n"
|
||||
<< "Reception AntPattern Path: " << ReceiveAntPatternFilePath.toStdString() << "\n"
|
||||
<< "Output Path: " << OutEchoPath.toStdString() << "\n"
|
||||
<< "Simulation Task Name: " << simulationtaskName.toStdString() << "\n";
|
||||
|
||||
long cpucore_num = std::thread::hardware_concurrency();
|
||||
|
||||
RTPCProcessMain(cpucore_num, TransAntPatternFilePath, ReceiveAntPatternFilePath, simulationtaskName, OutEchoPath, GPSXmlPath, TaskXmlPath, demTiffPath, landConverPath, HHSigmaPath, HVSigmaPath, VHSigmaPath, VVSigmaPath);
|
||||
|
||||
}
|
||||
|
||||
void QImageSARRTPC::onBtnReject()
|
||||
{
|
||||
this->close();
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
#pragma once
|
||||
|
||||
#include <QMainWindow>
|
||||
#include "ui_QImageSARRTPC.h"
|
||||
|
||||
class QImageSARRTPC : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QImageSARRTPC(QWidget *parent = nullptr);
|
||||
~QImageSARRTPC();
|
||||
|
||||
|
||||
public slots:
|
||||
|
||||
void onpushButtonRPClieck();
|
||||
void onpushButtonTPClieck();
|
||||
void onpushButtonEchoClieck();
|
||||
void onpushButtongpxmlClieck();
|
||||
void onpushButtonTaskxmlClieck();
|
||||
void onpushButtondemClieck();
|
||||
void onpushButtonlandcoverClieck();
|
||||
void onpushButtonHHSigma0Clieck();
|
||||
void onpushButtonHVSigma0Clieck();
|
||||
void onpushButtonVHSigma0Clieck();
|
||||
void onpushButtonVVSigma0Clieck();
|
||||
|
||||
void onBtnaccept();
|
||||
void onBtnReject();
|
||||
|
||||
private:
|
||||
Ui::QImageSARRTPCClass ui;
|
||||
};
|
|
@ -0,0 +1,502 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QImageSARRTPCClass</class>
|
||||
<widget class="QDialog" name="QImageSARRTPCClass">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>873</width>
|
||||
<height>499</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>RTPC回波仿真</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>853</width>
|
||||
<height>450</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>参考HH极化后向散射系数:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>参考VH极化后向散射系数</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>仿真任务名称:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="receivePatternFilePathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/ant/ant_model_setting_Horn_conical1_FarField-receive.csv</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QLineEdit" name="landCoverPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/landcover_aligned2.dat</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="outEchoPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/LAMPCAE_SCANE/</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLineEdit" name="taskXmlPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/GF3_Simulation_Setting.xml</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>接收方向图:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="transformPatternFilePathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/ant/ant_model_setting_Horn_conical1_FarField-trans.csv</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="1">
|
||||
<widget class="QLineEdit" name="vhSigmaPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/TestData/PALSAR-2/N45E116_23_MOS_F02DAR/N45E116_2023_sl_HV_F02DAR.tif</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_1">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>发射方向图:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<widget class="QLineEdit" name="vvSigmaPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/TestData/PALSAR-2/N45E116_23_MOS_F02DAR/N45E116_2023_sl_HH_F02DAR.tif</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QLineEdit" name="demTiffPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/115E39N_COP30_clip.tif</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>输出回波地址:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QLineEdit" name="hhSigmaPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/TestData/PALSAR-2/N45E116_23_MOS_F02DAR/N45E116_2023_sl_HH_F02DAR.tif</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>地表覆盖文件地址:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>参考VV极化后向散射系数</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>参考HV极化后向散射系数</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="gpsXmlPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/GF3_Simulation_GPSNode.xml</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QLineEdit" name="hvSigmaPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/TestData/PALSAR-2/N45E116_23_MOS_F02DAR/N45E116_2023_sl_HV_F02DAR.tif</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>参考DEM 地址:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>GPS xml 地址:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="simulationTaskNameEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>GF3_Simulation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>任务 xml 地址:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="pushButtonRP">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="pushButtonTP">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QPushButton" name="pushButtonEcho">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QPushButton" name="pushButtongpxml">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="QPushButton" name="pushButtonTaskxml">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2">
|
||||
<widget class="QPushButton" name="pushButtondem">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="2">
|
||||
<widget class="QPushButton" name="pushButtonlandcover">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="2">
|
||||
<widget class="QPushButton" name="pushButtonHHSigma0">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="2">
|
||||
<widget class="QPushButton" name="pushButtonHVSigma0">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="2">
|
||||
<widget class="QPushButton" name="pushButtonVHSigma0">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="2">
|
||||
<widget class="QPushButton" name="pushButtonVVSigma0">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,86 @@
|
|||
#pragma once
|
||||
|
||||
/*****************************************************************//**
|
||||
* \file RTPCProcessCls.h
|
||||
* \brief 距离时域脉冲相干法(Range Time domain Pulse Coherent)处理流程与相关文件
|
||||
*
|
||||
* 参考资料
|
||||
* 合成孔径雷达成像算法与实现,cumming 洪文译, 第四章 合成孔径的概念
|
||||
* 雷达信号处理基础,Mark A.Richards,邢孟道译
|
||||
* 合成孔径雷达成像原理,皮亦鸣
|
||||
* InSAR原理与应用,刘国祥
|
||||
* 弹载SAR回波信号仿真研究,林江红
|
||||
* 星载合成孔径雷达原始回波数据模拟研究,吕辉
|
||||
* SAR回波仿真信号生成算法的性能比较研究,韦立登
|
||||
* 星载合成孔径雷达影像正射校正方法研究,陈尔学
|
||||
* 注:吕辉 多普勒计算公式 与 陈尔学的多普勒计算公式存在差异,中间省略了一些变换过程
|
||||
*
|
||||
*
|
||||
* \author 陈增辉
|
||||
* \date October 2024
|
||||
*********************************************************************/
|
||||
|
||||
#include "BaseConstVariable.h"
|
||||
|
||||
#include "SARSatelliteSimulationAbstractCls.h"
|
||||
#include "SARSimulationTaskSetting.h"
|
||||
#include "SatelliteOribtModel.h"
|
||||
#include "EchoDataFormat.h"
|
||||
#include "SigmaDatabase.h"
|
||||
|
||||
class RTPCProcessCls
|
||||
{
|
||||
public:
|
||||
RTPCProcessCls();
|
||||
~RTPCProcessCls();
|
||||
public:
|
||||
void setTaskSetting(std::shared_ptr < AbstractSARSatelliteModel> TaskSetting);
|
||||
void setEchoSimulationDataSetting(std::shared_ptr < EchoL0Dataset> EchoSimulationData);
|
||||
void setTaskFileName(QString EchoFileName);
|
||||
void setDEMTiffPath(QString DEMTiffPath);
|
||||
void setLandCoverPath(QString LandCoverPath);
|
||||
void setHHSigmaPath(QString HHSigmaPath);
|
||||
void setHVSigmaPath(QString HVSigmaPath);
|
||||
void setVHSigmaPath(QString VHSigmaPath);
|
||||
void setVVSigmaPath(QString VVSigmaPath);
|
||||
void setOutEchoPath(QString OutEchoPath);
|
||||
|
||||
|
||||
private:
|
||||
std::shared_ptr <AbstractSARSatelliteModel> TaskSetting; // 仿真任务设置
|
||||
std::shared_ptr <EchoL0Dataset> EchoSimulationData; // GPS数据
|
||||
std::shared_ptr<SigmaDatabase> SigmaDatabasePtr;
|
||||
long PluseCount; // 脉冲数量
|
||||
long PlusePoint; // 脉冲点数
|
||||
QString DEMTiffPath; // DEM Tiff 文件路径
|
||||
QString LandCoverPath;
|
||||
QString HHSigmaPath;
|
||||
QString HVSigmaPath;
|
||||
QString VHSigmaPath;
|
||||
QString VVSigmaPath;
|
||||
|
||||
QString OutEchoPath; // 输出回波路径
|
||||
QString TaskFileName;
|
||||
QString tmpfolderPath;
|
||||
|
||||
QString OutEchoMaskPath;
|
||||
|
||||
public:
|
||||
ErrorCode Process(long num_thread); // 处理
|
||||
private: // 处理流程
|
||||
ErrorCode InitParams();// 1. 初始化参数
|
||||
ErrorCode DEMPreprocess(); // 2. 裁剪DEM范围
|
||||
ErrorCode InitEchoMaskArray();
|
||||
//ErrorCode RTPCMainProcess(long num_thread);
|
||||
ErrorCode RTPCMainProcess_GPU();
|
||||
|
||||
std::shared_ptr<SatelliteOribtNode[]> getSatelliteOribtNodes(double prf_time, double dt, bool antflag, long double imageStarttime);
|
||||
|
||||
private:
|
||||
QString demxyzPath;
|
||||
QString demmaskPath;
|
||||
QString demsloperPath;
|
||||
};
|
||||
|
||||
void RTPCProcessMain(long num_thread,QString TansformPatternFilePath,QString ReceivePatternFilePath,QString simulationtaskName, QString OutEchoPath, QString GPSXmlPath,QString TaskXmlPath,QString demTiffPath, QString LandCoverPath, QString HHSigmaPath, QString HVSigmaPath, QString VHSigmaPath, QString VVSigmaPath);
|
||||
|
|
@ -422,12 +422,15 @@ __global__ void CUDAKernel_RFPC_Caluation_R_Gain(
|
|||
float antZaxisX, float antZaxisY, float antZaxisZ,// 天线坐标系的Z轴
|
||||
float antDirectX, float antDirectY, float antDirectZ,// 天线的指向
|
||||
float Pt,// 发射能量
|
||||
double refPhaseRange,
|
||||
float* TransAntpattern, float Transtarttheta, float Transstartphi, float Transdtheta, float Transdphi, int Transthetapoints, int Transphipoints, // 发射天线方向图
|
||||
float* ReceiveAntpattern, float Receivestarttheta, float Receivestartphi, float Receivedtheta, float Receivedphi, int Receivethetapoints, int Receivephipoints,//接收天线方向图
|
||||
float NearR, float FarR, // 距离范围
|
||||
CUDASigmaParam* sigma0Paramslist, long sigmaparamslistlen,// 插值图
|
||||
float* factorj, long freqnum,
|
||||
double* outR, // 输出距离
|
||||
float* outAmp // 输出增益
|
||||
//float* outAmp // 输出增益
|
||||
float* PRFEcho_real, float* PRFEcho_imag, long prfid
|
||||
) {
|
||||
long idx = blockIdx.x * blockDim.x + threadIdx.x;
|
||||
if (idx < len) {
|
||||
|
@ -448,9 +451,6 @@ __global__ void CUDAKernel_RFPC_Caluation_R_Gain(
|
|||
//printf("antX=%f;antY=%f;antZ=%f;targetX=%f;targetY=%f;targetZ=%f;RstR=%.6f;diffR=%.6f;\n",antX,antY,antZ,targetX,targetY,targetZ,RstR, RstR - 9.010858499003178e+05);
|
||||
|
||||
if (RstR<NearR || RstR>FarR) {
|
||||
|
||||
outR[idx] = 0;
|
||||
outAmp[idx] = 0;
|
||||
}
|
||||
else {
|
||||
// 求解坡度
|
||||
|
@ -510,15 +510,16 @@ __global__ void CUDAKernel_RFPC_Caluation_R_Gain(
|
|||
|
||||
ampGain = TansantPatternGain * antPatternGain;
|
||||
ampGain = ampGain / (powf(4 * LAMP_CUDA_PI, 2) * powf(RstR, 4)); // 反射强度
|
||||
outAmp[idx] = ampGain * Pt * sigma0;
|
||||
outR[idx] = RstR;
|
||||
//if (sigma0 > 0) {
|
||||
// printf("Amp=%e;localangle=%f;R=%f;sigma0=%e;\n", outAmp[idx], localangle, outR[idx], sigma0);
|
||||
//}
|
||||
float outAmp = ampGain * Pt * sigma0;
|
||||
double outR = RstR- refPhaseRange;
|
||||
for (long ii = 0; ii < freqnum; ii++) {
|
||||
float phi= outR * factorj[ii]; // 相位
|
||||
// Eular; exp(ix)=cos(x)+isin(x)
|
||||
float real = outAmp * cos(phi); // 实部
|
||||
float imag = outAmp * sin(phi); // 虚部
|
||||
}
|
||||
}
|
||||
else {
|
||||
outR[idx] = 0;
|
||||
outAmp[idx] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -526,28 +527,24 @@ __global__ void CUDAKernel_RFPC_Caluation_R_Gain(
|
|||
|
||||
__global__ void CUDAKernel_PRF_CalFreqEcho(
|
||||
double* Rarr, float* ampArr, long pixelcount,
|
||||
double* freqpoints, long freqnum,
|
||||
float* factorj, long freqnum,
|
||||
double dx, double nearR,
|
||||
cuComplex* PRFEcho, long prfid) {
|
||||
long idx = blockIdx.x * blockDim.x + threadIdx.x;
|
||||
if (idx < freqnum) {
|
||||
double freq = freqpoints[idx];
|
||||
double lamda = LIGHTSPEED / freq;// 波长
|
||||
double fatorj = -4 * PI / lamda;
|
||||
double phi = 0;
|
||||
double amptemp = 0;
|
||||
float fatorj = factorj[idx];
|
||||
float phi = 0;
|
||||
float amptemp = 0;
|
||||
cuComplex tempfreqEcho = PRFEcho[prfid * freqnum + idx];
|
||||
double R = 0;
|
||||
for (long i = 0; i < pixelcount; i++) { // 区域积分
|
||||
R = Rarr[i];
|
||||
//phi = (R = R - (floor(R / lamda) - 1) * lamda)* fatorj; // 相位
|
||||
phi = R * fatorj; // 相位
|
||||
float phi = Rarr[i] * factorj[idx]; // 相位
|
||||
amptemp = ampArr[i];
|
||||
//printf("amp=%f\n", amptemp);
|
||||
// Eular; exp(ix)=cos(x)+isin(x)
|
||||
tempfreqEcho.x = tempfreqEcho.x + amptemp * cos(phi); // 实部
|
||||
tempfreqEcho.y = tempfreqEcho.y + amptemp * sin(phi); // 虚部
|
||||
//printf("freqid=%d;freq=%.10f;fatorj=%.12f;d_R=%.10f;phi=%.10f;echo=complex(%.5f,%.5f)\n", idx, freq, fatorj, Rarr[i], phi, tempfreqEcho.x, tempfreqEcho.y);
|
||||
//printf("freqid=%d;fatorj=%.12f;d_R=%.10f;phi=%.10f;echo=complex(%.5f,%.5f)\n", idx, fatorj, Rarr[i], phi, tempfreqEcho.x, tempfreqEcho.y);
|
||||
}
|
||||
PRFEcho[prfid*freqnum+idx] = tempfreqEcho;
|
||||
}
|
||||
|
@ -663,12 +660,15 @@ extern "C" void CUDARFPC_Caluation_R_Gain(
|
|||
float antZaxisX, float antZaxisY, float antZaxisZ,// 天线坐标系的Z轴
|
||||
float antDirectX, float antDirectY, float antDirectZ,// 天线的指向
|
||||
float Pt,// 发射能量
|
||||
double refPhaseRange,
|
||||
float* TransAntpattern, float Transtarttheta, float Transstartphi, float Transdtheta, float Transdphi, int Transthetapoints, int Transphipoints, // 发射天线方向图
|
||||
float* ReceiveAntpattern, float Receivestarttheta, float Receivestartphi, float Receivedtheta, float Receivedphi, int Receivethetapoints, int Receivephipoints,//接收天线方向图
|
||||
float NearR, float FarR, // 距离范围
|
||||
CUDASigmaParam* sigma0Paramslist, long sigmaparamslistlen,// 插值图
|
||||
float* factorj, long freqnum,
|
||||
double* outR, // 输出距离
|
||||
float* outAmp // 输出增益
|
||||
//float* outAmp // 输出增益
|
||||
float* PRFEcho_real, float* PRFEcho_imag, long prfid
|
||||
)
|
||||
{
|
||||
|
||||
|
@ -685,14 +685,17 @@ extern "C" void CUDARFPC_Caluation_R_Gain(
|
|||
antZaxisX, antZaxisY, antZaxisZ,
|
||||
antDirectX, antDirectY, antDirectZ,
|
||||
Pt,
|
||||
refPhaseRange,
|
||||
TransAntpattern,
|
||||
Transtarttheta, Transstartphi, Transdtheta, Transdphi, Transthetapoints, Transphipoints,
|
||||
ReceiveAntpattern,
|
||||
Receivestarttheta, Receivestartphi, Receivedtheta, Receivedphi, Receivethetapoints, Receivephipoints,
|
||||
NearR, FarR,
|
||||
sigma0Paramslist, sigmaparamslistlen,
|
||||
factorj, freqnum,
|
||||
outR,
|
||||
outAmp
|
||||
//outAmp
|
||||
PRFEcho_real, PRFEcho_imag, prfid
|
||||
);
|
||||
|
||||
|
||||
|
@ -708,7 +711,7 @@ extern "C" void CUDARFPC_Caluation_R_Gain(
|
|||
|
||||
extern "C" void CUDA_PRF_CalFreqEcho(
|
||||
double* Rarr, float* ampArr, long pixelcount,
|
||||
double* freqpoints, long freqnum,
|
||||
float* factorj, long freqnum,
|
||||
double dx, double nearR,
|
||||
cuComplex* PRFEcho, long prfid)
|
||||
{
|
||||
|
@ -717,7 +720,7 @@ extern "C" void CUDA_PRF_CalFreqEcho(
|
|||
|
||||
CUDAKernel_PRF_CalFreqEcho << <numBlocks, blockSize >> > (
|
||||
Rarr, ampArr, pixelcount,
|
||||
freqpoints, freqnum,
|
||||
factorj, freqnum,
|
||||
dx,nearR,
|
||||
PRFEcho, prfid
|
||||
);
|
||||
|
|
|
@ -52,18 +52,20 @@ extern "C" void CUDARFPC_Caluation_R_Gain(
|
|||
float antZaxisX, float antZaxisY, float antZaxisZ,// 天线坐标系的Z轴
|
||||
float antDirectX, float antDirectY, float antDirectZ,// 天线的指向
|
||||
float Pt,// 发射能量
|
||||
double refPhaseRange,
|
||||
float* TransAntpattern, float Transtarttheta, float Transstartphi, float Transdtheta, float Transdphi, int Transthetapoints, int Transphipoints, // 发射天线方向图
|
||||
float* ReceiveAntpattern, float Receivestarttheta, float Receivestartphi, float Receivedtheta, float Receivedphi, int Receivethetapoints, int Receivephipoints,//接收天线方向图
|
||||
float NearR,float FarR, // 距离范围
|
||||
CUDASigmaParam* sigma0Paramslist, long sigmaparamslistlen,// 插值图
|
||||
float* factorj, long freqnum,
|
||||
double* outR, // 输出距离
|
||||
float* outAmp // 输出增益
|
||||
float* PRFEcho_real,float* PRFEcho_imag, long prfid
|
||||
);
|
||||
|
||||
|
||||
extern "C" void CUDA_PRF_CalFreqEcho(
|
||||
double* Rarr, float* amp, long pixelcount,//
|
||||
double* freqpoints, long freqnum,
|
||||
float* factorj, long freqnum,
|
||||
double dx, double nearR,
|
||||
cuComplex* PRFEcho, long prfid
|
||||
);
|
||||
|
|
|
@ -36,6 +36,12 @@ extern "C" struct CUDAVectorEllipsoidal {
|
|||
float Rho;
|
||||
};
|
||||
|
||||
extern "C" struct CUDAComplex {
|
||||
float x;
|
||||
float y;
|
||||
};
|
||||
|
||||
|
||||
// 定义设备函数
|
||||
extern __device__ cuComplex cuCexpf(cuComplex x);
|
||||
extern __device__ CUDAVector GPU_VectorAB(CUDAVector A, CUDAVector B);
|
||||
|
@ -52,6 +58,8 @@ extern __global__ void CUDA_Norm_Vector(float* Vx, float* Vy, float* Vz, float*
|
|||
extern __global__ void CUDA_cosAngle_VA_AB(float* Ax, float* Ay, float* Az, float* Bx, float* By, float* Bz, float* anglecos, long len);
|
||||
extern __global__ void CUDA_GridPoint_Linear_Interp1(float* v, float* q, float* qv, long xlen, long qlen);
|
||||
|
||||
|
||||
|
||||
// 误差处理函数
|
||||
extern "C" void checkCudaError(cudaError_t err, const char* msg);
|
||||
|
||||
|
|
|
@ -74,11 +74,11 @@
|
|||
<ClCompile>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<OpenMPSupport>true</OpenMPSupport>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>873</width>
|
||||
<height>499</height>
|
||||
<height>647</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -25,62 +25,10 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>853</width>
|
||||
<height>450</height>
|
||||
<height>598</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>参考HH极化后向散射系数:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>参考VH极化后向散射系数</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>仿真任务名称:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="receivePatternFilePathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/ant/ant_model_setting_Horn_conical1_FarField-receive.csv</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QLineEdit" name="landCoverPathEdit">
|
||||
<property name="minimumSize">
|
||||
|
@ -94,97 +42,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="outEchoPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/LAMPCAE_SCANE/</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLineEdit" name="taskXmlPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/GF3_Simulation_Setting.xml</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>接收方向图:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="transformPatternFilePathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/ant/ant_model_setting_Horn_conical1_FarField-trans.csv</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="1">
|
||||
<widget class="QLineEdit" name="vhSigmaPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/TestData/PALSAR-2/N45E116_23_MOS_F02DAR/N45E116_2023_sl_HV_F02DAR.tif</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_1">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>发射方向图:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<widget class="QLineEdit" name="vvSigmaPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/TestData/PALSAR-2/N45E116_23_MOS_F02DAR/N45E116_2023_sl_HH_F02DAR.tif</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QLineEdit" name="demTiffPathEdit">
|
||||
<property name="minimumSize">
|
||||
|
@ -198,8 +55,8 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="receivePatternFilePathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
|
@ -207,176 +64,7 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>输出回波地址:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QLineEdit" name="hhSigmaPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/TestData/PALSAR-2/N45E116_23_MOS_F02DAR/N45E116_2023_sl_HH_F02DAR.tif</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>地表覆盖文件地址:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>参考VV极化后向散射系数</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>参考HV极化后向散射系数</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="gpsXmlPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/GF3_Simulation_GPSNode.xml</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QLineEdit" name="hvSigmaPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/TestData/PALSAR-2/N45E116_23_MOS_F02DAR/N45E116_2023_sl_HV_F02DAR.tif</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>参考DEM 地址:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>GPS xml 地址:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="simulationTaskNameEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>GF3_Simulation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>任务 xml 地址:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="pushButtonRP">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="pushButtonTP">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QPushButton" name="pushButtonEcho">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/ant/ant_model_setting_Horn_conical1_FarField-receive.csv</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -393,8 +81,8 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="QPushButton" name="pushButtonTaskxml">
|
||||
<item row="6" column="1">
|
||||
<widget class="QLineEdit" name="taskXmlPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
|
@ -402,12 +90,12 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/GF3_Simulation_Setting.xml</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2">
|
||||
<widget class="QPushButton" name="pushButtondem">
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="simulationTaskNameEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
|
@ -415,12 +103,12 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
<string>GF3_Simulation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="2">
|
||||
<widget class="QPushButton" name="pushButtonlandcover">
|
||||
<item row="11" column="2">
|
||||
<widget class="QPushButton" name="pushButtonVHSigma0">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
|
@ -445,8 +133,21 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="2">
|
||||
<widget class="QPushButton" name="pushButtonHVSigma0">
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>参考HH极化后向散射系数:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QPushButton" name="pushButtonEcho">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
|
@ -458,8 +159,8 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="2">
|
||||
<widget class="QPushButton" name="pushButtonVHSigma0">
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="pushButtonTP">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
|
@ -471,6 +172,123 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>参考HV极化后向散射系数</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="QPushButton" name="pushButtonTaskxml">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>接收方向图:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="2">
|
||||
<widget class="QPushButton" name="pushButtonlandcover">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="1">
|
||||
<widget class="QLineEdit" name="vhSigmaPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/TestData/PALSAR-2/N45E116_23_MOS_F02DAR/N45E116_2023_sl_HV_F02DAR.tif</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<widget class="QLineEdit" name="vvSigmaPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/TestData/PALSAR-2/N45E116_23_MOS_F02DAR/N45E116_2023_sl_HH_F02DAR.tif</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="transformPatternFilePathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/ant/ant_model_setting_Horn_conical1_FarField-trans.csv</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>参考VV极化后向散射系数</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>输出回波地址:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="2">
|
||||
<widget class="QPushButton" name="pushButtonVVSigma0">
|
||||
<property name="minimumSize">
|
||||
|
@ -484,6 +302,188 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>地表覆盖文件地址:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2">
|
||||
<widget class="QPushButton" name="pushButtondem">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="outEchoPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/LAMPCAE_SCANE/</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="2">
|
||||
<widget class="QPushButton" name="pushButtonHVSigma0">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QLineEdit" name="hvSigmaPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/TestData/PALSAR-2/N45E116_23_MOS_F02DAR/N45E116_2023_sl_HV_F02DAR.tif</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>GPS xml 地址:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="pushButtonRP">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>参考DEM 地址:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QLineEdit" name="hhSigmaPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/TestData/PALSAR-2/N45E116_23_MOS_F02DAR/N45E116_2023_sl_HH_F02DAR.tif</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="gpsXmlPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/GF3_Simulation_GPSNode.xml</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>任务 xml 地址:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>仿真任务名称:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_1">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>发射方向图:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>参考VH极化后向散射系数</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
|
|
@ -370,7 +370,7 @@ ErrorCode RFPCProcessCls::RFPCMainProcess_GPU()
|
|||
//double GainAntLen = -3;// -3dB 为天线半径
|
||||
long pluseCount = this->PluseCount;
|
||||
float lamda = this->TaskSetting->getCenterLamda(); // 波长
|
||||
|
||||
double refphaseRange = this->TaskSetting->getRefphaseRange(); // 参考相位斜距
|
||||
// 天线方向图
|
||||
std::shared_ptr<AbstractRadiationPattern> TransformPattern = this->TaskSetting->getTransformRadiationPattern(); // 发射天线方向图
|
||||
std::shared_ptr<AbstractRadiationPattern> ReceivePattern = this->TaskSetting->getReceiveRadiationPattern(); // 接收天线方向图
|
||||
|
@ -572,18 +572,21 @@ ErrorCode RFPCProcessCls::RFPCMainProcess_GPU()
|
|||
cuComplex* h_echo = (cuComplex*)mallocCUDAHost(sizeof(cuComplex) * blokline * tempDemCols);
|
||||
cuComplex* d_echo = (cuComplex*)mallocCUDADevice(sizeof(cuComplex) * blokline * tempDemCols); //19
|
||||
|
||||
long echoblockline = Memory1GB / 8 / 2 / PlusePoint * 3;
|
||||
long echoblockline = Memory1GB / 8 / 2 / PlusePoint * 2;
|
||||
|
||||
// 每一行的脉冲
|
||||
cuComplex* h_PRFEcho = (cuComplex*)mallocCUDAHost(sizeof(cuComplex) * echoblockline * PlusePoint);
|
||||
cuComplex* d_PRFEcho = (cuComplex*)mallocCUDADevice(sizeof(cuComplex) * echoblockline * PlusePoint);
|
||||
float* h_PRFEcho_real = (float*)mallocCUDAHost(sizeof(float) * echoblockline * PlusePoint);
|
||||
float* h_PRFEcho_imag = (float*)mallocCUDAHost(sizeof(float) * echoblockline * PlusePoint);
|
||||
float* d_PRFEcho_real = (float*)mallocCUDADevice(sizeof(float) * echoblockline * PlusePoint);
|
||||
float* d_PRFEcho_imag = (float*)mallocCUDADevice(sizeof(float) * echoblockline * PlusePoint);
|
||||
|
||||
double* h_freqpoints = (double*)mallocCUDAHost(sizeof(double) * freqlist.size());
|
||||
double* d_freqpoints = (double*)mallocCUDADevice(sizeof(double) * freqlist.size());
|
||||
float* h_factorj = (float*)mallocCUDAHost(sizeof(float) * freqlist.size());
|
||||
float* d_factorj = (float*)mallocCUDADevice(sizeof(float) * freqlist.size());
|
||||
for (long ii = 0; ii < freqlist.size(); ii++) {
|
||||
h_freqpoints[ii] = freqlist[ii];
|
||||
h_factorj[ii] = -4*PI*freqlist[ii]/LIGHTSPEED;
|
||||
}
|
||||
HostToDevice(h_freqpoints, d_freqpoints, sizeof(double) * freqlist.size());
|
||||
testOutAmpArr("freqpointslist.bin", h_freqpoints, freqlist.size(), 1);
|
||||
HostToDevice(h_factorj, d_factorj, sizeof(float) * freqlist.size());
|
||||
testOutAmpArr("factorj.bin", h_factorj, freqlist.size(), 1);
|
||||
// 地表覆盖类型
|
||||
Eigen::MatrixXd landcover = Eigen::MatrixXd::Zero(blokline, tempDemCols);// 地面覆盖类型
|
||||
long* h_demcls = (long*)mallocCUDAHost(sizeof(long) * blokline * tempDemCols);
|
||||
|
@ -674,8 +677,6 @@ ErrorCode RFPCProcessCls::RFPCMainProcess_GPU()
|
|||
#ifdef __PRFDEBUG__ && __PRFDEBUG_PRFINF__
|
||||
printf("tatgetPs=[%f,%f,%f]\n", h_dem_x[0], h_dem_y[0], h_dem_z[0]);
|
||||
std::shared_ptr<double> h_temp_R(new double[PluseCount],delArrPtr);
|
||||
|
||||
|
||||
#endif // __PRFDEBUG__
|
||||
|
||||
long pixelcount = newblokline * tempDemCols;
|
||||
|
@ -685,17 +686,18 @@ ErrorCode RFPCProcessCls::RFPCMainProcess_GPU()
|
|||
std::shared_ptr<std::complex<float>> echotemp = this->EchoSimulationData->getEchoArr(startprfid, templine);
|
||||
for (long tempprfid = 0; tempprfid < templine; tempprfid++) {
|
||||
for (long freqid = 0; freqid < PlusePoint; freqid++) {
|
||||
h_PRFEcho[tempprfid * PlusePoint + freqid].x = echotemp.get()[tempprfid * PlusePoint + freqid].real();
|
||||
h_PRFEcho[tempprfid * PlusePoint + freqid].y = echotemp.get()[tempprfid * PlusePoint + freqid].imag();
|
||||
h_PRFEcho_real[tempprfid * PlusePoint + freqid] = echotemp.get()[tempprfid * PlusePoint + freqid].real();
|
||||
h_PRFEcho_imag[tempprfid * PlusePoint + freqid] = echotemp.get()[tempprfid * PlusePoint + freqid].imag();
|
||||
}
|
||||
}
|
||||
|
||||
HostToDevice(h_PRFEcho, d_PRFEcho, sizeof(cuComplex) * echoblockline * PlusePoint);
|
||||
|
||||
HostToDevice(h_PRFEcho_real, d_PRFEcho_real, sizeof(float) * echoblockline * PlusePoint);
|
||||
HostToDevice(h_PRFEcho_imag, d_PRFEcho_imag, sizeof(float) * echoblockline * PlusePoint);
|
||||
for (long tempprfid = 0; tempprfid < templine; tempprfid++) {
|
||||
{// 计算
|
||||
long prfid = tempprfid + startprfid;
|
||||
std::cout << "[" << QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss.zzz").toStdString() << "] "<< prfid<<std::endl;
|
||||
|
||||
std::cout << "\r[" << QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss.zzz").toStdString() << "]\t" << prfid<<"\t\t\t\t\t";
|
||||
|
||||
// 天线位置
|
||||
float antpx = sateOirbtNodes[prfid].Px;
|
||||
float antpy = sateOirbtNodes[prfid].Py;
|
||||
|
@ -715,31 +717,31 @@ ErrorCode RFPCProcessCls::RFPCMainProcess_GPU()
|
|||
float antZaxisX = sateOirbtNodes[prfid].AntZaxisX;
|
||||
float antZaxisY = sateOirbtNodes[prfid].AntZaxisY;
|
||||
float antZaxisZ = sateOirbtNodes[prfid].AntZaxisZ;//18
|
||||
|
||||
// 计算距离、局地入射角、增益
|
||||
CUDARFPC_Caluation_R_Gain(
|
||||
antpx, antpy, antpz, // 天线的坐标
|
||||
d_dem_x, d_dem_y, d_dem_z, pixelcount, // 地面坐标
|
||||
d_demcls,
|
||||
d_demsloper_x, d_demsloper_y, d_demsloper_z, // 地表坡度矢量
|
||||
antXaxisX, antXaxisY, antXaxisZ, // 天线坐标系的X轴
|
||||
antYaxisX, antYaxisY, antYaxisZ,// 天线坐标系的Y轴
|
||||
antZaxisX, antZaxisY, antZaxisZ,// 天线坐标系的Z轴
|
||||
antdirectx, antdirecty, antdirectz,// 天线的指向
|
||||
Pt,// 增益后发射能量
|
||||
d_TantPattern, TstartTheta, TstartPhi, Tdtheta, Tdphi, Tthetanum, Tphinum, // 发射天线方向图
|
||||
d_RantPattern, RstartTheta, RstartPhi, Rdtheta, Rdphi, Rthetanum, Rphinum,//接收天线方向图
|
||||
NearRange, FarRange,
|
||||
d_clsSigmaParam, clamapid,
|
||||
d_R, // 输出距离
|
||||
d_amp // 输出振幅
|
||||
);
|
||||
|
||||
CUDA_PRF_CalFreqEcho(
|
||||
d_R, d_amp, pixelcount,
|
||||
d_freqpoints, PlusePoint,
|
||||
dx, NearRange,
|
||||
d_PRFEcho, tempprfid);
|
||||
// 计算距离、局地入射角、增益
|
||||
CUDARFPC_Caluation_R_Gain(
|
||||
antpx, antpy, antpz, // 天线的坐标
|
||||
d_dem_x, d_dem_y, d_dem_z, pixelcount, // 地面坐标
|
||||
d_demcls,
|
||||
d_demsloper_x, d_demsloper_y, d_demsloper_z, // 地表坡度矢量
|
||||
antXaxisX, antXaxisY, antXaxisZ, // 天线坐标系的X轴
|
||||
antYaxisX, antYaxisY, antYaxisZ,// 天线坐标系的Y轴
|
||||
antZaxisX, antZaxisY, antZaxisZ,// 天线坐标系的Z轴
|
||||
antdirectx, antdirecty, antdirectz,// 天线的指向
|
||||
Pt,// 增益后发射能量
|
||||
refphaseRange,
|
||||
d_TantPattern, TstartTheta, TstartPhi, Tdtheta, Tdphi, Tthetanum, Tphinum, // 发射天线方向图
|
||||
d_RantPattern, RstartTheta, RstartPhi, Rdtheta, Rdphi, Rthetanum, Rphinum,//接收天线方向图
|
||||
NearRange, FarRange,
|
||||
d_clsSigmaParam, clamapid,
|
||||
d_factorj, PlusePoint,
|
||||
d_R, // 输出距离
|
||||
d_PRFEcho_real, d_PRFEcho_imag,tempprfid // 输出振幅
|
||||
);
|
||||
//CUDA_PRF_CalFreqEcho(
|
||||
// d_R, d_amp, pixelcount,
|
||||
// d_factorj, PlusePoint,
|
||||
// dx, NearRange,
|
||||
// d_PRFEcho, tempprfid);
|
||||
|
||||
if (prfid % 100 == 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;
|
||||
|
@ -752,11 +754,12 @@ ErrorCode RFPCProcessCls::RFPCMainProcess_GPU()
|
|||
|
||||
}
|
||||
|
||||
DeviceToHost(h_PRFEcho, d_PRFEcho, sizeof(cuComplex) * echoblockline * PlusePoint);
|
||||
DeviceToHost(h_PRFEcho_real, d_PRFEcho_real, sizeof(float) * echoblockline * PlusePoint);
|
||||
DeviceToHost(h_PRFEcho_imag, d_PRFEcho_imag, sizeof(float) * echoblockline * PlusePoint);
|
||||
for (long tempprfid = 0; tempprfid < templine; tempprfid++) {
|
||||
for (long freqid = 0; freqid < PlusePoint; freqid++) {
|
||||
echotemp.get()[tempprfid * PlusePoint + freqid].real(h_PRFEcho[tempprfid * PlusePoint + freqid].x);
|
||||
echotemp.get()[tempprfid * PlusePoint + freqid].imag(h_PRFEcho[tempprfid * PlusePoint + freqid].y);
|
||||
echotemp.get()[tempprfid * PlusePoint + freqid].real(h_PRFEcho_real[tempprfid * PlusePoint + freqid]);
|
||||
echotemp.get()[tempprfid * PlusePoint + freqid].imag(h_PRFEcho_imag[tempprfid * PlusePoint + freqid]);
|
||||
}
|
||||
}
|
||||
this->EchoSimulationData->saveEchoArr(echotemp, startprfid, templine);
|
||||
|
@ -786,8 +789,9 @@ ErrorCode RFPCProcessCls::RFPCMainProcess_GPU()
|
|||
FreeCUDAHost(h_amp); FreeCUDADevice(d_amp);
|
||||
FreeCUDAHost(h_demcls); FreeCUDADevice(d_demcls);
|
||||
|
||||
FreeCUDAHost(h_freqpoints); FreeCUDADevice(d_freqpoints);
|
||||
FreeCUDAHost(h_PRFEcho); FreeCUDADevice(d_PRFEcho);
|
||||
FreeCUDAHost(h_factorj); FreeCUDADevice(d_factorj);
|
||||
FreeCUDAHost(h_PRFEcho_real); FreeCUDADevice(d_PRFEcho_real);
|
||||
FreeCUDAHost(h_PRFEcho_imag); FreeCUDADevice(d_PRFEcho_imag);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -222,6 +222,15 @@ QVector<double> AbstractSARSatelliteModel::getFreqList()
|
|||
return freqlist;
|
||||
}
|
||||
|
||||
void AbstractSARSatelliteModel::setRefphaseRange(double refRange)
|
||||
{
|
||||
}
|
||||
|
||||
double AbstractSARSatelliteModel::getRefphaseRange()
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
POLARTYPEENUM AbstractSARSatelliteModel::getPolarType()
|
||||
{
|
||||
return POLARTYPEENUM();
|
||||
|
@ -818,18 +827,4 @@ double AbstractRadiationPattern::getMinPhi()
|
|||
}
|
||||
return minphi;
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -67,8 +67,6 @@ struct SatelliteOribtNode {
|
|||
double AzAngle;// 摆动角
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -260,7 +258,8 @@ public: //
|
|||
virtual double getBandWidth();
|
||||
|
||||
virtual QVector<double> getFreqList(); // 获取频点列表
|
||||
|
||||
virtual void setRefphaseRange(double refRange);
|
||||
virtual double getRefphaseRange();
|
||||
|
||||
virtual POLARTYPEENUM getPolarType();// 极化类型
|
||||
virtual void setPolarType(POLARTYPEENUM type);
|
||||
|
@ -269,7 +268,7 @@ public: //
|
|||
virtual double getPRF();
|
||||
|
||||
virtual double getFs(); // 距离向采样频率
|
||||
|
||||
|
||||
|
||||
virtual double getCenterLookAngle() ;
|
||||
virtual void setCenterLookAngle(double angle) ;
|
||||
|
|
|
@ -143,6 +143,16 @@ double SARSimulationTaskSetting::getPRF()
|
|||
return this->PRF;
|
||||
}
|
||||
|
||||
void SARSimulationTaskSetting::setRefphaseRange(double refRange)
|
||||
{
|
||||
this->refPhaseRange = refRange;
|
||||
}
|
||||
|
||||
double SARSimulationTaskSetting::getRefphaseRange()
|
||||
{
|
||||
return this->refPhaseRange;
|
||||
}
|
||||
|
||||
void SARSimulationTaskSetting::setTransformRadiationPattern(std::shared_ptr<AbstractRadiationPattern> radiationPanttern)
|
||||
{
|
||||
this->TransformRadiationPattern = radiationPanttern;
|
||||
|
@ -165,22 +175,22 @@ std::shared_ptr<AbstractRadiationPattern> SARSimulationTaskSetting::getReceiveRa
|
|||
|
||||
double SARSimulationTaskSetting::getPt()
|
||||
{
|
||||
return this->OribtModel->getPt();
|
||||
return this->pt;
|
||||
}
|
||||
|
||||
double SARSimulationTaskSetting::getGri()
|
||||
{
|
||||
return this->OribtModel->getGri();
|
||||
return this->Gri;
|
||||
}
|
||||
|
||||
void SARSimulationTaskSetting::setPt(double Pt)
|
||||
void SARSimulationTaskSetting::setPt(double InPt)
|
||||
{
|
||||
this->OribtModel->setPt(Pt);
|
||||
this->pt = InPt;
|
||||
}
|
||||
|
||||
void SARSimulationTaskSetting::setGri(double gri)
|
||||
void SARSimulationTaskSetting::setGri(double Ingri)
|
||||
{
|
||||
this->OribtModel->setGri(gri);
|
||||
this->Gri = Ingri;
|
||||
}
|
||||
|
||||
std::shared_ptr<AbstractSARSatelliteModel> ReadSimulationSettingsXML(QString xmlPath)
|
||||
|
@ -221,14 +231,19 @@ std::shared_ptr<AbstractSARSatelliteModel> ReadSimulationSettingsXML(QString xml
|
|||
QDomElement bandWidth = taskSensor.firstChildElement("bandWidth");
|
||||
QDomElement centerLookAngle = taskSensor.firstChildElement("centerLookAngle");
|
||||
QDomElement prf = taskSensor.firstChildElement("prf");
|
||||
//QDomElement fs = taskSensor.firstChildElement("fs");
|
||||
QDomElement refphaseRange = taskSensor.firstChildElement("refPhaseRange");
|
||||
QDomElement polar = taskSensor.firstChildElement("polar");
|
||||
QDomElement nearRange = taskSensor.firstChildElement("nearRange");
|
||||
QDomElement farRange = taskSensor.firstChildElement("farRange");
|
||||
QDomElement lookDirection = taskSensor.firstChildElement("lookDirection");
|
||||
QDomElement ptitem = taskSensor.firstChildElement("Pt");
|
||||
QDomElement griitem = taskSensor.firstChildElement("Gri");
|
||||
|
||||
if (imagingMode.isNull() || radarCenterFrequency.isNull() || bandWidth.isNull()
|
||||
|| centerLookAngle.isNull() || prf.isNull() || polar.isNull()
|
||||
|| nearRange.isNull() || farRange.isNull() )
|
||||
|| nearRange.isNull() || farRange.isNull()|| refphaseRange.isNull()
|
||||
|| ptitem.isNull()
|
||||
|| griitem.isNull())
|
||||
{
|
||||
qDebug() << QString::fromStdString(errorCode2errInfo(ErrorCode::XMLNOTFOUNDElEMENT));
|
||||
return nullptr;
|
||||
|
@ -278,9 +293,8 @@ std::shared_ptr<AbstractSARSatelliteModel> ReadSimulationSettingsXML(QString xml
|
|||
if (lookDirection.text().toUpper() == "R") {
|
||||
isR = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
taskSetting->setRefphaseRange(refphaseRange.text().toDouble());
|
||||
taskSetting->setCenterLookAngle(centerLookAngle.text().toDouble());
|
||||
taskSetting->setSARImageStartTime(starttimestamp); // 成像开始时间
|
||||
taskSetting->setSARImageEndTime(endtimestamp); // 成像终止时间
|
||||
|
@ -291,5 +305,7 @@ std::shared_ptr<AbstractSARSatelliteModel> ReadSimulationSettingsXML(QString xml
|
|||
taskSetting->setNearRange(nearRange.text().toDouble()); // NearRange
|
||||
taskSetting->setFarRange(farRange.text().toDouble()); // FarRange
|
||||
taskSetting->setIsRightLook(isR);
|
||||
taskSetting->setPt(ptitem.text().toDouble());
|
||||
taskSetting->setGri(griitem.text().toDouble());
|
||||
return taskSetting;
|
||||
}
|
|
@ -78,10 +78,13 @@ private:
|
|||
public: // 设置PRF、FS
|
||||
virtual void setPRF(double prf) override; // 方位向采样频率
|
||||
virtual double getPRF() override;
|
||||
|
||||
virtual void setRefphaseRange(double refRange);
|
||||
virtual double getRefphaseRange();
|
||||
private:
|
||||
double PRF;
|
||||
|
||||
double refPhaseRange;
|
||||
double pt;
|
||||
double Gri;
|
||||
|
||||
public:// 天线方向图
|
||||
virtual void setTransformRadiationPattern(std::shared_ptr<AbstractRadiationPattern> radiationPanttern); // 极化发射方向图
|
||||
|
|
Loading…
Reference in New Issue