RasterProcessTool/GF3CalibrationAndOrthLib/GF3CalibrationGeoCodingFunC...

51 lines
1.2 KiB
Plaintext
Raw Normal View History

2025-05-13 17:48:58 +00:00
#include "GF3CalibrationGeoCodingFunCUDA.cuh"
#include <cmath>
#include <complex>
#include <device_launch_parameters.h>
#include <cuda_runtime.h>
#include <cufft.h>
#include <cufftw.h>
#include <cufftXt.h>
#include <cublas_v2.h>
#include <cuComplex.h>
#include <chrono>
#include "BaseConstVariable.h"
#include "GPUTool.cuh"
__device__ __host__ float Computrer_polartionConver_rpolf(float inangle, float alpha)
{
float tang = 0.0;
if (inangle <= 0.0) {
tang = 0.0;
}
else if (inangle > 90.0) {
tang = 90.0;
}
else {
tang = inangle;
}
tang = tang * PI / 180.0;
float tan_val = tanf(tang);
float rpol = powf((1.0 + 2.0 * tan_val * tan_val), 2) / powf((1.0 + alpha * tan_val * tan_val), 2);
return rpol;
}
__device__ __host__ double Computrer_polartionConver_rpold(double inangle, double alpha)
{
double tang = 0.0;
if (inangle <= 0.0) {
tang = 0.0;
}
else if (inangle > 90.0) {
tang = 90.0;
}
else {
tang = inangle;
}
tang = tang * PI / 180.0;
double tan_val = tan(tang);
double rpol = pow((1.0 + 2.0 * tan_val * tan_val), 2) / pow((1.0 + alpha * tan_val * tan_val), 2);
return rpol;
}