所有模块编译成功
parent
766168086b
commit
5528e25c74
|
@ -100,6 +100,7 @@ StyleCopReport.xml
|
|||
*.scc
|
||||
**.tlog
|
||||
*.tlog
|
||||
*.idb
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
|
|
|
@ -139,6 +139,9 @@
|
|||
<ProjectReference Include="..\LAMPDataProcessEXE\LAMPDataProcessEXE.vcxproj">
|
||||
<Project>{4e6e79a3-048c-4fb4-bbb0-43c518a3e6d4}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\LAMPMainWidget\LAMPMainWidget.vcxproj">
|
||||
<Project>{d50e4f7d-d021-36b9-a36a-7e4442ae70a5}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\LAMPSARProcessProgram\RasterProcessTool.vcxproj">
|
||||
<Project>{7ef67daa-dbc0-4b7f-80e8-11b4d2cb7ec2}</Project>
|
||||
</ProjectReference>
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
<CudaCompile Include="GPUTool\GPUTool.cu" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="GPUBaseLibAPI.h" />
|
||||
<ClInclude Include="GPUTool\GPUTool.cuh" />
|
||||
<ClInclude Include="GPUTool\GPUBaseLibAPI.h" />
|
||||
<CudaCompile Include="GPUTool\GPUTool.cuh" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>17.0</VCProjectVersion>
|
||||
|
|
|
@ -21,13 +21,13 @@
|
|||
<CudaCompile Include="GPUTool\GPUTool.cu">
|
||||
<Filter>GPUTool</Filter>
|
||||
</CudaCompile>
|
||||
<CudaCompile Include="GPUTool\GPUTool.cuh">
|
||||
<Filter>GPUTool</Filter>
|
||||
</CudaCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="GPUTool\GPUTool.cuh">
|
||||
<ClInclude Include="GPUTool\GPUBaseLibAPI.h">
|
||||
<Filter>GPUTool</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="GPUBaseLibAPI.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -25,83 +25,83 @@
|
|||
|
||||
|
||||
enum LAMPGPUDATETYPE {
|
||||
LAMP_LONG,
|
||||
LAMP_FLOAT,
|
||||
LAMP_COMPLEXFLOAT
|
||||
LAMP_LONG,
|
||||
LAMP_FLOAT,
|
||||
LAMP_COMPLEXFLOAT
|
||||
};
|
||||
|
||||
extern "C" struct CUDAVector {
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
};
|
||||
|
||||
extern "C" struct CUDAVectorEllipsoidal {
|
||||
float theta;
|
||||
float phi;
|
||||
float Rho;
|
||||
float theta;
|
||||
float phi;
|
||||
float Rho;
|
||||
};
|
||||
|
||||
extern "C" struct CUDAComplex {
|
||||
float x;
|
||||
float y;
|
||||
float x;
|
||||
float y;
|
||||
};
|
||||
|
||||
|
||||
// 定义设备函数
|
||||
extern __device__ cuComplex cuCexpf(cuComplex x);
|
||||
extern __device__ CUDAVector GPU_VectorAB(CUDAVector A, CUDAVector B);
|
||||
extern __device__ float GPU_VectorNorm2(CUDAVector A);
|
||||
extern __device__ float GPU_dotVector(CUDAVector A, CUDAVector B);
|
||||
extern __device__ float GPU_CosAngle_VectorA_VectorB(CUDAVector A, CUDAVector B);
|
||||
|
||||
// 定义全局函数
|
||||
extern __global__ void CUDA_DistanceAB(float* Ax, float* Ay, float* Az, float* Bx, float* By, float* Bz, float* R, long len);
|
||||
extern __global__ void CUDA_B_DistanceA(float* Ax, float* Ay, float* Az, float Bx, float By, float Bz, float* R, long len);
|
||||
extern __global__ void CUDA_make_VectorA_B(float sX, float sY, float sZ, float* tX, float* tY, float* tZ, float* RstX, float* RstY, float* RstZ, long len);
|
||||
extern __global__ void CUDA_Norm_Vector(float* Vx, float* Vy, float* Vz, float* R, long len);
|
||||
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 __global__ void CUDA_D_sin(double* y, double* X, int n);
|
||||
extern __global__ void CUDA_D_cos(double* y, double* X, int n);
|
||||
extern __global__ void CUDAKernel_MemsetBlock(cuComplex* data, cuComplex init0, long len);
|
||||
|
||||
extern __global__ void CUDAKernel_MemsetBlock(float* data, float init0, long len);
|
||||
//// 定义设备函数
|
||||
//extern __device__ cuComplex cuCexpf(cuComplex x);
|
||||
//extern __device__ CUDAVector GPU_VectorAB(CUDAVector A, CUDAVector B);
|
||||
//extern __device__ float GPU_VectorNorm2(CUDAVector A);
|
||||
//extern __device__ float GPU_dotVector(CUDAVector A, CUDAVector B);
|
||||
//extern __device__ float GPU_CosAngle_VectorA_VectorB(CUDAVector A, CUDAVector B);
|
||||
//
|
||||
//// 定义全局函数
|
||||
//extern __global__ void CUDA_DistanceAB(float* Ax, float* Ay, float* Az, float* Bx, float* By, float* Bz, float* R, long len);
|
||||
//extern __global__ void CUDA_B_DistanceA(float* Ax, float* Ay, float* Az, float Bx, float By, float Bz, float* R, long len);
|
||||
//extern __global__ void CUDA_make_VectorA_B(float sX, float sY, float sZ, float* tX, float* tY, float* tZ, float* RstX, float* RstY, float* RstZ, long len);
|
||||
//extern __global__ void CUDA_Norm_Vector(float* Vx, float* Vy, float* Vz, float* R, long len);
|
||||
//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 __global__ void CUDA_D_sin(double* y, double* X, int n);
|
||||
//extern __global__ void CUDA_D_cos(double* y, double* X, int n);
|
||||
//extern __global__ void CUDAKernel_MemsetBlock(cuComplex* data, cuComplex init0, long len);
|
||||
//
|
||||
//extern __global__ void CUDAKernel_MemsetBlock(float* data, float init0, long len);
|
||||
|
||||
|
||||
// 打印GPU参数
|
||||
extern "C" void GPUBASELIBAPI printDeviceInfo(int deviceId);
|
||||
extern "C" GPUBASELIBAPI void printDeviceInfo(int deviceId);
|
||||
// 误差处理函数
|
||||
extern "C" void GPUBASELIBAPI checkCudaError(cudaError_t err, const char* msg);
|
||||
extern "C" GPUBASELIBAPI void checkCudaError(cudaError_t err, const char* msg);
|
||||
|
||||
// GPU 内存函数
|
||||
extern "C" void* GPUBASELIBAPI mallocCUDAHost( long memsize); // 主机内存声明
|
||||
extern "C" void GPUBASELIBAPI FreeCUDAHost(void* ptr);
|
||||
extern "C" void* GPUBASELIBAPI mallocCUDADevice( long memsize); // GPU内存声明
|
||||
extern "C" void GPUBASELIBAPI FreeCUDADevice(void* ptr);
|
||||
extern "C" void GPUBASELIBAPI HostToDevice(void* hostptr, void* deviceptr, long memsize);//GPU 内存数据转移 设备 -> GPU
|
||||
extern "C" void GPUBASELIBAPI DeviceToHost(void* hostptr, void* deviceptr, long memsize);//GPU 内存数据转移 GPU -> 设备
|
||||
extern "C" void GPUBASELIBAPI DeviceToDevice(void* s_deviceptr, void* t_deviceptr, long memsize);//GPU 内存数据转移 GPU -> 设备
|
||||
extern "C" GPUBASELIBAPI void* mallocCUDAHost(long memsize); // 主机内存声明
|
||||
extern "C" GPUBASELIBAPI void FreeCUDAHost(void* ptr);
|
||||
extern "C" GPUBASELIBAPI void* mallocCUDADevice(long memsize); // GPU内存声明
|
||||
extern "C" GPUBASELIBAPI void FreeCUDADevice(void* ptr);
|
||||
extern "C" GPUBASELIBAPI void HostToDevice(void* hostptr, void* deviceptr, long memsize);//GPU 内存数据转移 设备 -> GPU
|
||||
extern "C" GPUBASELIBAPI void DeviceToHost(void* hostptr, void* deviceptr, long memsize);//GPU 内存数据转移 GPU -> 设备
|
||||
extern "C" GPUBASELIBAPI void DeviceToDevice(void* s_deviceptr, void* t_deviceptr, long memsize);//GPU 内存数据转移 GPU -> 设备
|
||||
|
||||
extern "C" void GPUBASELIBAPI CUDA_MemsetBlock(cuComplex* data, cuComplex init0, long len);
|
||||
extern "C" GPUBASELIBAPI void CUDA_MemsetBlock(cuComplex* data, cuComplex init0, long len);
|
||||
// 矢量基础运算函数
|
||||
extern "C" void GPUBASELIBAPI CUDAdistanceAB(float* Ax, float* Ay, float* Az, float* Bx, float* By, float* Bz, float* R, long member);
|
||||
extern "C" void GPUBASELIBAPI CUDABdistanceAs(float* Ax, float* Ay, float* Az, float Bx, float By, float Bz, float* R, long member);
|
||||
extern "C" void GPUBASELIBAPI CUDAmake_VectorA_B(float sX, float sY, float sZ, float* tX, float* tY, float* tZ, float* RstX, float* RstY, float* RstZ, long member);
|
||||
extern "C" void GPUBASELIBAPI CUDANorm_Vector(float* Vx, float* Vy, float* Vz, float* R, long member);
|
||||
extern "C" void GPUBASELIBAPI CUDAcosAngle_VA_AB(float* Ax, float* Ay, float* Az, float* Bx, float* By, float* Bz, float* anglecos, long len);
|
||||
extern "C" GPUBASELIBAPI void CUDAdistanceAB(float* Ax, float* Ay, float* Az, float* Bx, float* By, float* Bz, float* R, long member);
|
||||
extern "C" GPUBASELIBAPI void CUDABdistanceAs(float* Ax, float* Ay, float* Az, float Bx, float By, float Bz, float* R, long member);
|
||||
extern "C" GPUBASELIBAPI void CUDAmake_VectorA_B(float sX, float sY, float sZ, float* tX, float* tY, float* tZ, float* RstX, float* RstY, float* RstZ, long member);
|
||||
extern "C" GPUBASELIBAPI void CUDANorm_Vector(float* Vx, float* Vy, float* Vz, float* R, long member);
|
||||
extern "C" GPUBASELIBAPI void CUDAcosAngle_VA_AB(float* Ax, float* Ay, float* Az, float* Bx, float* By, float* Bz, float* anglecos, long len);
|
||||
|
||||
// 常见插值算法
|
||||
|
||||
extern "C" void GPUBASELIBAPI CUDAGridPointLinearInterp1(float* v, float* q, float* qv,long xlen, long qlen);
|
||||
extern "C" void GPUBASELIBAPI CUDADSin(double* y, double* X, int n);
|
||||
extern "C" void GPUBASELIBAPI CUDADCos(double* y, double* X, int n);
|
||||
extern "C" GPUBASELIBAPI void CUDAGridPointLinearInterp1(float* v, float* q, float* qv, long xlen, long qlen);
|
||||
extern "C" GPUBASELIBAPI void CUDADSin(double* y, double* X, int n);
|
||||
extern "C" GPUBASELIBAPI void CUDADCos(double* y, double* X, int n);
|
||||
|
||||
// 估算分块整数
|
||||
extern "C" long GPUBASELIBAPI NextBlockPad(long num,long blocksize);
|
||||
extern "C" GPUBASELIBAPI long NextBlockPad(long num, long blocksize);
|
||||
|
||||
|
||||
extern "C" void GPUBASELIBAPI PrintLasterError(const char* s);
|
||||
extern "C" GPUBASELIBAPI void PrintLasterError(const char* s);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -61,9 +61,9 @@
|
|||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">release\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">release\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">LAMPMainWidget</TargetName>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectName)</TargetName>
|
||||
<IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</IgnoreImportLibrary>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">debug\</OutDir>
|
||||
|
|
|
@ -1,599 +0,0 @@
|
|||
#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 "GPURFPC.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 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);
|
||||
}
|
||||
|
||||
|
||||
result.theta = ThetaAnt;
|
||||
result.phi = PhiAnt;
|
||||
result.Rho = 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];
|
||||
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 CUDAKernel_RFPC_Caluation_R_Gain(
|
||||
float antX, float antY, float antZ, // 天线的坐标
|
||||
float* targetX, float* targetY, float* targetZ, long len, // 地面坐标
|
||||
long* demCls,
|
||||
float* demSlopeX, float* demSlopeY, float* demSlopeZ, // 地表坡度矢量
|
||||
float antXaxisX, float antXaxisY, float antXaxisZ, // 天线坐标系的X轴
|
||||
float antYaxisX, float antYaxisY, float antYaxisZ,// 天线坐标系的Y轴
|
||||
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 // 输出增益
|
||||
) {
|
||||
long idx = blockIdx.x * blockDim.x + threadIdx.x;
|
||||
if (idx < len) {
|
||||
double tx = targetX[idx];
|
||||
double ty = targetY[idx];
|
||||
double tz = targetZ[idx];
|
||||
double RstX = antX - tx; // 计算坐标矢量
|
||||
double RstY = antY - ty;
|
||||
double RstZ = antZ - tz;
|
||||
|
||||
float slopeX = demSlopeX[idx];
|
||||
float slopeY = demSlopeY[idx];
|
||||
float slopeZ = demSlopeZ[idx];
|
||||
|
||||
double RstR2 = RstX * RstX + RstY * RstY + RstZ * RstZ;
|
||||
double RstR = sqrt(RstR2); // 矢量距离
|
||||
|
||||
//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) {
|
||||
outAmp[idx] = 0;
|
||||
outR[idx] = 0;
|
||||
}
|
||||
else {
|
||||
// 求解坡度
|
||||
float slopR = sqrtf(slopeX * slopeX + slopeY * slopeY + slopeZ * slopeZ); //
|
||||
float dotAB = RstX * slopeX + RstY * slopeY + RstZ * slopeZ;
|
||||
float localangle = acosf(dotAB / (RstR * slopR)); // 局地入射角
|
||||
float ampGain = 0;
|
||||
// 求解天线方向图指向
|
||||
CUDAVectorEllipsoidal antVector = GPU_SatelliteAntDirectNormal(
|
||||
RstX, RstY, RstZ,
|
||||
antXaxisX, antXaxisY, antXaxisZ,
|
||||
antYaxisX, antYaxisY, antYaxisZ,
|
||||
antZaxisX, antZaxisY, antZaxisZ,
|
||||
antDirectX, antDirectY, antDirectZ
|
||||
);
|
||||
if (antVector.Rho > 0) {
|
||||
// 发射方向图
|
||||
float temptheta = antVector.theta * r2d;
|
||||
float tempphi = antVector.phi * r2d;
|
||||
float TansantPatternGain =
|
||||
GPU_BillerInterpAntPattern(
|
||||
TransAntpattern,
|
||||
Transtarttheta, Transstartphi, Transdtheta, Transdphi, Transthetapoints, Transphipoints,
|
||||
temptheta, tempphi);
|
||||
|
||||
// 接收方向图
|
||||
float antPatternGain = GPU_BillerInterpAntPattern(
|
||||
ReceiveAntpattern,
|
||||
Receivestarttheta, Receivestartphi, Receivedtheta, Receivedphi, Receivethetapoints, Receivephipoints,
|
||||
temptheta, tempphi);
|
||||
|
||||
// 计算
|
||||
float sigma0 = 0;
|
||||
{
|
||||
long clsid = demCls[idx];
|
||||
//printf("clsid=%d\n", clsid);
|
||||
CUDASigmaParam tempsigma = sigma0Paramslist[clsid];
|
||||
if (localangle < 0 || localangle >= LAMP_CUDA_PI / 2) {
|
||||
sigma0 = 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
|
||||
) {
|
||||
sigma0 = 0;
|
||||
}
|
||||
else {
|
||||
float sigma = GPU_getSigma0dB(tempsigma, localangle);
|
||||
sigma0 = powf(10.0, sigma / 10.0);// 后向散射系数
|
||||
}
|
||||
}
|
||||
|
||||
ampGain = TansantPatternGain * antPatternGain;
|
||||
ampGain = ampGain / (powf(4 * LAMP_CUDA_PI, 2) * powf(RstR, 4)); // 反射强度
|
||||
outAmp[idx] = ampGain * Pt * sigma0;
|
||||
outR[idx] = RstR - refPhaseRange;
|
||||
}
|
||||
else {
|
||||
outAmp[idx] = 0;
|
||||
outR[idx] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
__global__ void CUDAKernel_PRF_CalFreqEcho(
|
||||
double* Rarr, float* ampArr, long pixelcount,
|
||||
float* factorj, long freqnum,
|
||||
double dx, double nearR,
|
||||
cuComplex* PRFEcho, long prfid) {
|
||||
long idx = blockIdx.x * blockDim.x + threadIdx.x;
|
||||
if (idx < freqnum) {
|
||||
float fatorj = factorj[idx];
|
||||
float phi = 0;
|
||||
float amptemp = 0;
|
||||
cuComplex tempfreqEcho = PRFEcho[prfid * freqnum + idx];
|
||||
for (long i = 0; i < pixelcount; i++) { // 区域积分
|
||||
//phi = (R = R - (floor(R / lamda) - 1) * lamda)* 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;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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
__global__ void CUDAKernel_PRFSumEcho_Rows(
|
||||
double* Rarr,float* ampArr,long Rows,long Cols,
|
||||
long startRid,
|
||||
float* factorj, long freqnum,
|
||||
cuComplex* freqRowsbuffer, long tempRows
|
||||
){
|
||||
long idx = blockIdx.x * blockDim.x + threadIdx.x;
|
||||
if (idx < Rows) { // 按行汇总
|
||||
double R = 0;
|
||||
double tempamp = 0;
|
||||
float phi = 0;
|
||||
long rid = idx + startRid;
|
||||
float factor = 0;
|
||||
|
||||
for (long jj = 0; jj < freqnum; jj++) {
|
||||
tempamp = ampArr[rid * Cols + jj];
|
||||
R = Rarr[rid * Cols + jj];
|
||||
for (long ii = 0; ii < freqnum; ii++) {
|
||||
phi = R * factorj[ii];
|
||||
freqRowsbuffer[idx * freqnum + ii].x = freqRowsbuffer[idx * freqnum + ii].x + tempamp * cos(phi); // 实部
|
||||
freqRowsbuffer[idx * freqnum + ii].y = freqRowsbuffer[idx * freqnum + ii].y + tempamp * sin(phi); // 虚部
|
||||
}
|
||||
//freqRowsbuffer[idx * freqnum + ii] = tempfreqEcho;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
__global__ void CUDAKernel_PRFSumEcho_Freq(
|
||||
cuComplex* freqRowsbuffer, long tempRows,long freqnum,
|
||||
cuComplex* PRFEcho, long prfid
|
||||
) {
|
||||
long idx = blockIdx.x * blockDim.x + threadIdx.x;
|
||||
if (idx < freqnum) { // 按行汇总
|
||||
cuComplex tempfreqEcho = freqRowsbuffer[prfid * freqnum + idx];
|
||||
cuComplex temp = tempfreqEcho;
|
||||
for (long ii = 0; ii < tempRows; ii++) { // 求和汇总
|
||||
temp = freqRowsbuffer[ii * freqnum + idx];
|
||||
tempfreqEcho.x = tempfreqEcho.x + temp.x;
|
||||
tempfreqEcho.y = tempfreqEcho.y + temp.y;
|
||||
}
|
||||
freqRowsbuffer[prfid * freqnum + idx] = tempfreqEcho;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
|
@ -15,7 +15,12 @@
|
|||
|
||||
#ifdef __CUDANVCC___
|
||||
|
||||
|
||||
// 定义参数
|
||||
__device__ cuComplex cuCexpf(cuComplex d)
|
||||
{
|
||||
float factor = exp(d.x);
|
||||
return make_cuComplex(factor * cos(d.y), factor * sin(d.y));
|
||||
}
|
||||
|
||||
__global__ void CUDA_TBPImage(
|
||||
float* antPx, float* antPy, float* antPz,
|
||||
|
|
|
@ -4,26 +4,28 @@
|
|||
#include "RFPCProcessCls.h"
|
||||
#include <boost/thread.hpp>
|
||||
#include <thread>
|
||||
#include "ui_QImageSARRFPC.h"
|
||||
|
||||
|
||||
QImageSARRFPC::QImageSARRFPC(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
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.pushButtonsloper, SIGNAL(clicked()), this, SLOT(onpushButtonSloperClieck()));
|
||||
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->pushButtonsloper, SIGNAL(clicked()), this, SLOT(onpushButtonSloperClieck()));
|
||||
|
||||
|
||||
|
||||
QObject::connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(onBtnaccept()));
|
||||
QObject::connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(onBtnReject()));
|
||||
QObject::connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(onBtnaccept()));
|
||||
QObject::connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(onBtnReject()));
|
||||
|
||||
|
||||
}
|
||||
|
@ -40,7 +42,7 @@ void QImageSARRFPC::onpushButtonRPClieck()
|
|||
u8"csv Files (*.csv);;All Files (*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.receivePatternFilePathEdit->setText(fileName);
|
||||
this->ui->receivePatternFilePathEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
|
@ -56,7 +58,7 @@ void QImageSARRFPC::onpushButtonTPClieck()
|
|||
u8"csv Files (*.csv);;All Files (*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.transformPatternFilePathEdit->setText(fileName);
|
||||
this->ui->transformPatternFilePathEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
|
@ -69,7 +71,7 @@ void QImageSARRFPC::onpushButtonEchoClieck()
|
|||
QString fileName = QFileDialog::getExistingDirectory(this, u8"选择回波存放路径", "");
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.outEchoPathEdit->setText(fileName);
|
||||
this->ui->outEchoPathEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件夹", u8"没有选择任何文件夹");
|
||||
|
@ -86,7 +88,7 @@ void QImageSARRFPC::onpushButtongpxmlClieck()
|
|||
u8"xml Files (*.xml);;All Files (*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.gpsXmlPathEdit->setText(fileName);
|
||||
this->ui->gpsXmlPathEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
|
@ -102,7 +104,7 @@ void QImageSARRFPC::onpushButtonTaskxmlClieck()
|
|||
u8"xml Files (*.xml);;All Files (*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.taskXmlPathEdit->setText(fileName);
|
||||
this->ui->taskXmlPathEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
|
@ -118,7 +120,7 @@ void QImageSARRFPC::onpushButtondemClieck()
|
|||
u8"tif Files (*.tif);;data Files (*.data);;bin Files (*.bin);;All Files (*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.demTiffPathEdit->setText(fileName);
|
||||
this->ui->demTiffPathEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
|
@ -134,7 +136,7 @@ void QImageSARRFPC::onpushButtonSloperClieck()
|
|||
u8"tif Files (*.tif);;data Files (*.data);;bin Files (*.bin);;All Files (*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.sloperPathEdit->setText(fileName);
|
||||
this->ui->sloperPathEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
|
@ -150,7 +152,7 @@ void QImageSARRFPC::onpushButtonlandcoverClieck()
|
|||
u8"tif Files (*.tif);;data Files (*.data);;bin Files (*.bin);;All Files (*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.landCoverPathEdit->setText(fileName);
|
||||
this->ui->landCoverPathEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
|
@ -162,16 +164,16 @@ void QImageSARRFPC::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 demsloperPath = ui.sloperPathEdit->text().trimmed();
|
||||
QString OutEchoPath = ui.outEchoPathEdit->text().trimmed();// u8"D:/Programme/vs2022/RasterMergeTest/TestData/outData/";
|
||||
QString simulationtaskName = ui.simulationTaskNameEdit->text().trimmed();// u8"GF3_Simulation";
|
||||
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 demsloperPath = ui->sloperPathEdit->text().trimmed();
|
||||
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";
|
||||
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";
|
||||
|
||||
// 打印参数
|
||||
// 打印解析的参数
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
#pragma once
|
||||
|
||||
#include "simulationsartool_global.h"
|
||||
#include <QMainWindow>
|
||||
#include "ui_QImageSARRFPC.h"
|
||||
#include <QDialog>
|
||||
|
||||
class QImageSARRFPC : public QDialog
|
||||
namespace Ui {
|
||||
class QImageSARRFPCClass;
|
||||
}
|
||||
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT QImageSARRFPC : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -28,5 +33,5 @@ public slots:
|
|||
void onBtnReject();
|
||||
|
||||
private:
|
||||
Ui::QImageSARRFPCClass ui;
|
||||
Ui::QImageSARRFPCClass* ui;
|
||||
};
|
||||
|
|
|
@ -5,16 +5,19 @@
|
|||
#include <QVector>
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
#include "ui_QMergeRasterProcessDialog.h"
|
||||
|
||||
|
||||
QMergeRasterProcessDialog::QMergeRasterProcessDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
ui->setupUi(this);
|
||||
|
||||
QObject::connect(ui.pushButtonSelect, SIGNAL(clicked(bool)), this, SLOT(onpushButtonSelectClick(bool)));
|
||||
QObject::connect(ui.AddpushButton, SIGNAL(clicked(bool)), this, SLOT(onAddpushButtonClick(bool)));
|
||||
QObject::connect(ui.RemovepushButton, SIGNAL(clicked(bool)), this, SLOT(onRemovepushButtonClick(bool)));
|
||||
QObject::connect(ui.buttonBoxDialog, SIGNAL(accepted()), this, SLOT(acceptclick()));
|
||||
QObject::connect(ui.buttonBoxDialog, SIGNAL(rejected()), this, SLOT(rejectclick()));
|
||||
QObject::connect(ui->pushButtonSelect, SIGNAL(clicked(bool)), this, SLOT(onpushButtonSelectClick(bool)));
|
||||
QObject::connect(ui->AddpushButton, SIGNAL(clicked(bool)), this, SLOT(onAddpushButtonClick(bool)));
|
||||
QObject::connect(ui->RemovepushButton, SIGNAL(clicked(bool)), this, SLOT(onRemovepushButtonClick(bool)));
|
||||
QObject::connect(ui->buttonBoxDialog, SIGNAL(accepted()), this, SLOT(acceptclick()));
|
||||
QObject::connect(ui->buttonBoxDialog, SIGNAL(rejected()), this, SLOT(rejectclick()));
|
||||
}
|
||||
|
||||
QMergeRasterProcessDialog::~QMergeRasterProcessDialog()
|
||||
|
@ -30,7 +33,7 @@ void QMergeRasterProcessDialog::onpushButtonSelectClick(bool checked ) {
|
|||
u8"Image Files (*.tif);;All Files (*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.lineEditOutPath->setText(fileName);
|
||||
this->ui->lineEditOutPath->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
|
@ -51,7 +54,7 @@ void QMergeRasterProcessDialog::onAddpushButtonClick(bool checked )
|
|||
if (!fileNames.isEmpty()) {
|
||||
QString message = "选择的文件有:\n";
|
||||
for (const QString& fileName : fileNames) {
|
||||
this->ui.listWidgetRaster->addItem(fileName);
|
||||
this->ui->listWidgetRaster->addItem(fileName);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -62,9 +65,9 @@ void QMergeRasterProcessDialog::onAddpushButtonClick(bool checked )
|
|||
|
||||
void QMergeRasterProcessDialog::onRemovepushButtonClick(bool checked )
|
||||
{
|
||||
QList<QListWidgetItem*> selectedItems =this->ui.listWidgetRaster->selectedItems();
|
||||
QList<QListWidgetItem*> selectedItems =this->ui->listWidgetRaster->selectedItems();
|
||||
for (QListWidgetItem* item : selectedItems) {
|
||||
delete this->ui.listWidgetRaster->takeItem(this->ui.listWidgetRaster->row(item));
|
||||
delete this->ui->listWidgetRaster->takeItem(this->ui->listWidgetRaster->row(item));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,10 +75,10 @@ void QMergeRasterProcessDialog::acceptclick()
|
|||
{
|
||||
QToolProcessBarDialog* processdialog = new QToolProcessBarDialog(this);
|
||||
|
||||
QVector<QString> infile(ui.listWidgetRaster->count());
|
||||
QString outstring = ui.lineEditOutPath->text();
|
||||
for (long i = 0; i < ui.listWidgetRaster->count(); i++) {
|
||||
infile[i] = ui.listWidgetRaster->item(i)->text();
|
||||
QVector<QString> infile(ui->listWidgetRaster->count());
|
||||
QString outstring = ui->lineEditOutPath->text();
|
||||
for (long i = 0; i < ui->listWidgetRaster->count(); i++) {
|
||||
infile[i] = ui->listWidgetRaster->item(i)->text();
|
||||
}
|
||||
processdialog->show();
|
||||
processdialog->showProcess(0.0,u8"合并影像");
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
#include "simulationsartool_global.h"
|
||||
#include <QDialog>
|
||||
#include "ui_QMergeRasterProcessDialog.h"
|
||||
|
||||
class QMergeRasterProcessDialog : public QDialog
|
||||
namespace Ui {
|
||||
class QMergeRasterProcessDialogClass;
|
||||
}
|
||||
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT QMergeRasterProcessDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -19,5 +23,5 @@ public slots:
|
|||
void rejectclick();
|
||||
|
||||
private:
|
||||
Ui::QMergeRasterProcessDialogClass ui;
|
||||
Ui::QMergeRasterProcessDialogClass* ui;
|
||||
};
|
||||
|
|
|
@ -1,23 +1,25 @@
|
|||
#include "QSARLookTableSimualtionGUI.h"
|
||||
#include <QFileDialog>
|
||||
#include <QDebug>
|
||||
#include "ui_QSARLookTableSimualtionGUI.h"
|
||||
|
||||
|
||||
QSARLookTableSimualtionGUI::QSARLookTableSimualtionGUI(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
ui->setupUi(this);
|
||||
|
||||
// 绑定事件
|
||||
|
||||
|
||||
connect(this->ui.OrbitBtn, SIGNAL(clicked(bool)), this, SLOT(onOrbitBtnClicked(bool)));
|
||||
connect(this->ui.DEMBtn, SIGNAL(clicked(bool)), this, SLOT(onDEMBtnClicked(bool)));
|
||||
connect(this->ui.SateParamsBtn, SIGNAL(clicked(bool)), this, SLOT(onSateParamsBtnClicked(bool)));
|
||||
connect(this->ui.IncBtn, SIGNAL(clicked(bool)), this, SLOT(onIncBtnClicked(bool)));
|
||||
connect(this->ui.LkTblBtn, SIGNAL(clicked(bool)), this, SLOT(onLkTblBtnClicked(bool)));
|
||||
connect(this->ui->OrbitBtn, SIGNAL(clicked(bool)), this, SLOT(onOrbitBtnClicked(bool)));
|
||||
connect(this->ui->DEMBtn, SIGNAL(clicked(bool)), this, SLOT(onDEMBtnClicked(bool)));
|
||||
connect(this->ui->SateParamsBtn, SIGNAL(clicked(bool)), this, SLOT(onSateParamsBtnClicked(bool)));
|
||||
connect(this->ui->IncBtn, SIGNAL(clicked(bool)), this, SLOT(onIncBtnClicked(bool)));
|
||||
connect(this->ui->LkTblBtn, SIGNAL(clicked(bool)), this, SLOT(onLkTblBtnClicked(bool)));
|
||||
|
||||
connect(this->ui.acpRjBtn, SIGNAL(accepted()), this, SLOT(acpRjBtnAccepted()));
|
||||
connect(this->ui.acpRjBtn, SIGNAL(rejected()), this, SLOT(acpRjBtnRejected()));
|
||||
connect(this->ui->acpRjBtn, SIGNAL(accepted()), this, SLOT(acpRjBtnAccepted()));
|
||||
connect(this->ui->acpRjBtn, SIGNAL(rejected()), this, SLOT(acpRjBtnRejected()));
|
||||
|
||||
}
|
||||
|
||||
|
@ -35,8 +37,8 @@ void QSARLookTableSimualtionGUI::onOrbitBtnClicked(bool)
|
|||
|
||||
// 检查用户是否选择了文件
|
||||
if (!filePath.isEmpty()) {
|
||||
this->ui.lineEdit_Orbit->clear();
|
||||
this->ui.lineEdit_Orbit->setText(filePath);
|
||||
this->ui->lineEdit_Orbit->clear();
|
||||
this->ui->lineEdit_Orbit->setText(filePath);
|
||||
}
|
||||
else {
|
||||
qDebug() << "用户取消了选择。";
|
||||
|
@ -54,8 +56,8 @@ void QSARLookTableSimualtionGUI::onDEMBtnClicked(bool)
|
|||
|
||||
// 检查用户是否选择了文件
|
||||
if (!filePath.isEmpty()) {
|
||||
this->ui.lineEdit_DEM->clear();
|
||||
this->ui.lineEdit_DEM->setText(filePath);
|
||||
this->ui->lineEdit_DEM->clear();
|
||||
this->ui->lineEdit_DEM->setText(filePath);
|
||||
}
|
||||
else {
|
||||
qDebug() << "用户取消了选择。";
|
||||
|
@ -73,8 +75,8 @@ void QSARLookTableSimualtionGUI::onSateParamsBtnClicked(bool)
|
|||
|
||||
// 检查用户是否选择了文件
|
||||
if (!filePath.isEmpty()) {
|
||||
this->ui.lineEdit_SateParams->clear();
|
||||
this->ui.lineEdit_SateParams->setText(filePath);
|
||||
this->ui->lineEdit_SateParams->clear();
|
||||
this->ui->lineEdit_SateParams->setText(filePath);
|
||||
}
|
||||
else {
|
||||
qDebug() << "用户取消了选择。";
|
||||
|
@ -92,8 +94,8 @@ void QSARLookTableSimualtionGUI::onIncBtnClicked(bool)
|
|||
|
||||
// 检查用户是否选择了文件
|
||||
if (!filePath.isEmpty()) {
|
||||
this->ui.lineEdit_Inc->clear();
|
||||
this->ui.lineEdit_Inc->setText(filePath);
|
||||
this->ui->lineEdit_Inc->clear();
|
||||
this->ui->lineEdit_Inc->setText(filePath);
|
||||
}
|
||||
else {
|
||||
qDebug() << "用户取消了选择。";
|
||||
|
@ -111,8 +113,8 @@ void QSARLookTableSimualtionGUI::onLkTblBtnClicked(bool)
|
|||
|
||||
// 检查用户是否选择了文件
|
||||
if (!filePath.isEmpty()) {
|
||||
this->ui.lineEdit_LkTbl->clear();
|
||||
this->ui.lineEdit_LkTbl->setText(filePath);
|
||||
this->ui->lineEdit_LkTbl->clear();
|
||||
this->ui->lineEdit_LkTbl->setText(filePath);
|
||||
}
|
||||
else {
|
||||
qDebug() << "用户取消了选择。";
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
#pragma once
|
||||
|
||||
#include "simulationsartool_global.h"
|
||||
#include <QDialog>
|
||||
#include "ui_QSARLookTableSimualtionGUI.h"
|
||||
|
||||
class QSARLookTableSimualtionGUI : public QDialog
|
||||
namespace Ui {
|
||||
class QSARLookTableSimualtionGUIClass;
|
||||
}
|
||||
|
||||
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT QSARLookTableSimualtionGUI : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -12,7 +17,7 @@ public:
|
|||
~QSARLookTableSimualtionGUI();
|
||||
|
||||
private:
|
||||
Ui::QSARLookTableSimualtionGUIClass ui;
|
||||
Ui::QSARLookTableSimualtionGUIClass* ui;
|
||||
|
||||
|
||||
public slots:
|
||||
|
|
|
@ -5,16 +5,18 @@
|
|||
#include "EchoDataFormat.h"
|
||||
#include <boost/thread.hpp>
|
||||
#include <thread>
|
||||
#include "ui_QSimulationBPImage.h"
|
||||
|
||||
|
||||
QSimulationBPImage::QSimulationBPImage(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
ui->setupUi(this);
|
||||
|
||||
QObject::connect(ui.pushButtonEchoSelect, SIGNAL(clicked()), this, SLOT(onpushButtonEchoSelectClicked()));
|
||||
QObject::connect(ui.pushButtonImageSelect, SIGNAL(clicked()), this, SLOT(onpushButtonImageSelectClicked()));
|
||||
QObject::connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(onbtnaccepted()));
|
||||
QObject::connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(onbtnrejected()));
|
||||
QObject::connect(ui->pushButtonEchoSelect, SIGNAL(clicked()), this, SLOT(onpushButtonEchoSelectClicked()));
|
||||
QObject::connect(ui->pushButtonImageSelect, SIGNAL(clicked()), this, SLOT(onpushButtonImageSelectClicked()));
|
||||
QObject::connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(onbtnaccepted()));
|
||||
QObject::connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(onbtnrejected()));
|
||||
|
||||
}
|
||||
|
||||
|
@ -33,7 +35,7 @@ void QSimulationBPImage::onpushButtonEchoSelectClicked()
|
|||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = "选择的文件有:\n";
|
||||
this->ui.lineEditEchoPath->setText(fileNames);
|
||||
this->ui->lineEditEchoPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
|
@ -51,7 +53,7 @@ void QSimulationBPImage::onpushButtonImageSelectClicked()
|
|||
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
this->ui.lineEditImagePath->setText(fileNames);
|
||||
this->ui->lineEditImagePath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
|
@ -60,9 +62,9 @@ void QSimulationBPImage::onpushButtonImageSelectClicked()
|
|||
|
||||
void QSimulationBPImage::onbtnaccepted()
|
||||
{
|
||||
QString echofile = this->ui.lineEditEchoPath->text().trimmed();
|
||||
QString outImageFolder = getParantFromPath(this->ui.lineEditImagePath->text().trimmed());
|
||||
QString imagename = getFileNameFromPath(this->ui.lineEditImagePath->text().trimmed());
|
||||
QString echofile = this->ui->lineEditEchoPath->text().trimmed();
|
||||
QString outImageFolder = getParantFromPath(this->ui->lineEditImagePath->text().trimmed());
|
||||
QString imagename = getFileNameFromPath(this->ui->lineEditImagePath->text().trimmed());
|
||||
std::shared_ptr<EchoL0Dataset> echoL0ds(new EchoL0Dataset);
|
||||
echoL0ds->Open(echofile);
|
||||
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
#pragma once
|
||||
|
||||
#include "simulationsartool_global.h"
|
||||
#include <QDialog>
|
||||
#include "ui_QSimulationBPImage.h"
|
||||
|
||||
class QSimulationBPImage : public QDialog
|
||||
namespace Ui {
|
||||
class QSimulationBPImageClass;
|
||||
}
|
||||
|
||||
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT QSimulationBPImage : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -19,5 +24,5 @@ public slots:
|
|||
void onbtnrejected();
|
||||
|
||||
private:
|
||||
Ui::QSimulationBPImageClass ui;
|
||||
Ui::QSimulationBPImageClass* ui;
|
||||
};
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
#include "QSimulationRFPCGUI.h"
|
||||
#include "ui_QSimulationRFPCGUI.h"
|
||||
|
||||
|
||||
QSimulationRFPCGUI::QSimulationRFPCGUI(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
QSimulationRFPCGUI::~QSimulationRFPCGUI()
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
#pragma once
|
||||
|
||||
#include "simulationsartool_global.h"
|
||||
#include <QDialog>
|
||||
#include "ui_QSimulationRFPCGUI.h"
|
||||
|
||||
class QSimulationRFPCGUI : public QDialog
|
||||
namespace Ui {
|
||||
class QSimulationRFPCGUIClass;
|
||||
}
|
||||
|
||||
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT QSimulationRFPCGUI : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -12,5 +17,5 @@ public:
|
|||
~QSimulationRFPCGUI();
|
||||
|
||||
private:
|
||||
Ui::QSimulationRFPCGUIClass ui;
|
||||
Ui::QSimulationRFPCGUIClass* ui;
|
||||
};
|
||||
|
|
|
@ -48,7 +48,9 @@
|
|||
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
|
||||
<Message Importance="High" Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
|
||||
</Target>
|
||||
<ImportGroup Label="ExtensionSettings" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
<Import Project="$(VCTargetsPath)\BuildCustomizations\CUDA 12.6.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared" />
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
|
@ -71,6 +73,10 @@
|
|||
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
|
||||
<OpenMPSupport>true</OpenMPSupport>
|
||||
</ClCompile>
|
||||
<CudaCompile>
|
||||
<GenerateRelocatableDeviceCode>true</GenerateRelocatableDeviceCode>
|
||||
<CodeGeneration>compute_86,sm_86</CodeGeneration>
|
||||
</CudaCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'" Label="Configuration">
|
||||
<ClCompile>
|
||||
|
@ -103,7 +109,6 @@
|
|||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="SimulationSAR\GF3PSTNClass.cpp" />
|
||||
<ClCompile Include="SimulationSAR\QImageSARRFPC.cpp" />
|
||||
<ClCompile Include="SimulationSAR\QMergeRasterProcessDialog.cpp" />
|
||||
<ClCompile Include="SimulationSAR\QSARLookTableSimualtionGUI.cpp" />
|
||||
|
@ -115,12 +120,13 @@
|
|||
<ClCompile Include="SimulationSAR\SatelliteOribtModel.cpp" />
|
||||
<ClCompile Include="SimulationSAR\SigmaDatabase.cpp" />
|
||||
<ClCompile Include="SimulationSAR\TBPImageAlgCls.cpp" />
|
||||
<ClInclude Include="SimulationSARToolAPI.h" />
|
||||
<ClInclude Include="simulationsartool_global.h" />
|
||||
<ClInclude Include="SimulationSAR\QImageSARRFPC.h" />
|
||||
<ClInclude Include="SimulationSAR\QMergeRasterProcessDialog.h" />
|
||||
<ClInclude Include="SimulationSAR\QSARLookTableSimualtionGUI.h" />
|
||||
<ClInclude Include="SimulationSAR\QSimulationBPImage.h" />
|
||||
<ClInclude Include="SimulationSAR\QSimulationRFPCGUI.h" />
|
||||
<QtMoc Include="SimulationSAR\QImageSARRFPC.h" />
|
||||
<QtMoc Include="SimulationSAR\QMergeRasterProcessDialog.h" />
|
||||
<QtMoc Include="SimulationSAR\QSARLookTableSimualtionGUI.h" />
|
||||
<QtMoc Include="SimulationSAR\QSimulationBPImage.h" />
|
||||
<QtMoc Include="SimulationSAR\QSimulationRFPCGUI.h" />
|
||||
<ClInclude Include="SimulationSAR\RFPCProcessCls.h" />
|
||||
<ClInclude Include="SimulationSAR\SARSatelliteSimulationAbstractCls.h" />
|
||||
<ClInclude Include="SimulationSAR\SARSimulationTaskSetting.h" />
|
||||
|
@ -131,11 +137,14 @@
|
|||
<ClCompile Include="SimulationSARTool.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="SimulationSAR\GPURFPC.cu" />
|
||||
<None Include="SimulationSAR\GPURFPC.cuh" />
|
||||
<None Include="SimulationSAR\GPURFPCKernel.cu" />
|
||||
<None Include="SimulationSAR\GPUTBPImage.cu" />
|
||||
<None Include="SimulationSAR\GPUTBPImage.cuh" />
|
||||
<CudaCompile Include="SimulationSAR\GPURFPC.cu">
|
||||
<FileType>Document</FileType>
|
||||
</CudaCompile>
|
||||
<CudaCompile Include="SimulationSAR\GPURFPC.cuh" />
|
||||
<CudaCompile Include="SimulationSAR\GPUTBPImage.cu">
|
||||
<FileType>Document</FileType>
|
||||
</CudaCompile>
|
||||
<CudaCompile Include="SimulationSAR\GPUTBPImage.cuh" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtUic Include="SimulationSAR\QImageSARRFPC.ui" />
|
||||
|
@ -148,6 +157,9 @@
|
|||
<ProjectReference Include="..\..\BaseCommonLibrary\BaseCommonLibrary.vcxproj">
|
||||
<Project>{872ecd6f-30e3-4a1b-b17c-15e87d373ff6}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\GPUBaseLib\GPUBaseLib.vcxproj">
|
||||
<Project>{b8b40c54-f7fe-4809-b6fb-8bc014570d7b}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\LAMPSARProcessProgram\RasterProcessTool.vcxproj">
|
||||
<Project>{7ef67daa-dbc0-4b7f-80e8-11b4d2cb7ec2}</Project>
|
||||
</ProjectReference>
|
||||
|
@ -157,5 +169,6 @@
|
|||
<Import Project="$(QtMsBuild)\qt.targets" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="$(VCTargetsPath)\BuildCustomizations\CUDA 12.6.targets" />
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -35,21 +35,6 @@
|
|||
<ClCompile Include="SimulationSARTool.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="SimulationSAR\QImageSARRFPC.h">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SimulationSAR\QMergeRasterProcessDialog.h">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SimulationSAR\QSARLookTableSimualtionGUI.h">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SimulationSAR\QSimulationBPImage.h">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SimulationSAR\QSimulationRFPCGUI.h">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SimulationSAR\RFPCProcessCls.h">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</ClInclude>
|
||||
|
@ -68,11 +53,11 @@
|
|||
<ClInclude Include="SimulationSAR\TBPImageAlgCls.h">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SimulationSARToolAPI.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="SimulationSAR\GF3PSTNClass.cpp">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SimulationSAR\QImageSARRFPC.cpp">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</ClCompile>
|
||||
|
@ -107,23 +92,6 @@
|
|||
<Filter>SimulationSAR</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="SimulationSAR\GPURFPC.cu">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</None>
|
||||
<None Include="SimulationSAR\GPURFPC.cuh">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</None>
|
||||
<None Include="SimulationSAR\GPURFPCKernel.cu">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</None>
|
||||
<None Include="SimulationSAR\GPUTBPImage.cu">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</None>
|
||||
<None Include="SimulationSAR\GPUTBPImage.cuh">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtUic Include="SimulationSAR\QImageSARRFPC.ui">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
|
@ -141,4 +109,35 @@
|
|||
<Filter>SimulationSAR</Filter>
|
||||
</QtUic>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="SimulationSAR\QImageSARRFPC.h">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="SimulationSAR\QSimulationRFPCGUI.h">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="SimulationSAR\QMergeRasterProcessDialog.h">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="SimulationSAR\QSARLookTableSimualtionGUI.h">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="SimulationSAR\QSimulationBPImage.h">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</QtMoc>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CudaCompile Include="SimulationSAR\GPURFPC.cu">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</CudaCompile>
|
||||
<CudaCompile Include="SimulationSAR\GPURFPC.cuh">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</CudaCompile>
|
||||
<CudaCompile Include="SimulationSAR\GPUTBPImage.cu">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</CudaCompile>
|
||||
<CudaCompile Include="SimulationSAR\GPUTBPImage.cuh">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</CudaCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
|
||||
# if defined(SIMULATIONSARTOOL_LIB)
|
||||
# define SIMULATIONSARTOOLAPI_EXPORT __declspec(dllexport)
|
||||
# else
|
||||
# define SIMULATIONSARTOOLAPI_EXPORT __declspec(dllimport)
|
||||
# endif
|
Loading…
Reference in New Issue