RasterProcessTool/Toolbox/SimulationSARTool/SimulationSAR/GPURFPC.cuh

162 lines
3.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#ifndef _GPURFPC_H_
#define _GPURFPC_H_
#include "BaseConstVariable.h"
#include "GPUTool.cuh"
#include <cuda_runtime.h>
#include <device_launch_parameters.h>
#include <cublas_v2.h>
#include <cuComplex.h>
/** CUDA µ÷ÓòÎÊý ************************************************************************************/
#define RFPCPIDIVLIGHT -4*PI/(LIGHTSPEED/1e9)
extern "C" struct SateState {
double Px, Py, Pz, Vx, Vy, Vz,antDirectX, antDirectY, antDirectZ;
};
extern "C" struct GoalState {
double Tx, Ty, Tz, TsX, TsY, TsZ;
size_t cls;
};
extern "C" struct CUDASigmaParam {
float p1;
float p2;
float p3;
float p4;
float p5;
float p6;
};
extern "C" struct SloperDs
{
double* SloperX;
double* SloperY;
double* SloperZ;
double* SloperAngle;
};
extern "C" struct DEMDs
{
double* demX;
double* demY;
double* demZ;
};
extern "C" struct LandDataDs
{
unsigned char* landData;
};
extern "C" struct GPSPointsDs
{
double* Pxs;
double* Pys;
double* Pzs;
double* Vxs;
double* Vys;
double* Vzs;
};
extern "C" struct RFPCTask
{
double startFreq;
double stepFreq;
long freqNum;
long prfNum;
double Rnear;
double Rfar;
double Rref;
double Pt = 1;
SateState* antlist = nullptr;
GoalState* goallist = nullptr;
cuComplex* d_echoData = nullptr; // »Ø²¨
CUDASigmaParam sigma0_cls;
double maxGain=48;
double GainWeight=10; // 2¶È·¶Î§
size_t targetnum;
};
extern __device__ double GPU_getSigma0dB_params(
const double p1, const double p2, const double p3, const double p4, const double p5, const double p6,
double theta);
extern __device__ double GPU_getSigma0dB(CUDASigmaParam param, double theta);
extern __device__ float GPU_getSigma0dB(CUDASigmaParam param, float theta);
extern __device__ CUDAVectorEllipsoidal GPU_SatelliteAntDirectNormal(
double RstX, double RstY, double RstZ,
double AntXaxisX, double AntXaxisY, double AntXaxisZ,
double AntYaxisX, double AntYaxisY, double AntYaxisZ,
double AntZaxisX, double AntZaxisY, double AntZaxisZ,
double AntDirectX, double AntDirectY, double AntDirectZ
);
extern __device__ double GPU_BillerInterpAntPattern(double* antpattern,
double starttheta, double startphi, double dtheta, double dphi,
long thetapoints, long phipoints,
double searththeta, double searchphi);
extern "C" void CUDA_RFPC_MainProcess(
// ÌìÏß
double* antX, double* antY, double* antZ, // ÌìÏß×ø±ê
double* antXaxisX, double* antXaxisY, double* antXaxisZ, // ÌìÏß×ø±êϵµÄXÖá
double* antYaxisX, double* antYaxisY, double* antYaxisZ,// ÌìÏß×ø±êϵµÄYÖá
double* antZaxisX, double* antZaxisY, double* antZaxisZ,// ÌìÏß×ø±êϵµÄZÖá
double* antDirectX, double* antDirectY, double* antDirectZ,// ÌìÏßµÄÖ¸Ïò
long PRFCount, long FreqNum, // Âö³åÊýÁ¿£¬ÆµÂÊÊýÁ¿
float f0, float dfreq,// ÆðʼƵÂÊ£¬ÖÕֹƵÂÊ
double Pt,// ·¢ÉäÄÜÁ¿
double refPhaseRange,
// ÌìÏß·½Ïòͼ
double* TransAntpattern, double Transtarttheta, double Transstartphi, double Transdtheta, double Transdphi, int Transthetapoints, int Transphipoints, // ·¢ÉäÌìÏß·½Ïòͼ
double* ReceiveAntpattern, double Receivestarttheta, double Receivestartphi, double Receivedtheta, double Receivedphi, int Receivethetapoints, int Receivephipoints,//½ÓÊÕÌìÏß·½Ïòͼ
double maxTransAntPatternValue,double maxReceiveAntPatternValue,
double NearR, double FarR, // ¾àÀ뷶Χ
// µØÃæ
double* targetX, double* targetY, double* targetZ, long* demCls, long TargetPixelNumber, // µØÃæ×ø±ê¡¢µØ±í¸²¸ÇÀàÐÍ£¬ÏñËØÊý
double* demSlopeX, double* demSlopeY, double* demSlopeZ, // µØ±íÆÂ¶ÈʸÁ¿
CUDASigmaParam* sigma0Paramslist, long sigmaparamslistlen,// ²åֵͼÏñ
float* out_echoReal, float* out_echoImag,// Êä³ö»Ø²¨
float* d_temp_R, float* d_temp_amp
);
extern "C" double* hostSigmaData_toDevice(int devid);
extern "C" void ProcessRFPCTask(RFPCTask& task,long devid,float* h_R,float* h_amp);
#endif