冲突解决
commit
c0c95cc82c
|
@ -220,11 +220,13 @@
|
|||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
|
||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
||||
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
|
||||
<OpenMPSupport>true</OpenMPSupport>
|
||||
<LanguageStandard>stdcpp14</LanguageStandard>
|
||||
<LanguageStandard_C>stdc11</LanguageStandard_C>
|
||||
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
|
|
@ -15,6 +15,9 @@
|
|||
|
||||
|
||||
|
||||
/** 定义常见文件格式*********/
|
||||
#define ENVI_FILE_FORMAT_FILTER u8"ALL File(*.*);;ENVI Bin(*.bin);;ENVI Data(*.dat);;ENVI Data(*.data);;tiff影像(*.tif);;tiff影像(*.tiff)"
|
||||
#define XML_FILE_FORMAT_FILTER u8"ALL File(*.*);;XML File(*.xml);;tiff影像(*.tiff)"
|
||||
|
||||
|
||||
//
|
||||
|
@ -136,6 +139,14 @@ struct Point3 {
|
|||
void setZ(double iz) { z = iz; }
|
||||
};
|
||||
|
||||
struct Point_3d {
|
||||
double x;
|
||||
double y;
|
||||
double z;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct DemBox {
|
||||
double min_lon;
|
||||
double max_lon;
|
||||
|
@ -154,7 +165,7 @@ struct Vector3_single {
|
|||
|
||||
|
||||
/*********************************************** FEKO仿真参数 ********************************************************************/
|
||||
struct SatellitePos {
|
||||
extern "C" struct SatellitePos {
|
||||
double time;
|
||||
double Px ;
|
||||
double Py ;
|
||||
|
@ -165,7 +176,7 @@ struct SatellitePos {
|
|||
};
|
||||
|
||||
|
||||
struct SatelliteAntPos {
|
||||
extern "C" struct SatelliteAntPos {
|
||||
double time; // 0
|
||||
double Px;
|
||||
double Py;
|
||||
|
@ -188,7 +199,7 @@ struct SatelliteAntPos {
|
|||
};
|
||||
|
||||
|
||||
struct PatternImageDesc {
|
||||
extern "C" struct PatternImageDesc {
|
||||
long phinum;
|
||||
long thetanum;
|
||||
double startTheta;
|
||||
|
|
|
@ -38,7 +38,10 @@
|
|||
#include <xmmintrin.h> // 包含SSE指令集头文件
|
||||
#include <emmintrin.h> // 包含SSE2指令集头文件
|
||||
#include <omp.h> // 包含OpenMP头文件
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <boost/date_time/posix_time/conversion.hpp>
|
||||
|
||||
QString longDoubleToQStringScientific(long double value) {
|
||||
std::ostringstream stream;
|
||||
|
@ -702,3 +705,71 @@ Eigen::MatrixXd BASECONSTVARIABLEAPI dB2Amp(Eigen::MatrixXd& sigma0)
|
|||
}
|
||||
|
||||
|
||||
|
||||
QDateTime parseCustomDateTime(const QString& dateTimeStr) {
|
||||
// 手动解析日期时间字符串
|
||||
int year = dateTimeStr.left(4).toInt();
|
||||
int month = dateTimeStr.mid(5, 2).toInt();
|
||||
int day = dateTimeStr.mid(8, 2).toInt();
|
||||
int hour = dateTimeStr.mid(11, 2).toInt();
|
||||
int minute = dateTimeStr.mid(14, 2).toInt();
|
||||
int second = dateTimeStr.mid(17, 2).toInt();
|
||||
int msec = dateTimeStr.mid(20, 6).toInt(); // 只取毫秒的前三位,因为QDateTime支持到毫秒
|
||||
|
||||
// 创建 QDate 和 QTime 对象
|
||||
QDate date(year, month, day);
|
||||
QTime time(hour, minute, second, msec ); // 转换为微秒,但QTime只支持毫秒精度
|
||||
|
||||
// 构造 QDateTime 对象
|
||||
QDateTime result(date, time);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
bool isLeapYear(int year) {
|
||||
return (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0));
|
||||
}
|
||||
|
||||
int daysInMonth(int year, int month) {
|
||||
if (month == 2) return isLeapYear(year) ? 29 : 28;
|
||||
else if (month == 4 || month == 6 || month == 9 || month == 11) return 30;
|
||||
else return 31;
|
||||
}
|
||||
|
||||
|
||||
TimestampMicroseconds parseAndConvert( std::string dateTimeStr) {
|
||||
// 解析年、月、日、时、分、秒和微秒
|
||||
int year = std::stoi(dateTimeStr.substr(0, 4));
|
||||
int month = std::stoi(dateTimeStr.substr(5, 2));
|
||||
int day = std::stoi(dateTimeStr.substr(8, 2));
|
||||
int hour = std::stoi(dateTimeStr.substr(11, 2));
|
||||
int minute = std::stoi(dateTimeStr.substr(14, 2));
|
||||
int second = std::stoi(dateTimeStr.substr(17, 2));
|
||||
int microsec = std::stoi(dateTimeStr.substr(20, 6));
|
||||
|
||||
// 计算从1970年至目标年份前一年的总天数
|
||||
long long totalDays = 0;
|
||||
for (int y = 1970; y < year; ++y) {
|
||||
totalDays += isLeapYear(y) ? 366 : 365;
|
||||
}
|
||||
|
||||
// 加上目标年份从1月到上一个月的天数
|
||||
for (int m = 1; m < month; ++m) {
|
||||
totalDays += daysInMonth(year, m);
|
||||
}
|
||||
|
||||
// 加上本月的天数
|
||||
totalDays += day - 1;
|
||||
|
||||
// 转换为总秒数,再加上小时、分钟、秒
|
||||
long long totalSeconds = totalDays * 24 * 60 * 60 + hour * 60 * 60 + minute * 60 + second;
|
||||
|
||||
// 转换为毫秒和微秒
|
||||
long long msecsSinceEpoch = totalSeconds * 1000 + microsec / 1000;
|
||||
int microseconds = microsec % 1000;
|
||||
|
||||
return { msecsSinceEpoch, microseconds };
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -31,7 +31,8 @@
|
|||
#include <QDebug>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
|
||||
#include <QDatetime>
|
||||
#include <boost/cstdint.hpp>
|
||||
|
||||
///////////////////////////////////// 基础数学函数 /////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -101,7 +102,7 @@ Eigen::Matrix3d BASECONSTVARIABLEAPI rotationMatrix(const Eigen::Vector3d& axis
|
|||
|
||||
long double BASECONSTVARIABLEAPI convertToMilliseconds(const std::string& dateTimeStr);
|
||||
|
||||
|
||||
QDateTime BASECONSTVARIABLEAPI parseCustomDateTime(const QString& dateTimeStr);
|
||||
/// <summary>
|
||||
/// list 应该是按照从小到大的顺序排好
|
||||
/// </summary>
|
||||
|
@ -132,6 +133,19 @@ void initializeMatrixWithSSE2(Eigen::MatrixXf& mat, const float* data, long rowc
|
|||
Eigen::MatrixXd BASECONSTVARIABLEAPI MuhlemanSigmaArray(Eigen::MatrixXd& eta_deg);
|
||||
Eigen::MatrixXd BASECONSTVARIABLEAPI dB2Amp(Eigen::MatrixXd& sigma0);
|
||||
|
||||
|
||||
struct TimestampMicroseconds {
|
||||
boost::int64_t msecsSinceEpoch; // 自1970-01-01T00:00:00 UTC以来的毫秒数
|
||||
int microseconds; // 额外的微秒(精确到微秒)
|
||||
};
|
||||
|
||||
|
||||
bool BASECONSTVARIABLEAPI isLeapYear(int year);
|
||||
int BASECONSTVARIABLEAPI daysInMonth(int year, int month);
|
||||
|
||||
TimestampMicroseconds BASECONSTVARIABLEAPI parseAndConvert( std::string dateTimeStr);
|
||||
|
||||
|
||||
/** 模板函数类 ***********************************************************************************************************/
|
||||
|
||||
inline double calculate_MuhlemanSigma(double eta_deg) {
|
||||
|
|
|
@ -93,7 +93,8 @@ QString getFileNameFromPath(const QString& path)
|
|||
QString getFileNameWidthoutExtend(QString path)
|
||||
{
|
||||
QFileInfo fileInfo(path);
|
||||
QString fileNameWithoutExtension = fileInfo.baseName(); // 获取无后缀文件名
|
||||
QString fileNameWithoutExtension = fileInfo.completeBaseName(); // 获取无后缀文件名
|
||||
qDebug() << u8"File name without extension: " << fileNameWithoutExtension;
|
||||
return fileNameWithoutExtension;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
|
||||
bool BASECONSTVARIABLEAPI isDirectory(const QString& path);
|
||||
bool BASECONSTVARIABLEAPI isExists(const QString& path);
|
||||
|
@ -29,7 +29,7 @@ unsigned long BASECONSTVARIABLEAPI convertToULong(const QString& input);
|
|||
/// <param name="folderpath"></param>
|
||||
/// <param name="FilenameExtension"></param>
|
||||
/// <returns></returns>
|
||||
std::vector<QString> BASECONSTVARIABLEAPI getFilelist(const QString& folderpath, const QString& FilenameExtension = ".*",int (*logfun)(QString logtext,int value)=nullptr);
|
||||
std::vector<QString> BASECONSTVARIABLEAPI getFilelist(const QString& folderpath, const QString& FilenameExtension = ".*", int (*logfun)(QString logtext, int value) = nullptr);
|
||||
|
||||
QString BASECONSTVARIABLEAPI getParantFolderNameFromPath(const QString& path);
|
||||
|
||||
|
@ -41,11 +41,11 @@ QString BASECONSTVARIABLEAPI getFileExtension(QString path);
|
|||
|
||||
int BASECONSTVARIABLEAPI write_binfile(char* filepath, char* data, size_t data_len);
|
||||
|
||||
char* read_textfile(char* text_path, int* length);
|
||||
char* read_textfile(char* text_path, int* length);
|
||||
|
||||
bool BASECONSTVARIABLEAPI exists_test(const QString& name);
|
||||
bool BASECONSTVARIABLEAPI exists_test(const QString& name);
|
||||
|
||||
size_t BASECONSTVARIABLEAPI fsize(FILE* fp);
|
||||
size_t BASECONSTVARIABLEAPI fsize(FILE* fp);
|
||||
|
||||
QString BASECONSTVARIABLEAPI getParantFromPath(const QString& path);
|
||||
void BASECONSTVARIABLEAPI copyFile(const QString& sourcePath, const QString& destinationPath);
|
||||
|
|
|
@ -18,7 +18,9 @@
|
|||
#include <fstream>
|
||||
#include <proj.h>
|
||||
#include "GeoOperator.h"
|
||||
|
||||
#include <ogr_spatialref.h> // OGRSpatialReference 用于空间参考转换
|
||||
#include <gdal_alg.h> // 用于 GDALWarp 操作
|
||||
#include <ogr_spatialref.h>
|
||||
|
||||
|
||||
Landpoint operator +(const Landpoint& p1, const Landpoint& p2)
|
||||
|
@ -135,6 +137,44 @@ Landpoint XYZ2LLA(const Landpoint& XYZ) {
|
|||
|
||||
|
||||
|
||||
void XYZ2BLH_FixedHeight(double x, double y, double z,double ati, Landpoint& point) {
|
||||
const double a = 6378137.0; // WGS84长半轴
|
||||
const double f = 1.0 / 298.257223563;
|
||||
const double e2 = 2 * f - f * f; // 第一偏心率平方
|
||||
|
||||
// 计算经度L (弧度)
|
||||
const double L_rad = std::atan2(y, x);
|
||||
point.lon = L_rad * 180.0 / M_PI; // 转为度
|
||||
|
||||
const double p = std::sqrt(x * x + y * y);
|
||||
const double H = ati; // 使用已知高度
|
||||
|
||||
// 初始纬度估算(考虑已知高度H)
|
||||
double B_rad = std::atan2(z, p * (1 - e2 * (a / (a + H))));
|
||||
|
||||
// 迭代计算纬度B(固定H)
|
||||
for (int i = 0; i < 10; ++i) { // 已知H时迭代次数减少
|
||||
const double sin_B = std::sin(B_rad);
|
||||
const double N = a / std::sqrt(1 - e2 * sin_B * sin_B);
|
||||
const double delta = e2 * N / (N + H); // 高度固定时的修正项
|
||||
|
||||
const double B_new = std::atan2(z, p * (1 - delta));
|
||||
|
||||
if (std::abs(B_new - B_rad) < 1e-9) {
|
||||
B_rad = B_new;
|
||||
break;
|
||||
}
|
||||
B_rad = B_new;
|
||||
}
|
||||
|
||||
point.lat = B_rad * 180.0 / M_PI; // 弧度转度
|
||||
|
||||
// 经度范围修正 [-180°, 180°]
|
||||
point.lon = std::fmod(point.lon + 360.0, 360.0);
|
||||
if (point.lon > 180.0) point.lon -= 360.0;
|
||||
point.ati = ati;
|
||||
}
|
||||
|
||||
|
||||
double getAngle(const Landpoint& a, const Landpoint& b)
|
||||
{
|
||||
|
@ -408,3 +448,53 @@ double getlocalIncAngle(Vector3D& satepoint, Vector3D& landpoint, Vector3D& slop
|
|||
return angle;
|
||||
}
|
||||
}
|
||||
|
||||
bool BASECONSTVARIABLEAPI ConvertResolutionToDegrees(int sourceEPSG, double resolutionMeters, double refLon, double refLat, double& degreePerPixelX, double& degreePerPixelY){
|
||||
// 初始化源坐标系(平面投影)和目标坐标系(WGS84 经纬度)
|
||||
OGRSpatialReference sourceSRS, targetSRS;
|
||||
sourceSRS.importFromEPSG(sourceEPSG); // 源坐标系需明确 EPSG
|
||||
targetSRS.importFromEPSG(4326); // 目标为 WGS84 经纬度
|
||||
|
||||
// 创建坐标转换器:经纬度 -> 平面坐标
|
||||
OGRCoordinateTransformation* toPlane = OGRCreateCoordinateTransformation(&targetSRS, &sourceSRS);
|
||||
if (!toPlane) return false;
|
||||
|
||||
// 将参考点经纬度转换为平面坐标
|
||||
double x = refLon, y = refLat;
|
||||
if (!toPlane->Transform(1, &x, &y)) {
|
||||
OGRCoordinateTransformation::DestroyCT(toPlane);
|
||||
return false;
|
||||
}
|
||||
|
||||
// 创建坐标转换器:平面坐标 -> 经纬度
|
||||
OGRCoordinateTransformation* toGeo = OGRCreateCoordinateTransformation(&sourceSRS, &targetSRS);
|
||||
if (!toGeo) {
|
||||
OGRCoordinateTransformation::DestroyCT(toPlane);
|
||||
return false;
|
||||
}
|
||||
|
||||
// 计算东向分辨率(经度变化量)
|
||||
double eastX = x + resolutionMeters, eastY = y;
|
||||
double eastLon = eastX, eastLat = eastY;
|
||||
if (!toGeo->Transform(1, &eastLon, &eastLat)) {
|
||||
OGRCoordinateTransformation::DestroyCT(toPlane);
|
||||
OGRCoordinateTransformation::DestroyCT(toGeo);
|
||||
return false;
|
||||
}
|
||||
degreePerPixelX = (eastLon - refLon) / resolutionMeters; // 经度方向每米对应度数
|
||||
|
||||
// 计算北向分辨率(纬度变化量)
|
||||
double northX = x, northY = y + resolutionMeters;
|
||||
double northLon = northX, northLat = northY;
|
||||
if (!toGeo->Transform(1, &northLon, &northLat)) {
|
||||
OGRCoordinateTransformation::DestroyCT(toPlane);
|
||||
OGRCoordinateTransformation::DestroyCT(toGeo);
|
||||
return false;
|
||||
}
|
||||
degreePerPixelY = (northLat - refLat) / resolutionMeters; // 纬度方向每米对应度数
|
||||
|
||||
// 释放资源
|
||||
OGRCoordinateTransformation::DestroyCT(toPlane);
|
||||
OGRCoordinateTransformation::DestroyCT(toGeo);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ Eigen::MatrixXd BASECONSTVARIABLEAPI LLA2XYZ(Eigen::MatrixXd landpoint);
|
|||
/// <returns>经纬度--degree</returns>
|
||||
Landpoint BASECONSTVARIABLEAPI XYZ2LLA(const Landpoint& XYZ);
|
||||
|
||||
void BASECONSTVARIABLEAPI XYZ2BLH_FixedHeight(double x, double y, double z, double ati, Landpoint& point);
|
||||
|
||||
Landpoint BASECONSTVARIABLEAPI operator +(const Landpoint& p1, const Landpoint& p2);
|
||||
|
||||
|
@ -123,4 +124,24 @@ CartesianCoordinates BASECONSTVARIABLEAPI sphericalToCartesian(const Spheric
|
|||
double BASECONSTVARIABLEAPI getlocalIncAngle(Vector3D& satepoint, Vector3D& landpoint, Vector3D& slopeVector);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief 将平面坐标分辨率(米)转换为经纬度分辨率(度)
|
||||
* @param sourceEPSG 平面坐标系 EPSG 码(如 UTM Zone 50N 对应 32650)
|
||||
* @param resolutionMeters 输入分辨率(单位:米)
|
||||
* @param refLon 参考点经度(十进制度,用于计算局部转换系数)
|
||||
* @param refLat 参考点纬度(十进制度,用于计算局部转换系数)
|
||||
* @param[out] degreePerPixelX 经度方向分辨率(度/像素)
|
||||
* @param[out] degreePerPixelY 纬度方向分辨率(度/像素)
|
||||
* @return 是否转换成功
|
||||
*/
|
||||
bool BASECONSTVARIABLEAPI ConvertResolutionToDegrees(
|
||||
int sourceEPSG,
|
||||
double resolutionMeters,
|
||||
double refLon,
|
||||
double refLat,
|
||||
double& degreePerPixelX,
|
||||
double& degreePerPixelY
|
||||
);
|
||||
|
||||
#endif
|
|
@ -89,7 +89,7 @@ enum GDALREADARRCOPYMETHOD {
|
|||
/// \param long 经度
|
||||
/// \param lat 纬度
|
||||
/// \return 对应投影坐标系统的 EPSG编码,-1 表示计算错误
|
||||
long BASECONSTVARIABLEAPI getProjectEPSGCodeByLon_Lat(double long, double lat, ProjectStripDelta stripState);
|
||||
long BASECONSTVARIABLEAPI getProjectEPSGCodeByLon_Lat(double lon, double lat, ProjectStripDelta stripState= ProjectStripDelta::Strip_6);
|
||||
|
||||
long BASECONSTVARIABLEAPI getProjectEPSGCodeByLon_Lat_inStrip3(double lon, double lat);
|
||||
|
||||
|
@ -135,10 +135,10 @@ GDALDataType BASECONSTVARIABLEAPI getGDALDataType(QString fileptah);
|
|||
|
||||
|
||||
struct RasterExtend {
|
||||
double min_x; //纬度
|
||||
double min_y;//经度
|
||||
double max_x;//纬度
|
||||
double max_y;//经度
|
||||
double min_x;
|
||||
double min_y;
|
||||
double max_x;
|
||||
double max_y;
|
||||
};
|
||||
|
||||
|
||||
|
@ -174,8 +174,6 @@ public: // 方法
|
|||
virtual void saveImage(std::shared_ptr<float>, int start_row, int start_col, int rowcount, int colcount, int band_ids);
|
||||
virtual void saveImage(std::shared_ptr<int>, int start_row, int start_col, int rowcount, int colcount, int band_ids);
|
||||
|
||||
|
||||
|
||||
virtual void saveImage();
|
||||
virtual void setNoDataValue(double nodatavalue, int band_ids);
|
||||
virtual void setNoDataValuei(int nodatavalue, int band_ids);
|
||||
|
@ -197,6 +195,10 @@ public: // 方法
|
|||
|
||||
virtual RasterExtend getExtend();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
QString img_path; // 图像文件
|
||||
int height; // 高
|
||||
|
@ -236,6 +238,10 @@ public:
|
|||
Eigen::MatrixXcd data;
|
||||
};
|
||||
|
||||
|
||||
bool BASECONSTVARIABLEAPI CopyProjectTransformMatrixFromRasterAToRasterB(QString RasterAPath, QString RasterBPath);
|
||||
|
||||
|
||||
// 创建影像
|
||||
gdalImage BASECONSTVARIABLEAPI CreategdalImageDouble(QString& img_path, int height, int width, int band_num, bool overwrite = false, bool isEnvi = false);
|
||||
gdalImage BASECONSTVARIABLEAPI CreategdalImageFloat(QString& img_path, int height, int width, int band_num, bool overwrite = false, bool isEnvi = false);
|
||||
|
@ -310,6 +316,24 @@ void BASECONSTVARIABLEAPI testOutDataArr(QString filename, long* data, long row
|
|||
|
||||
void BASECONSTVARIABLEAPI CreateSARIntensityByLookTable(QString IntensityRasterPath, QString LookTableRasterPath, QString SARIntensityPath, long min_rid, long max_rid, long min_cid, long max_cid, std::function<void(long, long)> processBarShow = {});
|
||||
|
||||
bool BASECONSTVARIABLEAPI ConvertVrtToEnvi(QString vrtPath, QString outPath);
|
||||
|
||||
|
||||
|
||||
|
||||
void BASECONSTVARIABLEAPI MultiLookRaster(QString inRasterPath, QString outRasterPath, long looklineNumrow, long looklineNumCol);
|
||||
ErrorCode BASECONSTVARIABLEAPI Complex2PhaseRaster(QString inComplexPath, QString outRasterPath);
|
||||
ErrorCode BASECONSTVARIABLEAPI Complex2dBRaster(QString inComplexPath, QString outRasterPath);
|
||||
ErrorCode BASECONSTVARIABLEAPI Complex2AmpRaster(QString inComplexPath, QString outRasterPath);
|
||||
ErrorCode BASECONSTVARIABLEAPI amp2dBRaster(QString inPath, QString outRasterPath);
|
||||
|
||||
|
||||
ErrorCode BASECONSTVARIABLEAPI ResampleDEM(QString indemPath, QString outdemPath, double gridx, double gridy);
|
||||
|
||||
|
||||
void BASECONSTVARIABLEAPI CloseAllGDALRaster();
|
||||
|
||||
|
||||
|
||||
//--------------------- 图像文件读写 ------------------------------
|
||||
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
#include <QTextCodec>
|
||||
#include <iostream>
|
||||
#include <QFile>
|
||||
#include "SARSimulationImageL1.h"
|
||||
#include <QMessageBox>
|
||||
|
||||
namespace RasterToolBase {
|
||||
long getProjectEPSGCodeByLon_Lat(double lon, double lat, ProjectStripDelta stripState)
|
||||
|
@ -268,4 +270,7 @@ namespace RasterToolBase {
|
|||
return CoordinateSystemType::UNKNOW;
|
||||
}
|
||||
}
|
||||
} // namespace RasterToolBase
|
||||
}; // namespace RasterToolBase
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -12,40 +12,42 @@
|
|||
#include "BaseConstVariable.h"
|
||||
#include "gdal_priv.h"
|
||||
#include <memory>
|
||||
#include "LogInfoCls.h"
|
||||
|
||||
|
||||
namespace RasterToolBase {
|
||||
|
||||
static bool GDALAllRegisterEnable=false;
|
||||
static bool GDALAllRegisterEnable = false;
|
||||
|
||||
|
||||
enum ProjectStripDelta{
|
||||
enum ProjectStripDelta {
|
||||
Strip_6, // 6度带
|
||||
Strip_3
|
||||
};
|
||||
|
||||
enum CoordinateSystemType{ // 坐标系类型
|
||||
enum CoordinateSystemType { // 坐标系类型
|
||||
GeoCoordinateSystem,
|
||||
ProjectCoordinateSystem,
|
||||
UNKNOW
|
||||
};
|
||||
|
||||
struct PointRaster{ // 影像坐标点
|
||||
struct PointRaster { // 影像坐标点
|
||||
double x;
|
||||
double y;
|
||||
double z;
|
||||
};
|
||||
|
||||
|
||||
struct PointXYZ{
|
||||
double x,y,z;
|
||||
struct PointXYZ {
|
||||
double x, y, z;
|
||||
};
|
||||
|
||||
struct PointGeo{
|
||||
double lon,lat,ati;
|
||||
struct PointGeo {
|
||||
double lon, lat, ati;
|
||||
};
|
||||
|
||||
struct PointImage{
|
||||
double pixel_x,pixel_y;
|
||||
struct PointImage {
|
||||
double pixel_x, pixel_y;
|
||||
};
|
||||
|
||||
/// 根据经纬度获取
|
||||
|
@ -56,14 +58,14 @@ namespace RasterToolBase {
|
|||
/// \param lat 纬度
|
||||
/// \return 对应投影坐标系统的 EPSG编码,-1 表示计算错误
|
||||
long BASECONSTVARIABLEAPI getProjectEPSGCodeByLon_Lat(double long, double lat,
|
||||
ProjectStripDelta stripState = ProjectStripDelta::Strip_3);
|
||||
ProjectStripDelta stripState = ProjectStripDelta::Strip_3);
|
||||
|
||||
long BASECONSTVARIABLEAPI getProjectEPSGCodeByLon_Lat_inStrip3(double lon, double lat);
|
||||
|
||||
long BASECONSTVARIABLEAPI getProjectEPSGCodeByLon_Lat_inStrip6(double lon, double lat);
|
||||
|
||||
|
||||
QString BASECONSTVARIABLEAPI GetProjectionNameFromEPSG(long epsgCode) ;
|
||||
QString BASECONSTVARIABLEAPI GetProjectionNameFromEPSG(long epsgCode);
|
||||
|
||||
|
||||
long BASECONSTVARIABLEAPI GetEPSGFromRasterFile(QString filepath);
|
||||
|
@ -72,9 +74,23 @@ namespace RasterToolBase {
|
|||
|
||||
CoordinateSystemType BASECONSTVARIABLEAPI getCoordinateSystemTypeByEPSGCode(long EPSGCODE);
|
||||
|
||||
};// namespace RasterProjectConvertor
|
||||
|
||||
|
||||
|
||||
|
||||
// 遥感类常用数据
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace RasterProjectConvertor
|
||||
|
||||
#endif // LAMPCAE_RASTERTOOLBASE_H
|
||||
|
|
|
@ -106,7 +106,7 @@ ErrorCode SARSimulationImageL1Dataset::OpenOrNew(QString folder, QString filenam
|
|||
this->saveToXml();
|
||||
}
|
||||
|
||||
if (this->Rasterlevel!=RasterL2||QFile(this->GPSPointFilePath).exists() == false) {
|
||||
if (this->Rasterlevel==RasterL2||QFile(this->GPSPointFilePath).exists() == false) {
|
||||
// 创建新文件
|
||||
omp_lock_t lock;
|
||||
omp_init_lock(&lock);
|
||||
|
@ -122,7 +122,7 @@ ErrorCode SARSimulationImageL1Dataset::OpenOrNew(QString folder, QString filenam
|
|||
omp_destroy_lock(&lock);
|
||||
}
|
||||
|
||||
if (this->Rasterlevel == RasterLevel::RasterSLC || QFile(this->ImageRasterPath).exists() == false) {
|
||||
else if (this->Rasterlevel == RasterLevel::RasterSLC || QFile(this->ImageRasterPath).exists() == false) {
|
||||
|
||||
// 创建新文件
|
||||
omp_lock_t lock;
|
||||
|
@ -140,7 +140,7 @@ ErrorCode SARSimulationImageL1Dataset::OpenOrNew(QString folder, QString filenam
|
|||
}
|
||||
|
||||
|
||||
if (this->Rasterlevel != RasterLevel::RasterSLC || QFile(this->ImageRasterPath).exists() == false) {
|
||||
else if (this->Rasterlevel == RasterLevel::RasterL1B || QFile(this->ImageRasterPath).exists() == false) {
|
||||
|
||||
// 创建新文件
|
||||
omp_lock_t lock;
|
||||
|
@ -150,11 +150,11 @@ ErrorCode SARSimulationImageL1Dataset::OpenOrNew(QString folder, QString filenam
|
|||
CPLSetConfigOption("GDAL_FILENAME_IS_UTF8", "YES");
|
||||
|
||||
GDALDriver* poDriver = GetGDALDriverManager()->GetDriverByName("ENVI");
|
||||
std::shared_ptr<GDALDataset> poDstDS(poDriver->Create(this->ImageRasterPath.toUtf8().constData(), colCount, rowCount, 1, GDT_CFloat32, NULL));
|
||||
std::shared_ptr<GDALDataset> poDstDS(poDriver->Create(this->GPSPointFilePath.toUtf8().constData(), 19, rowCount, 1, GDT_Float64, NULL));
|
||||
GDALFlushCache((GDALDatasetH)poDstDS.get());
|
||||
poDstDS.reset();
|
||||
omp_unset_lock(&lock); //
|
||||
omp_destroy_lock(&lock); //
|
||||
omp_unset_lock(&lock);
|
||||
omp_destroy_lock(&lock);
|
||||
}
|
||||
|
||||
|
||||
|
@ -203,7 +203,7 @@ ErrorCode SARSimulationImageL1Dataset::Open(QString xmlPath)
|
|||
QFileInfo fileInfo(xmlPath);
|
||||
QString fileName = fileInfo.fileName(); // 获取文件名
|
||||
QString fileSuffix = fileInfo.suffix(); // 获取后缀名
|
||||
QString fileNameWithoutSuffix = fileInfo.baseName(); // »ñÈ¡²»´øºó׺µÄÎļþÃû
|
||||
QString fileNameWithoutSuffix = fileInfo.completeBaseName(); // »ñÈ¡²»´øºó׺µÄÎļþÃû
|
||||
QString directoryPath = fileInfo.path(); // 获取文件夹路径
|
||||
if (fileSuffix.toLower() == "xml" || fileSuffix.toLower() == ".xml") {
|
||||
return this->Open(directoryPath, fileNameWithoutSuffix);
|
||||
|
@ -246,12 +246,13 @@ void SARSimulationImageL1Dataset::saveToXml()
|
|||
|
||||
xmlWriter.writeTextElement("RowCount", QString::number(this->rowCount));
|
||||
xmlWriter.writeTextElement("ColCount", QString::number(this->colCount));
|
||||
xmlWriter.writeTextElement("Rnear", QString::number(this->Rnear));
|
||||
xmlWriter.writeTextElement("Rfar", QString::number(this->Rfar));
|
||||
xmlWriter.writeTextElement("Rref", QString::number(this->Rref));
|
||||
xmlWriter.writeTextElement("CenterFreq", QString::number(this->centerFreq));
|
||||
xmlWriter.writeTextElement("Fs", QString::number(this->Fs));
|
||||
xmlWriter.writeTextElement("CenterAngle", QString::number(this->CenterAngle));
|
||||
xmlWriter.writeTextElement("Rnear", QString::number(this->Rnear, 'e', 18));
|
||||
xmlWriter.writeTextElement("Rfar", QString::number(this->Rfar, 'e', 18));
|
||||
xmlWriter.writeTextElement("Rref", QString::number(this->Rref, 'e', 18));
|
||||
xmlWriter.writeTextElement("CenterFreq", QString::number(this->centerFreq, 'e', 18));
|
||||
xmlWriter.writeTextElement("Fs", QString::number(this->Fs, 'e', 18));
|
||||
xmlWriter.writeTextElement("PRF", QString::number(this->prf, 'e', 18));
|
||||
xmlWriter.writeTextElement("CenterAngle", QString::number(this->CenterAngle, 'e', 18));
|
||||
xmlWriter.writeTextElement("LookSide", this->LookSide);
|
||||
|
||||
// 保存sateantpos
|
||||
|
@ -259,60 +260,60 @@ void SARSimulationImageL1Dataset::saveToXml()
|
|||
|
||||
for (long i = 0; i < this->sateposes.count(); i++) {
|
||||
xmlWriter.writeStartElement("AntPosParam");
|
||||
xmlWriter.writeTextElement("time", QString::number(this->sateposes[i].time)); // time
|
||||
xmlWriter.writeTextElement("Px", QString::number(this->sateposes[i].Px)); // Px
|
||||
xmlWriter.writeTextElement("Py", QString::number(this->sateposes[i].Py)); // Py
|
||||
xmlWriter.writeTextElement("Pz", QString::number(this->sateposes[i].Pz)); // Pz
|
||||
xmlWriter.writeTextElement("Vx", QString::number(this->sateposes[i].Vx)); // Vx
|
||||
xmlWriter.writeTextElement("Vy", QString::number(this->sateposes[i].Vy)); // Vy
|
||||
xmlWriter.writeTextElement("Vz", QString::number(this->sateposes[i].Vz)); // Vz
|
||||
xmlWriter.writeTextElement("AntDirectX", QString::number(this->sateposes[i].AntDirectX)); // AntDirectX
|
||||
xmlWriter.writeTextElement("AntDirectY", QString::number(this->sateposes[i].AntDirectY)); // AntDirectY
|
||||
xmlWriter.writeTextElement("AntDirectZ", QString::number(this->sateposes[i].AntDirectZ)); // AntDirectZ
|
||||
xmlWriter.writeTextElement("AVx", QString::number(this->sateposes[i].AVx)); // AVx
|
||||
xmlWriter.writeTextElement("AVy", QString::number(this->sateposes[i].AVy)); // AVy
|
||||
xmlWriter.writeTextElement("AVz", QString::number(this->sateposes[i].AVz)); // AVz
|
||||
xmlWriter.writeTextElement("lon", QString::number(this->sateposes[i].lon)); // lon
|
||||
xmlWriter.writeTextElement("lat", QString::number(this->sateposes[i].lat)); // lat
|
||||
xmlWriter.writeTextElement("ati", QString::number(this->sateposes[i].ati)); // ati
|
||||
xmlWriter.writeTextElement("time", QString::number(this->sateposes[i].time, 'e', 18)); // time
|
||||
xmlWriter.writeTextElement("Px", QString::number(this->sateposes[i].Px, 'e', 18)); // Px
|
||||
xmlWriter.writeTextElement("Py", QString::number(this->sateposes[i].Py, 'e', 18)); // Py
|
||||
xmlWriter.writeTextElement("Pz", QString::number(this->sateposes[i].Pz, 'e', 18)); // Pz
|
||||
xmlWriter.writeTextElement("Vx", QString::number(this->sateposes[i].Vx, 'e', 18)); // Vx
|
||||
xmlWriter.writeTextElement("Vy", QString::number(this->sateposes[i].Vy, 'e', 18)); // Vy
|
||||
xmlWriter.writeTextElement("Vz", QString::number(this->sateposes[i].Vz, 'e', 18)); // Vz
|
||||
xmlWriter.writeTextElement("AntDirectX", QString::number(this->sateposes[i].AntDirectX, 'e', 18)); // AntDirectX
|
||||
xmlWriter.writeTextElement("AntDirectY", QString::number(this->sateposes[i].AntDirectY, 'e', 18)); // AntDirectY
|
||||
xmlWriter.writeTextElement("AntDirectZ", QString::number(this->sateposes[i].AntDirectZ, 'e', 18)); // AntDirectZ
|
||||
xmlWriter.writeTextElement("AVx", QString::number(this->sateposes[i].AVx, 'e', 18)); // AVx
|
||||
xmlWriter.writeTextElement("AVy", QString::number(this->sateposes[i].AVy, 'e', 18)); // AVy
|
||||
xmlWriter.writeTextElement("AVz", QString::number(this->sateposes[i].AVz, 'e', 18)); // AVz
|
||||
xmlWriter.writeTextElement("lon", QString::number(this->sateposes[i].lon, 'e', 18)); // lon
|
||||
xmlWriter.writeTextElement("lat", QString::number(this->sateposes[i].lat, 'e', 18)); // lat
|
||||
xmlWriter.writeTextElement("ati", QString::number(this->sateposes[i].ati, 'e', 18)); // ati
|
||||
xmlWriter.writeEndElement(); // 结束 <AntPosParam>
|
||||
}
|
||||
|
||||
xmlWriter.writeTextElement("ImageStartTime", QString::number(this->startImageTime));
|
||||
xmlWriter.writeTextElement("ImageEndTime", QString::number(this->EndImageTime));
|
||||
xmlWriter.writeTextElement("ImageStartTime", QString::number(this->startImageTime, 'e', 18));
|
||||
xmlWriter.writeTextElement("ImageEndTime", QString::number(this->EndImageTime, 'e', 18));
|
||||
|
||||
xmlWriter.writeTextElement("incidenceAngleNearRange", QString::number(this->incidenceAngleNearRange));
|
||||
xmlWriter.writeTextElement("incidenceAngleFarRange", QString::number(this->incidenceAngleFarRange));
|
||||
xmlWriter.writeTextElement("TotalProcessedAzimuthBandWidth", QString::number(this->TotalProcessedAzimuthBandWidth));
|
||||
xmlWriter.writeTextElement("DopplerParametersReferenceTime", QString::number(this->DopplerParametersReferenceTime));
|
||||
xmlWriter.writeTextElement("incidenceAngleNearRange", QString::number(this->incidenceAngleNearRange, 'e', 18));
|
||||
xmlWriter.writeTextElement("incidenceAngleFarRange", QString::number(this->incidenceAngleFarRange, 'e', 18));
|
||||
xmlWriter.writeTextElement("TotalProcessedAzimuthBandWidth", QString::number(this->TotalProcessedAzimuthBandWidth, 'e', 18));
|
||||
xmlWriter.writeTextElement("DopplerParametersReferenceTime", QString::number(this->DopplerParametersReferenceTime, 'e', 18));
|
||||
|
||||
xmlWriter.writeStartElement("DopplerCentroidCoefficients");
|
||||
xmlWriter.writeTextElement("d0", QString::number(this->d0));
|
||||
xmlWriter.writeTextElement("d1", QString::number(this->d1));
|
||||
xmlWriter.writeTextElement("d2", QString::number(this->d2));
|
||||
xmlWriter.writeTextElement("d3", QString::number(this->d3));
|
||||
xmlWriter.writeTextElement("d4", QString::number(this->d4));
|
||||
xmlWriter.writeTextElement("d0", QString::number(this->d0, 'e', 18));
|
||||
xmlWriter.writeTextElement("d1", QString::number(this->d1, 'e', 18));
|
||||
xmlWriter.writeTextElement("d2", QString::number(this->d2, 'e', 18));
|
||||
xmlWriter.writeTextElement("d3", QString::number(this->d3, 'e', 18));
|
||||
xmlWriter.writeTextElement("d4", QString::number(this->d4, 'e', 18));
|
||||
xmlWriter.writeEndElement(); // DopplerCentroidCoefficients
|
||||
|
||||
xmlWriter.writeStartElement("DopplerRateValuesCoefficients");
|
||||
xmlWriter.writeTextElement("r0", QString::number(this->r0));
|
||||
xmlWriter.writeTextElement("r1", QString::number(this->r1));
|
||||
xmlWriter.writeTextElement("r2", QString::number(this->r2));
|
||||
xmlWriter.writeTextElement("r3", QString::number(this->r3));
|
||||
xmlWriter.writeTextElement("r4", QString::number(this->r4));
|
||||
xmlWriter.writeTextElement("r0", QString::number(this->r0, 'e', 18));
|
||||
xmlWriter.writeTextElement("r1", QString::number(this->r1, 'e', 18));
|
||||
xmlWriter.writeTextElement("r2", QString::number(this->r2, 'e', 18));
|
||||
xmlWriter.writeTextElement("r3", QString::number(this->r3, 'e', 18));
|
||||
xmlWriter.writeTextElement("r4", QString::number(this->r4, 'e', 18));
|
||||
xmlWriter.writeEndElement(); // DopplerRateValuesCoefficients
|
||||
|
||||
|
||||
xmlWriter.writeTextElement("latitude_center", QString::number(this->latitude_center));
|
||||
xmlWriter.writeTextElement("longitude_center", QString::number(this->longitude_center));
|
||||
xmlWriter.writeTextElement("latitude_topLeft", QString::number(this->latitude_topLeft));
|
||||
xmlWriter.writeTextElement("longitude_topLeft", QString::number(this->longitude_topLeft));
|
||||
xmlWriter.writeTextElement("latitude_topRight", QString::number(this->latitude_topRight));
|
||||
xmlWriter.writeTextElement("longitude_topRight", QString::number(this->longitude_topRight));
|
||||
xmlWriter.writeTextElement("latitude_bottomLeft", QString::number(this->latitude_bottomLeft));
|
||||
xmlWriter.writeTextElement("longitude_bottomLeft", QString::number(this->longitude_bottomLeft));
|
||||
xmlWriter.writeTextElement("latitude_bottomRight", QString::number(this->latitude_bottomRight));
|
||||
xmlWriter.writeTextElement("longitude_bottomRight", QString::number(this->longitude_bottomRight));
|
||||
xmlWriter.writeTextElement("latitude_center", QString::number(this->latitude_center, 'e', 18));
|
||||
xmlWriter.writeTextElement("longitude_center", QString::number(this->longitude_center, 'e', 18));
|
||||
xmlWriter.writeTextElement("latitude_topLeft", QString::number(this->latitude_topLeft, 'e', 18));
|
||||
xmlWriter.writeTextElement("longitude_topLeft", QString::number(this->longitude_topLeft, 'e', 18));
|
||||
xmlWriter.writeTextElement("latitude_topRight", QString::number(this->latitude_topRight, 'e', 18));
|
||||
xmlWriter.writeTextElement("longitude_topRight", QString::number(this->longitude_topRight, 'e', 18));
|
||||
xmlWriter.writeTextElement("latitude_bottomLeft", QString::number(this->latitude_bottomLeft, 'e', 18));
|
||||
xmlWriter.writeTextElement("longitude_bottomLeft", QString::number(this->longitude_bottomLeft, 'e', 18));
|
||||
xmlWriter.writeTextElement("latitude_bottomRight", QString::number(this->latitude_bottomRight, 'e', 18));
|
||||
xmlWriter.writeTextElement("longitude_bottomRight", QString::number(this->longitude_bottomRight, 'e', 18));
|
||||
|
||||
xmlWriter.writeEndElement(); // Parameters
|
||||
xmlWriter.writeEndDocument();
|
||||
|
@ -371,6 +372,9 @@ ErrorCode SARSimulationImageL1Dataset::loadFromXml()
|
|||
else if (xmlReader.name() == "Fs") {
|
||||
this->Fs = xmlReader.readElementText().toDouble();
|
||||
}
|
||||
else if (xmlReader.name() == "PRF") {
|
||||
this->prf = xmlReader.readElementText().toDouble();
|
||||
}
|
||||
else if(xmlReader.name() == "ImageStartTime"){
|
||||
this->startImageTime = xmlReader.readElementText().toDouble();
|
||||
}
|
||||
|
@ -873,6 +877,7 @@ QVector<double> SARSimulationImageL1Dataset::getDopplerParams()
|
|||
result[2] = d2;
|
||||
result[3] = d3;
|
||||
result[4] = d4;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -888,11 +893,13 @@ void SARSimulationImageL1Dataset::setDopplerParams(double id0, double id1, doubl
|
|||
QVector<double> SARSimulationImageL1Dataset::getDopplerCenterCoff()
|
||||
{
|
||||
QVector<double> result(5);
|
||||
result[0]=r0;
|
||||
result[1]=r1;
|
||||
result[2]=r2;
|
||||
result[3]=r3;
|
||||
result[4]=r4;
|
||||
result[0] = r0;
|
||||
result[1] = r1;
|
||||
result[2] = r2;
|
||||
result[3] = r3;
|
||||
result[4] = r4;
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -143,9 +143,11 @@ public:
|
|||
double getDopplerParametersReferenceTime();
|
||||
void setDopplerParametersReferenceTime(double v);
|
||||
|
||||
// 多普勒参数
|
||||
QVector<double> getDopplerParams();
|
||||
void setDopplerParams(double d0, double d1, double d2, double d3, double d4);
|
||||
|
||||
// 多普勒中心系数
|
||||
QVector<double> getDopplerCenterCoff();
|
||||
void setDopplerCenterCoff(double r0, double r1, double r2, double r3, double r4);
|
||||
|
||||
|
@ -208,3 +210,9 @@ private:
|
|||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -121,20 +121,48 @@ void gdalImageComplex::saveImage(Eigen::MatrixXcd data, int start_row, int start
|
|||
int datarows = data.rows();
|
||||
int datacols = data.cols();
|
||||
|
||||
double* databuffer = new double[data.size() * 2];
|
||||
for (int i = 0; i < data.rows(); i++) {
|
||||
for (int j = 0; j < data.cols(); j++) {
|
||||
databuffer[i * data.cols() * 2 + j * 2] = data(i, j).real();
|
||||
databuffer[i * data.cols() * 2 + j * 2 + 1] = data(i, j).imag();
|
||||
if (this->getDataType() == GDT_CFloat64)
|
||||
{
|
||||
|
||||
double* databuffer = new double[data.size() * 2];
|
||||
for (int i = 0; i < data.rows(); i++) {
|
||||
for (int j = 0; j < data.cols(); j++) {
|
||||
databuffer[i * data.cols() * 2 + j * 2] = data(i, j).real();
|
||||
databuffer[i * data.cols() * 2 + j * 2 + 1] = data(i, j).imag();
|
||||
}
|
||||
}
|
||||
|
||||
// poDstDS->RasterIO(GF_Write,start_col, start_row, datacols, datarows, databuffer, datacols,
|
||||
// datarows, GDT_Float32,band_ids, num,0,0,0);
|
||||
poDstDS->GetRasterBand(band_ids)->RasterIO(GF_Write, start_col, start_row, datacols, datarows,
|
||||
databuffer, datacols, datarows, GDT_CFloat64, 0, 0);
|
||||
GDALFlushCache(poDstDS);
|
||||
delete databuffer;
|
||||
|
||||
}
|
||||
else if (this->getDataType() == GDT_CFloat32) {
|
||||
|
||||
float* databuffer = new float[data.size() * 2];
|
||||
for (int i = 0; i < data.rows(); i++) {
|
||||
for (int j = 0; j < data.cols(); j++) {
|
||||
databuffer[i * data.cols() * 2 + j * 2] = float(data(i, j).real());
|
||||
databuffer[i * data.cols() * 2 + j * 2 + 1] =float( data(i, j).imag());
|
||||
}
|
||||
}
|
||||
|
||||
// poDstDS->RasterIO(GF_Write,start_col, start_row, datacols, datarows, databuffer, datacols,
|
||||
// datarows, GDT_Float32,band_ids, num,0,0,0);
|
||||
poDstDS->GetRasterBand(band_ids)->RasterIO(GF_Write, start_col, start_row, datacols, datarows,
|
||||
databuffer, datacols, datarows, GDT_CFloat32, 0, 0);
|
||||
GDALFlushCache(poDstDS);
|
||||
delete databuffer;
|
||||
}
|
||||
else {
|
||||
throw std::exception("gdalImageComplex::saveImage: data type error");
|
||||
}
|
||||
|
||||
// poDstDS->RasterIO(GF_Write,start_col, start_row, datacols, datarows, databuffer, datacols,
|
||||
// datarows, GDT_Float32,band_ids, num,0,0,0);
|
||||
poDstDS->GetRasterBand(band_ids)->RasterIO(GF_Write, start_col, start_row, datacols, datarows,
|
||||
databuffer, datacols, datarows, GDT_CFloat64, 0, 0);
|
||||
GDALFlushCache(poDstDS);
|
||||
delete databuffer;
|
||||
|
||||
|
||||
GDALClose((GDALDatasetH)poDstDS);
|
||||
GDALDestroy(); // or, DllMain at DLL_PROCESS_DETACH
|
||||
omp_unset_lock(&lock); //
|
||||
|
@ -265,24 +293,46 @@ Eigen::MatrixXcd gdalImageComplex::getDataComplex(int start_row, int start_col,
|
|||
// 获取数据集的第一个波段
|
||||
GDALRasterBand* poBand;
|
||||
poBand = poDataset->GetRasterBand(1);
|
||||
|
||||
rows_count = start_row + rows_count <= this->height ? rows_count : this->height - start_row;
|
||||
cols_count = start_col + cols_count <= this->width ? cols_count : this->width - start_col;
|
||||
// 读取波段信息,假设是复数类型
|
||||
int nXSize = cols_count; poBand->GetXSize();
|
||||
int nYSize = rows_count; poBand->GetYSize();
|
||||
|
||||
double* databuffer = new double[nXSize * nYSize * 2];
|
||||
poBand->RasterIO(GF_Read, start_col, start_row, cols_count, rows_count, databuffer, cols_count,
|
||||
rows_count, GDT_CFloat64, 0, 0);
|
||||
GDALClose((GDALDatasetH)poDataset);
|
||||
Eigen::MatrixXcd rasterData(nYSize, nXSize); // 使用Eigen的MatrixXcd
|
||||
for (size_t i = 0; i < nYSize; i++) {
|
||||
for (size_t j = 0; j < nXSize; j++) {
|
||||
rasterData(i, j) = std::complex<double>(databuffer[i * nXSize * 2 + j * 2],
|
||||
databuffer[i * nXSize * 2 + j * 2 + 1]);
|
||||
if (this->getDataType() == GDT_CFloat64)
|
||||
{
|
||||
long long pixelCount =long long( nXSize) *long long( nYSize);
|
||||
double* databuffer = new double[pixelCount * 2];
|
||||
poBand->RasterIO(GF_Read, start_col, start_row, cols_count, rows_count, databuffer, cols_count, rows_count, GDT_CFloat64, 0, 0);
|
||||
GDALClose((GDALDatasetH)poDataset);
|
||||
|
||||
for (long long i = 0; i < nYSize; i++) {
|
||||
for (long long j = 0; j < nXSize; j++) {
|
||||
rasterData(i, j) = std::complex<double>(databuffer[i * nXSize * 2 + j * 2],
|
||||
databuffer[i * nXSize * 2 + j * 2 + 1]);
|
||||
}
|
||||
}
|
||||
|
||||
delete[] databuffer;
|
||||
}
|
||||
else if(this->getDataType()==GDT_CFloat32)
|
||||
{
|
||||
long long pixelCount = long long(nXSize) * long long(nYSize);
|
||||
float* databuffer = new float[pixelCount * 2];
|
||||
poBand->RasterIO(GF_Read, start_col, start_row, cols_count, rows_count, databuffer, cols_count, rows_count, GDT_CFloat32, 0, 0);
|
||||
GDALClose((GDALDatasetH)poDataset);
|
||||
|
||||
for (long long i = 0; i < nYSize; i++) {
|
||||
for (long long j = 0; j < nXSize; j++) {
|
||||
rasterData(i, j) = std::complex<double>(databuffer[i * nXSize * 2 + j * 2],
|
||||
databuffer[i * nXSize * 2 + j * 2 + 1]);
|
||||
}
|
||||
}
|
||||
|
||||
delete[] databuffer;
|
||||
}
|
||||
|
||||
delete[] databuffer;
|
||||
|
||||
return rasterData;
|
||||
}
|
||||
|
||||
|
|
|
@ -1228,8 +1228,8 @@ RasterExtend gdalImage::getExtend()
|
|||
double x1 = this->gt(0, 0);
|
||||
double y1 = this->gt(1, 0);
|
||||
|
||||
double x2 = this->gt(0, 0) + (this->width - 1) * gt(0, 1) + (0) * gt(0, 2);
|
||||
double y2 = this->gt(1, 0) + (this->width - 1) * gt(1, 1) + (0) * gt(1, 2);
|
||||
double x2 = this->gt(0, 0) + (this->width - 1) * gt(0, 1) + (0) * gt(0, 2); // 经
|
||||
double y2 = this->gt(1, 0) + (this->width - 1) * gt(1, 1) + (0) * gt(1, 2); // 纬
|
||||
|
||||
double x3 = this->gt(0, 0) + (0) * gt(0, 1) + (this->height - 1) * gt(0, 2);
|
||||
double y3 = this->gt(1, 0) + (0) * gt(1, 1) + (this->height - 1) * gt(1, 2);
|
||||
|
@ -1401,6 +1401,15 @@ gdalImage CreategdalImage(const QString& img_path, int height, int width, int ba
|
|||
|
||||
GDALDataset* poDstDS = poDriver->Create(img_path.toUtf8().constData(), width, height, band_num,
|
||||
datetype, NULL); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
if (NULL == poDstDS)
|
||||
{
|
||||
qDebug() << "Create image failed!";
|
||||
throw "Create image failed!";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
if (need_gt) {
|
||||
if (!projection.isEmpty()) {
|
||||
poDstDS->SetProjection(projection.toUtf8().constData());
|
||||
|
@ -1470,6 +1479,51 @@ gdalImage CreategdalImage(const QString& img_path, int height, int width, int ba
|
|||
}
|
||||
|
||||
|
||||
bool CopyProjectTransformMatrixFromRasterAToRasterB(QString RasterAPath, QString RasterBPath) {
|
||||
// 注册所有GDAL驱动
|
||||
GDALAllRegister();
|
||||
|
||||
// 打开影像A(只读模式)
|
||||
GDALDataset* ds_a = (GDALDataset*)GDALOpen(RasterAPath.toUtf8().constData(), GA_ReadOnly);
|
||||
if (ds_a == nullptr) {
|
||||
std::cerr << "无法打开影像A" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
// 获取A的仿射矩阵和投影信息
|
||||
double geotransform[6];
|
||||
ds_a->GetGeoTransform(geotransform); // 包含六参数仿射变换
|
||||
const char* projection = ds_a->GetProjectionRef(); // WKT格式投影
|
||||
|
||||
// 打开影像B(更新模式)
|
||||
GDALDataset* ds_b = (GDALDataset*)GDALOpen(RasterBPath.toUtf8().constData(), GA_Update);
|
||||
if (ds_b == nullptr) {
|
||||
std::cerr << "无法打开影像B" << std::endl;
|
||||
GDALClose(ds_a);
|
||||
return false;
|
||||
}
|
||||
|
||||
// 设置仿射矩阵
|
||||
if (ds_b->SetGeoTransform(geotransform) != CE_None) {
|
||||
std::cerr << "设置仿射矩阵失败" << std::endl;
|
||||
}
|
||||
|
||||
// 设置投影坐标系
|
||||
if (ds_b->SetProjection(projection) != CE_None) {
|
||||
std::cerr << "设置投影失败" << std::endl;
|
||||
}
|
||||
|
||||
// 释放资源
|
||||
GDALClose(ds_a);
|
||||
GDALClose(ds_b);
|
||||
|
||||
return true;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -32,5 +32,10 @@ QString QToolAbstract::getToolName()
|
|||
}
|
||||
|
||||
void QToolAbstract::excute()
|
||||
{
|
||||
this->run();
|
||||
}
|
||||
|
||||
void QToolAbstract::run()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -27,6 +27,8 @@ public slots:
|
|||
public:
|
||||
QVector<QString> toolPath;
|
||||
QString toolname;
|
||||
public:
|
||||
virtual void run();
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -20,13 +20,15 @@
|
|||
/** CUDA 调用参数 ************************************************************************************/
|
||||
#define BLOCK_SIZE 256
|
||||
#define SHAREMEMORY_BYTE 49152
|
||||
#define SHAREMEMORY_FLOAT_HALF 6144
|
||||
#define SHAREMEMORY_FLOAT_HALF_STEP 24
|
||||
#define SHAREMEMORY_FLOAT_HALF_STEP 2
|
||||
#define SHAREMEMORY_FLOAT_HALF 512
|
||||
|
||||
#define SHAREMEMORY_DEM_STEP 768
|
||||
#define SHAREMEMORY_Reflect 612
|
||||
|
||||
|
||||
|
||||
|
||||
enum LAMPGPUDATETYPE {
|
||||
LAMP_LONG,
|
||||
LAMP_FLOAT,
|
||||
|
|
|
@ -38,10 +38,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RasterMainWidgetGUI", "Rast
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageshowTool", "ImageshowTool\ImageshowTool.vcxproj", "{8C8CA066-A93A-4098-9A46-B855EFEAADF2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SPG4Tool", "SPG4Tool\SPG4Tool.vcxproj", "{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pluginToolboxLibrary", "pluginToolboxLibrary\pluginToolboxLibrary.vcxproj", "{667625A5-8DE2-4373-99F0-8BAD2CCED011}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SPG4Tool", "SPG4Tool\SPG4Tool.vcxproj", "{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|ARM = Debug|ARM
|
||||
|
@ -172,18 +172,6 @@ Global
|
|||
{8C8CA066-A93A-4098-9A46-B855EFEAADF2}.Release|x64.Build.0 = Release|x64
|
||||
{8C8CA066-A93A-4098-9A46-B855EFEAADF2}.Release|x86.ActiveCfg = Release|x64
|
||||
{8C8CA066-A93A-4098-9A46-B855EFEAADF2}.Release|x86.Build.0 = Release|x64
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Debug|ARM.ActiveCfg = Debug|x64
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Debug|ARM.Build.0 = Debug|x64
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Debug|x64.Build.0 = Debug|x64
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Debug|x86.ActiveCfg = Debug|x64
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Debug|x86.Build.0 = Debug|x64
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Release|ARM.ActiveCfg = Release|x64
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Release|ARM.Build.0 = Release|x64
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Release|x64.ActiveCfg = Release|x64
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Release|x64.Build.0 = Release|x64
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Release|x86.ActiveCfg = Release|x64
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Release|x86.Build.0 = Release|x64
|
||||
{667625A5-8DE2-4373-99F0-8BAD2CCED011}.Debug|ARM.ActiveCfg = Debug|x64
|
||||
{667625A5-8DE2-4373-99F0-8BAD2CCED011}.Debug|ARM.Build.0 = Debug|x64
|
||||
{667625A5-8DE2-4373-99F0-8BAD2CCED011}.Debug|x64.ActiveCfg = Debug|x64
|
||||
|
@ -196,6 +184,18 @@ Global
|
|||
{667625A5-8DE2-4373-99F0-8BAD2CCED011}.Release|x64.Build.0 = Release|x64
|
||||
{667625A5-8DE2-4373-99F0-8BAD2CCED011}.Release|x86.ActiveCfg = Release|Win32
|
||||
{667625A5-8DE2-4373-99F0-8BAD2CCED011}.Release|x86.Build.0 = Release|Win32
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Debug|ARM.ActiveCfg = Debug|x64
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Debug|ARM.Build.0 = Debug|x64
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Debug|x64.Build.0 = Debug|x64
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Debug|x86.ActiveCfg = Debug|x64
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Debug|x86.Build.0 = Debug|x64
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Release|ARM.ActiveCfg = Release|x64
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Release|ARM.Build.0 = Release|x64
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Release|x64.ActiveCfg = Release|x64
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Release|x64.Build.0 = Release|x64
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Release|x86.ActiveCfg = Release|x64
|
||||
{80A5854F-6F80-4EC2-9F73-84E0F4DB8D7E}.Release|x86.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "FileOperator.h"
|
||||
|
||||
#include "RasterWidgetMessageShow.h"
|
||||
|
||||
#include "ImageOperatorBase.h"
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
|
@ -53,7 +53,15 @@ namespace LAMPMainWidget {
|
|||
// 绑定消息显示
|
||||
RasterMessageShow::RasterWidgetMessageShow* messageshow = RasterMessageShow::RasterWidgetMessageShow::getInstance(this);
|
||||
messageshow->bandingTextBrowserMessage(this->mUi->textBrowserMessage);
|
||||
|
||||
connect(mUi->actioncloseAllRasterFile, SIGNAL(triggered()), this, SLOT(onactioncloseAllRasterFile_triggered()));
|
||||
|
||||
this->mUi->toolBar->hide();
|
||||
this->mUi->dockWidget_Map->hide();
|
||||
this->mUi->dockWidget->hide();
|
||||
this->mUi->statusbar->hide();
|
||||
this->mUi->dockWidget_2->hide();
|
||||
this->mUi->dockWidget_3->hide();
|
||||
|
||||
}
|
||||
|
||||
|
@ -317,9 +325,14 @@ namespace LAMPMainWidget {
|
|||
mMapConvas->selectTool("addplane_tool");
|
||||
}
|
||||
|
||||
QTableWidget* RasterMainWidget::getTaskTable()
|
||||
{
|
||||
return this->mUi->taskTable;
|
||||
}
|
||||
void RasterMainWidget::onactioncloseAllRasterFile_triggered()
|
||||
{
|
||||
CloseAllGDALRaster();
|
||||
}
|
||||
|
||||
QTableWidget* RasterMainWidget::getTaskTable()
|
||||
{
|
||||
return this->mUi->taskTable;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ namespace LAMPMainWidget {
|
|||
private slots:
|
||||
void on_drawArea_triggered();
|
||||
void on_addPlaneaction_triggered();
|
||||
|
||||
void onactioncloseAllRasterFile_triggered();
|
||||
private:
|
||||
Ui::RasterMainWidget* mUi;
|
||||
MapCanvas* mMapConvas;
|
||||
|
|
|
@ -134,6 +134,9 @@
|
|||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
<widget class="QToolBar" name="toolBar">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>toolBar</string>
|
||||
</property>
|
||||
|
@ -375,6 +378,85 @@ p, li { white-space: pre-wrap; }
|
|||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QDockWidget" name="dockWidget_Map">
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>地图窗口</string>
|
||||
</property>
|
||||
<attribute name="dockWidgetArea">
|
||||
<number>1</number>
|
||||
</attribute>
|
||||
<widget class="QWidget" name="dockWidgetContents_5">
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>0</y>
|
||||
<width>502</width>
|
||||
<height>274</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="mapTab">
|
||||
<attribute name="title">
|
||||
<string>地图</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="mapCanvasLayout"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="taskTab">
|
||||
<attribute name="title">
|
||||
<string>任务</string>
|
||||
</attribute>
|
||||
<widget class="QWidget" name="gridLayoutWidget_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1431</width>
|
||||
<height>871</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="taskLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QTableWidget" name="taskTable"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>906</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="toolsMenu">
|
||||
<property name="title">
|
||||
<string>工具</string>
|
||||
</property>
|
||||
<addaction name="actioncloseAllRasterFile"/>
|
||||
</widget>
|
||||
<addaction name="toolsMenu"/>
|
||||
</widget>
|
||||
<action name="tutorialAction">
|
||||
<property name="text">
|
||||
<string>使用教程</string>
|
||||
|
@ -511,6 +593,11 @@ p, li { white-space: pre-wrap; }
|
|||
<string>飞机</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actioncloseAllRasterFile">
|
||||
<property name="text">
|
||||
<string>释放影像文件</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../RasterMainWidgetGUI.qrc"/>
|
||||
|
|
|
@ -25,6 +25,7 @@ ToolBoxWidget::ToolBoxWidget(LAMPMainWidget::RasterMainWidget* mainWindows, QWid
|
|||
ui->setupUi(this);
|
||||
setContextMenuPolicy(Qt::CustomContextMenu); // <20>零塘숩우쌥꽉데
|
||||
QObject::connect(this, SIGNAL(addBoxToolItemSIGNAL(QToolAbstract*)), this, SLOT(addBoxToolItemSLOT(QToolAbstract*)));
|
||||
QObject::connect(this, SIGNAL(addBoxToolItemInPathSIGNAL(QVector<QString> , QToolAbstract* )), this, SLOT(addBoxToolItemInPathSLOT(QVector<QString>, QToolAbstract * )));
|
||||
|
||||
}
|
||||
|
||||
|
@ -122,6 +123,37 @@ void ToolBoxWidget::addBoxToolItemSLOT(QToolAbstract* item)
|
|||
}
|
||||
|
||||
|
||||
void ToolBoxWidget::addBoxToolItemInPathSLOT(QVector<QString> xnodepath, QToolAbstract* item)
|
||||
{
|
||||
QString toolName = item->getToolName();
|
||||
|
||||
QTreeWidgetItem* parentItem = findOrCreateParentItem(xnodepath);
|
||||
|
||||
// 检查该父项是否已经绑定了 toolButton
|
||||
if (parentItem && ui->treeWidgetToolBox->itemWidget(parentItem, 0) == nullptr) {
|
||||
|
||||
toollist.append(QToolboxTreeWidgetItem(ui->treeWidgetToolBox, parentItem, item));
|
||||
|
||||
|
||||
//QTreeWidgetItem* actionItem = new QTreeWidgetItem(parentItem);
|
||||
//parentItem->addChild(actionItem);
|
||||
//actionItem->setText(0,toolName);
|
||||
//QIcon icon(QString::fromUtf8(":/ToolBoxWidget/toolicon"));
|
||||
//QPushButton* button = new QPushButton(ui->treeWidgetToolBox);
|
||||
//button->setIcon(icon);
|
||||
//button->setText(toolName);
|
||||
//button->setLayoutDirection(Qt::LeftToRight);
|
||||
//button->setStyleSheet("QPushButton { text-align: left; }");
|
||||
//ui->treeWidgetToolBox->setItemWidget(actionItem, 0, button);
|
||||
//connect(button, SIGNAL(clicked()), item, SLOT(excute()));
|
||||
//item->setParent(ui->treeWidgetToolBox);
|
||||
//qDebug() << "ToolButton bound to parent:" << actionItem->text(0);
|
||||
}
|
||||
else {
|
||||
qDebug() << "ToolButton already bound to parent:" << parentItem->text(0);
|
||||
}
|
||||
}
|
||||
|
||||
// 몽앴쨌쓺꿴冷샀눼쉔만淃
|
||||
QTreeWidgetItem* ToolBoxWidget::findOrCreateParentItem( QVector<QString>& path) {
|
||||
QTreeWidgetItem* currentItem = nullptr;
|
||||
|
@ -171,7 +203,17 @@ QTreeWidgetItem* ToolBoxWidget::findChildItemByName(QTreeWidgetItem* parentItem,
|
|||
return childItem;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
|
||||
|
||||
// 如果没有找到,创建新的顶级节点
|
||||
QTreeWidgetItem* newItem = new QTreeWidgetItem(parentItem);
|
||||
QIcon icon(QString::fromUtf8(":/RasterProcessTool/toolboxIcon"));
|
||||
newItem->setIcon(0, icon);
|
||||
newItem->setTextAlignment(0, Qt::AlignLeft);
|
||||
newItem->setText(0, name);
|
||||
parentItem->addChild(newItem);
|
||||
return newItem;
|
||||
// return nullptr;
|
||||
}
|
||||
|
||||
void ToolBoxWidget::OpenToolboxManagerWidget()
|
||||
|
|
|
@ -49,9 +49,11 @@ private:
|
|||
|
||||
signals:
|
||||
void addBoxToolItemSIGNAL(QToolAbstract* item);
|
||||
void addBoxToolItemInPathSIGNAL(QVector<QString> xnodepath, QToolAbstract* item);
|
||||
|
||||
public slots:
|
||||
void addBoxToolItemSLOT(QToolAbstract* item);
|
||||
void addBoxToolItemInPathSLOT(QVector<QString> xnodepath, QToolAbstract* item);
|
||||
QTreeWidgetItem* findOrCreateParentItem( QVector<QString>& path);
|
||||
QTreeWidgetItem* findOrCreateTopLevelItem( QString& name);
|
||||
QTreeWidgetItem* findChildItemByName(QTreeWidgetItem* parentItem, QString& name);
|
||||
|
|
|
@ -13,6 +13,9 @@
|
|||
#include "QResampleRefrenceRaster.h"
|
||||
#include "QtLookTableCorrectOffsetDialog.h"
|
||||
#include "QtCreateGPSPointsDialog.h"
|
||||
#include "RasterVRT2ENVIdataDialog.h"
|
||||
|
||||
#include "SARSatalliteSimulationWorkflow.h" // 大场景仿真
|
||||
|
||||
GF3ImportDataToolButton::GF3ImportDataToolButton(QWidget* parent) :QToolAbstract(parent)
|
||||
{
|
||||
|
@ -115,6 +118,19 @@ void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWi
|
|||
emit toolbox->addBoxToolItemSIGNAL(new QResampleRefrenceRasterToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new QLookTableCorrectOffsetToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new QCreateGPSPointsToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new RasterVRT2ENVIdataDialogToolButton(toolbox));
|
||||
|
||||
|
||||
// 大场景仿真流程
|
||||
#ifdef __BASETOOLBOX__SARSATALLITESIMULATIONWORKFLOW__H__
|
||||
initBaseToolSARSateSimulationWorkflow(toolbox);
|
||||
#endif // __BASETOOLBOX__SARSATALLITESIMULATIONWORKFLOW__H__
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
QDEMResampleDialogToolButton::QDEMResampleDialogToolButton(QWidget* parent)
|
||||
|
@ -215,4 +231,21 @@ void QCreateGPSPointsToolButton::excute()
|
|||
{
|
||||
QtCreateGPSPointsDialog* dialog = new QtCreateGPSPointsDialog;
|
||||
dialog->show();
|
||||
}
|
||||
}
|
||||
|
||||
RasterVRT2ENVIdataDialogToolButton::RasterVRT2ENVIdataDialogToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolPath = QVector<QString>(0);
|
||||
this->toolPath.push_back(u8"基础处理");
|
||||
this->toolname = QString(u8"vrt文件转换envi数据格式");
|
||||
}
|
||||
|
||||
RasterVRT2ENVIdataDialogToolButton::~RasterVRT2ENVIdataDialogToolButton()
|
||||
{
|
||||
}
|
||||
|
||||
void RasterVRT2ENVIdataDialogToolButton::run()
|
||||
{
|
||||
RasterVRT2ENVIdataDialog* dialog = new RasterVRT2ENVIdataDialog;
|
||||
dialog->show();
|
||||
}
|
||||
|
|
|
@ -10,6 +10,8 @@ namespace LAMPMainWidget {
|
|||
class ToolBoxWidget;
|
||||
|
||||
|
||||
extern "C" BASETOOLBOX_EXPORT void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWidget* toolbox);
|
||||
|
||||
class BASETOOLBOX_EXPORT GF3ImportDataToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -132,4 +134,18 @@ public slots:
|
|||
|
||||
};
|
||||
|
||||
extern "C" BASETOOLBOX_EXPORT void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWidget* toolbox);
|
||||
|
||||
|
||||
|
||||
|
||||
class BASETOOLBOX_EXPORT RasterVRT2ENVIdataDialogToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
RasterVRT2ENVIdataDialogToolButton(QWidget* parent = nullptr);
|
||||
~RasterVRT2ENVIdataDialogToolButton();
|
||||
public :
|
||||
virtual void run() override;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -60,12 +60,12 @@
|
|||
</ImportGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'" Label="QtSettings">
|
||||
<QtInstall>tools_qt5</QtInstall>
|
||||
<QtModules>core</QtModules>
|
||||
<QtModules>core;gui;widgets</QtModules>
|
||||
<QtBuildConfig>debug</QtBuildConfig>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="QtSettings">
|
||||
<QtInstall>tools_qt5</QtInstall>
|
||||
<QtModules>core</QtModules>
|
||||
<QtModules>core;gui;widgets</QtModules>
|
||||
<QtBuildConfig>debug</QtBuildConfig>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" Label="QtSettings">
|
||||
|
@ -122,6 +122,7 @@
|
|||
<EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
|
||||
<LanguageStandard>stdcpp14</LanguageStandard>
|
||||
<LanguageStandard_C>stdc11</LanguageStandard_C>
|
||||
<Optimization>Disabled</Optimization>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
|
@ -207,10 +208,13 @@
|
|||
<ClCompile Include="BaseToolbox\QResampleRefrenceRaster.cpp" />
|
||||
<ClCompile Include="BaseToolbox\QtCreateGPSPointsDialog.cpp" />
|
||||
<ClCompile Include="BaseToolbox\QtLookTableCorrectOffsetDialog.cpp" />
|
||||
<ClCompile Include="BaseToolbox\RasterVRT2ENVIdataDialog.cpp" />
|
||||
<ClCompile Include="BaseToolbox\SatelliteGF3xmlParser.cpp" />
|
||||
<ClCompile Include="BaseToolbox\SateOrbit.cpp" />
|
||||
<ClCompile Include="BaseToolbox\simptsn.cpp" />
|
||||
<ClCompile Include="BaseToolbox\WGS84_J2000.cpp" />
|
||||
<ClCompile Include="SARSatalliteSimulationWorkflow.cpp" />
|
||||
<QtMoc Include="SARSatalliteSimulationWorkflow.h" />
|
||||
<QtMoc Include="BaseToolbox\DEMLLA2XYZTool.h" />
|
||||
<ClInclude Include="BaseToolbox\GF3CalibrationAndGeocodingClass.h" />
|
||||
<ClInclude Include="BaseToolbox\GF3PSTNClass.h" />
|
||||
|
@ -225,6 +229,7 @@
|
|||
<QtMoc Include="BaseToolbox\QResampleRefrenceRaster.h" />
|
||||
<QtMoc Include="BaseToolbox\QtLookTableCorrectOffsetDialog.h" />
|
||||
<QtMoc Include="BaseToolbox\QtCreateGPSPointsDialog.h" />
|
||||
<QtMoc Include="BaseToolbox\RasterVRT2ENVIdataDialog.h" />
|
||||
<ClInclude Include="BaseToolbox\SatelliteGF3xmlParser.h" />
|
||||
<ClInclude Include="BaseToolbox\SateOrbit.h" />
|
||||
<ClInclude Include="BaseToolbox\simptsn.h" />
|
||||
|
@ -246,6 +251,7 @@
|
|||
<QtUic Include="BaseToolbox\QResampleRefrenceRaster.ui" />
|
||||
<QtUic Include="BaseToolbox\QtCreateGPSPointsDialog.ui" />
|
||||
<QtUic Include="BaseToolbox\QtLookTableCorrectOffsetDialog.ui" />
|
||||
<QtUic Include="BaseToolbox\RasterVRT2ENVIdataDialog.ui" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\BaseCommonLibrary\BaseCommonLibrary.vcxproj">
|
||||
|
|
|
@ -106,6 +106,12 @@
|
|||
<ClCompile Include="BaseToolbox\QtCreateGPSPointsDialog.cpp">
|
||||
<Filter>BaseToolbox</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="BaseToolbox\RasterVRT2ENVIdataDialog.cpp">
|
||||
<Filter>BaseToolbox</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SARSatalliteSimulationWorkflow.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="BaseToolbox\DEMLLA2XYZTool.h">
|
||||
|
@ -147,6 +153,12 @@
|
|||
<QtMoc Include="BaseToolbox\QtCreateGPSPointsDialog.h">
|
||||
<Filter>BaseToolbox</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="BaseToolbox\RasterVRT2ENVIdataDialog.h">
|
||||
<Filter>BaseToolbox</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="SARSatalliteSimulationWorkflow.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtUic Include="BaseToolbox\DEMLLA2XYZTool.ui">
|
||||
|
@ -185,5 +197,8 @@
|
|||
<QtUic Include="BaseToolbox\QtCreateGPSPointsDialog.ui">
|
||||
<Filter>BaseToolbox</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="BaseToolbox\RasterVRT2ENVIdataDialog.ui">
|
||||
<Filter>BaseToolbox</Filter>
|
||||
</QtUic>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -26,7 +26,7 @@ ErrorCode GF3CalibrationRaster(QString inRasterPath, QString outRasterPath, doub
|
|||
|
||||
double quayCoff = Qualifyvalue * 1.0 / 32767;
|
||||
double caliCoff = std::pow(10.0, (calibrationConst * 1.0 / 20));
|
||||
qDebug() << "定标系数:\t" << quayCoff / caliCoff;
|
||||
qDebug() << u8"定标系数:\t" << quayCoff / caliCoff;
|
||||
long startrow = 0;
|
||||
for (startrow = 0; startrow < imgraster.height; startrow = startrow + blocklines) {
|
||||
|
||||
|
@ -37,7 +37,7 @@ ErrorCode GF3CalibrationRaster(QString inRasterPath, QString outRasterPath, doub
|
|||
imgArr.imag() = imgArrb2.array() * quayCoff / caliCoff;
|
||||
outraster.saveImage(imgArr, startrow, 0, 1);
|
||||
}
|
||||
qDebug() << "影像写入到:" << outRasterPath;
|
||||
qDebug() << u8"影像写入到:" << outRasterPath;
|
||||
return ErrorCode::SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -80,29 +80,29 @@ ErrorCode ImportGF3L1ARasterToWorkspace(QString inMetaxmlPath, QString inRasterP
|
|||
QString outRasterpath = l1dataset.getImageRasterPath();
|
||||
|
||||
ErrorCode errorcode = ErrorCode::SUCCESS;
|
||||
qDebug() << "导入数据:\t" << inRasterPath;
|
||||
qDebug() << u8"导入数据:\t" << inRasterPath;
|
||||
switch (polsartype)
|
||||
{
|
||||
case POLARHH:
|
||||
qDebug() << "极化:HH";
|
||||
qDebug() << u8"极化:HH";
|
||||
errorcode = GF3CalibrationRaster(inRasterPath, outRasterpath, gf3xml.HH_QualifyValue, gf3xml.HH_CalibrationConst);
|
||||
break;
|
||||
case POLARHV:
|
||||
qDebug() << "极化:HH";
|
||||
qDebug() << u8"极化:HH";
|
||||
errorcode = GF3CalibrationRaster(inRasterPath, outRasterpath, gf3xml.HV_QualifyValue, gf3xml.HV_CalibrationConst);
|
||||
break;
|
||||
case POLARVH:
|
||||
qDebug() << "极化:VH";
|
||||
qDebug() << u8"极化:VH";
|
||||
errorcode = GF3CalibrationRaster(inRasterPath, outRasterpath, gf3xml.VH_QualifyValue, gf3xml.VH_CalibrationConst);
|
||||
break;
|
||||
case POLARVV:
|
||||
qDebug() << "极化:VV";
|
||||
qDebug() << u8"极化:VV";
|
||||
errorcode = GF3CalibrationRaster(inRasterPath, outRasterpath, gf3xml.VV_QualifyValue, gf3xml.VV_CalibrationConst);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
qDebug() << "导入数据状态:\t" << QString::fromStdString(errorCode2errInfo(errorcode));
|
||||
qDebug() << u8"导入数据状态:\t" << QString::fromStdString(errorCode2errInfo(errorcode));
|
||||
|
||||
return errorcode;
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ QVector<QString> SearchGF3DataTiff(QString inMetaxmlPath)
|
|||
// 获取路径所在的目录
|
||||
QDir directory(absPath);
|
||||
if (!directory.exists()) {
|
||||
qDebug() << "Directory does not exist:" << directory.absolutePath();
|
||||
qDebug() << u8"Directory does not exist:" << directory.absolutePath();
|
||||
return QVector<QString>(0);
|
||||
}
|
||||
|
||||
|
@ -124,7 +124,7 @@ QVector<QString> SearchGF3DataTiff(QString inMetaxmlPath)
|
|||
filters << "*.tif" << "*.TIF" << "*.tiff" << "*.TIFF";
|
||||
QStringList files = directory.entryList(filters, QDir::Files);
|
||||
|
||||
qDebug() << "TIFF Files in the directory" << directory.absolutePath() << ":";
|
||||
qDebug() << u8"TIFF Files in the directory" << directory.absolutePath() << ":";
|
||||
QVector<QString> filepath(0);
|
||||
|
||||
for (long i = 0; i < files.count(); i++) {
|
||||
|
@ -144,7 +144,7 @@ POLARTYPEENUM getDatasetGF3FilePolsarType(QString fileName)
|
|||
if (match.hasMatch()) {
|
||||
polarization = match.captured(1);
|
||||
polarization = polarization.toLower().replace("_", "");
|
||||
qDebug() << "Polarization extracted:" << polarization;
|
||||
qDebug() << u8"Polarization extracted:" << polarization;
|
||||
if (polarization == "hh") {
|
||||
return POLARTYPEENUM::POLARHH;
|
||||
}
|
||||
|
@ -162,7 +162,7 @@ POLARTYPEENUM getDatasetGF3FilePolsarType(QString fileName)
|
|||
}
|
||||
}
|
||||
else {
|
||||
qDebug() << "No polarization found in the path.";
|
||||
qDebug() << u8"No polarization found in the path.";
|
||||
return POLARTYPEENUM::POLARUNKOWN;
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@ ErrorCode ImportGF3L1AProcess(QString inMetaxmlPath, QString outWorkDirPath)
|
|||
break;
|
||||
}
|
||||
if (errorcode == ErrorCode::SUCCESS) {
|
||||
return errorcode;
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
QMessageBox::warning(nullptr, u8"错误", u8"数据导入错误");
|
||||
|
@ -209,94 +209,10 @@ ErrorCode ImportGF3L1AProcess(QString inMetaxmlPath, QString outWorkDirPath)
|
|||
return errorcode;
|
||||
}
|
||||
|
||||
ErrorCode Complex2AmpRaster(QString inComplexPath, QString outRasterPath)
|
||||
{
|
||||
gdalImageComplex inimg(inComplexPath);
|
||||
gdalImage ampimg = CreategdalImage(outRasterPath, inimg.height, inimg.width, inimg.band_num, inimg.gt, inimg.projection, true, true);
|
||||
|
||||
long blocklines = Memory1GB * 2 / 8 / inimg.width;
|
||||
blocklines = blocklines < 100 ? 100 : blocklines;
|
||||
Eigen::MatrixXd imgArrb1 = Eigen::MatrixXd::Zero(blocklines, ampimg.width);
|
||||
Eigen::MatrixXcd imgArr = Eigen::MatrixXcd::Zero(blocklines, inimg.width);
|
||||
|
||||
long startrow = 0;
|
||||
for (startrow = 0; startrow < inimg.height; startrow = startrow + blocklines) {
|
||||
|
||||
imgArrb1 = ampimg.getData(startrow, 0, blocklines, inimg.width, 1);
|
||||
imgArr = inimg.getData(startrow, 0, blocklines, inimg.width, 2);
|
||||
imgArrb1 = imgArr.array().abs();
|
||||
ampimg.saveImage(imgArrb1, startrow, 0, 1);
|
||||
}
|
||||
qDebug() << "影像写入到:" << outRasterPath;
|
||||
return ErrorCode::SUCCESS;
|
||||
}
|
||||
|
||||
ErrorCode Complex2PhaseRaster(QString inComplexPath, QString outRasterPath)
|
||||
{
|
||||
gdalImageComplex inimg(inComplexPath);
|
||||
gdalImage ampimg = CreategdalImage(outRasterPath, inimg.height, inimg.width, inimg.band_num, inimg.gt, inimg.projection, true, true);
|
||||
|
||||
|
||||
long blocklines = Memory1GB * 2 / 8 / inimg.width;
|
||||
blocklines = blocklines < 100 ? 100 : blocklines;
|
||||
Eigen::MatrixXd imgArrb1 = Eigen::MatrixXd::Zero(blocklines, ampimg.width);
|
||||
Eigen::MatrixXcd imgArr = Eigen::MatrixXcd::Zero(blocklines, inimg.width);
|
||||
|
||||
long startrow = 0;
|
||||
for (startrow = 0; startrow < inimg.height; startrow = startrow + blocklines) {
|
||||
|
||||
imgArrb1 = ampimg.getData(startrow, 0, blocklines, inimg.width, 1);
|
||||
imgArr = inimg.getData(startrow, 0, blocklines, inimg.width, 2);
|
||||
imgArrb1 = imgArr.array().arg();
|
||||
ampimg.saveImage(imgArrb1, startrow, 0, 1);
|
||||
}
|
||||
qDebug() << "影像写入到:" << outRasterPath;
|
||||
return ErrorCode::SUCCESS;
|
||||
}
|
||||
|
||||
ErrorCode Complex2dBRaster(QString inComplexPath, QString outRasterPath)
|
||||
{
|
||||
gdalImageComplex inimg(inComplexPath);
|
||||
gdalImage ampimg = CreategdalImage(outRasterPath, inimg.height, inimg.width, inimg.band_num, inimg.gt, inimg.projection, true, true);
|
||||
|
||||
|
||||
long blocklines = Memory1GB * 2 / 8 / inimg.width;
|
||||
blocklines = blocklines < 100 ? 100 : blocklines;
|
||||
Eigen::MatrixXd imgArrb1 = Eigen::MatrixXd::Zero(blocklines, ampimg.width);
|
||||
Eigen::MatrixXcd imgArr = Eigen::MatrixXcd::Zero(blocklines, inimg.width);
|
||||
|
||||
long startrow = 0;
|
||||
for (startrow = 0; startrow < inimg.height; startrow = startrow + blocklines) {
|
||||
|
||||
imgArrb1 = ampimg.getData(startrow, 0, blocklines, inimg.width, 1);
|
||||
imgArr = inimg.getData(startrow, 0, blocklines, inimg.width, 2);
|
||||
imgArrb1 = imgArr.array().abs().log10() * 20.0;
|
||||
ampimg.saveImage(imgArrb1, startrow, 0, 1);
|
||||
}
|
||||
qDebug() << "影像写入到:" << outRasterPath;
|
||||
return ErrorCode::SUCCESS;
|
||||
}
|
||||
|
||||
ErrorCode ResampleDEM(QString indemPath, QString outdemPath, double gridx, double gridy)
|
||||
{
|
||||
double gridlat = gridy / 110000.0;
|
||||
double gridlon = gridx / 100000.0;
|
||||
|
||||
long espgcode = GetEPSGFromRasterFile(indemPath.toUtf8().constData());
|
||||
if (espgcode == 4326) {
|
||||
resampleRaster(indemPath.toUtf8().constData(), outdemPath.toUtf8().constData(), gridlon, gridlat);
|
||||
return ErrorCode::SUCCESS;
|
||||
}
|
||||
else {
|
||||
QMessageBox::warning(nullptr, u8"警告", u8"请输入WGS84坐标的DEM影像");
|
||||
return ErrorCode::FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ErrorCode RD_PSTN(double& refrange, double& lamda, double& timeR, double& R, double& tx, double& ty, double& tz, double& slopex, double& slopey, double& slopez, GF3PolyfitSatelliteOribtModel& polyfitmodel, SatelliteOribtNode& node, double& d0, double& d1, double& d2, double& d3, double& d4)
|
||||
{
|
||||
double dt = 1e-6;
|
||||
double dt = 1e-4;
|
||||
double inct = 0;
|
||||
bool antfalg = false;
|
||||
double timeR2 = 0;
|
||||
|
@ -315,21 +231,24 @@ ErrorCode RD_PSTN(double& refrange, double& lamda, double& timeR, double& R, dou
|
|||
for (int i = 0; i < 50; i++) {
|
||||
polyfitmodel.getSatelliteOribtNode(timeR, node, antfalg);
|
||||
R1 = std::sqrt(std::pow(node.Px - tx, 2) + std::pow(node.Py - ty, 2) + std::pow(node.Pz - tz, 2));
|
||||
dplerTheory1 = (-2 / lamda) * (((node.Px - tx) * (node.Vx + EARTHWE * ty) + (node.Py - ty) * (node.Vy - EARTHWE * tz) + (node.Pz - tz) * (node.Vz - 0)) / R1);
|
||||
dplerR = (R1 - refrange) * 1e6 / LIGHTSPEED;
|
||||
//dplerTheory1 = (-2 / lamda / R1) * ((node.Px - tx) * (node.Vx + EARTHWE * ty) + (node.Py - ty) * (node.Vy - EARTHWE * tx) + (node.Pz - tz) * (node.Vz - 0));
|
||||
dplerTheory1 = (-2 / lamda / R1) * ((node.Px - tx) * (node.Vx + 0) + (node.Py - ty) * (node.Vy -0) + (node.Pz - tz) * (node.Vz - 0));
|
||||
dplerR = (R1 - refrange) * 1e6 / LIGHTSPEED; // GF3 计算公式
|
||||
dplerNumber1 = d0 + dplerR * d1 + std::pow(dplerR, 2) * d2 + std::pow(dplerR, 3) * d3 + std::pow(dplerR, 4) * d4;
|
||||
|
||||
timeR2 = timeR + dt;
|
||||
polyfitmodel.getSatelliteOribtNode(timeR2, node, antfalg);
|
||||
R2 = std::sqrt(std::pow(node.Px - tx, 2) + std::pow(node.Py - ty, 2) + std::pow(node.Pz - tz, 2));
|
||||
dplerTheory2 = (-2 / lamda) * (((node.Px - tx) * (node.Vx + EARTHWE * ty) + (node.Py - ty) * (node.Vy - EARTHWE * tz) + (node.Pz - tz) * (node.Vz - 0)) / R2);
|
||||
dplerR = (R2 - refrange) * 1e6 / LIGHTSPEED;
|
||||
dplerNumber2 = d0 + dplerR * d1 + std::pow(dplerR, 2) * d2 + std::pow(dplerR, 3) * d3 + std::pow(dplerR, 4) * d4;
|
||||
|
||||
inct = dt * (dplerTheory2 - dplerNumber1) / (dplerTheory1 - dplerTheory2);
|
||||
if (std::abs(dplerTheory1 - dplerTheory2) < 1e-9 || std::abs(inct) < dt) {
|
||||
//dplerTheory2 = (-2 / lamda/R2) * ((node.Px - tx) * (node.Vx + EARTHWE * ty) + (node.Py - ty) * (node.Vy - EARTHWE * tx) + (node.Pz - tz) * (node.Vz - 0));
|
||||
dplerTheory2 = (-2 / lamda/R2) * ((node.Px - tx) * (node.Vx +0) + (node.Py - ty) * (node.Vy -0) + (node.Pz - tz) * (node.Vz - 0));
|
||||
//dplerR = (R2 - refrange) * 1e6 / LIGHTSPEED; // GF3 计算公式
|
||||
//dplerNumber2 = d0 + dplerR * d1 + std::pow(dplerR, 2) * d2 + std::pow(dplerR, 3) * d3 + std::pow(dplerR, 4) * d4;
|
||||
|
||||
inct = dt*(dplerTheory2-dplerNumber1) / (dplerTheory2 - dplerTheory1);
|
||||
if (std::abs(dplerNumber1 - dplerTheory2) < 1e-6 || std::abs(inct) < 1.0e-4) {
|
||||
break;
|
||||
}
|
||||
inct = std::abs(inct) < 10 ?inct:inct*1e-2;
|
||||
timeR = timeR - inct;
|
||||
}
|
||||
R = R1; // 斜距
|
||||
|
@ -349,7 +268,7 @@ ErrorCode GF3RDCreateLookTable(QString inxmlPath, QString indemPath, QString out
|
|||
gdalImage rasterRC = CreategdalImage(outlooktablePath, demxyz.height, demxyz.width, 2, demxyz.gt, demxyz.projection, true, true);// X,Y,Z
|
||||
gdalImage localincangleRaster;
|
||||
if (localincAngleFlag) {
|
||||
localincangleRaster = CreategdalImage(outLocalIncidenceAnglePath, demxyz.height, demxyz.width, 2, demxyz.gt, demxyz.projection, true, true);// X,Y,Z
|
||||
localincangleRaster = CreategdalImage(outLocalIncidenceAnglePath, demxyz.height, demxyz.width, 1, demxyz.gt, demxyz.projection, true, true);// X,Y,Z
|
||||
}
|
||||
|
||||
|
||||
|
@ -363,44 +282,64 @@ ErrorCode GF3RDCreateLookTable(QString inxmlPath, QString indemPath, QString out
|
|||
double d3 = dopplers[3];
|
||||
double d4 = dopplers[4];
|
||||
|
||||
double fs = l1dataset.getFs();// Fs采样
|
||||
double prf = (l1dataset.getEndImageTime() - l1dataset.getStartImageTime()) / (l1dataset.getrowCount() - 1);// PRF 采样
|
||||
double fs = l1dataset.getFs()*1e6;// Fs采样
|
||||
double prf = l1dataset.getPRF();// PRF 采样
|
||||
|
||||
double nearRange = l1dataset.getNearRange();
|
||||
double imagestarttime = l1dataset.getStartImageTime();
|
||||
double imageendtime = l1dataset.getEndImageTime();
|
||||
double refrange = l1dataset.getRefRange();
|
||||
double lamda = (LIGHTSPEED*1e-6)/ l1dataset.getCenterFreq();
|
||||
double lamda = (LIGHTSPEED*1.0e-9)/ l1dataset.getCenterFreq();
|
||||
// 打印参数
|
||||
qDebug() << "Fs:\t" << fs;
|
||||
qDebug() << "prf:\t" << prf;
|
||||
qDebug() << "nearRange:\t" << nearRange;
|
||||
qDebug() << "imagestarttime:\t" << imagestarttime;
|
||||
qDebug() << "imageendtime:\t" << imageendtime;
|
||||
qDebug() << "refrange:\t" << refrange;
|
||||
qDebug() << "lamda:\t" << lamda;
|
||||
//打印多普累参数
|
||||
qDebug() << u8"-----------------------------------";
|
||||
qDebug() << u8"多普勒参数:\n";
|
||||
qDebug() << u8"d0:\t" << d0;
|
||||
qDebug() << u8"d1:\t" << d1;
|
||||
qDebug() << u8"d2:\t" << d2;
|
||||
qDebug() << u8"d3:\t" << d3;
|
||||
qDebug() << u8"d4:\t" << d4;
|
||||
qDebug() << u8"-----------------------------------";
|
||||
|
||||
// 构建轨道模型
|
||||
GF3PolyfitSatelliteOribtModel polyfitmodel;
|
||||
QVector < SatelliteAntPos > antposes = l1dataset.getXmlSateAntPos();
|
||||
polyfitmodel.setSatelliteOribtStartTime(imagestarttime);
|
||||
polyfitmodel.setSatelliteOribtStartTime((imagestarttime+imageendtime)/2);
|
||||
for (long i = 0; i < antposes.size(); i++) {
|
||||
SatelliteOribtNode node;
|
||||
node.time = antposes[i].time;
|
||||
node.Px = antposes[i].Px;
|
||||
node.Py = antposes[i].Py;
|
||||
node.Pz = antposes[i].Pz;
|
||||
node.Vx = antposes[i].Vx;
|
||||
node.Vy = antposes[i].Vy;
|
||||
node.Vz = antposes[i].Vz;
|
||||
polyfitmodel.addOribtNode(node);
|
||||
if (antposes[i].time > imagestarttime - 5 && antposes[i].time < imageendtime + 5) {
|
||||
SatelliteOribtNode node;
|
||||
node.time = antposes[i].time;
|
||||
node.Px = antposes[i].Px;
|
||||
node.Py = antposes[i].Py;
|
||||
node.Pz = antposes[i].Pz;
|
||||
node.Vx = antposes[i].Vx;
|
||||
node.Vy = antposes[i].Vy;
|
||||
node.Vz = antposes[i].Vz;
|
||||
polyfitmodel.addOribtNode(node);
|
||||
}
|
||||
}
|
||||
polyfitmodel.polyFit(3, false);
|
||||
|
||||
qDebug() << "-----------------------------------";
|
||||
qDebug() << "satellite polyfit model params:\n";
|
||||
qDebug() << u8"satellite polyfit model params:\n";
|
||||
qDebug() << polyfitmodel.getSatelliteOribtModelParamsString();
|
||||
qDebug() << "-----------------------------------";
|
||||
|
||||
// 开始计算查找表
|
||||
//1.计算分块
|
||||
long cpucore_num = std::thread::hardware_concurrency();
|
||||
long blockline = Memory1MB * 500 / 8 / cpucore_num / 4 / l1dataset.getcolCount();
|
||||
blockline = blockline < 50 ? 50 : blockline;
|
||||
long blocklineinit = Memory1MB / 8 / cpucore_num / 4 / l1dataset.getcolCount() * 8000;
|
||||
blocklineinit = blocklineinit < 50 ? 50 : blocklineinit;
|
||||
//2.迭代计算
|
||||
long colcount = l1dataset.getcolCount();
|
||||
long rowcount = l1dataset.getrowCount();
|
||||
long colcount = rasterRC.width;//l1dataset.getcolCount();
|
||||
long rowcount = rasterRC.height;//l1dataset.getrowCount();
|
||||
long startRId = 0;
|
||||
|
||||
long processNumber = 0;
|
||||
|
@ -417,33 +356,41 @@ ErrorCode GF3RDCreateLookTable(QString inxmlPath, QString indemPath, QString out
|
|||
|
||||
|
||||
|
||||
#pragma omp parallel for num_threads(cpucore_num-1)
|
||||
for (startRId = 0; startRId < rowcount; startRId = startRId + blockline) {
|
||||
|
||||
for (startRId = 0; startRId < rowcount; startRId = startRId + blocklineinit) {
|
||||
long blockline = blocklineinit;
|
||||
if (startRId + blockline > rowcount) {
|
||||
blockline = rowcount - startRId;
|
||||
}
|
||||
Eigen::MatrixXd sar_r = rasterRC.getData(startRId, 0, blockline, colcount, 1);
|
||||
Eigen::MatrixXd sar_c = rasterRC.getData(startRId, 0, blockline, colcount, 2);
|
||||
Eigen::MatrixXd dem_x = demxyz.getData(startRId, 0, blockline, colcount, 1);
|
||||
Eigen::MatrixXd dem_y = demxyz.getData(startRId, 0, blockline, colcount, 2);
|
||||
Eigen::MatrixXd dem_z = demxyz.getData(startRId, 0, blockline, colcount, 3);
|
||||
|
||||
// 逐像素迭代计算
|
||||
double timeR = 0;
|
||||
|
||||
long blockrows = sar_r.rows();
|
||||
long blockcols = sar_r.cols();
|
||||
double tx = 0;
|
||||
double ty = 0;
|
||||
double tz = 0;
|
||||
double R = 0;
|
||||
double slopex=0, slopey=0, slopez=0;
|
||||
SatelliteOribtNode node{0,0,0,0,0,0,0,0};
|
||||
bool antflag = false;
|
||||
|
||||
#pragma omp parallel for
|
||||
for (long i = 0; i < blockrows; i++) {
|
||||
// 逐像素迭代计算
|
||||
double timeR = 0;
|
||||
double tx = 0;
|
||||
double ty = 0;
|
||||
double tz = 0;
|
||||
double R = 0;
|
||||
double slopex = 0, slopey = 0, slopez = 0;
|
||||
SatelliteOribtNode node{ 0,0,0,0,0,0,0,0 };
|
||||
bool antflag = false;
|
||||
for (long j = 0; j < blockcols; j++) {
|
||||
|
||||
tx = dem_x(i, j);
|
||||
ty = dem_y(i, j);
|
||||
tz = dem_z(i, j);
|
||||
if (RD_PSTN(refrange,lamda, timeR,R,tx,ty,tz,slopex,slopey,slopez,polyfitmodel,node,d0,d1,d2,d3,d4) == ErrorCode::SUCCESS) {
|
||||
sar_r(i, j) = timeR * prf;
|
||||
sar_c(i, j) = ((R - nearRange) / 2 / LIGHTSPEED) * fs;
|
||||
sar_r(i, j) =( timeR+ (imagestarttime + imageendtime) / 2 -imagestarttime) * prf;
|
||||
sar_c(i, j) = ((R - nearRange) * 2 / LIGHTSPEED) * fs;
|
||||
}
|
||||
else {
|
||||
sar_r(i, j) = -1;
|
||||
|
@ -452,6 +399,14 @@ ErrorCode GF3RDCreateLookTable(QString inxmlPath, QString indemPath, QString out
|
|||
}
|
||||
}
|
||||
|
||||
// 保存结果
|
||||
omp_set_lock(&lock);
|
||||
rasterRC.saveImage(sar_r, startRId, 0, 1);
|
||||
rasterRC.saveImage(sar_c, startRId, 0, 2);
|
||||
|
||||
omp_unset_lock(&lock);
|
||||
|
||||
|
||||
Eigen::MatrixXd Angle_Arr = Eigen::MatrixXd::Zero(dem_x.rows(),dem_x.cols()).array()+181;
|
||||
if (localincAngleFlag) {
|
||||
Eigen::MatrixXd demslope_x = demslope.getData(startRId, 0, blockline, colcount, 1);
|
||||
|
@ -461,7 +416,20 @@ ErrorCode GF3RDCreateLookTable(QString inxmlPath, QString indemPath, QString out
|
|||
|
||||
double Rst_x = 0, Rst_y = 0, Rst_z = 0, localangle = 0;
|
||||
double slopeR = 0;
|
||||
#pragma omp parallel for
|
||||
for (long i = 0; i < blockrows; i++) {
|
||||
// 逐像素迭代计算
|
||||
double timeR = 0;
|
||||
double tx = 0;
|
||||
double ty = 0;
|
||||
double tz = 0;
|
||||
double R = 0;
|
||||
double slopex = 0, slopey = 0, slopez = 0;
|
||||
SatelliteOribtNode node{ 0,0,0,0,0,0,0,0 };
|
||||
bool antflag = false;
|
||||
|
||||
|
||||
|
||||
for (long j = 0; j < blockcols; j++) {
|
||||
timeR = sar_r(i, j) / prf;
|
||||
slopex = demslope_x(i, j);
|
||||
|
@ -482,18 +450,25 @@ ErrorCode GF3RDCreateLookTable(QString inxmlPath, QString indemPath, QString out
|
|||
Angle_Arr(i, j) = localangle;
|
||||
}
|
||||
}
|
||||
|
||||
// 保存结果
|
||||
omp_set_lock(&lock);
|
||||
|
||||
if (localincAngleFlag) {
|
||||
localincangleRaster.saveImage(Angle_Arr, startRId, 0, 1);
|
||||
}
|
||||
else {}
|
||||
|
||||
omp_unset_lock(&lock);
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 保存结果
|
||||
omp_set_lock(&lock);
|
||||
rasterRC.saveImage(sar_r, startRId, 0, 1);
|
||||
rasterRC.saveImage(sar_c, startRId, 0, 2);
|
||||
if (localincAngleFlag) {
|
||||
localincangleRaster.saveImage(Angle_Arr, startRId, 0, 1);
|
||||
}
|
||||
else {}
|
||||
|
||||
processNumber = processNumber + blockrows;
|
||||
qDebug() << "\rprocess bar:\t" << processNumber * 100.0 / rowcount << " % " << "\t\t\t";
|
||||
qDebug() << u8"\rprocess bar:\t" << processNumber * 100.0 / rowcount << " % " << "\t\t\t";
|
||||
if (progressDialog.maximum() <= processNumber) {
|
||||
processNumber = progressDialog.maximum() - 1;
|
||||
}
|
||||
|
@ -511,16 +486,17 @@ ErrorCode GF3OrthSLC( QString inRasterPath, QString inlooktablePath, QString out
|
|||
|
||||
gdalImage slcRaster(inRasterPath);//
|
||||
gdalImage looktableRaster(inlooktablePath);//
|
||||
gdalImage outRaster(outRasterPath);//
|
||||
gdalImage outRaster = CreategdalImage(outRasterPath, looktableRaster.height, looktableRaster.width, 1, looktableRaster.gt, looktableRaster.projection, true, true);// X,Y,Z
|
||||
//gdalImage outRaster(outRasterPath);//
|
||||
|
||||
if (outRaster.height != looktableRaster.height || outRaster.width != looktableRaster.width) {
|
||||
qDebug() << "look table size is not same as outRaster size"<< looktableRaster.height <<"!="<<outRaster.height<<" "<<looktableRaster.width<<"!="<<outRaster.width;
|
||||
qDebug() << u8"look table size is not same as outRaster size"<< looktableRaster.height <<"!="<<outRaster.height<<" "<<looktableRaster.width<<"!="<<outRaster.width;
|
||||
return ErrorCode::FAIL;
|
||||
}
|
||||
|
||||
Eigen::MatrixXd slcImg = slcRaster.getData(0, 0, slcRaster.height, slcRaster.width, 1);
|
||||
Eigen::MatrixXd sar_r = looktableRaster.getData(0, 0, looktableRaster.height, looktableRaster.width, 1);
|
||||
Eigen::MatrixXd sar_c = looktableRaster.getData(0, 0, looktableRaster.height, looktableRaster.width, 1);
|
||||
Eigen::MatrixXd sar_c = looktableRaster.getData(0, 0, looktableRaster.height, looktableRaster.width, 2);
|
||||
Eigen::MatrixXd outImg = outRaster.getData(0, 0, outRaster.height, outRaster.width, 1);
|
||||
|
||||
long lookRows = sar_r.rows();
|
||||
|
@ -549,7 +525,7 @@ ErrorCode GF3OrthSLC( QString inRasterPath, QString inlooktablePath, QString out
|
|||
|
||||
for (long i = 0; i < lookRows; i++) {
|
||||
for (long j = 0; j < lookCols; j++) {
|
||||
p0 = {sar_r(i,j),sar_c(i,j),0};
|
||||
|
||||
lastr = std::floor(sar_r(i, j));
|
||||
nextr = std::ceil(sar_r(i, j));
|
||||
lastc = std::floor(sar_c(i, j));
|
||||
|
@ -557,11 +533,13 @@ ErrorCode GF3OrthSLC( QString inRasterPath, QString inlooktablePath, QString out
|
|||
if (lastr < 0 || lastc < 0 || nextr >= slcRows || nextc >= slcCols) {
|
||||
continue;
|
||||
}
|
||||
p11 = { sar_r(i,j),sar_c(i,j),0 };
|
||||
|
||||
p0 = { sar_c(i,j)-lastc, sar_r(i,j)-lastr,0 };
|
||||
p11 = Landpoint{ 0,0,slcImg(lastr,lastc) };
|
||||
p21 = Landpoint{ 0,1,slcImg(nextr,lastc) };
|
||||
p12 = Landpoint{ 1,0,slcImg(lastr,nextc) };
|
||||
p22 = Landpoint{ 1,1,slcImg(nextr,nextc) };
|
||||
|
||||
Bileanervalue = Bilinear_interpolation(p0, p11, p21, p12, p22);
|
||||
outImg(i, j) = Bileanervalue;
|
||||
}
|
||||
|
@ -585,6 +563,35 @@ ErrorCode GF3RDProcess(QString inxmlPath, QString indemPath, QString outworkdir,
|
|||
double minlon = box.min_lon - dlon;
|
||||
double maxlat = box.max_lat + dlat;
|
||||
double maxlon = box.max_lon + dlon;
|
||||
qDebug() << u8"影像范围:";
|
||||
qDebug() << u8"Bounding Box:";
|
||||
qDebug() << u8"Latitude:" << minlat <<" - "<< maxlat;
|
||||
qDebug() << u8"Longitude:" << minlon <<" - "<< maxlon;
|
||||
double centerlat = (minlat + maxlat) / 2;
|
||||
double centerlon = (minlon + maxlon) / 2;
|
||||
long sourceespgcode = getProjectEPSGCodeByLon_Lat(centerlon, centerlat);
|
||||
long demespgcode = GetEPSGFromRasterFile(indemPath);
|
||||
double grid_resolution = gridx < gridy ? gridx : gridy;
|
||||
double degreePerPixelX = grid_resolution / 110000.0;
|
||||
double degreePerPixelY = grid_resolution / 110000.0;
|
||||
bool meter2degreeflag = ConvertResolutionToDegrees(
|
||||
sourceespgcode,
|
||||
grid_resolution,
|
||||
centerlon,
|
||||
centerlat,
|
||||
degreePerPixelX,
|
||||
degreePerPixelY
|
||||
);
|
||||
if (!meter2degreeflag) {
|
||||
qDebug() << u8"转换分辨率为经纬度失败";
|
||||
degreePerPixelX = grid_resolution / 110000.0;
|
||||
degreePerPixelY = grid_resolution / 110000.0;
|
||||
}
|
||||
qDebug() << u8"DEM影像范围:";
|
||||
qDebug() << u8"输入分辨率:"<<gridx<<" \t" << gridy;
|
||||
qDebug() << u8"影像分辨率:\t" << grid_resolution;
|
||||
qDebug() << u8"分辨率转换为经纬度:\t" << degreePerPixelX << "\t" << degreePerPixelY;
|
||||
// 计算DEM的分辨率
|
||||
|
||||
// 裁剪DEM
|
||||
QString filename = getFileNameWidthoutExtend(l1dataset.getxmlFilePath());
|
||||
|
@ -592,20 +599,16 @@ ErrorCode GF3RDProcess(QString inxmlPath, QString indemPath, QString outworkdir,
|
|||
QString clipDEMPath = JoinPath(outworkdir, getFileNameWidthoutExtend(indemPath) + filename + "_clip.tif");
|
||||
cropRasterByLatLon(indemPath.toUtf8().constData(), clipDEMPath.toUtf8().constData(), minlon, maxlon, minlat, maxlat);
|
||||
QString resampleDEMPath = JoinPath(outworkdir, getFileNameWidthoutExtend(indemPath) + filename + "_clip_resample.tif");
|
||||
resampleRaster(clipDEMPath.toUtf8().constData(), resampleDEMPath.toUtf8().constData(), gridx, gridy);
|
||||
resampleRaster(clipDEMPath.toUtf8().constData(), resampleDEMPath.toUtf8().constData(), degreePerPixelX, degreePerPixelY);
|
||||
|
||||
|
||||
QString outlooktablePath = JoinPath(outworkdir, getFileNameWidthoutExtend(l1dataset.getxmlFilePath()) + "_looktable.tif");
|
||||
QString outlocalAnglePath = JoinPath(outworkdir, getFileNameWidthoutExtend(l1dataset.getxmlFilePath()) + "_localAngle.tif");
|
||||
|
||||
QString outOrthPath=JoinPath(outworkdir, getFileNameWidthoutExtend(l1dataset.getxmlFilePath()) + "_orth.tif");
|
||||
if (GF3RDCreateLookTable(inxmlPath, resampleDEMPath, outworkdir, outlooktablePath, outlocalAnglePath,true) != ErrorCode::SUCCESS) {
|
||||
qDebug() << "查找表生成错误:\t" + getFileNameWidthoutExtend(inxmlPath);
|
||||
if (GF3RDCreateLookTable(inxmlPath, resampleDEMPath, outworkdir, outlooktablePath, outlocalAnglePath,true) != ErrorCode::SUCCESS) {
|
||||
qDebug() << u8"查找表生成错误:\t" + getFileNameWidthoutExtend(inxmlPath);
|
||||
return ErrorCode::FAIL;
|
||||
}
|
||||
return ErrorCode::SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -17,14 +17,7 @@ QVector<QString> SearchGF3DataTiff(QString inMetaxmlPath);
|
|||
POLARTYPEENUM getDatasetGF3FilePolsarType(QString fileName);
|
||||
|
||||
ErrorCode ImportGF3L1AProcess(QString inMetaxmlPath, QString outWorkDirPath);
|
||||
// 复数转实部
|
||||
ErrorCode Complex2AmpRaster(QString inComplexPath, QString outRasterPath);
|
||||
//复数转相位
|
||||
ErrorCode Complex2PhaseRaster(QString inComplexPath, QString outRasterPath);
|
||||
ErrorCode Complex2dBRaster(QString inComplexPath, QString outRasterPath);
|
||||
|
||||
|
||||
ErrorCode ResampleDEM(QString indemPath, QString outdemPath, double gridx, double gridy);
|
||||
// RD Ëã·¨Àà
|
||||
ErrorCode RD_PSTN(double& refrange,double& lamda, double& timeR, double& R, double& tx, double& ty, double& tz, double& slopex, double& slopey, double& slopez, GF3PolyfitSatelliteOribtModel& polyfitmodel, SatelliteOribtNode& node,double& d0,double& d1, double& d2, double& d3, double& d4);
|
||||
|
||||
|
@ -36,6 +29,3 @@ ErrorCode GF3OrthSLC( QString inRasterPath, QString inlooktablePath, QString out
|
|||
// ÕýÉä´¦ÀíÁ÷³Ì
|
||||
ErrorCode GF3RDProcess(QString inxmlPath, QString indemPath, QString outworkdir, double gridx, double gridy);
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ QString GF3PolyfitSatelliteOribtModel::getSatelliteOribtModelParamsString()
|
|||
result += QString::number(this->polyfitVz[i], 'e', 6) + "\n";
|
||||
}
|
||||
result += "------------------------------------------------------\n";
|
||||
|
||||
printf("%s\n", result.toUtf8().constData());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "BaseTool.h"
|
||||
#include "SARSimulationImageL1.h"
|
||||
#include "GF3CalibrationAndGeocodingClass.h"
|
||||
#include "RasterToolBase.h"
|
||||
|
||||
QComplex2AmpPhase::QComplex2AmpPhase(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
|
@ -15,7 +16,8 @@ QComplex2AmpPhase::QComplex2AmpPhase(QWidget *parent)
|
|||
QObject::connect(ui.radioButtonAmp,SIGNAL(toggled(bool)),this,SLOT(radioButtonAmptoggled(bool)));
|
||||
QObject::connect(ui.radioButtonPhase, SIGNAL(toggled(bool)), this, SLOT(radioButtonPhasetoggled(bool)));
|
||||
QObject::connect(ui.radioButtonSigma0, SIGNAL(toggled(bool)), this, SLOT(radioButtonSigma0toggled(bool)));
|
||||
QObject::connect(ui.buttonBox, SIGNAL(accept()), this, SLOT(onaccept()));
|
||||
QObject::connect(ui.pushButtonWorkSpace, SIGNAL(clicked(bool)), this, SLOT(onpushButtonWorkSpaceClicked(bool)));
|
||||
QObject::connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(onaccept()));
|
||||
QObject::connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(onreject()));
|
||||
//toggled(bool )
|
||||
}
|
||||
|
@ -46,19 +48,19 @@ void QComplex2AmpPhase::onaccept()
|
|||
slcl1.Open(folderpath, filename);
|
||||
QString l2bfilename = filename + ui.lineEditHZ->text();
|
||||
SARSimulationImageL1Dataset l1B(RasterLevel::RasterL1B);
|
||||
slcl1.OpenOrNew(outworkdir, l2bfilename,slcl1.getrowCount(),slcl1.getcolCount());
|
||||
l1B.OpenOrNew(outworkdir, l2bfilename,slcl1.getrowCount(),slcl1.getcolCount());
|
||||
QString srcxmlpath = slcl1.getxmlFilePath();
|
||||
QString tarxmlpath = l1B.getxmlFilePath();
|
||||
copyAndReplaceFile(srcxmlpath, tarxmlpath);
|
||||
l1B.loadFromXml();
|
||||
if (ui.radioButtonAmp->isChecked()) {
|
||||
Complex2AmpRaster(imgfilepath, slcl1.getImageRasterPath());
|
||||
Complex2AmpRaster(imgfilepath, l1B.getImageRasterPath());
|
||||
}
|
||||
else if (ui.radioButtonPhase->isChecked()) {
|
||||
Complex2PhaseRaster(imgfilepath, slcl1.getImageRasterPath());
|
||||
Complex2PhaseRaster(imgfilepath, l1B.getImageRasterPath());
|
||||
}
|
||||
else if (ui.radioButtonSigma0->isChecked()) {
|
||||
Complex2dBRaster(imgfilepath, slcl1.getImageRasterPath());
|
||||
Complex2dBRaster(imgfilepath, l1B.getImageRasterPath());
|
||||
}
|
||||
progressDialog.setValue(i);
|
||||
}
|
||||
|
|
|
@ -7,10 +7,9 @@ QImportGF3StripL1ADataset::QImportGF3StripL1ADataset(QWidget *parent)
|
|||
{
|
||||
ui.setupUi(this);
|
||||
|
||||
QListWidget* listWidgetMetaxml;
|
||||
QObject::connect(ui.pushButtonAdd,SIGNAL(clicked(clicked)),this,SLOT(onpushButtonAddClicked(bool)));
|
||||
QObject::connect(ui.pushButtonRemove, SIGNAL(clicked(clicked)), this, SLOT(onpushButtonRemoveClicked(bool)));
|
||||
QObject::connect(ui.pushButtonWorkSpace, SIGNAL(clicked(clicked)), this, SLOT(onpushButtonWorkSpaceClicked(bool)));
|
||||
QObject::connect(ui.pushButtonAdd,SIGNAL(clicked(bool)),this,SLOT(onpushButtonAddClicked(bool)));
|
||||
QObject::connect(ui.pushButtonRemove, SIGNAL(clicked(bool)), this, SLOT(onpushButtonRemoveClicked(bool)));
|
||||
QObject::connect(ui.pushButtonWorkSpace, SIGNAL(clicked(bool)), this, SLOT(onpushButtonWorkSpaceClicked(bool)));
|
||||
QObject::connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(onreject()));
|
||||
QObject::connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(onaccept()));
|
||||
|
||||
|
|
|
@ -14,10 +14,10 @@ QOrthSlrRaster::QOrthSlrRaster(QWidget *parent)
|
|||
|
||||
connect(ui.pushButtonAdd, SIGNAL(clicked(bool)), this, SLOT(onpushButtonAddClicked(bool)));
|
||||
connect(ui.pushButtonRemove, SIGNAL(clicked(bool)), this, SLOT(onpushButtonRemoveClicked(bool)));
|
||||
connect(ui.pushButtonDEMSelect, SIGNAL(clicked(bool)), this, SLOT(onpushButtonWorkSpaceClicked(bool)));
|
||||
connect(ui.pushButtonWorkSpace, SIGNAL(clicked(bool)), this, SLOT(pushButtonDEMSelectClicked(bool)));
|
||||
connect(ui.pushButtonDEMSelect, SIGNAL(clicked(bool)), this, SLOT(pushButtonDEMSelectClicked(bool)));
|
||||
connect(ui.pushButtonWorkSpace, SIGNAL(clicked(bool)), this, SLOT(onpushButtonWorkSpaceClicked(bool)));
|
||||
QObject::connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(onreject()));
|
||||
QObject::connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(onreject()));
|
||||
QObject::connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(onaccept()));
|
||||
}
|
||||
|
||||
QOrthSlrRaster::~QOrthSlrRaster()
|
||||
|
@ -61,7 +61,7 @@ void QOrthSlrRaster::onpushButtonAddClicked(bool)
|
|||
this, // 父窗口
|
||||
tr(u8"选择xml文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(u8"xml Files (*.xml);;All Files (*)") // Îļþ¹ýÂËÆ÷
|
||||
tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器
|
||||
);
|
||||
|
||||
// 如果用户选择了文件
|
||||
|
|
|
@ -10,8 +10,8 @@ QRDOrthProcessClass::QRDOrthProcessClass(QWidget *parent)
|
|||
|
||||
connect(ui.pushButtonAdd,SIGNAL(clicked(bool)),this,SLOT(onpushButtonAddClicked(bool)));
|
||||
connect(ui.pushButtonRemove,SIGNAL(clicked(bool)),this,SLOT(onpushButtonRemoveClicked(bool)));
|
||||
connect(ui.pushButtonDEMSelect,SIGNAL(clicked(bool)),this,SLOT(onpushButtonWorkSpaceClicked(bool)));
|
||||
connect(ui.pushButtonWorkSpace, SIGNAL(clicked(bool)), this, SLOT(pushButtonDEMSelectClicked(bool)));
|
||||
connect(ui.pushButtonWorkSpace,SIGNAL(clicked(bool)),this,SLOT(onpushButtonWorkSpaceClicked(bool)));
|
||||
connect(ui.pushButtonDEMSelect, SIGNAL(clicked(bool)), this, SLOT(pushButtonDEMSelectClicked(bool)));
|
||||
QObject::connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(onreject()));
|
||||
QObject::connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(onaccept()));
|
||||
// QDialogButtonBox* buttonBox;
|
||||
|
|
|
@ -0,0 +1,77 @@
|
|||
#include "RasterVRT2ENVIdataDialog.h"
|
||||
#include "ui_RasterVRT2ENVIdataDialog.h"
|
||||
#include "BaseConstVariable.h"
|
||||
#include "BaseTool.h"
|
||||
#include "RasterToolBase.h"
|
||||
#include "LogInfoCls.h"
|
||||
#include <QMessageBox>
|
||||
#include <QFileDialog>
|
||||
#include "ImageOperatorBase.h"
|
||||
|
||||
RasterVRT2ENVIdataDialog::RasterVRT2ENVIdataDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
,ui(new Ui::RasterVRT2ENVIdataDialogClass)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
connect(ui->pushButtonVRTSelect, SIGNAL(clicked()), this, SLOT(onpushButtonVRTSelect_clicked()));
|
||||
connect(ui->pushButtonENVIDatSelect, SIGNAL(clicked()), this, SLOT(onpushButtonENVIDatSelect_clicked()));
|
||||
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(onbuttonBox_accepted()));
|
||||
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(onbuttonBox_rejected()));
|
||||
|
||||
}
|
||||
|
||||
RasterVRT2ENVIdataDialog::~RasterVRT2ENVIdataDialog()
|
||||
{}
|
||||
|
||||
void RasterVRT2ENVIdataDialog::onpushButtonVRTSelect_clicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getOpenFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择L1B数据文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器
|
||||
);
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = "选择的文件有:\n";
|
||||
this->ui->lineEditVRTPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void RasterVRT2ENVIdataDialog::onpushButtonENVIDatSelect_clicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getSaveFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择ENVIData数据文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器
|
||||
);
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = "选择的文件有:\n";
|
||||
this->ui->lineEditENVIDatPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void RasterVRT2ENVIdataDialog::onbuttonBox_accepted()
|
||||
{
|
||||
QString vrtrasterpath = ui->lineEditVRTPath->text();
|
||||
QString envidatapath = ui->lineEditENVIDatPath->text();
|
||||
|
||||
ConvertVrtToEnvi(vrtrasterpath, envidatapath);
|
||||
|
||||
|
||||
QMessageBox::information(this, tr(u8"提示"), tr(u8"完成"));
|
||||
}
|
||||
|
||||
void RasterVRT2ENVIdataDialog::onbuttonBox_rejected()
|
||||
{
|
||||
this->close();
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class RasterVRT2ENVIdataDialogClass;
|
||||
}
|
||||
|
||||
|
||||
class RasterVRT2ENVIdataDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
RasterVRT2ENVIdataDialog(QWidget *parent = nullptr);
|
||||
~RasterVRT2ENVIdataDialog();
|
||||
|
||||
|
||||
public slots:
|
||||
void onpushButtonVRTSelect_clicked();
|
||||
void onpushButtonENVIDatSelect_clicked();
|
||||
void onbuttonBox_accepted();
|
||||
void onbuttonBox_rejected();
|
||||
private:
|
||||
Ui::RasterVRT2ENVIdataDialogClass* ui;
|
||||
};
|
|
@ -0,0 +1,126 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>RasterVRT2ENVIdataDialogClass</class>
|
||||
<widget class="QDialog" name="RasterVRT2ENVIdataDialogClass">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>396</width>
|
||||
<height>156</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>RasterVRT2ENVIdataDialog</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="pushButtonVRTSelect">
|
||||
<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="lineEditENVIDatPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEditVRTPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="pushButtonENVIDatSelect">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="3">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>vrt文件地址:</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>输出dat地址:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -5,24 +5,41 @@
|
|||
bool SatelliteGF3xmlParser::loadFile(const QString& filename) {
|
||||
QFile file(filename);
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
qWarning() << "Cannot open file:" << filename;
|
||||
qWarning() << u8"Cannot open file:" << filename;
|
||||
return false;
|
||||
}
|
||||
|
||||
QDomDocument doc;
|
||||
if (!doc.setContent(&file)) {
|
||||
file.close();
|
||||
qWarning() << "Failed to parse the file into a DOM tree.";
|
||||
qWarning() << u8"Failed to parse the file into a DOM tree.";
|
||||
return false;
|
||||
}
|
||||
file.close();
|
||||
|
||||
xml = doc;
|
||||
|
||||
this->parseAdditionalData();
|
||||
this->parseImageInfo();
|
||||
this->parsePlatform();
|
||||
this->parseGPS();
|
||||
|
||||
//处理时间
|
||||
double tempreftime = start + (end - start) / 2;
|
||||
for (long i = 0;i < antposs.size();i++)
|
||||
{
|
||||
antposs[i].time = antposs[i].time - tempreftime;
|
||||
}
|
||||
|
||||
start = start- tempreftime;
|
||||
end = end- tempreftime;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void SatelliteGF3xmlParser::parsePlatform() {
|
||||
QDomElement platform = xml.firstChildElement("root").firstChildElement("platform");
|
||||
QDomElement platform = xml.firstChildElement("product").firstChildElement("platform");
|
||||
if (!platform.isNull()) {
|
||||
CenterTime = platform.firstChildElement("CenterTime").text();
|
||||
Rs = platform.firstChildElement("Rs").text().toDouble();
|
||||
|
@ -37,24 +54,24 @@ void SatelliteGF3xmlParser::parsePlatform() {
|
|||
Vys = platform.firstChildElement("Vys").text().toDouble();
|
||||
Vzs = platform.firstChildElement("Vzs").text().toDouble();
|
||||
|
||||
qDebug() << "Platform Data:";
|
||||
qDebug() << "CenterTime:" << CenterTime;
|
||||
qDebug() << "Rs:" << Rs;
|
||||
qDebug() << "satVelocity:" << satVelocity;
|
||||
qDebug() << "RollAngle:" << RollAngle;
|
||||
qDebug() << "PitchAngle:" << PitchAngle;
|
||||
qDebug() << "YawAngle:" << YawAngle;
|
||||
qDebug() << "Xs:" << Xs;
|
||||
qDebug() << "Ys:" << Ys;
|
||||
qDebug() << "Zs:" << Zs;
|
||||
qDebug() << "Vxs:" << Vxs;
|
||||
qDebug() << "Vys:" << Vys;
|
||||
qDebug() << "Vzs:" << Vzs;
|
||||
qDebug() << u8"Platform Data:";
|
||||
qDebug() << u8"CenterTime:" << CenterTime;
|
||||
qDebug() << u8"Rs:" << Rs;
|
||||
qDebug() << u8"satVelocity:" << satVelocity;
|
||||
qDebug() << u8"RollAngle:" << RollAngle;
|
||||
qDebug() << u8"PitchAngle:" << PitchAngle;
|
||||
qDebug() << u8"YawAngle:" << YawAngle;
|
||||
qDebug() << u8"Xs:" << Xs;
|
||||
qDebug() << u8"Ys:" << Ys;
|
||||
qDebug() << u8"Zs:" << Zs;
|
||||
qDebug() << u8"Vxs:" << Vxs;
|
||||
qDebug() << u8"Vys:" << Vys;
|
||||
qDebug() << u8"Vzs:" << Vzs;
|
||||
}
|
||||
}
|
||||
|
||||
void SatelliteGF3xmlParser::parseGPS() {
|
||||
QDomElement GPS = xml.firstChildElement("root").firstChildElement("GPS");
|
||||
QDomElement GPS = xml.firstChildElement("product").firstChildElement("GPS");
|
||||
if (!GPS.isNull()) {
|
||||
QDomNodeList GPSParams = GPS.elementsByTagName("GPSParam");
|
||||
for (int i = 0; i < GPSParams.count(); ++i) {
|
||||
|
@ -69,37 +86,52 @@ void SatelliteGF3xmlParser::parseGPS() {
|
|||
QString yVelocity = GPSParam.firstChildElement("yVelocity").text();
|
||||
QString zVelocity = GPSParam.firstChildElement("zVelocity").text();
|
||||
|
||||
QDateTime dateTime = QDateTime::fromString(TimeStamp, "yyyy-MM-dd HH:mm:ss.zzzzzz");
|
||||
satepos.time = dateTime.toMSecsSinceEpoch() / 1000.0;
|
||||
satepos.Px = xPosition.toDouble();
|
||||
satepos.Py = yPosition.toDouble();
|
||||
satepos.Pz = zPosition.toDouble();
|
||||
satepos.Vx = xVelocity.toDouble();
|
||||
satepos.Vy = yVelocity.toDouble();
|
||||
satepos.Vz = zVelocity.toDouble();
|
||||
|
||||
TimestampMicroseconds dateTime = parseAndConvert(TimeStamp.toStdString());
|
||||
satepos.time = dateTime.msecsSinceEpoch / 1000.0 + dateTime.microseconds / 100000.0;
|
||||
satepos.Px = xPosition.toDouble();
|
||||
satepos.Py = yPosition.toDouble();
|
||||
satepos.Pz = zPosition.toDouble();
|
||||
satepos.Vx = xVelocity.toDouble();
|
||||
satepos.Vy = yVelocity.toDouble();
|
||||
satepos.Vz = zVelocity.toDouble();
|
||||
|
||||
this->antposs.append(satepos);
|
||||
|
||||
qDebug() << "\nGPS Param Data:";
|
||||
qDebug() << "TimeStamp:" << TimeStamp;
|
||||
qDebug() << "xPosition:" << xPosition;
|
||||
qDebug() << "yPosition:" << yPosition;
|
||||
qDebug() << "zPosition:" << zPosition;
|
||||
qDebug() << "xVelocity:" << xVelocity;
|
||||
qDebug() << "yVelocity:" << yVelocity;
|
||||
qDebug() << "zVelocity:" << zVelocity;
|
||||
qDebug() << u8"\nGPS Param Data:";
|
||||
qDebug() << u8"TimeStamp:" << TimeStamp;
|
||||
qDebug() << u8"xPosition:" << xPosition;
|
||||
qDebug() << u8"yPosition:" << yPosition;
|
||||
qDebug() << u8"zPosition:" << zPosition;
|
||||
qDebug() << u8"xVelocity:" << xVelocity;
|
||||
qDebug() << u8"yVelocity:" << yVelocity;
|
||||
qDebug() << u8"zVelocity:" << zVelocity;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SatelliteGF3xmlParser::parseImageInfo() {
|
||||
QDomElement imageinfo = xml.firstChildElement("root").firstChildElement("imageinfo");
|
||||
QDomElement imageinfo = xml.firstChildElement("product").firstChildElement("imageinfo");
|
||||
if (!imageinfo.isNull()) {
|
||||
QDomElement imagingTime = imageinfo.firstChildElement("imagingTime");
|
||||
;
|
||||
start = QDateTime::fromString(imagingTime.firstChildElement("start").text(), "yyyy-MM-dd HH:mm:ss.zzzzzz").toMSecsSinceEpoch()/1000.0;
|
||||
end = QDateTime::fromString(imagingTime.firstChildElement("end").text(), "yyyy-MM-dd HH:mm:ss.zzzzzz").toMSecsSinceEpoch() / 1000.0;
|
||||
|
||||
|
||||
QString starttimestr = imagingTime.firstChildElement("start").text().trimmed();
|
||||
QString endtimestr = imagingTime.firstChildElement("end").text().trimmed();
|
||||
|
||||
TimestampMicroseconds starttime = parseAndConvert(starttimestr.toStdString());
|
||||
TimestampMicroseconds endtime = parseAndConvert(endtimestr.toStdString());
|
||||
|
||||
start = starttime.msecsSinceEpoch / 1000.0 + starttime.microseconds / 100000.0;
|
||||
end = endtime.msecsSinceEpoch / 1000.0 + endtime.microseconds / 100000.0;
|
||||
|
||||
// 打印starttime,endtime
|
||||
qDebug() << u8"成像开始时间(parse):" << starttime.msecsSinceEpoch << "\t" << starttime.microseconds;
|
||||
qDebug() << u8"成像结束时间(parse):" << endtime.msecsSinceEpoch << "\t" << endtime.microseconds;
|
||||
|
||||
qDebug() << u8"成像开始时间:" << start <<"\t"<< starttimestr;
|
||||
qDebug() << u8"成像结束时间:" << end << "\t" << endtimestr;
|
||||
|
||||
|
||||
nearRange = imageinfo.firstChildElement("nearRange").text().toDouble();
|
||||
refRange = imageinfo.firstChildElement("refRange").text().toDouble();
|
||||
eqvFs = imageinfo.firstChildElement("eqvFs").text().toDouble();
|
||||
|
@ -154,35 +186,36 @@ void SatelliteGF3xmlParser::parseImageInfo() {
|
|||
incidenceAngleNearRange = imageinfo.firstChildElement("incidenceAngleNearRange").text().toDouble();
|
||||
incidenceAngleFarRange = imageinfo.firstChildElement("incidenceAngleFarRange").text().toDouble();
|
||||
|
||||
qDebug() << "\nImage Info Data:";
|
||||
qDebug() << "Start:" << start;
|
||||
qDebug() << "End:" << end;
|
||||
qDebug() << "Near Range:" << nearRange;
|
||||
qDebug() << "Ref Range:" << refRange;
|
||||
qDebug() << "Eqv Fs:" << eqvFs;
|
||||
qDebug() << "Eqv PRF:" << eqvPRF;
|
||||
qDebug() << "Center Latitude:" << latitude_center << ", Longitude:" << longitude_center;
|
||||
qDebug() << "Top Left Corner Latitude:" << latitude_topLeft << ", Longitude:" << longitude_topLeft;
|
||||
qDebug() << "Top Right Corner Latitude:" << latitude_topRight << ", Longitude:" << longitude_topRight;
|
||||
qDebug() << "Bottom Left Corner Latitude:" << latitude_bottomLeft << ", Longitude:" << longitude_bottomLeft;
|
||||
qDebug() << "Bottom Right Corner Latitude:" << latitude_bottomRight << ", Longitude:" << longitude_bottomRight;
|
||||
qDebug() << "Width:" << width;
|
||||
qDebug() << "Height:" << height;
|
||||
qDebug() << "Width Space:" << widthspace;
|
||||
qDebug() << "Height Space:" << heightspace;
|
||||
qDebug() << "Scene Shift:" << sceneShift;
|
||||
qDebug() << "Image Bit:" << imagebit;
|
||||
qDebug() << "HH Qualify Value:" << HH_QualifyValue;
|
||||
qDebug() << "HV Qualify Value:" << HV_QualifyValue;
|
||||
qDebug() << "HH Echo Saturation:" << HH_echoSaturation;
|
||||
qDebug() << "HV Echo Saturation:" << HV_echoSaturation;
|
||||
qDebug() << "incidenceAngleNearRange:" << incidenceAngleNearRange;
|
||||
qDebug() << "incidenceAngleFarRange:" << incidenceAngleFarRange;
|
||||
qDebug() << u8"\nImage Info Data:";
|
||||
qDebug() << u8"Start:" << start;
|
||||
qDebug() << u8"End:" << end;
|
||||
qDebug() << u8"Near Range:" << nearRange;
|
||||
qDebug() << u8"Ref Range:" << refRange;
|
||||
qDebug() << u8"Eqv Fs:" << eqvFs;
|
||||
qDebug() << u8"Eqv PRF:" << eqvPRF;
|
||||
qDebug() << u8"Center Latitude:" << latitude_center << ", Longitude:" << longitude_center;
|
||||
qDebug() << u8"Top Left Corner Latitude:" << latitude_topLeft << ", Longitude:" << longitude_topLeft;
|
||||
qDebug() << u8"Top Right Corner Latitude:" << latitude_topRight << ", Longitude:" << longitude_topRight;
|
||||
qDebug() << u8"Bottom Left Corner Latitude:" << latitude_bottomLeft << ", Longitude:" << longitude_bottomLeft;
|
||||
qDebug() << u8"Bottom Right Corner Latitude:" << latitude_bottomRight << ", Longitude:" << longitude_bottomRight;
|
||||
qDebug() << u8"Width:" << width;
|
||||
qDebug() << u8"Height:" << height;
|
||||
qDebug() << u8"Width Space:" << widthspace;
|
||||
qDebug() << u8"Height Space:" << heightspace;
|
||||
qDebug() << u8"Scene Shift:" << sceneShift;
|
||||
qDebug() << u8"Image Bit:" << imagebit;
|
||||
qDebug() << u8"HH Qualify Value:" << HH_QualifyValue;
|
||||
qDebug() << u8"HV Qualify Value:" << HV_QualifyValue;
|
||||
qDebug() << u8"HH Echo Saturation:" << HH_echoSaturation;
|
||||
qDebug() << u8"HV Echo Saturation:" << HV_echoSaturation;
|
||||
qDebug() << u8"incidenceAngleNearRange:" << incidenceAngleNearRange;
|
||||
qDebug() << u8"incidenceAngleFarRange:" << incidenceAngleFarRange;
|
||||
}
|
||||
}
|
||||
|
||||
void SatelliteGF3xmlParser::parseAdditionalData() {
|
||||
QDomElement calibrationConst = xml.firstChildElement("root").firstChildElement("CalibrationConst");
|
||||
QDomElement processinfo = xml.firstChildElement("product").firstChildElement("processinfo");
|
||||
QDomElement calibrationConst = processinfo.firstChildElement("CalibrationConst");
|
||||
if (!calibrationConst.isNull()) {
|
||||
|
||||
bool HH_CalibrationConstISNULL=false;
|
||||
|
@ -201,50 +234,50 @@ void SatelliteGF3xmlParser::parseAdditionalData() {
|
|||
|
||||
|
||||
|
||||
qDebug() << "\nCalibration Const Data:";
|
||||
qDebug() << "HH Calibration Const:" << HH_CalibrationConst;
|
||||
qDebug() << "HV Calibration Const:" << HV_CalibrationConst;
|
||||
qDebug() << "VH Calibration Const:" << VH_CalibrationConst;
|
||||
qDebug() << "VV Calibration Const:" << VV_CalibrationConst;
|
||||
qDebug() << u8"\nCalibration Const Data:";
|
||||
qDebug() << u8"HH Calibration Const:" << HH_CalibrationConst;
|
||||
qDebug() << u8"HV Calibration Const:" << HV_CalibrationConst;
|
||||
qDebug() << u8"VH Calibration Const:" << VH_CalibrationConst;
|
||||
qDebug() << u8"VV Calibration Const:" << VV_CalibrationConst;
|
||||
}
|
||||
|
||||
AzFdc0 = xml.firstChildElement("root").firstChildElement("AzFdc0").text().toDouble();
|
||||
AzFdc1 = xml.firstChildElement("root").firstChildElement("AzFdc1").text().toDouble();
|
||||
AzFdc0 = processinfo.firstChildElement("AzFdc0").text().toDouble();
|
||||
AzFdc1 = processinfo.firstChildElement("AzFdc1").text().toDouble();
|
||||
QDomElement sensorNode = xml.firstChildElement("product").firstChildElement("sensor");
|
||||
sensorID = sensorNode.firstChildElement("sensorID").text();
|
||||
imagingMode = sensorNode.firstChildElement("imagingMode").text();
|
||||
lamda = sensorNode.firstChildElement("lamda").text().toDouble();
|
||||
RadarCenterFrequency = sensorNode.firstChildElement("RadarCenterFrequency").text().toDouble();
|
||||
|
||||
sensorID = xml.firstChildElement("root").firstChildElement("sensorID").text();
|
||||
imagingMode = xml.firstChildElement("root").firstChildElement("imagingMode").text();
|
||||
lamda = xml.firstChildElement("root").firstChildElement("lamda").text().toDouble();
|
||||
RadarCenterFrequency = xml.firstChildElement("root").firstChildElement("RadarCenterFrequency").text().toDouble();
|
||||
TotalProcessedAzimuthBandWidth = processinfo.firstChildElement("TotalProcessedAzimuthBandWidth").text().toDouble();
|
||||
DopplerParametersReferenceTime = processinfo.firstChildElement("DopplerParametersReferenceTime").text().toDouble();
|
||||
|
||||
TotalProcessedAzimuthBandWidth = xml.firstChildElement("root").firstChildElement("TotalProcessedAzimuthBandWidth").text().toDouble();
|
||||
DopplerParametersReferenceTime = xml.firstChildElement("root").firstChildElement("DopplerParametersReferenceTime").text().toDouble();
|
||||
|
||||
QDomElement dopplerCentroidCoefficients = xml.firstChildElement("root").firstChildElement("DopplerCentroidCoefficients");
|
||||
QDomElement dopplerCentroidCoefficients = processinfo.firstChildElement("DopplerCentroidCoefficients");
|
||||
d0 = dopplerCentroidCoefficients.firstChildElement("d0").text().toDouble();
|
||||
d1 = dopplerCentroidCoefficients.firstChildElement("d1").text().toDouble();
|
||||
d2 = dopplerCentroidCoefficients.firstChildElement("d2").text().toDouble();
|
||||
d3 = dopplerCentroidCoefficients.firstChildElement("d3").text().toDouble();
|
||||
d4 = dopplerCentroidCoefficients.firstChildElement("d4").text().toDouble();
|
||||
|
||||
QDomElement dopplerRateValuesCoefficients = xml.firstChildElement("root").firstChildElement("DopplerRateValuesCoefficients");
|
||||
QDomElement dopplerRateValuesCoefficients = processinfo.firstChildElement("DopplerRateValuesCoefficients");
|
||||
r0 = dopplerRateValuesCoefficients.firstChildElement("r0").text().toDouble();
|
||||
r1 = dopplerRateValuesCoefficients.firstChildElement("r1").text().toDouble();
|
||||
r2 = dopplerRateValuesCoefficients.firstChildElement("r2").text().toDouble();
|
||||
r3 = dopplerRateValuesCoefficients.firstChildElement("r3").text().toDouble();
|
||||
r4 = dopplerRateValuesCoefficients.firstChildElement("r4").text().toDouble();
|
||||
|
||||
DEM = xml.firstChildElement("root").firstChildElement("DEM").text().toDouble();
|
||||
DEM = processinfo.firstChildElement("DEM").text().toDouble();
|
||||
|
||||
qDebug() << "\nAdditional Data:";
|
||||
qDebug() << "AzFdc0:" << AzFdc0;
|
||||
qDebug() << "AzFdc1:" << AzFdc1;
|
||||
qDebug() << "Sensor ID:" << sensorID;
|
||||
qDebug() << "Imaging Mode:" << imagingMode;
|
||||
qDebug() << "Lambda:" << lamda;
|
||||
qDebug() << "Radar Center Frequency:" << RadarCenterFrequency;
|
||||
qDebug() << "Total Processed Azimuth Band Width:" << TotalProcessedAzimuthBandWidth;
|
||||
qDebug() << "Doppler Parameters Reference Time:" << DopplerParametersReferenceTime;
|
||||
qDebug() << "Doppler Centroid Coefficients: d0=" << d0 << ", d1=" << d1 << ", d2=" << d2 << ", d3=" << d3 << ", d4=" << d4;
|
||||
qDebug() << "Doppler Rate Values Coefficients: r0=" << r0 << ", r1=" << r1 << ", r2=" << r2 << ", r3=" << r3 << ", r4=" << r4;
|
||||
qDebug() << "DEM:" << DEM;
|
||||
qDebug() << u8"\nAdditional Data:";
|
||||
qDebug() << u8"AzFdc0:" << AzFdc0;
|
||||
qDebug() << u8"AzFdc1:" << AzFdc1;
|
||||
qDebug() << u8"Sensor ID:" << sensorID;
|
||||
qDebug() << u8"Imaging Mode:" << imagingMode;
|
||||
qDebug() << u8"Lambda:" << lamda;
|
||||
qDebug() << u8"Radar Center Frequency:" << RadarCenterFrequency;
|
||||
qDebug() << u8"Total Processed Azimuth Band Width:" << TotalProcessedAzimuthBandWidth;
|
||||
qDebug() << u8"Doppler Parameters Reference Time:" << DopplerParametersReferenceTime;
|
||||
qDebug() << u8"Doppler Centroid Coefficients: d0=" << d0 << ", d1=" << d1 << ", d2=" << d2 << ", d3=" << d3 << ", d4=" << d4;
|
||||
qDebug() << u8"Doppler Rate Values Coefficients: r0=" << r0 << ", r1=" << r1 << ", r2=" << r2 << ", r3=" << r3 << ", r4=" << r4;
|
||||
qDebug() << u8"DEM:" << DEM;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,90 @@
|
|||
#include "SARSatalliteSimulationWorkflow.h"
|
||||
#include "QtCreateGPSPointsDialog.h"
|
||||
#include "QResampleRefrenceRaster.h"
|
||||
#include "DEMLLA2XYZTool.h"
|
||||
|
||||
|
||||
void initBaseToolSARSateSimulationWorkflow(ToolBoxWidget* toolbox)
|
||||
{
|
||||
// 1. 两行根数生成轨道节点
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3B仿真流程"}, new TLE2SatePositionVelocityToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3C仿真流程"}, new TLE2SatePositionVelocityToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1A仿真流程"}, new TLE2SatePositionVelocityToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1B仿真流程"}, new TLE2SatePositionVelocityToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2E仿真流程"}, new TLE2SatePositionVelocityToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2F仿真流程"}, new TLE2SatePositionVelocityToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT04仿真流程"}, new TLE2SatePositionVelocityToolButton(toolbox));
|
||||
|
||||
// 3. 对齐地类与地形影像
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3B仿真流程"}, new QAligendLandClsAndDEMToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3C仿真流程"}, new QAligendLandClsAndDEMToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1A仿真流程"}, new QAligendLandClsAndDEMToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1B仿真流程"}, new QAligendLandClsAndDEMToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2E仿真流程"}, new QAligendLandClsAndDEMToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2F仿真流程"}, new QAligendLandClsAndDEMToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT04仿真流程"}, new QAligendLandClsAndDEMToolButton(toolbox));
|
||||
|
||||
|
||||
// 4. 计算地固坐标与坡面矢量影像
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3B仿真流程"}, new QDEMLLA2XYZSloperVectorToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3C仿真流程"}, new QDEMLLA2XYZSloperVectorToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1A仿真流程"}, new QDEMLLA2XYZSloperVectorToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1B仿真流程"}, new QDEMLLA2XYZSloperVectorToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2E仿真流程"}, new QDEMLLA2XYZSloperVectorToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2F仿真流程"}, new QDEMLLA2XYZSloperVectorToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT04仿真流程"}, new QDEMLLA2XYZSloperVectorToolButton(toolbox));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
TLE2SatePositionVelocityToolButton::TLE2SatePositionVelocityToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolname = QString(u8" 两行根数生成轨道节点");
|
||||
}
|
||||
|
||||
TLE2SatePositionVelocityToolButton::~TLE2SatePositionVelocityToolButton()
|
||||
{
|
||||
}
|
||||
|
||||
void TLE2SatePositionVelocityToolButton::run()
|
||||
{
|
||||
QtCreateGPSPointsDialog* dialog = new QtCreateGPSPointsDialog;
|
||||
dialog->setWindowTitle(u8"两行根数生成轨道节点");
|
||||
dialog->show();
|
||||
}
|
||||
|
||||
QAligendLandClsAndDEMToolButton::QAligendLandClsAndDEMToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolname = QString(u8" 对齐地类与地形影像");
|
||||
}
|
||||
|
||||
QAligendLandClsAndDEMToolButton::~QAligendLandClsAndDEMToolButton()
|
||||
{
|
||||
}
|
||||
|
||||
void QAligendLandClsAndDEMToolButton::run()
|
||||
{
|
||||
QResampleRefrenceRaster* dialog = new QResampleRefrenceRaster;
|
||||
dialog->setWindowTitle(u8"对齐地类与地形(根据地形栅格重采样地类影像)");
|
||||
dialog->show();
|
||||
}
|
||||
|
||||
QDEMLLA2XYZSloperVectorToolButton::QDEMLLA2XYZSloperVectorToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolname = QString(u8" 地形生成地面目标坐标与坡面矢量");
|
||||
}
|
||||
|
||||
QDEMLLA2XYZSloperVectorToolButton::~QDEMLLA2XYZSloperVectorToolButton()
|
||||
{
|
||||
}
|
||||
|
||||
void QDEMLLA2XYZSloperVectorToolButton::run()
|
||||
{
|
||||
DEMLLA2XYZTool* dialog = new DEMLLA2XYZTool();
|
||||
dialog->setWindowTitle(u8"根据地形栅格生成地面目标坐标点与坡面矢量");
|
||||
dialog->show();
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
#pragma once
|
||||
|
||||
|
||||
#ifndef __BASETOOLBOX__SARSATALLITESIMULATIONWORKFLOW__H__
|
||||
#define __BASETOOLBOX__SARSATALLITESIMULATIONWORKFLOW__H__
|
||||
|
||||
|
||||
/**
|
||||
* \file SARSatalliteSimulationWorkflow.h
|
||||
* \brief 大场景仿真处理菜单处理
|
||||
*
|
||||
* \author 30453
|
||||
* \date April 2025
|
||||
*
|
||||
**/
|
||||
#include "basetoolbox_global.h"
|
||||
#include "ToolBoxWidget.h"
|
||||
|
||||
|
||||
extern "C" BASETOOLBOX_EXPORT void initBaseToolSARSateSimulationWorkflow(ToolBoxWidget* toolbox);
|
||||
|
||||
|
||||
|
||||
|
||||
class BASETOOLBOX_EXPORT TLE2SatePositionVelocityToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
TLE2SatePositionVelocityToolButton(QWidget* parent = nullptr);
|
||||
~TLE2SatePositionVelocityToolButton();
|
||||
public:
|
||||
virtual void run() override;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
class BASETOOLBOX_EXPORT QAligendLandClsAndDEMToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QAligendLandClsAndDEMToolButton(QWidget* parent = nullptr);
|
||||
~QAligendLandClsAndDEMToolButton();
|
||||
public :
|
||||
virtual void run() override;
|
||||
|
||||
};
|
||||
|
||||
class BASETOOLBOX_EXPORT QDEMLLA2XYZSloperVectorToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QDEMLLA2XYZSloperVectorToolButton(QWidget* parent = nullptr);
|
||||
~QDEMLLA2XYZSloperVectorToolButton();
|
||||
public:
|
||||
virtual void run() override;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -145,6 +145,87 @@ __global__ void Kernel_RDProcess_doppler(
|
|||
|
||||
|
||||
|
||||
__global__ void Kernel_RDProcess_doppler_calRangeDistance(
|
||||
double* demX, double* demY, double* demZ,
|
||||
double* outR,
|
||||
long pixelcount,
|
||||
double Xp0, double Yp0, double Zp0, double Xv0, double Yv0, double Zv0,
|
||||
double Xp1, double Yp1, double Zp1, double Xv1, double Yv1, double Zv1,
|
||||
double Xp2, double Yp2, double Zp2, double Xv2, double Yv2, double Zv2,
|
||||
double Xp3, double Yp3, double Zp3, double Xv3, double Yv3, double Zv3,
|
||||
double Xp4, double Yp4, double Zp4, double Xv4, double Yv4, double Zv4,
|
||||
double Xp5, double Yp5, double Zp5, double Xv5, double Yv5, double Zv5,
|
||||
double reftime, double r0, double r1, double r2, double r3, double r4,
|
||||
double starttime, double nearRange, double farRange,
|
||||
double PRF, double Fs,
|
||||
double fact_lamda
|
||||
) {
|
||||
long idx = blockIdx.x * blockDim.x + threadIdx.x;
|
||||
if (idx < pixelcount) {
|
||||
double demx = demX[idx];
|
||||
double demy = demY[idx];
|
||||
double demz = demZ[idx];
|
||||
double dt = 1.0 / PRF / 3;
|
||||
double Spx = 0, Spy = 0, Spz = 0, Svx = 0, Svy = 0, Svz = 0;
|
||||
double Rx = 0, Ry = 0, Rz = 0, R = 0;
|
||||
|
||||
double dp1 = 0, dpn1 = 0, dp2 = 0, dpn2 = 0;
|
||||
|
||||
double ti = 0;
|
||||
double inct = 0;
|
||||
for (long i = 0; i < 10000; i++) { // ×î´óľü´úˇśÎ§
|
||||
Spx = getPolyfitNumber(ti + dt, Xp0, Xp1, Xp2, Xp3, Xp4, Xp5);
|
||||
Spy = getPolyfitNumber(ti + dt, Yp0, Yp1, Yp2, Yp3, Yp4, Yp5);
|
||||
Spz = getPolyfitNumber(ti + dt, Zp0, Zp1, Zp2, Zp3, Zp4, Zp5);
|
||||
Svx = getPolyfitNumber(ti + dt, Xv0, Xv1, Xv2, Xv3, Xv4, Xv5);
|
||||
Svy = getPolyfitNumber(ti + dt, Yv0, Yv1, Yv2, Yv3, Yv4, Yv5);
|
||||
Svz = getPolyfitNumber(ti + dt, Zv0, Zv1, Zv2, Zv3, Zv4, Zv5);
|
||||
|
||||
Rx = Spx - demx;
|
||||
Ry = Spy - demy;
|
||||
Rz = Spz - demz;
|
||||
R = sqrt(Rx * Rx + Ry * Ry + Rz * Rz);
|
||||
Rx = Rx / R;
|
||||
Ry = Ry / R;
|
||||
Rz = Rz / R;
|
||||
|
||||
dp2 = getDopplerCenterRate(Rx, Ry, Rz, Svx, Svy, Svz, fact_lamda);
|
||||
dpn2 = getNumberDopplerCenterRate(R, r0, r1, r2, r3, r4, reftime);
|
||||
|
||||
// ti
|
||||
Spx = getPolyfitNumber(ti, Xp0, Xp1, Xp2, Xp3, Xp4, Xp5);
|
||||
Spy = getPolyfitNumber(ti, Yp0, Yp1, Yp2, Yp3, Yp4, Yp5);
|
||||
Spz = getPolyfitNumber(ti, Zp0, Zp1, Zp2, Zp3, Zp4, Zp5);
|
||||
Svx = getPolyfitNumber(ti, Xv0, Xv1, Xv2, Xv3, Xv4, Xv5);
|
||||
Svy = getPolyfitNumber(ti, Yv0, Yv1, Yv2, Yv3, Yv4, Yv5);
|
||||
Svz = getPolyfitNumber(ti, Zv0, Zv1, Zv2, Zv3, Zv4, Zv5);
|
||||
|
||||
Rx = Spx - demx;
|
||||
Ry = Spy - demy;
|
||||
Rz = Spz - demz;
|
||||
R = sqrt(Rx * Rx + Ry * Ry + Rz * Rz);
|
||||
Rx = Rx / R;
|
||||
Ry = Ry / R;
|
||||
Rz = Rz / R;
|
||||
|
||||
dp1 = getDopplerCenterRate(Rx, Ry, Rz, Svx, Svy, Svz, fact_lamda);
|
||||
dpn1 = getNumberDopplerCenterRate(R, r0, r1, r2, r3, r4, reftime);
|
||||
|
||||
// iter
|
||||
inct = dt * (dp2 - dpn1) / (dp1 - dp2);
|
||||
|
||||
if (abs(inct) <= dt || isnan(inct)) {
|
||||
outR[idx] = R;//Rd_c;
|
||||
return;
|
||||
}
|
||||
ti = ti + inct;
|
||||
}
|
||||
outR[idx] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void RDProcess_dopplerGPU(
|
||||
|
@ -185,6 +266,51 @@ void RDProcess_dopplerGPU(
|
|||
cudaDeviceSynchronize();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void RDProcess_dopplerGPU_InSARImagePlaneXYZR(
|
||||
double* demX, double* demY, double* demZ,
|
||||
double* outR,
|
||||
long rowcount, long colcount,
|
||||
double starttime, double nearRange, double farRange,
|
||||
double PRF, double Fs,
|
||||
double fact_lamda,
|
||||
double Xp0, double Yp0, double Zp0, double Xv0, double Yv0, double Zv0,
|
||||
double Xp1, double Yp1, double Zp1, double Xv1, double Yv1, double Zv1,
|
||||
double Xp2, double Yp2, double Zp2, double Xv2, double Yv2, double Zv2,
|
||||
double Xp3, double Yp3, double Zp3, double Xv3, double Yv3, double Zv3,
|
||||
double Xp4, double Yp4, double Zp4, double Xv4, double Yv4, double Zv4,
|
||||
double Xp5, double Yp5, double Zp5, double Xv5, double Yv5, double Zv5,
|
||||
double reftime, double r0, double r1, double r2, double r3, double r4
|
||||
|
||||
)
|
||||
{
|
||||
long pixelcount = rowcount * colcount;
|
||||
int numBlocks = (pixelcount + BLOCK_SIZE - 1) / BLOCK_SIZE;
|
||||
Kernel_RDProcess_doppler_calRangeDistance << <numBlocks, BLOCK_SIZE >> > (
|
||||
demX, demY, demZ,
|
||||
outR,
|
||||
pixelcount,
|
||||
Xp0, Yp0, Zp0, Xv0, Yv0, Zv0,
|
||||
Xp1, Yp1, Zp1, Xv1, Yv1, Zv1,
|
||||
Xp2, Yp2, Zp2, Xv2, Yv2, Zv2,
|
||||
Xp3, Yp3, Zp3, Xv3, Yv3, Zv3,
|
||||
Xp4, Yp4, Zp4, Xv4, Yv4, Zv4,
|
||||
Xp5, Yp5, Zp5, Xv5, Yv5, Zv5,
|
||||
reftime, r0, r1, r2, r3, r4,
|
||||
starttime, nearRange, farRange,
|
||||
PRF, Fs,
|
||||
fact_lamda
|
||||
);
|
||||
PrintLasterError("RD with doppler function");
|
||||
cudaDeviceSynchronize();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
__device__ double calculateIncidenceAngle(double Rx, double Ry, double Rz, double Sx, double Sy, double Sz) {
|
||||
double dotProduct = Rx * Sx + Ry * Sy + Rz * Sz;
|
||||
double magnitudeR = sqrt(Rx * Rx + Ry * Ry + Rz * Rz);
|
||||
|
|
|
@ -57,3 +57,21 @@ extern "C" void RDProcess_demSloperGPU(
|
|||
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
extern "C" void RDProcess_dopplerGPU_InSARImagePlaneXYZR(
|
||||
double* demX, double* demY, double* demZ,
|
||||
double* outR,
|
||||
long rowcount, long colcount,
|
||||
double starttime, double nearRange, double farRange,
|
||||
double PRF, double Fs,
|
||||
double fact_lamda,
|
||||
double Xp0, double Yp0, double Zp0, double Xv0, double Yv0, double Zv0,
|
||||
double Xp1, double Yp1, double Zp1, double Xv1, double Yv1, double Zv1,
|
||||
double Xp2, double Yp2, double Zp2, double Xv2, double Yv2, double Zv2,
|
||||
double Xp3, double Yp3, double Zp3, double Xv3, double Yv3, double Zv3,
|
||||
double Xp4, double Yp4, double Zp4, double Xv4, double Yv4, double Zv4,
|
||||
double Xp5, double Yp5, double Zp5, double Xv5, double Yv5, double Zv5,
|
||||
double reftime, double r0, double r1, double r2, double r3, double r4
|
||||
);
|
|
@ -0,0 +1,95 @@
|
|||
#include "QLookTableResampleFromWGS84ToRange.h"
|
||||
#include "BaseConstVariable.h"
|
||||
#include "BaseTool.h"
|
||||
#include <QMessageBox>
|
||||
#include <QFileDialog>
|
||||
#include "ui_QLookTableResampleFromWGS84ToRange.h"
|
||||
#include "ImageNetOperator.h"
|
||||
|
||||
QLookTableResampleFromWGS84ToRange::QLookTableResampleFromWGS84ToRange(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
,ui(new Ui::QLookTableResampleFromWGS84ToRangeClass)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(onaccepted()));
|
||||
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(onrejected()));
|
||||
connect(ui->pushButtonLookTableWGS84Select, SIGNAL(clicked(bool)), this, SLOT(onpushButtonLookTableWGS84SelectClicked(bool)));
|
||||
connect(ui->pushButtonLookTableRangeSelect, SIGNAL(clicked(bool)), this, SLOT(onpushButtonLookTableRangeSelectClicked(bool)));
|
||||
connect(ui->pushButtonLookTableCountSelect, SIGNAL(clicked(bool)), this, SLOT(onpushButtonLookTableCountSelectClicked(bool)));
|
||||
}
|
||||
|
||||
QLookTableResampleFromWGS84ToRange::~QLookTableResampleFromWGS84ToRange()
|
||||
{}
|
||||
|
||||
void QLookTableResampleFromWGS84ToRange::onaccepted()
|
||||
{
|
||||
QString looktableWGS84Ptah = ui->lineEditLookTableWGS84Path->text();
|
||||
QString looktableRangePtah = ui->lineEditLookTableRangePath->text();
|
||||
QString looktableCountPtah = ui->lineEditLookTableCountPath->text();
|
||||
|
||||
long Oriheight = ui->spinBoxRowCount->value();
|
||||
long OriWidth = ui->spinBoxColCount->value();
|
||||
|
||||
ReflectTable_WGS2Range(looktableWGS84Ptah, looktableRangePtah, looktableCountPtah, Oriheight, OriWidth);
|
||||
QMessageBox::information(nullptr, u8"提示", u8"完成");
|
||||
}
|
||||
|
||||
void QLookTableResampleFromWGS84ToRange::onrejected()
|
||||
{
|
||||
this->close();
|
||||
}
|
||||
|
||||
void QLookTableResampleFromWGS84ToRange::onpushButtonLookTableWGS84SelectClicked(bool)
|
||||
{
|
||||
QString fileNames = QFileDialog::getOpenFileName(
|
||||
this,
|
||||
tr(u8"选择WGS84文件"),
|
||||
QString(),
|
||||
tr(ENVI_FILE_FORMAT_FILTER)
|
||||
);
|
||||
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = "选中文件\n";
|
||||
this->ui->lineEditLookTableWGS84Path->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"提示"), tr(u8"没有选中文件"));
|
||||
}
|
||||
}
|
||||
|
||||
void QLookTableResampleFromWGS84ToRange::onpushButtonLookTableRangeSelectClicked(bool)
|
||||
{
|
||||
QString fileNames = QFileDialog::getSaveFileName(
|
||||
this,
|
||||
tr(u8"保存斜距平面文件"),
|
||||
QString(),
|
||||
tr(ENVI_FILE_FORMAT_FILTER)
|
||||
);
|
||||
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = "选中文件\n";
|
||||
this->ui->lineEditLookTableRangePath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"提示"), tr(u8"没有选中文件"));
|
||||
}
|
||||
}
|
||||
|
||||
void QLookTableResampleFromWGS84ToRange::onpushButtonLookTableCountSelectClicked(bool)
|
||||
{
|
||||
QString fileNames = QFileDialog::getSaveFileName(
|
||||
this,
|
||||
tr(u8"保存统计采样平面文件"),
|
||||
QString(),
|
||||
tr(ENVI_FILE_FORMAT_FILTER)
|
||||
);
|
||||
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = "选中文件\n";
|
||||
this->ui->lineEditLookTableCountPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"提示"), tr(u8"没有选中文件"));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class QLookTableResampleFromWGS84ToRangeClass;
|
||||
}
|
||||
|
||||
class QLookTableResampleFromWGS84ToRange : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QLookTableResampleFromWGS84ToRange(QWidget *parent = nullptr);
|
||||
~QLookTableResampleFromWGS84ToRange();
|
||||
|
||||
|
||||
public slots:
|
||||
|
||||
void onaccepted();
|
||||
void onrejected();
|
||||
void onpushButtonLookTableWGS84SelectClicked(bool);
|
||||
void onpushButtonLookTableRangeSelectClicked(bool);
|
||||
void onpushButtonLookTableCountSelectClicked(bool);
|
||||
|
||||
|
||||
private:
|
||||
Ui::QLookTableResampleFromWGS84ToRangeClass* ui;
|
||||
};
|
|
@ -0,0 +1,201 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QLookTableResampleFromWGS84ToRangeClass</class>
|
||||
<widget class="QDialog" name="QLookTableResampleFromWGS84ToRangeClass">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>747</width>
|
||||
<height>293</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>QLookTableResampleFromWGS84ToRange</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEditLookTableWGS84Path">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="lineEditLookTableCountPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="pushButtonLookTableWGS84Select">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</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="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>查找表(斜距)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="pushButtonLookTableRangeSelect">
|
||||
<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_4">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>查找表(WGS84)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" 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="2" column="2">
|
||||
<widget class="QPushButton" name="pushButtonLookTableCountSelect">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="3">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEditLookTableRangePath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>列数</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QSpinBox" name="spinBoxRowCount">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>999999999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QSpinBox" name="spinBoxColCount">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>999999999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -0,0 +1,204 @@
|
|||
#include "GPUBaseTool.h"
|
||||
#include "GPUBPTool.cuh"
|
||||
#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 "GPUBPImageNet.cuh"
|
||||
|
||||
#ifndef MAX_ITER
|
||||
#define EPSILON 1e-12
|
||||
#define MAX_ITER 50
|
||||
#endif
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
#endif
|
||||
|
||||
|
||||
__global__ void kernel_TimeBPImageGridNet(
|
||||
double* antPx, double* antPy, double* antPz,
|
||||
double* antDirx, double* antDiry, double* antDirz,
|
||||
double* imgx, double* imgy, double* imgz,
|
||||
long prfcount, long freqpoints, double meanH,
|
||||
double Rnear, double dx) {
|
||||
|
||||
long idx = blockIdx.x * blockDim.x + threadIdx.x;
|
||||
long pixelcount = prfcount * freqpoints;
|
||||
long prfid = idx / freqpoints;
|
||||
long Rid = idx % freqpoints;
|
||||
if (idx < pixelcount) {
|
||||
// 计算坐标
|
||||
Vector3 S = { antPx[prfid], antPy[prfid], antPz[prfid] }; // 卫星位置 (m)
|
||||
Vector3 ray = { antDirx[prfid], antDiry[prfid], antDirz[prfid] }; // 视线方向
|
||||
double H = meanH; // 平均高程
|
||||
double R = Rnear + dx * Rid; // 目标距离
|
||||
// 参数校验
|
||||
if (R <= 0 || H < -WGS84_A * 0.1 || H > WGS84_A * 0.1) {
|
||||
//printf("参数错误:\n H范围:±%.1f km\n R必须>0\n", WGS84_A * 0.1 / 1000);
|
||||
imgx[idx] = 0;
|
||||
imgy[idx] = 0;
|
||||
imgz[idx] = 0;
|
||||
return;
|
||||
//printf("idx=%d;prfid=%d;Rid=%d;S=[%f , %f ,%f ];ray=[%f ,%f ,%f ];H=%f;R=%f,imgP=[%f ,%f , %f ];Rextend\n",
|
||||
// idx, prfid, Rid, S.x, S.y, S.z, ray.x, ray.y, ray.z, H, R,imgx[idx],imgy[idx],imgz[idx]);
|
||||
// 参数校验
|
||||
//return;
|
||||
}
|
||||
|
||||
// Step 1: 计算交点T
|
||||
Vector3 T = compute_T(S, ray, H);
|
||||
if (isnan(T.x)) {
|
||||
imgx[idx] = 0;
|
||||
imgy[idx] = 0;
|
||||
imgz[idx] = 0;
|
||||
//printf("idx=%d;prfid=%d;Rid=%d;Tnan\n",
|
||||
// idx, prfid, Rid, S.x, S.y, S.z, ray.x, ray.y, ray.z, H, R,T.x,T.y,T.z, imgx[idx], imgy[idx], imgz[idx]);
|
||||
return;
|
||||
}
|
||||
|
||||
// Step 2: 计算目标点P
|
||||
|
||||
Vector3 P;// = compute_P(S, T, R, H);
|
||||
{ // 计算P
|
||||
Vector3 ex, ey, ez; // 平面基函数
|
||||
Vector3 ST = vec_normalize(vec_sub(T, S));// S->T
|
||||
Vector3 SO = vec_normalize(vec_sub(Vector3{ 0, 0, 0 }, S)); // S->O
|
||||
|
||||
|
||||
Vector3 st1 = vec_sub(T, S);
|
||||
double R0 = sqrt(st1.x * st1.x + st1.y * st1.y + st1.z * st1.z);
|
||||
ez = vec_normalize(vec_cross(SO, ST)); // Z 轴
|
||||
ey = vec_normalize(vec_cross(ez, SO)); // Y 轴 与 ST 同向 --这个结论在星地几何约束,便是显然的;
|
||||
ex = vec_normalize(SO); //X轴
|
||||
|
||||
|
||||
|
||||
double h2 = (WGS84_A + H) * (WGS84_A + H);
|
||||
double b2 = WGS84_B * WGS84_B;
|
||||
double R2 = R * R;
|
||||
double A = R2 * ((ex.x * ex.x + ex.y * ex.y) / h2 + (ex.z * ex.z) / b2);
|
||||
double B = R2 * ((ex.x * ey.x + ex.y * ey.y) / h2 + (ex.z * ey.z) / b2) * 2;
|
||||
double C = R2 * ((ey.x * ey.x + ey.y * ey.y) / h2 + (ey.z * ey.z) / b2);
|
||||
double D = 1 - ((S.x * S.x + S.y * S.y) / h2 + (S.z * S.z) / b2);
|
||||
double E = 2 * R * ((S.x * ex.x + S.y * ex.y) / h2 + (S.z * ex.z) / b2);
|
||||
double F = 2 * R * ((S.x * ey.x + S.y * ey.y) / h2 + (S.z * ey.z) / b2);
|
||||
double Q0 = angleBetweenVectors(SO, ST, false);
|
||||
double dQ = 0;
|
||||
double fQ = 0;
|
||||
double dfQ = 0;
|
||||
double Q = R < R0 ? Q0 - 1e-3 : Q0 + 1e-3;
|
||||
|
||||
//printf("A=%f;B=%f;C=%f;D=%f;E=%f;F=%f;Q=%f;\
|
||||
// S=[%f , %f ,%f ];\
|
||||
// T=[%f , %f ,%f ];\
|
||||
// ex=[%f , %f ,%f ];\
|
||||
// ey=[%f , %f ,%f ];\
|
||||
// ez=[%f , %f ,%f ];\
|
||||
//ray=[%f ,%f ,%f ];\
|
||||
//H=%f;R=%f;;\n",A,B,C,D,E,F,Q,
|
||||
// S.x,S.y,S.z,
|
||||
// T.x,T.y,T.z ,
|
||||
// ex.x,ex.y,ex.z,
|
||||
// ey.x,ey.y,ey.z,
|
||||
// ez.x,ez.y,ez.z,
|
||||
// ray.x, ray.y, ray.z,
|
||||
// H, R);
|
||||
// return;
|
||||
|
||||
// 牛顿迭代法
|
||||
for (int iter = 0; iter < MAX_ITER * 10; ++iter) {
|
||||
fQ = A * cos(Q) * cos(Q) + B * sin(Q) * cos(Q) + C * sin(Q) * sin(Q) + E * cos(Q) + F * sin(Q) - D;
|
||||
dfQ = (C - A) * sin(2 * Q) + B * cos(2 * Q) - E * sin(Q) + F * cos(Q);
|
||||
dQ = fQ / dfQ;
|
||||
if (abs(dQ) < 1e-8) {
|
||||
//printf("iter=%d;check Q0=%f;Q=%f;dQ=%f;fQ=%f;dfQ=%f;break\n", iter, Q0, Q, dQ, fQ, dfQ);
|
||||
break;
|
||||
}
|
||||
else {
|
||||
dQ = (abs(dQ) < d2r * 3) ? dQ : (abs(dQ) / dQ * d2r * 3);
|
||||
Q = Q - dQ;
|
||||
//printf("iter=%d;check Q0=%f;Q=%f;dQ=%f;fQ=%f;dfQ=%f;\n", iter, Q0, Q, dQ, fQ, dfQ);
|
||||
}
|
||||
|
||||
}
|
||||
//printf("check Q0=%f;Q=%f;\n", Q0, Q);
|
||||
double t1 = R * cos(Q);
|
||||
double t2 = R * sin(Q);
|
||||
P = Vector3{
|
||||
S.x + t1 * ex.x + t2 * ey.x, //因为 t3=0;
|
||||
S.y + t1 * ex.y + t2 * ey.y,
|
||||
S.z + t1 * ex.z + t2 * ey.z,
|
||||
};
|
||||
double check = (P.x * P.x + P.y * P.y) / ((WGS84_A + H) * (WGS84_A + H))
|
||||
+ P.z * P.z / (WGS84_B * WGS84_B);
|
||||
if (isnan(Q) || isinf(Q) || fabs(check - 1.0) > 1e-6) {
|
||||
P = Vector3{ 0,0,0 };
|
||||
imgx[idx] = 0;
|
||||
imgy[idx] = 0;
|
||||
imgz[idx] = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
double Rt = sqrt(pow(S.x - T.x, 2) + pow(S.y - T.y, 2) + pow(S.z - T.z, 2));
|
||||
double Rp = sqrt(pow(S.x - P.x, 2) + pow(S.y - P.y, 2) + pow(S.z - P.z, 2));
|
||||
double Rop = sqrt(pow(P.x, 2) + pow(P.y, 2) + pow(P.z, 2));
|
||||
|
||||
if (!isnan(P.x) && (Rop > WGS84_A * 0.3) && (Rop < WGS84_A * 3)) {
|
||||
|
||||
imgx[idx] = P.x;
|
||||
imgy[idx] = P.y;
|
||||
imgz[idx] = P.z;
|
||||
return;
|
||||
//printf("idx=%d; S=[%f , %f ,%f ]; H=%f;R=%f;RP=%f;Rr=%f;imgT=[%f ,%f ,%f ];imgP=[%f ,%f , %f ]; \n",
|
||||
// idx, S.x, S.y, S.z, H, R, Rp, Rt,T.x, T.y, T.z, P.x, P.y, P.z);
|
||||
}
|
||||
else {
|
||||
imgx[idx] = 0;
|
||||
imgy[idx] = 0;
|
||||
imgz[idx] = 0;
|
||||
printf("idx=%d; S=[%f , %f ,%f ]; H=%f;R=%f;RP=%f;Rr=%f;imgT=[%f ,%f ,%f ];imgP=[%f ,%f , %f ]; ERROR\n",
|
||||
idx, S.x, S.y, S.z, H, R, Rp, Rt, T.x, T.y, T.z, P.x, P.y, P.z);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void TIMEBPCreateImageGrid(double* antPx, double* antPy, double* antPz,
|
||||
double* antDirx, double* antDiry, double* antDirz,
|
||||
double* imgx, double* imgy, double* imgz,
|
||||
long prfcount, long freqpoints, double meanH,
|
||||
double Rnear, double dx
|
||||
)
|
||||
{
|
||||
long pixelcount = prfcount * freqpoints;
|
||||
int grid_size = (pixelcount + BLOCK_SIZE - 1) / BLOCK_SIZE;
|
||||
|
||||
kernel_TimeBPImageGridNet << <grid_size, BLOCK_SIZE >> > (
|
||||
antPx, antPy, antPz,
|
||||
antDirx, antDiry, antDirz,
|
||||
imgx, imgy, imgz,
|
||||
prfcount, freqpoints, meanH,
|
||||
Rnear, dx);
|
||||
PrintLasterError("TIMEBPCreateImageGrid");
|
||||
cudaDeviceSynchronize();
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
#ifndef __GPUBPIMAGENET_CUH___
|
||||
#define __GPUBPIMAGENET_CUH___
|
||||
|
||||
|
||||
#include "BaseConstVariable.h"
|
||||
#include "GPUTool.cuh"
|
||||
#include <cuda_runtime.h>
|
||||
#include <device_launch_parameters.h>
|
||||
#include <cublas_v2.h>
|
||||
#include <cuComplex.h>
|
||||
#include "GPUTool.cuh"
|
||||
#include "GPUBPTool.cuh"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
extern "C" void TIMEBPCreateImageGrid(
|
||||
double* antPx, double* antPy, double* antPz, // ÎÀÐÇ×ø±ê S
|
||||
double* antDirx, double* antDiry, double* antDirz, //
|
||||
double* imgx, double* imgy, double* imgz,
|
||||
long prfcount, long freqpoints, double meanH,
|
||||
double Rnear, double dx
|
||||
);
|
||||
|
||||
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,28 @@
|
|||
#pragma once
|
||||
#ifndef __ImageNetOperator__H_
|
||||
#define __ImageNetOperator__H_
|
||||
#include "BaseConstVariable.h"
|
||||
#include <QString>
|
||||
|
||||
|
||||
void InitCreateImageXYZProcess(QString& outImageLLPath, QString& outImageXYZPath, QString& InEchoGPSDataPath, double& NearRange, double& RangeResolution, int64_t& RangeNum);
|
||||
|
||||
bool OverlapCheck(QString& ImageLLPath, QString& ImageDEMPath);
|
||||
|
||||
bool GPSPointsNumberEqualCheck(QString& ImageLLPath, QString& InEchoGPSDataPath);
|
||||
|
||||
void InterploateClipAtiByRefDEM(QString ImageLLPath, QString& ImageDEMPath, QString& outImageLLAPath, QString& InEchoGPSDataPath);
|
||||
void InterploateAtiByRefDEM(QString& ImageLLPath, QString& ImageDEMPath, QString& outImageLLAPath, QString& InEchoGPSDataPath);
|
||||
int ReflectTable_WGS2Range(QString dem_rc_path, QString outOriSimTiffPath, QString ori_sim_count_tiffPath, long OriHeight, long OriWidth);
|
||||
|
||||
int ResampleEChoDataFromGeoEcho(QString L2complexechodataPath, QString RangeLooktablePath, QString L1AEchoDataPath);
|
||||
|
||||
int ResampleRangeDataFromGeoImage(QString geodataPath, QString RangeLooktablePath, QString RangeDataPath);
|
||||
|
||||
|
||||
void InterpLookTableRfromDEM(QString lonlatPath, QString DEMPath, QString outllrpath);
|
||||
|
||||
void RangeLooktableLLA_2_RangeLooktableXYZ(QString LLAPath, QString outXYZPath);
|
||||
|
||||
|
||||
#endif
|
|
@ -0,0 +1,146 @@
|
|||
#include "ImagePlaneAtiInterpDialog.h"
|
||||
#include "ui_ImagePlaneAtiInterpDialog.h"
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
#include <QCheckBox>
|
||||
#include "BaseConstVariable.h"
|
||||
#include "ImageNetOperator.h"
|
||||
|
||||
ImagePlaneAtiInterpDialog::ImagePlaneAtiInterpDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::ImagePlaneAtiInterpDialogClass)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
connect(ui->pushButtonImageLLASelect, SIGNAL(clicked()), this, SLOT(onpushButtonImageLLASelect_clicked()));
|
||||
connect(ui->pushButtonImageNet0Select, SIGNAL(clicked()), this, SLOT(onpushButtonImageNet0Select_clicked()));
|
||||
connect(ui->pushButtonRefRangeDEMSelect, SIGNAL(clicked()), this, SLOT(onpushButtonRefRangeDEMSelect_clicked()));
|
||||
connect(ui->pushButtonEchoGPSPointDataSelect, SIGNAL(clicked()), this, SLOT(onpushButtonEchoGPSPointSelect_clicked()));
|
||||
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(onbuttonBoxAccepted()));
|
||||
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(onbuttonBoxRejected()));
|
||||
|
||||
|
||||
}
|
||||
|
||||
ImagePlaneAtiInterpDialog::~ImagePlaneAtiInterpDialog()
|
||||
{}
|
||||
|
||||
void ImagePlaneAtiInterpDialog::onpushButtonImageNet0Select_clicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getOpenFileName(
|
||||
this,
|
||||
tr(u8"选择成像粗平面文件"),
|
||||
QString(),
|
||||
tr(ENVI_FILE_FORMAT_FILTER)
|
||||
);
|
||||
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = "选中文件\n";
|
||||
this->ui->lineEditImageNet0Path->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"提示"), tr(u8"没有选中文件"));
|
||||
}
|
||||
}
|
||||
|
||||
void ImagePlaneAtiInterpDialog::onpushButtonEchoGPSPointSelect_clicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getOpenFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择回波GPS坐标点文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(u8"GPS坐标点文件(*.gpspos.data);;All Files(*.*)") // 文件过滤器
|
||||
);
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = "选择的文件有:\n";
|
||||
this->ui->lineEditGPSPointsPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void ImagePlaneAtiInterpDialog::onpushButtonRefRangeDEMSelect_clicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getOpenFileName(
|
||||
this,
|
||||
tr(u8"选择参考DEM"),
|
||||
QString(),
|
||||
tr(ENVI_FILE_FORMAT_FILTER)
|
||||
);
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = "选中文件\n";
|
||||
this->ui->lineEditRefRangeDEMPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"提示"), tr(u8"没有选中文件"));
|
||||
}
|
||||
}
|
||||
|
||||
void ImagePlaneAtiInterpDialog::onpushButtonImageLLASelect_clicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getSaveFileName(
|
||||
this,
|
||||
tr(u8"提示"),
|
||||
QString(),
|
||||
tr(ENVI_FILE_FORMAT_FILTER)
|
||||
);
|
||||
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = "选中文件\n";
|
||||
this->ui->lineEditImageLLAPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"提示"), tr(u8"没有选中文件"));
|
||||
}
|
||||
}
|
||||
|
||||
void ImagePlaneAtiInterpDialog::onbuttonBoxAccepted()
|
||||
{
|
||||
QString imageNet0Path = this->ui->lineEditImageNet0Path->text().trimmed();
|
||||
QString refRangeDEMPath = this->ui->lineEditRefRangeDEMPath->text().trimmed();
|
||||
QString imageLLAPath = this->ui->lineEditImageLLAPath->text().trimmed();
|
||||
QString echoGPSDataPath = this->ui->lineEditGPSPointsPath->text().trimmed();
|
||||
if (imageNet0Path.isEmpty() || refRangeDEMPath.isEmpty() || imageLLAPath.isEmpty()||echoGPSDataPath.isEmpty()) {
|
||||
QMessageBox::warning(this, tr(u8"提示"), tr(u8"没有选中文件"));
|
||||
return;
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
if (GPSPointsNumberEqualCheck(imageNet0Path, echoGPSDataPath)) {
|
||||
}
|
||||
else {
|
||||
QMessageBox::warning(nullptr, u8"警告", u8"回波GPS坐标点数目不一致");
|
||||
return;
|
||||
}
|
||||
|
||||
bool checkflag= this->ui->checkBoxOverLap->isChecked();
|
||||
if (checkflag) {
|
||||
InterploateClipAtiByRefDEM(imageNet0Path, refRangeDEMPath, imageLLAPath, echoGPSDataPath);
|
||||
QMessageBox::information(this, tr(u8"提示"), tr(u8"完成"));
|
||||
return;
|
||||
}
|
||||
else {
|
||||
if (OverlapCheck(imageNet0Path, refRangeDEMPath)) { // ????DEM???
|
||||
InterploateAtiByRefDEM(imageNet0Path, refRangeDEMPath, imageLLAPath, echoGPSDataPath);
|
||||
|
||||
QMessageBox::information(nullptr, u8"提示", u8"completed!!");
|
||||
return;
|
||||
|
||||
}
|
||||
else {
|
||||
QMessageBox::warning(nullptr, u8"警告", u8"DEM影像小于成像粗平面采样要求");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ImagePlaneAtiInterpDialog::onbuttonBoxRejected()
|
||||
{
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
#pragma once
|
||||
|
||||
#ifndef __ImagePlaneAtiInterpDialog__HH__
|
||||
#define __ImagePlaneAtiInterpDialog__HH__
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class ImagePlaneAtiInterpDialogClass;
|
||||
}
|
||||
|
||||
|
||||
class ImagePlaneAtiInterpDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ImagePlaneAtiInterpDialog(QWidget *parent = nullptr);
|
||||
~ImagePlaneAtiInterpDialog();
|
||||
|
||||
public slots:
|
||||
|
||||
void onpushButtonImageNet0Select_clicked();
|
||||
void onpushButtonEchoGPSPointSelect_clicked();
|
||||
void onpushButtonRefRangeDEMSelect_clicked();
|
||||
void onpushButtonImageLLASelect_clicked();
|
||||
void onbuttonBoxAccepted();
|
||||
void onbuttonBoxRejected();
|
||||
|
||||
|
||||
private:
|
||||
Ui::ImagePlaneAtiInterpDialogClass* ui;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
|
@ -0,0 +1,201 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ImagePlaneAtiInterpDialogClass</class>
|
||||
<widget class="QDialog" name="ImagePlaneAtiInterpDialogClass">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>661</width>
|
||||
<height>305</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>根据经纬度插值高程数据</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<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="pushButtonEchoGPSPointDataSelect">
|
||||
<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_4">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>回波GPS点</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>参考DEM:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="pushButtonImageNet0Select">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="lineEditRefRangeDEMPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="3">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="lineEditImageLLAPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEditGPSPointsPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QPushButton" name="pushButtonImageLLASelect">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QPushButton" name="pushButtonRefRangeDEMSelect">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</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="lineEditImageNet0Path">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QCheckBox" name="checkBoxOverLap">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>强制采样</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -0,0 +1,98 @@
|
|||
#include "InitCreateImageXYZDialog.h"
|
||||
#include "ui_InitCreateImageXYZDialog.h"
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
#include "ImageNetOperator.h"
|
||||
|
||||
InitCreateImageXYZDialog::InitCreateImageXYZDialog(QWidget *parent)
|
||||
: QDialog(parent), ui(new Ui::InitCreateImageXYZDialogClass)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
connect(ui->pushButtonEchoGPSDataSelect, SIGNAL(clicked()), this, SLOT(onpushButtonEchoGPSDataSelect_clicked()));
|
||||
connect(ui->pushButtonImageXYZSelect, SIGNAL(clicked()), this, SLOT(onpushButtonImageXYZSelect_clicked()));
|
||||
connect(ui->pushButtonImageLLSelect, SIGNAL(clicked()), this, SLOT(onpushButtonImageLLSelect_clicked()));
|
||||
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(onbuttonBox_accepted()));
|
||||
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(onbuttonBox_rejected()));
|
||||
}
|
||||
|
||||
InitCreateImageXYZDialog::~InitCreateImageXYZDialog()
|
||||
{}
|
||||
|
||||
void InitCreateImageXYZDialog::onpushButtonImageLLSelect_clicked()
|
||||
{
|
||||
QString fileNamePath = QFileDialog::getSaveFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"保存经纬度成像网格"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(u8"ENVI Bin(*.bin);;ENVI Data(*.dat);;ENVI Data(*.data);;tiff影像(*.tif);;tiff影像(*.tiff)") // 文件过滤器
|
||||
);
|
||||
// 如果用户选择了文件
|
||||
if (!fileNamePath.isEmpty()) {
|
||||
QString message = "选择的文件有:\n";
|
||||
this->ui->lineEditImageLLPath->setText(fileNamePath);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void InitCreateImageXYZDialog::onpushButtonImageXYZSelect_clicked()
|
||||
{
|
||||
QString fileNamePath = QFileDialog::getSaveFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"保存XYZ成像网格"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(u8"ENVI Bin(*.bin);;ENVI Data(*.dat);;ENVI Data(*.data);;tiff影像(*.tif);;tiff影像(*.tiff)") // 文件过滤器
|
||||
);
|
||||
// 如果用户选择了文件
|
||||
if (!fileNamePath.isEmpty()) {
|
||||
QString message = "选择的文件有:\n";
|
||||
this->ui->lineEditImageXYZPath->setText(fileNamePath);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void InitCreateImageXYZDialog::onpushButtonEchoGPSDataSelect_clicked()
|
||||
{
|
||||
|
||||
QString fileNames = QFileDialog::getOpenFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择回波GPS坐标点文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(u8"GPS坐标点文件(*.gpspos.data);;All Files(*.*)") // 文件过滤器
|
||||
);
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = "选择的文件有:\n";
|
||||
this->ui->lineEditEchoGPSDataPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void InitCreateImageXYZDialog::onbuttonBox_accepted()
|
||||
{
|
||||
double NearRange = this->ui->doubleSpinBoxNearRange->value();
|
||||
double RangeResolution = this->ui->doubleSpinBoxRangeResolution->value();
|
||||
int64_t RangeNum = this->ui->spinBoxRangeNum->value();
|
||||
QString imageLLPath = this->ui->lineEditImageLLPath->text().trimmed();
|
||||
QString imageXYZPath = this->ui->lineEditImageXYZPath->text().trimmed();
|
||||
QString echoGPSDataPath = this->ui->lineEditEchoGPSDataPath->text().trimmed();
|
||||
|
||||
InitCreateImageXYZProcess(imageLLPath, imageXYZPath, echoGPSDataPath, NearRange, RangeResolution, RangeNum);
|
||||
if (imageLLPath.isEmpty() || imageXYZPath.isEmpty() || echoGPSDataPath.isEmpty()) {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
return;
|
||||
}
|
||||
QMessageBox::information(this, tr(u8"提示"), tr(u8"完成"));
|
||||
|
||||
}
|
||||
|
||||
void InitCreateImageXYZDialog::onbuttonBox_rejected()
|
||||
{
|
||||
this->close();
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
#pragma once
|
||||
#ifndef __InitCreateImageXYZDialog__HH__
|
||||
#define __InitCreateImageXYZDialog__HH__
|
||||
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class InitCreateImageXYZDialogClass;
|
||||
}
|
||||
|
||||
|
||||
class InitCreateImageXYZDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
InitCreateImageXYZDialog(QWidget *parent = nullptr);
|
||||
~InitCreateImageXYZDialog();
|
||||
|
||||
|
||||
public slots :
|
||||
void onpushButtonImageLLSelect_clicked();
|
||||
void onpushButtonImageXYZSelect_clicked();
|
||||
void onpushButtonEchoGPSDataSelect_clicked();
|
||||
void onbuttonBox_accepted();
|
||||
void onbuttonBox_rejected();
|
||||
|
||||
|
||||
private:
|
||||
Ui::InitCreateImageXYZDialogClass* ui;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
|
@ -0,0 +1,250 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>InitCreateImageXYZDialogClass</class>
|
||||
<widget class="QDialog" name="InitCreateImageXYZDialogClass">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>600</width>
|
||||
<height>403</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>初始化成像平面网格</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<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>成像网格(XYZ):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QPushButton" name="pushButtonImageLLSelect">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="pushButtonImageXYZSelect">
|
||||
<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="lineEditImageXYZPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:\Programme\vs2022\RasterMergeTest\LAMPCAE_SCANE-all-scane\BPImage\GF3BPImage</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" 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">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>回波GPS轨道节点:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEditEchoGPSDataPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:\Programme\vs2022\RasterMergeTest\LAMPCAE_SCANE-all-scane\GF3_Simulation.xml</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="pushButtonEchoGPSDataSelect">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="3">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="lineEditImageLLPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:\Programme\vs2022\RasterMergeTest\LAMPCAE_SCANE-all-scane\BPImage\GF3BPImage</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="3">
|
||||
<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>580</width>
|
||||
<height>239</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>方位向参数</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>方位向的像素数与回波GPS脉冲数一致</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>距离向参数</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>近斜距</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBoxRangeResolution">
|
||||
<property name="decimals">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1000000000000000000.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.010000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBoxNearRange">
|
||||
<property name="decimals">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>99999999999999991611392.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.000100000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>距离向间隔</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>距离向像素数</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSpinBox" name="spinBoxRangeNum">
|
||||
<property name="maximum">
|
||||
<number>999999999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -0,0 +1,386 @@
|
|||
#include "QCreateInSARImagePlaneXYZRDialog.h"
|
||||
#include "ui_QCreateInSARImagePlaneXYZRDialog.h"
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "SatelliteOribtModel.h"
|
||||
#include "SARSimulationTaskSetting.h"
|
||||
#include "ImageOperatorBase.h"
|
||||
#include "FileOperator.h"
|
||||
#include "BaseConstVariable.h"
|
||||
#include "GPUTool.cuh"
|
||||
#include "LookTableSimulationComputer.cuh"
|
||||
#include <QDebug>
|
||||
|
||||
#include "ImageShowDialogClass.h"
|
||||
#include "QToolProcessBarDialog.h"
|
||||
|
||||
QCreateInSARImagePlaneXYZRDialog::QCreateInSARImagePlaneXYZRDialog(QWidget* parent)
|
||||
: QDialog(parent), ui(new Ui::QCreateInSARImagePlaneXYZRDialogClass)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(onaccepted()));
|
||||
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(onrejected()));
|
||||
connect(ui->pushButtonDEM, SIGNAL(clicked(bool)), this, SLOT(onpushButtonDEMClicked(bool)));
|
||||
connect(ui->pushButtonSloper, SIGNAL(clicked(bool)), this, SLOT(onpushButtonSloperClicked(bool)));
|
||||
connect(ui->pushButtonOrbitModel, SIGNAL(clicked(bool)), this, SLOT(onpushButtonOrbitModelClicked(bool)));
|
||||
connect(ui->pushButtonOutDir, SIGNAL(clicked(bool)), this, SLOT(onpushButtonOutDirClicked(bool)));
|
||||
connect(ui->pushButtonSataSetting, SIGNAL(clicked(bool)), this, SLOT(onpushButtonSataSettingClicked(bool)));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
QCreateInSARImagePlaneXYZRDialog::~QCreateInSARImagePlaneXYZRDialog()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void QCreateInSARImagePlaneXYZRDialog::onrejected()
|
||||
{
|
||||
this->close();
|
||||
}
|
||||
|
||||
void QCreateInSARImagePlaneXYZRDialog::onpushButtonOrbitModelClicked(bool)
|
||||
{
|
||||
// 调用文件选择对话框并选择一个 .tif 文件
|
||||
QString fileName = QFileDialog::getOpenFileName(this,
|
||||
u8"GPS Orbit Model xml", // 对话框标题
|
||||
"", // 初始目录,可以设置为路径
|
||||
u8"xml Files (*.xml)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui->OrbitModelPathLineEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
}
|
||||
}
|
||||
|
||||
void QCreateInSARImagePlaneXYZRDialog::onpushButtonSataSettingClicked(bool)
|
||||
{
|
||||
// 调用文件选择对话框并选择一个 .tif 文件
|
||||
QString fileName = QFileDialog::getOpenFileName(this,
|
||||
u8"Satellite Params setting xml", // 对话框标题
|
||||
"", // 初始目录,可以设置为路径
|
||||
u8"xml Files (*.xml)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui->SateSettingLineEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
}
|
||||
}
|
||||
|
||||
void QCreateInSARImagePlaneXYZRDialog::onpushButtonDEMClicked(bool)
|
||||
{
|
||||
// 调用文件选择对话框并选择一个 .tif 文件
|
||||
QString fileName = QFileDialog::getOpenFileName(this,
|
||||
u8"DEM XYZ Raster Select", // 对话框标题
|
||||
"", // 初始目录,可以设置为路径
|
||||
u8"tiff Files (*.tiff);;tif Files (*.tif);;dat Files (*.dat);;All Files (*.*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui->DEMLineEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
}
|
||||
}
|
||||
|
||||
void QCreateInSARImagePlaneXYZRDialog::onpushButtonSloperClicked(bool)
|
||||
{
|
||||
// 调用文件选择对话框并选择一个 .tif 文件
|
||||
QString fileName = QFileDialog::getOpenFileName(this,
|
||||
u8"DEM Sloper Raster Select", // 对话框标题
|
||||
"", // 初始目录,可以设置为路径
|
||||
u8"tiff Files (*.tiff);;tif Files (*.tif);;dat Files (*.dat);;All Files (*.*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui->SloperLineEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
}
|
||||
}
|
||||
|
||||
void QCreateInSARImagePlaneXYZRDialog::onpushButtonOutDirClicked(bool)
|
||||
{
|
||||
// 调用文件选择对话框并选择一个 .tif 文件
|
||||
QString fileName = QFileDialog::getExistingDirectory(this,
|
||||
u8"DEM Raster Select", // 对话框标题
|
||||
"" // 初始目录,可以设置为路径
|
||||
);
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui->outDirLineEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
}
|
||||
}
|
||||
|
||||
void QCreateInSARImagePlaneXYZRDialog::LookTableSimualtionMainProcess(QString sateName, QString orbitpath, QString SatePath, QString DEMPath, QString outDirPath)
|
||||
{
|
||||
|
||||
if (!isExists(orbitpath)) {
|
||||
qDebug() << "Orbit model file is not exist !!!";
|
||||
return;
|
||||
}
|
||||
if (!isExists(SatePath)) {
|
||||
qDebug() << "Satellite Model file is not exist !!!";
|
||||
return;
|
||||
}
|
||||
if (!isExists(DEMPath)) {
|
||||
qDebug() << "DEM file is not exist !!!";
|
||||
return;
|
||||
}
|
||||
|
||||
// 读取轨道模型
|
||||
qDebug() << "load orbit model params from xml :" << orbitpath;
|
||||
PolyfitSatelliteOribtModel orbitmodel;
|
||||
orbitmodel.loadFromXml(orbitpath);
|
||||
|
||||
// 轨道参数
|
||||
long double OribtStartTime = orbitmodel.getOribtStartTime();
|
||||
std::vector<double> PolyfitPx = orbitmodel.getPolyfitPx();
|
||||
std::vector<double> PolyfitPy = orbitmodel.getPolyfitPy();
|
||||
std::vector<double> PolyfitPz = orbitmodel.getPolyfitPz();
|
||||
std::vector<double> PolyfitVx = orbitmodel.getPolyfitVx();
|
||||
std::vector<double> PolyfitVy = orbitmodel.getPolyfitVy();
|
||||
std::vector<double> PolyfitVz = orbitmodel.getPolyfitVz();
|
||||
|
||||
|
||||
// 参数模型
|
||||
qDebug() << "load simulation setting params from xml :" << orbitpath;
|
||||
std::shared_ptr<AbstractSARSatelliteModel> SARSetting = ReadSimulationSettingsXML(SatePath);
|
||||
|
||||
// 多普勒参数
|
||||
double dopplerRefrenceTime = SARSetting->getDopplerParametersReferenceTime();
|
||||
std::vector<double> DopplerCentroidCoefficients = SARSetting->getDopplerCentroidCoefficients();
|
||||
std::vector<double> DopplerRateValuesCoefficient = SARSetting->getDopplerRateValuesCoefficients();
|
||||
|
||||
// 仿真成像参数计算
|
||||
double startTime = SARSetting->getSARImageStartTime();
|
||||
double endTime = SARSetting->getSARImageStartTime();
|
||||
|
||||
double PRF = SARSetting->getPRF();
|
||||
double Fs = SARSetting->getFs();
|
||||
double nearRange = SARSetting->getNearRange();
|
||||
double farRange = SARSetting->getFarRange();
|
||||
double lamda = SARSetting->getCenterLamda();
|
||||
// 输出结果处理
|
||||
QString outLookTablePath = "";
|
||||
QString outIncPath = "";
|
||||
gdalImage demimg(DEMPath);
|
||||
|
||||
|
||||
outLookTablePath = JoinPath(outDirPath, sateName + "_looktable.bin");
|
||||
|
||||
this->ui->label_tip->setText(u8"look table create...");
|
||||
|
||||
this->LookTableSimulationDopplerProcess(
|
||||
DEMPath,
|
||||
outLookTablePath,
|
||||
OribtStartTime,
|
||||
PolyfitPx, PolyfitPy, PolyfitPz,
|
||||
PolyfitVx, PolyfitVy, PolyfitVz,
|
||||
dopplerRefrenceTime,
|
||||
DopplerCentroidCoefficients,
|
||||
startTime,
|
||||
endTime,
|
||||
nearRange,
|
||||
farRange,
|
||||
PRF,
|
||||
Fs,
|
||||
lamda
|
||||
);
|
||||
}
|
||||
|
||||
void QCreateInSARImagePlaneXYZRDialog::LookTableSimulationDopplerProcess(QString DEMPath, QString outLookTablePath, long double OribtStartTime, std::vector<double> PolyfitPx, std::vector<double> PolyfitPy, std::vector<double> PolyfitPz, std::vector<double> PolyfitVx, std::vector<double> PolyfitVy, std::vector<double> PolyfitVz, double dopplerRefrenceTime, std::vector<double> DopplerCentroidCoefficients, double starttime, double endtime, double nearRange, double farRange, double PRF, double Fs, double lamda)
|
||||
{
|
||||
qDebug() << "generate look table ";
|
||||
qDebug() << "DEMPath\t" << DEMPath;
|
||||
qDebug() << "outLookTablePath\t" << outLookTablePath;
|
||||
|
||||
gdalImage demimg(DEMPath);
|
||||
gdalImage outLookTable = CreategdalImageDouble( // 创建查找表
|
||||
outLookTablePath,
|
||||
demimg.height, demimg.width, 4,
|
||||
demimg.gt,
|
||||
demimg.projection,
|
||||
true,
|
||||
true,
|
||||
true
|
||||
);
|
||||
|
||||
|
||||
starttime = starttime - OribtStartTime; // 处理坐标时间
|
||||
endtime = endtime - OribtStartTime;
|
||||
|
||||
// 轨道模型
|
||||
double Xp0 = 0, Yp0 = 0, Zp0 = 0, Xv0 = 0, Yv0 = 0, Zv0 = 0;
|
||||
double Xp1 = 0, Yp1 = 0, Zp1 = 0, Xv1 = 0, Yv1 = 0, Zv1 = 0;
|
||||
double Xp2 = 0, Yp2 = 0, Zp2 = 0, Xv2 = 0, Yv2 = 0, Zv2 = 0;
|
||||
double Xp3 = 0, Yp3 = 0, Zp3 = 0, Xv3 = 0, Yv3 = 0, Zv3 = 0;
|
||||
double Xp4 = 0, Yp4 = 0, Zp4 = 0, Xv4 = 0, Yv4 = 0, Zv4 = 0;
|
||||
double Xp5 = 0, Yp5 = 0, Zp5 = 0, Xv5 = 0, Yv5 = 0, Zv5 = 0;
|
||||
int degree = PolyfitPx.size();
|
||||
switch (degree) {
|
||||
case(6):
|
||||
Xp5 = PolyfitPx[5];
|
||||
Yp5 = PolyfitPy[5];
|
||||
Zp5 = PolyfitPz[5];
|
||||
Xv5 = PolyfitVx[5];
|
||||
Yv5 = PolyfitVy[5];
|
||||
Zv5 = PolyfitVz[5];
|
||||
case(5):
|
||||
Xp4 = PolyfitPx[4];
|
||||
Yp4 = PolyfitPy[4];
|
||||
Zp4 = PolyfitPz[4];
|
||||
Xv4 = PolyfitVx[4];
|
||||
Yv4 = PolyfitVy[4];
|
||||
Zv4 = PolyfitVz[4];
|
||||
case(4):
|
||||
Xp3 = PolyfitPx[3];
|
||||
Yp3 = PolyfitPy[3];
|
||||
Zp3 = PolyfitPz[3];
|
||||
Xv3 = PolyfitVx[3];
|
||||
Yv3 = PolyfitVy[3];
|
||||
Zv3 = PolyfitVz[3];
|
||||
case(3):
|
||||
Xp2 = PolyfitPx[2];
|
||||
Yp2 = PolyfitPy[2];
|
||||
Zp2 = PolyfitPz[2];
|
||||
Xv2 = PolyfitVx[2];
|
||||
Yv2 = PolyfitVy[2];
|
||||
Zv2 = PolyfitVz[2];
|
||||
case(2):
|
||||
Xp1 = PolyfitPx[1];
|
||||
Yp1 = PolyfitPy[1];
|
||||
Zp1 = PolyfitPz[1];
|
||||
Xv1 = PolyfitVx[1];
|
||||
Yv1 = PolyfitVy[1];
|
||||
Zv1 = PolyfitVz[1];
|
||||
case(1):
|
||||
Xp0 = PolyfitPx[0];
|
||||
Yp0 = PolyfitPy[0];
|
||||
Zp0 = PolyfitPz[0];
|
||||
Xv0 = PolyfitVx[0];
|
||||
Yv0 = PolyfitVy[0];
|
||||
Zv0 = PolyfitVz[0];
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// 多普勒参数
|
||||
double r0 = 0, r1 = 0, r2 = 0, r3 = 0, r4 = 0;
|
||||
degree = DopplerCentroidCoefficients.size();
|
||||
switch (degree)
|
||||
{
|
||||
case(5):
|
||||
r4 = DopplerCentroidCoefficients[4];
|
||||
case(4):
|
||||
r3 = DopplerCentroidCoefficients[3];
|
||||
case(3):
|
||||
r2 = DopplerCentroidCoefficients[2];
|
||||
case(2):
|
||||
r1 = DopplerCentroidCoefficients[1];
|
||||
case(1):
|
||||
r0 = DopplerCentroidCoefficients[0];
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 处理分块
|
||||
long GPUMemoryline = floor((Memory1MB * 2.0 / 8.0 / 3.0 / demimg.width * 2000));//2GB
|
||||
GPUMemoryline = GPUMemoryline < 1 ? 1 : GPUMemoryline;
|
||||
|
||||
// 内存预分配
|
||||
|
||||
double fact_lamda = 1 / lamda;
|
||||
for (long rid = 0; rid < demimg.height; rid = rid + GPUMemoryline) {
|
||||
long rowcount = GPUMemoryline;
|
||||
long colcount = demimg.width;
|
||||
qDebug() << "computer read file : " << rid << "~" << rowcount + rid << "\t:" << demimg.height;
|
||||
//double* tmep = new double[rowcount * colcount];
|
||||
std::shared_ptr<double> demX = readDataArr<double>(demimg, rid, 0, rowcount, colcount, 1, GDALREADARRCOPYMETHOD::VARIABLEMETHOD);// 行列数修改
|
||||
std::shared_ptr<double> demY = readDataArr<double>(demimg, rid, 0, rowcount, colcount, 2, GDALREADARRCOPYMETHOD::VARIABLEMETHOD);
|
||||
std::shared_ptr<double> demZ = readDataArr<double>(demimg, rid, 0, rowcount, colcount, 3, GDALREADARRCOPYMETHOD::VARIABLEMETHOD);
|
||||
|
||||
//
|
||||
std::shared_ptr<double> host_R((double*)mallocCUDAHost(sizeof(double) * rowcount * demimg.width), FreeCUDAHost);
|
||||
|
||||
std::shared_ptr<double> device_R((double*)mallocCUDADevice(sizeof(double) * rowcount * demimg.width), FreeCUDADevice);
|
||||
|
||||
//
|
||||
std::shared_ptr<double> host_demX((double*)mallocCUDAHost(sizeof(double) * rowcount * demimg.width), FreeCUDAHost);
|
||||
std::shared_ptr<double> host_demY((double*)mallocCUDAHost(sizeof(double) * rowcount * demimg.width), FreeCUDAHost);
|
||||
std::shared_ptr<double> host_demZ((double*)mallocCUDAHost(sizeof(double) * rowcount * demimg.width), FreeCUDAHost);
|
||||
|
||||
std::shared_ptr<double> device_demX((double*)mallocCUDADevice(sizeof(double) * rowcount * demimg.width), FreeCUDADevice);
|
||||
std::shared_ptr<double> device_demY((double*)mallocCUDADevice(sizeof(double) * rowcount * demimg.width), FreeCUDADevice);
|
||||
std::shared_ptr<double> device_demZ((double*)mallocCUDADevice(sizeof(double) * rowcount * demimg.width), FreeCUDADevice);
|
||||
|
||||
// 数据复制
|
||||
memcpy(host_demX.get(), demX.get(), sizeof(double) * rowcount * colcount);
|
||||
memcpy(host_demY.get(), demY.get(), sizeof(double) * rowcount * colcount);
|
||||
memcpy(host_demZ.get(), demZ.get(), sizeof(double) * rowcount * colcount);
|
||||
|
||||
//内存->GPU
|
||||
HostToDevice(host_demX.get(), device_demX.get(), sizeof(double) * rowcount * demimg.width);
|
||||
HostToDevice(host_demY.get(), device_demY.get(), sizeof(double) * rowcount * demimg.width);
|
||||
HostToDevice(host_demZ.get(), device_demZ.get(), sizeof(double) * rowcount * demimg.width);
|
||||
|
||||
qDebug() << "GPU computer start: " << rid << "~" << rowcount + rid << "\t:" << demimg.height;
|
||||
RDProcess_dopplerGPU_InSARImagePlaneXYZR(
|
||||
device_demX.get(), device_demY.get(), device_demZ.get(),
|
||||
device_R.get(),
|
||||
rowcount, colcount,
|
||||
starttime, nearRange, farRange,
|
||||
PRF, Fs,
|
||||
fact_lamda,
|
||||
Xp0, Yp0, Zp0, Xv0, Yv0, Zv0,
|
||||
Xp1, Yp1, Zp1, Xv1, Yv1, Zv1,
|
||||
Xp2, Yp2, Zp2, Xv2, Yv2, Zv2,
|
||||
Xp3, Yp3, Zp3, Xv3, Yv3, Zv3,
|
||||
Xp4, Yp4, Zp4, Xv4, Yv4, Zv4,
|
||||
Xp5, Yp5, Zp5, Xv5, Yv5, Zv5,
|
||||
dopplerRefrenceTime, r0, r1, r2, r3, r4);
|
||||
// GPU -> 内存
|
||||
DeviceToHost(host_R.get(), device_R.get(), sizeof(double) * rowcount * demimg.width);
|
||||
qDebug() << "GPU computer finished!!: " << rid << "~" << rowcount + rid << "\t:" << demimg.height;
|
||||
//exit(-1);
|
||||
// 数据存储
|
||||
outLookTable.saveImage(demX, rid, 0, rowcount, colcount, 1);
|
||||
outLookTable.saveImage(demY, rid, 0, rowcount, colcount, 2);
|
||||
outLookTable.saveImage(demZ, rid, 0, rowcount, colcount, 3);
|
||||
outLookTable.saveImage(host_R, rid, 0, rowcount, colcount, 4);
|
||||
|
||||
qDebug() << "GPU computer result write finished: " << rid << " ~ " << rowcount + rid << "\t:" << demimg.height;
|
||||
|
||||
}
|
||||
|
||||
qDebug() << "look table computed finished!!!";
|
||||
}
|
||||
|
||||
void QCreateInSARImagePlaneXYZRDialog::onaccepted()
|
||||
{
|
||||
QString orbitpath = this->ui->OrbitModelPathLineEdit->text();
|
||||
QString SatePath = this->ui->SateSettingLineEdit->text();
|
||||
QString DEMPath = this->ui->DEMLineEdit->text();
|
||||
QString outDirPath = this->ui->outDirLineEdit->text();
|
||||
|
||||
QString simulationName = this->ui->lineEditLookName->text();
|
||||
this->LookTableSimualtionMainProcess(
|
||||
simulationName,
|
||||
orbitpath, SatePath, DEMPath, outDirPath
|
||||
);
|
||||
QMessageBox::information(this, u8"info", u8"completed!!!");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class QCreateInSARImagePlaneXYZRDialogClass;
|
||||
}
|
||||
|
||||
class QCreateInSARImagePlaneXYZRDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QCreateInSARImagePlaneXYZRDialog(QWidget *parent = nullptr);
|
||||
~QCreateInSARImagePlaneXYZRDialog();
|
||||
|
||||
private:
|
||||
Ui::QCreateInSARImagePlaneXYZRDialogClass* ui;
|
||||
|
||||
|
||||
public slots:
|
||||
void onaccepted();
|
||||
void onrejected();
|
||||
|
||||
void onpushButtonOrbitModelClicked(bool);
|
||||
void onpushButtonSataSettingClicked(bool);
|
||||
void onpushButtonDEMClicked(bool);
|
||||
void onpushButtonSloperClicked(bool);
|
||||
void onpushButtonOutDirClicked(bool);
|
||||
|
||||
|
||||
|
||||
private: // doppler 处理软件
|
||||
void LookTableSimualtionMainProcess(
|
||||
QString sateName,
|
||||
QString orbitpath, QString SatePath, QString DEMPath, QString outDirPath
|
||||
);
|
||||
|
||||
void LookTableSimulationDopplerProcess(
|
||||
QString DEMPath,
|
||||
QString outLookTablePath,
|
||||
|
||||
// 多项式轨道参数
|
||||
long double OribtStartTime, // 轨道模型参考时间
|
||||
std::vector<double> PolyfitPx, // 5次项,空余填0
|
||||
std::vector<double> PolyfitPy, // 5次项,空余填0
|
||||
std::vector<double> PolyfitPz, // 5次项,空余填0
|
||||
std::vector<double> PolyfitVx, // 5次项,空余填0
|
||||
std::vector<double> PolyfitVy, // 5次项,空余填0
|
||||
std::vector<double> PolyfitVz, // 5次项,空余填0
|
||||
|
||||
|
||||
// 多普勒参数
|
||||
double dopplerRefrenceTime,
|
||||
std::vector<double> DopplerCentroidCoefficients,// d0 ~ d5, 空余填零
|
||||
|
||||
// 其他成像参数
|
||||
double starttime, // 成像开始时间
|
||||
double endtime, // 成像结束时间
|
||||
double nearRange, // 近斜距
|
||||
double farRange, // 远斜距
|
||||
double PRF, // 脉冲重复采样频率
|
||||
double Fs, // 距离采样频率
|
||||
double lamda
|
||||
);
|
||||
|
||||
|
||||
|
||||
};
|
|
@ -0,0 +1,293 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QCreateInSARImagePlaneXYZRDialogClass</class>
|
||||
<widget class="QDialog" name="QCreateInSARImagePlaneXYZRDialogClass">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>763</width>
|
||||
<height>498</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>QCreateInSARImagePlaneXYZR</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="7" column="1">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QPushButton" name="pushButtonSloper">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" 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="SloperLineEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:\FZSimulation\LT1A\L20250210\LT1A_DEM_20250210_resampleXYZ.dat</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="checkBoxDoppler">
|
||||
<property name="text">
|
||||
<string>采用多普勒参数</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" 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="1" column="2">
|
||||
<widget class="QPushButton" name="pushButtonSataSetting">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</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>DEM文件(XYZ)</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>坡度法向文件(sloper)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="OrbitModelPathLineEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:\FZSimulation\LT1A\L20250210\LT1_Simulation_OrbitModel.xml</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="lineEditLookName">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>LT1A_20250210</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLineEdit" name="outDirLineEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:\FZSimulation\LT1A\L20250210\Looktable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="label_tip">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="pushButtonOrbitModel">
|
||||
<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_7">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>多项式轨道模型参数:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0" colspan="3">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="DEMLineEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:\FZSimulation\LT1A\L20250210\LT1A_DEM_20250210_resampleXYZ.dat</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>结果文件保存地址:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<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="pushButtonOutDir">
|
||||
<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="SateSettingLineEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:\FZSimulation\LT1A\L20250210\LT1_Simulation_Setting.xml</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -0,0 +1,114 @@
|
|||
#include "QL1ASARProcessDialog.h"
|
||||
#include "ui_QL1ASARProcessDialog.h"
|
||||
#include "BaseConstVariable.h"
|
||||
#include "BaseTool.h"
|
||||
#include "RasterToolBase.h"
|
||||
#include "LogInfoCls.h"
|
||||
#include <QMessageBox>
|
||||
#include <QFileDialog>
|
||||
#include "ImageNetOperator.h"
|
||||
#include "ImageOperatorBase.h"
|
||||
|
||||
QL1ASARProcessDialog::QL1ASARProcessDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
,ui(new Ui::QL1ASARProcessDialogClass)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
|
||||
connect(ui->pushButtonL1BSelect, SIGNAL(clicked()), this, SLOT(onpushButtonL1BSelect_clicked()));
|
||||
connect(ui->pushButtonL1ASelect, SIGNAL(clicked()), this, SLOT(onpushButtonL1ASelect_clicked()));
|
||||
connect(ui->pushButtonS1ASelect, SIGNAL(clicked()), this, SLOT(onpushButtonS1ASelect_clicked()));
|
||||
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(onbuttonBox_accepted()));
|
||||
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(onbuttonBox_rejected()));
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
QL1ASARProcessDialog::~QL1ASARProcessDialog()
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void QL1ASARProcessDialog::onpushButtonL1BSelect_clicked()
|
||||
{
|
||||
|
||||
QString fileNames = QFileDialog::getSaveFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择L1B数据文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器
|
||||
);
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = u8"选择的文件有:\n";
|
||||
this->ui->lineEditL1BDataPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void QL1ASARProcessDialog::onpushButtonL1ASelect_clicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getOpenFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择L1A数据文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器
|
||||
);
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = u8"选择的文件有:\n";
|
||||
this->ui->lineEditL1ADataPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void QL1ASARProcessDialog::onpushButtonS1ASelect_clicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getSaveFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择单视斜距振幅产品文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器
|
||||
);
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = u8"选择的文件有:\n";
|
||||
this->ui->lineSlAPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void QL1ASARProcessDialog::onbuttonBox_accepted()
|
||||
{
|
||||
QString l1arasterpath = ui->lineEditL1ADataPath->text();
|
||||
QString s1arasterpath = ui->lineSlAPath->text();
|
||||
QString l1brasterpath = ui->lineEditL1BDataPath->text();
|
||||
|
||||
long nlaz = ui->spinBoxLNAz->value();
|
||||
long nlra = ui->spinBoxLNRa->value();
|
||||
|
||||
qDebug() << u8"单视斜距复数产品 转 单视斜距幅度产品";
|
||||
Complex2AmpRaster(l1arasterpath, s1arasterpath);
|
||||
|
||||
qDebug() << u8"单视斜距幅度产品 转 多视斜距幅度产品";
|
||||
MultiLookRaster(s1arasterpath, l1brasterpath, nlaz, nlra);
|
||||
|
||||
QMessageBox::information(this, tr(u8"提示"), tr(u8"多视处理完成"));
|
||||
}
|
||||
|
||||
void QL1ASARProcessDialog::onbuttonBox_rejected()
|
||||
{
|
||||
this->close();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class QL1ASARProcessDialogClass;
|
||||
|
||||
};
|
||||
|
||||
class QL1ASARProcessDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QL1ASARProcessDialog(QWidget *parent = nullptr);
|
||||
~QL1ASARProcessDialog();
|
||||
|
||||
|
||||
public slots:
|
||||
|
||||
void onpushButtonL1BSelect_clicked();
|
||||
void onpushButtonL1ASelect_clicked();
|
||||
void onpushButtonS1ASelect_clicked();
|
||||
void onbuttonBox_accepted();
|
||||
void onbuttonBox_rejected();
|
||||
|
||||
private:
|
||||
Ui::QL1ASARProcessDialogClass* ui;
|
||||
};
|
|
@ -0,0 +1,232 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QL1ASARProcessDialogClass</class>
|
||||
<widget class="QDialog" name="QL1ASARProcessDialogClass">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>475</width>
|
||||
<height>354</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>QL1ASARProcessDialog</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEditL1ADataPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineSlAPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="3">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</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="2" column="2">
|
||||
<widget class="QPushButton" name="pushButtonL1BSelect">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>L1B:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>L1A产品:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="pushButtonL1ASelect">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="lineEditL1BDataPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>多视参数</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>方位向视数:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="spinBoxLNAz">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>方位向视数:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="spinBoxLNRa">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="pushButtonS1ASelect">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -0,0 +1,124 @@
|
|||
#include "QLonLatInterpAtiFromDEM.h"
|
||||
#include "ui_QLonLatInterpAtiFromDEM.h"
|
||||
#include "BaseConstVariable.h"
|
||||
#include "BaseTool.h"
|
||||
#include "RasterToolBase.h"
|
||||
#include "LogInfoCls.h"
|
||||
#include <QMessageBox>
|
||||
#include <QFileDialog>
|
||||
#include "ImageNetOperator.h"
|
||||
|
||||
QLonLatInterpAtiFromDEM::QLonLatInterpAtiFromDEM(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
,ui(new Ui::QLonLatInterpAtiFromDEMClass)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
connect(ui->pushButtonLonLatRasterSelect, SIGNAL(clicked()), this, SLOT(onpushButtonLonLatRasterSelect_clicked()));
|
||||
connect(ui->pushButtonDEMRasterSelect, SIGNAL(clicked()), this, SLOT(onpushButtonDEMRasterSelect_clicked()));
|
||||
connect(ui->pushButtonLLARasterSelect, SIGNAL(clicked()), this, SLOT(onpushButtonLLARasterSelect_clicked()));
|
||||
connect(ui->pushButtonXYZRasterSelect, SIGNAL(clicked()), this, SLOT(onpushButtonXYZRasterSelect_clicked()));
|
||||
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(onbuttonBox_accepted()));
|
||||
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(onbuttonBox_rejected()));
|
||||
|
||||
|
||||
}
|
||||
|
||||
QLonLatInterpAtiFromDEM::~QLonLatInterpAtiFromDEM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void QLonLatInterpAtiFromDEM::onpushButtonLonLatRasterSelect_clicked()
|
||||
{
|
||||
|
||||
QString fileNames = QFileDialog::getOpenFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择坐标点数据文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器
|
||||
);
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = "选择的文件有:\n";
|
||||
this->ui->lineEditLonLatRasterPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void QLonLatInterpAtiFromDEM::onpushButtonDEMRasterSelect_clicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getOpenFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择DEM数据文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器
|
||||
);
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = "选择的文件有:\n";
|
||||
this->ui->lineEditDEMRasterPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void QLonLatInterpAtiFromDEM::onpushButtonLLARasterSelect_clicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getSaveFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择保存采样后数据文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器
|
||||
);
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = "选择的文件有:\n";
|
||||
this->ui->lineEditLLARasterPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void QLonLatInterpAtiFromDEM::onpushButtonXYZRasterSelect_clicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getSaveFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择采样后转换数据文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器
|
||||
);
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = "选择的文件有:\n";
|
||||
this->ui->lineEditXYZRasterPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void QLonLatInterpAtiFromDEM::onbuttonBox_accepted()
|
||||
{
|
||||
QString llrasterpath = ui->lineEditLonLatRasterPath->text();
|
||||
QString demrasterpath = ui->lineEditDEMRasterPath->text();
|
||||
QString llarasterpath = ui->lineEditLLARasterPath->text();
|
||||
QString xyzrasterpath = ui->lineEditXYZRasterPath->text();
|
||||
|
||||
qDebug() << "从DEM采样高程中。。。。";
|
||||
InterpLookTableRfromDEM(llrasterpath, demrasterpath, llarasterpath);
|
||||
qDebug() << "经纬度转换为XYZ中。。。。";
|
||||
RangeLooktableLLA_2_RangeLooktableXYZ(llarasterpath, xyzrasterpath);
|
||||
QMessageBox::information(this, tr(u8"提示"), tr(u8"完成"));
|
||||
}
|
||||
|
||||
void QLonLatInterpAtiFromDEM::onbuttonBox_rejected()
|
||||
{
|
||||
this->close();
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class QLonLatInterpAtiFromDEMClass;
|
||||
}
|
||||
|
||||
class QLonLatInterpAtiFromDEM : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QLonLatInterpAtiFromDEM(QWidget *parent = nullptr);
|
||||
~QLonLatInterpAtiFromDEM();
|
||||
|
||||
|
||||
public slots:
|
||||
void onpushButtonLonLatRasterSelect_clicked();
|
||||
void onpushButtonDEMRasterSelect_clicked();
|
||||
void onpushButtonLLARasterSelect_clicked();
|
||||
void onpushButtonXYZRasterSelect_clicked();
|
||||
void onbuttonBox_accepted();
|
||||
void onbuttonBox_rejected();
|
||||
|
||||
|
||||
private:
|
||||
Ui::QLonLatInterpAtiFromDEMClass* ui;
|
||||
};
|
|
@ -0,0 +1,191 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QLonLatInterpAtiFromDEMClass</class>
|
||||
<widget class="QDialog" name="QLonLatInterpAtiFromDEMClass">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>600</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>QLonLatInterpAtiFromDEM</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<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="lineEditLonLatRasterPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="pushButtonLonLatRasterSelect">
|
||||
<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_4">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>待采样DEM:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEditDEMRasterPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="pushButtonDEMRasterSelect">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>采样矩阵(LLA):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="lineEditLLARasterPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QPushButton" name="pushButtonLLARasterSelect">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</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>采样矩阵(XYZ):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="lineEditXYZRasterPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QPushButton" name="pushButtonXYZRasterSelect">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="3">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -0,0 +1,124 @@
|
|||
#include "QSARSimulationComplexEchoDataDialog.h"
|
||||
#include "ui_QSARSimulationComplexEchoDataDialog.h"
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
#include "BaseConstVariable.h"
|
||||
#include "BaseTool.h"
|
||||
#include "ImageNetOperator.h"
|
||||
#include <QDebug>
|
||||
#include "FileOperator.h"
|
||||
#include "ImageOperatorBase.h"
|
||||
|
||||
|
||||
QSARSimulationComplexEchoDataDialog::QSARSimulationComplexEchoDataDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::QSARSimulationComplexEchoDataDialogClass)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
|
||||
connect(ui->pushButtonEchoDataSelect, SIGNAL(clicked()), this, SLOT(onpushButtonEchoDataSelect_clicked()));
|
||||
connect(ui->pushButtonLookTableSelect, SIGNAL(clicked()), this, SLOT(onpushButtonLookTableSelect_clicked()));
|
||||
connect(ui->pushButtonL1AEchoDataSelect, SIGNAL(clicked()), this, SLOT(onpushButtonL1AEchoDataSelect_clicked()));
|
||||
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(onbuttonBox_accepted()));
|
||||
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(onbuttonBox_rejected()));
|
||||
|
||||
}
|
||||
|
||||
QSARSimulationComplexEchoDataDialog::~QSARSimulationComplexEchoDataDialog()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
void QSARSimulationComplexEchoDataDialog::onpushButtonEchoDataSelect_clicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getOpenFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择地距数据文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器
|
||||
);
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = "选择的文件有:\n";
|
||||
this->ui->lineEditEchoDataPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void QSARSimulationComplexEchoDataDialog::onpushButtonLookTableSelect_clicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getOpenFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择查找表回波数据文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器
|
||||
);
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = "选择的文件有:\n";
|
||||
this->ui->lineEditLookTablePath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void QSARSimulationComplexEchoDataDialog::onpushButtonL1AEchoDataSelect_clicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getSaveFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择斜距数据文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器
|
||||
);
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = "选择的文件有:\n";
|
||||
this->ui->lineEditL1AEchoDataPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void QSARSimulationComplexEchoDataDialog::onbuttonBox_accepted()
|
||||
{
|
||||
QString echoDataPath = this->ui->lineEditEchoDataPath->text().trimmed();
|
||||
QString RangelookTablePath = this->ui->lineEditLookTablePath->text().trimmed();
|
||||
QString l1AEchoDataPath = this->ui->lineEditL1AEchoDataPath->text().trimmed();
|
||||
|
||||
if (isExists(echoDataPath) && isExists(RangelookTablePath)) {
|
||||
gdalImage echoData(echoDataPath);
|
||||
gdalImage RangelookTable(RangelookTablePath);
|
||||
if (echoData.getDataType() == GDT_CFloat32
|
||||
||echoData.getDataType()==GDT_CFloat64
|
||||
|| echoData.getDataType() == GDT_CInt16
|
||||
|| echoData.getDataType()==GDT_CInt32
|
||||
) {
|
||||
|
||||
CreategdalImageComplex(l1AEchoDataPath, RangelookTable.height, RangelookTable.width,1, RangelookTable.gt, RangelookTable.projection, true, true);
|
||||
|
||||
|
||||
ResampleEChoDataFromGeoEcho(echoDataPath, RangelookTablePath, l1AEchoDataPath);
|
||||
}
|
||||
else {
|
||||
CreategdalImage(l1AEchoDataPath, RangelookTable.height, RangelookTable.width, 1, RangelookTable.gt, RangelookTable.projection, true, true);
|
||||
ResampleRangeDataFromGeoImage(echoDataPath, RangelookTablePath, l1AEchoDataPath);
|
||||
}
|
||||
|
||||
QMessageBox::information(this, tr(u8"提示"), tr(u8"完成"));
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"提示"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void QSARSimulationComplexEchoDataDialog::onbuttonBox_rejected()
|
||||
{
|
||||
this->close();
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class QSARSimulationComplexEchoDataDialogClass;
|
||||
}
|
||||
|
||||
class QSARSimulationComplexEchoDataDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QSARSimulationComplexEchoDataDialog(QWidget *parent = nullptr);
|
||||
~QSARSimulationComplexEchoDataDialog();
|
||||
|
||||
|
||||
public slots:
|
||||
void onpushButtonEchoDataSelect_clicked();
|
||||
void onpushButtonLookTableSelect_clicked();
|
||||
void onpushButtonL1AEchoDataSelect_clicked();
|
||||
void onbuttonBox_accepted();
|
||||
void onbuttonBox_rejected();
|
||||
private:
|
||||
Ui::QSARSimulationComplexEchoDataDialogClass* ui;
|
||||
};
|
|
@ -0,0 +1,149 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QSARSimulationComplexEchoDataDialogClass</class>
|
||||
<widget class="QDialog" name="QSARSimulationComplexEchoDataDialogClass">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>916</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>QSARSimulationComplexEchoDataDialog</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" 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="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEditEchoDataPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="pushButtonEchoDataSelect">
|
||||
<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">
|
||||
<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="lineEditLookTablePath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="pushButtonLookTableSelect">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" 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="2" column="1">
|
||||
<widget class="QLineEdit" name="lineEditL1AEchoDataPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QPushButton" name="pushButtonL1AEchoDataSelect">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="3">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -0,0 +1,193 @@
|
|||
#include "QSimulationBPImageMultiProduction.h"
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
#include "TBPImageAlgCls.h"
|
||||
#include "EchoDataFormat.h"
|
||||
#include <boost/thread.hpp>
|
||||
#include <thread>
|
||||
#include "ui_QSimulationBPImageMultiProduction.h"
|
||||
#include "ImageNetOperator.h"
|
||||
|
||||
QSimulationBPImageMultiProduction::QSimulationBPImageMultiProduction(QWidget *parent)
|
||||
: QDialog(parent),ui(new Ui::QSimulationBPImageMultiProductionClass)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
QObject::connect(ui->pushButtonEchoSelect, SIGNAL(clicked()), this, SLOT(onpushButtonEchoSelectClicked()));
|
||||
QObject::connect(ui->LookTableBtn, SIGNAL(clicked()), this, SLOT(onpushButtonLookTableBtnClicked()));
|
||||
QObject::connect(ui->GridNetBtn, SIGNAL(clicked()), this, SLOT(onpushButtonGridNetBtnSelectClicked()));
|
||||
QObject::connect(ui->L1ASelectBtn, SIGNAL(clicked()), this, SLOT(onpushButtonL1ASelectBtnClicked()));
|
||||
QObject::connect(ui->L2SelectSelect, SIGNAL(clicked()), this, SLOT(onpushButtonL2SelectSelectClicked()));
|
||||
QObject::connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(onbtnaccepted()));
|
||||
QObject::connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(onbtnrejected()));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
QSimulationBPImageMultiProduction::~QSimulationBPImageMultiProduction()
|
||||
{}
|
||||
|
||||
void QSimulationBPImageMultiProduction::onpushButtonEchoSelectClicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getOpenFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择影像文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(u8"xml Files (*.xml);;All Files (*)") // 文件过滤器
|
||||
);
|
||||
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = "选择的文件有:\n";
|
||||
this->ui->lineEditEchoPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void QSimulationBPImageMultiProduction::onpushButtonLookTableBtnClicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getOpenFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择查找表文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(u8"All Files(*)") // 文件过滤器
|
||||
);
|
||||
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
this->ui->lineEditLookTablePath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void QSimulationBPImageMultiProduction::onpushButtonGridNetBtnSelectClicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getOpenFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择成像网格文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(u8"All Files(*)") // 文件过滤器
|
||||
);
|
||||
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
this->ui->lineEditImageNetPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void QSimulationBPImageMultiProduction::onpushButtonL1ASelectBtnClicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getSaveFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择影像文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(u8"All Files(*)") // 文件过滤器
|
||||
);
|
||||
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
this->ui->lineEditL1AProductionPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void QSimulationBPImageMultiProduction::onpushButtonL2SelectSelectClicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getSaveFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择影像文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(u8"All Files(*)") // 文件过滤器
|
||||
);
|
||||
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
this->ui->lineEditL2ProductionPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void QSimulationBPImageMultiProduction::onbtnaccepted()
|
||||
{
|
||||
QString L1ADataPath = this->ui->lineEditL1AProductionPath->text().trimmed();
|
||||
QString L2DataPath = this->ui->lineEditL2ProductionPath->text().trimmed();
|
||||
QString looktablePath = this->ui->lineEditLookTablePath->text().trimmed();
|
||||
QString imgNetPath = this->ui->lineEditImageNetPath->text().trimmed();
|
||||
QString echoDataPath = this->ui->lineEditEchoPath->text().trimmed();
|
||||
|
||||
this->hide();
|
||||
QString echofile = echoDataPath;
|
||||
QString outImageFolder = getParantFromPath(L2DataPath);
|
||||
QString imagename = getFileNameFromPath(L2DataPath);
|
||||
std::shared_ptr<EchoL0Dataset> echoL0ds(new EchoL0Dataset);
|
||||
echoL0ds->Open(echofile);
|
||||
|
||||
std::shared_ptr< SARSimulationImageL1Dataset> imagL1(new SARSimulationImageL1Dataset);
|
||||
imagL1->setCenterAngle(echoL0ds->getCenterAngle());
|
||||
imagL1->setCenterFreq(echoL0ds->getCenterFreq());
|
||||
imagL1->setNearRange(echoL0ds->getNearRange());
|
||||
imagL1->setRefRange((echoL0ds->getNearRange() + echoL0ds->getFarRange()) / 2);
|
||||
imagL1->setFarRange(echoL0ds->getFarRange());
|
||||
imagL1->setFs(echoL0ds->getFs());
|
||||
imagL1->setLookSide(echoL0ds->getLookSide());
|
||||
|
||||
gdalImage imgxyzimg(imgNetPath);
|
||||
imagL1->OpenOrNew(outImageFolder, imagename, imgxyzimg.height, imgxyzimg.width);
|
||||
|
||||
qDebug() << u8"成像中";
|
||||
TBPImageAlgCls TBPimag;
|
||||
TBPimag.setEchoL0(echoL0ds);
|
||||
TBPimag.setImageL1(imagL1);
|
||||
long cpucore_num = std::thread::hardware_concurrency();
|
||||
TBPimag.setGPU(true);
|
||||
TBPimag.ProcessWithGridNet(cpucore_num, imgNetPath);
|
||||
qDebug() << u8"系统几何校正中";
|
||||
|
||||
// 处理成像映射
|
||||
std::shared_ptr< SARSimulationImageL1Dataset> imagL2(new SARSimulationImageL1Dataset);
|
||||
imagL2->setCenterAngle(echoL0ds->getCenterAngle());
|
||||
imagL2->setCenterFreq(echoL0ds->getCenterFreq());
|
||||
imagL2->setNearRange(echoL0ds->getNearRange());
|
||||
imagL2->setRefRange((echoL0ds->getNearRange() + echoL0ds->getFarRange()) / 2);
|
||||
imagL2->setFarRange(echoL0ds->getFarRange());
|
||||
imagL2->setFs(echoL0ds->getFs());
|
||||
imagL2->setLookSide(echoL0ds->getLookSide());
|
||||
|
||||
|
||||
QString outL1AImageFolder = getParantFromPath(L1ADataPath);
|
||||
QString L1Aimagename = getFileNameFromPath(L1ADataPath);
|
||||
|
||||
gdalImage Looktableimg(looktablePath);
|
||||
imagL2->OpenOrNew(outL1AImageFolder, L1Aimagename, Looktableimg.height, Looktableimg.width);
|
||||
|
||||
QString L1AEchoDataPath =imagL2->getImageRasterPath();
|
||||
|
||||
ResampleEChoDataFromGeoEcho(imagL1->getImageRasterPath(), looktablePath, L1AEchoDataPath);
|
||||
|
||||
|
||||
this->show();
|
||||
|
||||
QMessageBox::information(this,u8"成像",u8"成像结束");
|
||||
|
||||
}
|
||||
|
||||
void QSimulationBPImageMultiProduction::onbtnrejected()
|
||||
{
|
||||
this->close();
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
#pragma once
|
||||
#include "simulationsartool_global.h"
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class QSimulationBPImageMultiProductionClass;
|
||||
}
|
||||
|
||||
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT QSimulationBPImageMultiProduction : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QSimulationBPImageMultiProduction(QWidget *parent = nullptr);
|
||||
~QSimulationBPImageMultiProduction();
|
||||
|
||||
|
||||
public slots:
|
||||
void onpushButtonEchoSelectClicked();
|
||||
void onpushButtonLookTableBtnClicked();
|
||||
void onpushButtonGridNetBtnSelectClicked();
|
||||
void onpushButtonL1ASelectBtnClicked();
|
||||
void onpushButtonL2SelectSelectClicked();
|
||||
void onbtnaccepted();
|
||||
void onbtnrejected();
|
||||
|
||||
|
||||
private:
|
||||
Ui::QSimulationBPImageMultiProductionClass* ui;
|
||||
};
|
|
@ -0,0 +1,303 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QSimulationBPImageMultiProductionClass</class>
|
||||
<widget class="QDialog" name="QSimulationBPImageMultiProductionClass">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>813</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>仿真图像TimeBP方法</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>回波地址: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEditEchoPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/FZSimulation/LTDQ/Input/xml/xml/165665/echodata/LT1B_DQ_165665_Simulation.xml</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonEchoSelect">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_3">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>成像区域网格:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEditImageNetPath">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/FZSimulation/LTDQ/Input/xml/xml/165665/InSARImageXYZ/LT1A_165665_InSAR_ImageXYZ_looktable.bin</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="GridNetBtn">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_4">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>查找表: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEditLookTablePath">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/FZSimulation/LTDQ/Input/DEM1/looktable165665/LT1A_65665_looktable_Range.bin</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="LookTableBtn">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_5">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>1级产品: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEditL1AProductionPath">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/FZSimulation/LTDQ/Input/xml/xml/165665/TBPImageProduction/L1/LT1A_165665_L1A</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="L1ASelectBtn">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_2">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>2级产品: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEditL2ProductionPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/FZSimulation/LTDQ/Input/xml/xml/165665/TBPImageProduction/L2/LT1A_165665_L2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="L2SelectSelect">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -56,7 +56,7 @@ __global__ void fftshiftKernel(cufftComplex* data, int Nfft, int Np) {
|
|||
__global__ void processPulseKernel(
|
||||
long prfid,
|
||||
int nx, int ny,
|
||||
const double* x_mat, const double* y_mat, const double* z_mat,
|
||||
const double* x_mat, const double* y_mat, const double* z_mat,const double* R_mat,
|
||||
double AntX, double AntY, double AntZ,
|
||||
double R0, double minF,
|
||||
const cufftComplex* rc_pulse,
|
||||
|
@ -65,22 +65,24 @@ __global__ void processPulseKernel(
|
|||
) {
|
||||
//
|
||||
|
||||
long long idx = blockIdx.x * blockDim.x + threadIdx.x;
|
||||
long long pixelcount = nx * ny;
|
||||
if (idx >= pixelcount) return;
|
||||
int64_t idx = int64_t(blockIdx.x) * int64_t(blockDim.x) + int64_t(threadIdx.x);
|
||||
int64_t pixelcount = int64_t(nx) * int64_t(ny);
|
||||
if (idx >= pixelcount) { return; }
|
||||
|
||||
//printf("processPulseKernel start!!\n");
|
||||
|
||||
//if (x >= nx || y >= ny) return;
|
||||
//int idx = x * ny + y;
|
||||
|
||||
|
||||
|
||||
double dx = AntX - x_mat[idx];
|
||||
double dy = AntY - y_mat[idx];
|
||||
double dz = AntZ - z_mat[idx];
|
||||
double initR = R_mat[idx];
|
||||
|
||||
//printf("processPulseKernel xmat !!\n");
|
||||
double R = sqrt(dx * dx + dy * dy + dz * dz);
|
||||
double ampcorrect = (powf(4 * LAMP_CUDA_PI, 2) * powf(R, 4));
|
||||
double dR = R - R0;
|
||||
|
||||
if (dR < r_start || dR >= (r_start + dr * (nR - 1))) return;
|
||||
|
@ -98,7 +100,7 @@ __global__ void processPulseKernel(
|
|||
rc_interp.y = rc_low.y * (1 - weight) + rc_high.y * weight;
|
||||
|
||||
// Phase correction
|
||||
double phase = 4 * PI * minF / c * dR;
|
||||
double phase = 4 * PI * minF / c * (dR- initR); // ²¹³äµ±Ç°µãµÄ²Î¿¼¾àÀë
|
||||
double cos_phase = cos(phase);
|
||||
double sin_phase = sin(phase);
|
||||
|
||||
|
@ -106,9 +108,15 @@ __global__ void processPulseKernel(
|
|||
phCorr.x = rc_interp.x * cos_phase - rc_interp.y * sin_phase;
|
||||
phCorr.y = rc_interp.x * sin_phase + rc_interp.y * cos_phase;
|
||||
|
||||
// amp correction
|
||||
//phCorr.x = ampcorrect * phCorr.x;
|
||||
//phCorr.y = ampcorrect * phCorr.y;
|
||||
|
||||
// Accumulate
|
||||
im_final[idx].x += phCorr.x;
|
||||
im_final[idx].y += phCorr.y;
|
||||
|
||||
|
||||
//printf("r_start=%e;dr=%e;nR=%d\n", r_start, dr, nR);
|
||||
//if (abs(phCorr.x) > 1e-100 || abs(phCorr.y > 1e-100)) {
|
||||
//printf(
|
||||
|
@ -161,13 +169,12 @@ void bpBasic0CUDA(GPUDATA& data, int flag,double* h_R) {
|
|||
printfinfo("fft finished!!\n");
|
||||
// ͼÏñÖØ½¨
|
||||
|
||||
|
||||
|
||||
double r_start = data.r_vec[0];
|
||||
double dr = (data.r_vec[data.Nfft - 1] - r_start) / (data.Nfft - 1);
|
||||
printfinfo("dr = %f\n",dr);
|
||||
long pixelcount = data.nx* data.ny;
|
||||
long grid_size = (pixelcount + BLOCK_SIZE - 1) / BLOCK_SIZE;
|
||||
int64_t pixelcount = int64_t(data.nx)* int64_t(data.ny);
|
||||
int64_t grid_size = (pixelcount + BLOCK_SIZE - 1) / BLOCK_SIZE;
|
||||
printfinfo("grid finished!!\n");
|
||||
|
||||
//double* d_R = (double*)mallocCUDADevice(sizeof(double) * data.nx * data.ny);
|
||||
|
@ -177,7 +184,7 @@ void bpBasic0CUDA(GPUDATA& data, int flag,double* h_R) {
|
|||
processPulseKernel << <grid_size, BLOCK_SIZE >> > (
|
||||
ii,
|
||||
data.nx, data.ny,
|
||||
data.x_mat, data.y_mat, data.z_mat,
|
||||
data.x_mat, data.y_mat, data.z_mat,data.R_mat,
|
||||
data.AntX[ii], data.AntY[ii], data.AntZ[ii],
|
||||
data.R0, data.minF[ii],
|
||||
data.phdata,
|
||||
|
@ -206,6 +213,7 @@ void initGPUData(GPUDATA& h_data, GPUDATA& d_data) {
|
|||
d_data.x_mat = (double*)mallocCUDADevice(sizeof(double) * h_data.nx * h_data.ny);
|
||||
d_data.y_mat = (double*)mallocCUDADevice(sizeof(double) * h_data.nx * h_data.ny);
|
||||
d_data.z_mat = (double*)mallocCUDADevice(sizeof(double) * h_data.nx * h_data.ny);
|
||||
d_data.R_mat = (double*)mallocCUDADevice(sizeof(double) * h_data.nx * h_data.ny);
|
||||
d_data.r_vec = h_data.r_vec;// (double*)mallocCUDADevice(sizeof(double) * h_data.Nfft);
|
||||
d_data.Freq = (double*)mallocCUDADevice(sizeof(double) * h_data.Nfft);
|
||||
d_data.phdata = (cuComplex*)mallocCUDADevice(sizeof(cuComplex) * h_data.Nfft * h_data.Np);
|
||||
|
@ -218,6 +226,7 @@ void initGPUData(GPUDATA& h_data, GPUDATA& d_data) {
|
|||
HostToDevice(h_data.x_mat, d_data.x_mat,sizeof(double) * h_data.nx * h_data.ny); printf("image X Copy finished!!!\n");
|
||||
HostToDevice(h_data.y_mat, d_data.y_mat,sizeof(double) * h_data.nx * h_data.ny); printf("image Y Copy finished!!!\n");
|
||||
HostToDevice(h_data.z_mat, d_data.z_mat, sizeof(double) * h_data.nx * h_data.ny); printf("image Z Copy finished!!!\n");
|
||||
HostToDevice(h_data.R_mat, d_data.R_mat, sizeof(double) * h_data.nx * h_data.ny); printf("image R Copy finished!!!\n");
|
||||
HostToDevice(h_data.Freq, d_data.Freq, sizeof(double) * h_data.Nfft);
|
||||
//HostToDevice(h_data.r_vec, d_data.r_vec, sizeof(double) * h_data.Nfft);
|
||||
HostToDevice(h_data.phdata, d_data.phdata, sizeof(cuComplex) * h_data.Nfft * h_data.Np); printf("image echo Copy finished!!!\n");
|
||||
|
@ -242,6 +251,7 @@ void freeGPUData(GPUDATA& d_data) {
|
|||
FreeCUDADevice((d_data.x_mat));
|
||||
FreeCUDADevice((d_data.y_mat));
|
||||
FreeCUDADevice((d_data.z_mat));
|
||||
FreeCUDADevice((d_data.R_mat));
|
||||
//FreeCUDADevice((d_data.r_vec));
|
||||
FreeCUDADevice((d_data.Freq));
|
||||
FreeCUDADevice((d_data.phdata));
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
struct GPUDATA {
|
||||
long Nfft, K, Np, nx, ny; // 傅里叶点数、频点数、脉冲数、图像列、图像行
|
||||
double* AntX, * AntY, * AntZ, * minF; // 天线坐标、起始频率
|
||||
double* x_mat, * y_mat, * z_mat;// 華醱釴梓
|
||||
double* x_mat, * y_mat, * z_mat,*R_mat;// 華醱釴梓
|
||||
double* r_vec; // 坐标范围
|
||||
double* Freq;// 频率
|
||||
cuComplex* phdata;// 回波
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
#ifndef __GPUBPTOOL_CUH___
|
||||
#define __GPUBPTOOL_CUH___
|
||||
|
||||
|
||||
#include "BaseConstVariable.h"
|
||||
#include "GPUTool.cuh"
|
||||
#include <cuda_runtime.h>
|
||||
|
@ -7,7 +11,6 @@
|
|||
#include "GPUTool.cuh"
|
||||
|
||||
|
||||
|
||||
extern __device__ double angleBetweenVectors(Vector3 a, Vector3 b, bool returnDegrees = false);
|
||||
extern __device__ Vector3 vec_sub(Vector3 a, Vector3 b);
|
||||
extern __device__ double vec_dot(Vector3 a, Vector3 b);
|
||||
|
@ -21,3 +24,5 @@ extern __device__ double angleBetweenVectors_single(Vector3_single a, Vector3_s
|
|||
extern __device__ Vector3_single vec_sub_single(Vector3_single a, Vector3_single b);
|
||||
extern __device__ float vec_dot_single(Vector3_single a, Vector3_single b);
|
||||
extern __device__ Vector3_single vec_cross_single(Vector3_single a, Vector3_single b);
|
||||
|
||||
#endif
|
|
@ -487,16 +487,17 @@ __global__ void Kernel_Computer_R_amp_NoAntPattern(
|
|||
double Pt,
|
||||
double refPhaseRange,
|
||||
double NearR, double FarR,
|
||||
double maxGain,double GainWeight,
|
||||
double* d_temp_R, double* d_temp_amps// 计算输出
|
||||
double maxGain, double GainWeight,
|
||||
float* d_temp_R, float* d_temp_amps// 计算输出
|
||||
) {
|
||||
long long idx = blockIdx.x * blockDim.x + threadIdx.x; // 获取当前的线程编码
|
||||
long long prfId = idx / SHAREMEMORY_FLOAT_HALF;
|
||||
long long posId = idx % SHAREMEMORY_FLOAT_HALF + startPosId; // 当前线程对应的影像点
|
||||
|
||||
//if (prfId > 20000) {
|
||||
// printf("prfid %d,PRFCount : %d\n", prfId, PRFCount);
|
||||
//}
|
||||
int tid = threadIdx.x;
|
||||
int bid = blockIdx.x;
|
||||
int dmx = blockDim.x;
|
||||
int idx = bid*dmx+tid; // 获取当前的线程编码
|
||||
int prfId = idx / SHAREMEMORY_FLOAT_HALF;
|
||||
int posId = idx % SHAREMEMORY_FLOAT_HALF + startPosId; // 当前线程对应的影像点
|
||||
//d_temp_R[idx] = pixelcount;
|
||||
//d_temp_amps[idx] = posId;
|
||||
|
||||
if (prfId < PRFCount && posId < pixelcount) {
|
||||
SateState antp = antlist[prfId];
|
||||
|
@ -506,8 +507,6 @@ __global__ void Kernel_Computer_R_amp_NoAntPattern(
|
|||
double RstZ = antp.Pz - gp.Tz;
|
||||
double RstR = sqrt(RstX * RstX + RstY * RstY + RstZ * RstZ); // 矢量距离
|
||||
|
||||
|
||||
|
||||
if (RstR<NearR || RstR>FarR) {
|
||||
d_temp_R[idx] = 0;
|
||||
d_temp_amps[idx] = 0;
|
||||
|
@ -525,8 +524,8 @@ __global__ void Kernel_Computer_R_amp_NoAntPattern(
|
|||
|
||||
float slopR = sqrtf(slopeX * slopeX + slopeY * slopeY + slopeZ * slopeZ); //
|
||||
if (slopR > 1e-3) {
|
||||
|
||||
float localangle = acosf((RstX * slopeX + RstY * slopeY + RstZ * slopeZ) / ( slopR));
|
||||
float dotAB = RstX * slopeX + RstY * slopeY + RstZ * slopeZ;
|
||||
float localangle = acosf(dotAB / (slopR));
|
||||
|
||||
if (localangle < 0 || localangle >= LAMP_CUDA_PI / 2 || isnan(localangle)) {
|
||||
d_temp_R[idx] = 0;
|
||||
|
@ -538,95 +537,111 @@ __global__ void Kernel_Computer_R_amp_NoAntPattern(
|
|||
|
||||
// 计算斜距衰减
|
||||
|
||||
float antDirectR = sqrtf(antp.antDirectX * antp.antDirectX
|
||||
+ antp.antDirectY * antp.antDirectY
|
||||
+ antp.antDirectZ * antp.antDirectZ);
|
||||
//float antDirectR = sqrtf(antp.antDirectX * antp.antDirectX
|
||||
// + antp.antDirectY * antp.antDirectY
|
||||
// + antp.antDirectZ * antp.antDirectZ);
|
||||
|
||||
float diectAngle = -1*(RstX*antp.antDirectX+
|
||||
RstY*antp.antDirectY+
|
||||
RstZ*antp.antDirectZ) / (antDirectR );
|
||||
//float diectAngle = -1 * (RstX * antp.antDirectX +
|
||||
// RstY * antp.antDirectY +
|
||||
// RstZ * antp.antDirectZ) / (antDirectR);
|
||||
|
||||
diectAngle = acosf(diectAngle);// 弧度制
|
||||
diectAngle = diectAngle * GainWeight;
|
||||
//diectAngle = acosf(diectAngle);// 弧度制
|
||||
//diectAngle = diectAngle * GainWeight;
|
||||
|
||||
float ampGain = 1;
|
||||
ampGain=2 * maxGain * (1 - (powf(diectAngle,2) / 6)
|
||||
+ (powf(diectAngle, 4) / 120)
|
||||
- (powf(diectAngle, 6) / 5040)); //dB
|
||||
|
||||
ampGain = powf(10.0, ampGain / 10.0);
|
||||
//ampGain = 2 * maxGain * (1 - (powf(diectAngle, 2) / 6)
|
||||
// + (powf(diectAngle, 4) / 120)
|
||||
// - (powf(diectAngle, 6) / 5040)); //dB
|
||||
|
||||
//ampGain = powf(10.0, ampGain / 10.0);
|
||||
|
||||
ampGain = ampGain / (PI4POW2 * powf(RstR, 4)); // 反射强度
|
||||
float sigma = GPU_getSigma0dB(sigma0Params, localangle);
|
||||
sigma = powf(10.0, sigma / 10.0);
|
||||
|
||||
double temp_amp = double(ampGain * Pt * sigma);
|
||||
double temp_R = double(RstR - refPhaseRange);
|
||||
|
||||
bool isNan = !(isnan(temp_amp) || isnan(temp_R) || isinf(temp_amp) || isinf(temp_R));
|
||||
|
||||
d_temp_amps[idx] = temp_amp * isNan;
|
||||
d_temp_R[idx] = temp_R * isNan;
|
||||
|
||||
return;
|
||||
float temp_amp = float(ampGain * Pt * sigma);
|
||||
double temp_R = RstR - refPhaseRange;
|
||||
if (isnan(temp_amp) || isnan(temp_R) || isinf(temp_amp) || isinf(temp_R)) {
|
||||
d_temp_R[idx] = 0;
|
||||
d_temp_amps[idx] = 0;
|
||||
return;
|
||||
}
|
||||
else {
|
||||
d_temp_amps[idx] = temp_amp;
|
||||
d_temp_R[idx] =static_cast<float>(temp_R);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
d_temp_R[idx] = 0;
|
||||
d_temp_amps[idx] =0;
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
__global__ void CUDA_Kernel_Computer_echo_NoAntPattern_Optimized(
|
||||
double* d_temp_R, double* d_temp_amps, long posNum,
|
||||
__global__ void CUDA_Kernel_Computer_echo_NoAntPattern(
|
||||
float* d_temp_R, float* d_temp_amps,
|
||||
double f0, double dfreq,
|
||||
long FreqPoints, // 当前频率的分块
|
||||
long maxfreqnum, // 最大脉冲值
|
||||
long maxfreqnum, long nextfreqNum,// 最大脉冲值
|
||||
cuComplex* echodata,
|
||||
long temp_PRF_Count
|
||||
) {
|
||||
// 使用动态共享内存,根据线程块大小调整
|
||||
extern __shared__ double s_data[];
|
||||
double* s_R = s_data;
|
||||
double* s_amp = s_data + blockDim.x;
|
||||
__shared__ float s_R[SHAREMEMORY_FLOAT_HALF]; // 注意一个完整的block_size 共享相同内存
|
||||
__shared__ float s_amp[SHAREMEMORY_FLOAT_HALF];
|
||||
|
||||
const int tid = threadIdx.x;
|
||||
const int prfId = blockIdx.x;
|
||||
const int fId = tid; // 每个线程处理一个频率点
|
||||
long tid = threadIdx.x;
|
||||
long bid = blockIdx.x;
|
||||
long idx = bid * blockDim.x + tid;
|
||||
long prfId = idx / nextfreqNum; // 脉冲ID
|
||||
long fId = idx % nextfreqNum;//频率ID
|
||||
|
||||
double factorjTemp = RFPCPIDIVLIGHT * (f0 + fId * dfreq);
|
||||
cuComplex echo = make_cuComplex(0.0f, 0.0f);
|
||||
long psid = 0;
|
||||
long pixelId = 0;
|
||||
for (long ii = 0; ii < SHAREMEMORY_FLOAT_HALF_STEP; ii++) { // SHAREMEMORY_FLOAT_HALF_STEP * BLOCK_SIZE=SHAREMEMORY_FLOAT_HALF
|
||||
psid = ii * BLOCK_SIZE + tid;
|
||||
pixelId = prfId * SHAREMEMORY_FLOAT_HALF + psid;
|
||||
s_R[psid] = d_temp_R[pixelId];
|
||||
s_amp[psid] = d_temp_amps[pixelId];
|
||||
|
||||
// 分块加载数据并计算
|
||||
for (int block_offset = 0; block_offset < posNum; block_offset += blockDim.x) {
|
||||
int psid = block_offset + tid;
|
||||
int pixelId = prfId * posNum + psid;
|
||||
|
||||
// 加载当前块到共享内存
|
||||
if (psid < posNum) {
|
||||
s_R[tid] = static_cast<double>(d_temp_R[pixelId]);
|
||||
s_amp[tid] = static_cast<double>(d_temp_amps[pixelId]);
|
||||
}
|
||||
else {
|
||||
s_R[tid] = 0.0f;
|
||||
s_amp[tid] = 0.0f;
|
||||
}
|
||||
__syncthreads();
|
||||
|
||||
// 计算当前块的贡献
|
||||
for (int dataid = 0; dataid < blockDim.x; ++dataid) {
|
||||
float temp_phi =fmod( s_R[dataid] * factorjTemp,2*PI);
|
||||
float temp_amp = s_amp[dataid];
|
||||
float sin_phi, cos_phi;
|
||||
sincosf(temp_phi, &sin_phi, &cos_phi);
|
||||
echo.x += temp_amp * cos_phi;
|
||||
echo.y += temp_amp * sin_phi;
|
||||
}
|
||||
__syncthreads();
|
||||
}
|
||||
|
||||
// 只处理有效的频率点和PRF
|
||||
if (prfId < temp_PRF_Count && fId < FreqPoints && fId < maxfreqnum) {
|
||||
const int echo_ID = prfId * maxfreqnum + fId;
|
||||
atomicAdd(&echodata[echo_ID].x, echo.x);
|
||||
atomicAdd(&echodata[echo_ID].y, echo.y);
|
||||
__syncthreads(); // 确定所有待处理数据都已经进入程序中
|
||||
|
||||
|
||||
|
||||
|
||||
if (fId < maxfreqnum && prfId < temp_PRF_Count) {
|
||||
|
||||
long echo_ID = prfId * maxfreqnum + fId; // 计算对应的回波位置
|
||||
double factorjTemp = RFPCPIDIVLIGHT * (f0 + fId * dfreq);
|
||||
cuComplex echo = make_cuComplex(0, 0);
|
||||
|
||||
for (long dataid = 0; dataid < SHAREMEMORY_FLOAT_HALF; dataid++) {
|
||||
|
||||
float temp_real = 0;
|
||||
float temp_imag = 0;
|
||||
double R = s_R[dataid];
|
||||
float temp_phi = fmod(R * factorjTemp, 2 * PI);
|
||||
float temp_amp = s_amp[dataid];
|
||||
sincosf(temp_phi, &temp_imag, &temp_real);
|
||||
echo.x = echo.x + (temp_amp * temp_real);
|
||||
echo.y = echo.y + (temp_amp * temp_imag);
|
||||
//if (dataid > 5000) {
|
||||
// printf("echo_ID=%d; dataid=%d;ehodata=(%f,%f);R=%f;amp=%f;\n", echo_ID, dataid, temp_real, temp_imag, s_R[0], s_amp[0]);
|
||||
//}
|
||||
//if (isnan(temp_phi) || isnan(temp_amp) || isnan(echo.x) || isnan(echo.y)
|
||||
// || isinf(temp_phi) || isinf(temp_amp) || isinf(echo.x) || isinf(echo.y)
|
||||
// ) {
|
||||
// printf("[amp,phi,real,imag]=[%f,%f,%f,%f];\n", temp_amp, temp_phi, echo.x, echo.y);
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
echodata[echo_ID] = cuCaddf(echodata[echo_ID], echo);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -634,27 +649,28 @@ __global__ void CUDA_Kernel_Computer_echo_NoAntPattern_Optimized(
|
|||
|
||||
|
||||
/** 分块处理 ****************************************************************************************************************/
|
||||
extern "C" void ProcessRFPCTask(RFPCTask& task, long devid)
|
||||
extern "C" void ProcessRFPCTask(RFPCTask& task, long devid, float* h_R, float* h_amp)
|
||||
{
|
||||
size_t pixelcount = task.prfNum * task.freqNum;
|
||||
size_t grid_size = (pixelcount + BLOCK_SIZE - 1) / BLOCK_SIZE;
|
||||
printf("computer pixelcount goalnum gridsize blocksize prfnum %zu,%zu ,%zu,%d ,%d \n", pixelcount, task.targetnum, grid_size, BLOCK_SIZE,task.prfNum);
|
||||
printf("computer pixelcount goalnum gridsize blocksize prfnum %zu,%zu ,%zu,%d ,%d \n", pixelcount, task.targetnum, grid_size, BLOCK_SIZE, task.prfNum);
|
||||
printf("Dev:%d ,freqnum:%d , prfnum:%d ,Rref: %e ,Rnear : %e ,Rfar: %e , StartFreq: %e ,DeletFreq: %e \n",
|
||||
devid, task.freqNum, task.prfNum, task.Rref, task.Rnear, task.Rfar, task.startFreq, task.stepFreq);
|
||||
double* d_R = (double*)mallocCUDADevice(task.prfNum * SHAREMEMORY_FLOAT_HALF * sizeof(double), devid);
|
||||
double* d_amps = (double*)mallocCUDADevice(task.prfNum * SHAREMEMORY_FLOAT_HALF * sizeof(double), devid);
|
||||
float* d_R = (float*)mallocCUDADevice(task.prfNum * SHAREMEMORY_FLOAT_HALF * sizeof(float), devid);
|
||||
float* d_amps = (float*)mallocCUDADevice(task.prfNum * SHAREMEMORY_FLOAT_HALF * sizeof(float), devid);
|
||||
|
||||
|
||||
long BLOCK_FREQNUM = NextBlockPad(task.freqNum, BLOCK_SIZE); // 256*freqBlockID
|
||||
long cudaBlocknum = 0;
|
||||
long freqpoints = BLOCK_FREQNUM;
|
||||
|
||||
printf("freqpoints:%d\n", freqpoints);
|
||||
long freqpoints = BLOCK_SIZE;
|
||||
|
||||
printf("freqpoints:%d\n", task.freqNum);
|
||||
long prfcount = task.prfNum;
|
||||
long process = 0;
|
||||
for (long sTi = 0; sTi < task.targetnum; sTi = sTi + SHAREMEMORY_FLOAT_HALF) {
|
||||
|
||||
cudaBlocknum = (task.prfNum * SHAREMEMORY_FLOAT_HALF + BLOCK_SIZE - 1) / BLOCK_SIZE;
|
||||
Kernel_Computer_R_amp_NoAntPattern << <cudaBlocknum, BLOCK_SIZE >> >(
|
||||
Kernel_Computer_R_amp_NoAntPattern << <cudaBlocknum, BLOCK_SIZE >> > (
|
||||
task.antlist,
|
||||
prfcount,
|
||||
task.goallist,
|
||||
|
@ -664,39 +680,29 @@ extern "C" void ProcessRFPCTask(RFPCTask& task, long devid)
|
|||
task.Pt,
|
||||
task.Rref,
|
||||
task.Rnear, task.Rfar,
|
||||
task.maxGain,task.GainWeight,
|
||||
task.maxGain, task.GainWeight,
|
||||
d_R, d_amps// 计算输出
|
||||
);
|
||||
);
|
||||
PrintLasterError("CUDA_Kernel_Computer_R_amp");
|
||||
cudaDeviceSynchronize();
|
||||
|
||||
//DeviceToHost(h_R, d_R, task.prfNum * SHAREMEMORY_FLOAT_HALF * sizeof(float));
|
||||
//DeviceToHost(h_amp, d_amps, task.prfNum * SHAREMEMORY_FLOAT_HALF * sizeof(float));
|
||||
//break;
|
||||
|
||||
dim3 blocks(task.prfNum);
|
||||
dim3 threads(BLOCK_SIZE);
|
||||
|
||||
size_t shared_mem_size = 2 * BLOCK_SIZE * sizeof(double);
|
||||
|
||||
CUDA_Kernel_Computer_echo_NoAntPattern_Optimized << <blocks, threads, shared_mem_size >> > (
|
||||
d_R, d_amps, SHAREMEMORY_FLOAT_HALF,
|
||||
task.startFreq/1e9, task.stepFreq / 1e9,
|
||||
freqpoints, task.freqNum,
|
||||
task.d_echoData,
|
||||
task.prfNum
|
||||
);
|
||||
|
||||
//cudaBlocknum = (task.prfNum * BLOCK_FREQNUM + BLOCK_SIZE - 1) / BLOCK_SIZE;
|
||||
//CUDA_Kernel_Computer_echo_NoAntPattern << <cudaBlocknum, BLOCK_SIZE >> > (
|
||||
// d_R, d_amps, SHAREMEMORY_FLOAT_HALF,
|
||||
// task.startFreq/1e9, task.stepFreq / 1e9,
|
||||
// freqpoints, task.freqNum,
|
||||
// task.d_echoData,
|
||||
// task.prfNum
|
||||
// );
|
||||
cudaBlocknum = (task.prfNum * BLOCK_FREQNUM + BLOCK_SIZE- 1) / BLOCK_SIZE;
|
||||
CUDA_Kernel_Computer_echo_NoAntPattern << <cudaBlocknum, BLOCK_SIZE >> > (
|
||||
d_R, d_amps,
|
||||
task.startFreq / 1e9, task.stepFreq / 1e9,
|
||||
task.freqNum, BLOCK_FREQNUM,
|
||||
task.d_echoData,
|
||||
task.prfNum
|
||||
);
|
||||
PrintLasterError("CUDA_Kernel_Computer_echo");
|
||||
cudaDeviceSynchronize();
|
||||
if ((sTi * 100.0 / task.targetnum) - process >= 10) {
|
||||
if ((sTi * 100.0 / task.targetnum) - process >= 1) {
|
||||
process = sTi * 100.0 / task.targetnum;
|
||||
PRINT("device ID : %d , TargetID [%f]: %d / %d finished %d\n",devid, sTi * 100.0 / task.targetnum, sTi, task.targetnum,devid);
|
||||
PRINT("device ID : %d , TargetID [%f]: %d / %d finished %d\n", devid, sTi * 100.0 / task.targetnum, sTi, task.targetnum, devid);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -707,7 +713,7 @@ extern "C" void ProcessRFPCTask(RFPCTask& task, long devid)
|
|||
FreeCUDADevice(d_amps);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -16,11 +16,7 @@
|
|||
|
||||
|
||||
extern "C" struct SateState {
|
||||
double Px, Py, Pz, Vx, Vy, Vz;
|
||||
//double antXaxisX, antXaxisY, antXaxisZ;
|
||||
//double antYaxisX, antYaxisY, antYaxisZ;
|
||||
//double antZaxisX, antZaxisY, antZaxisZ;
|
||||
double antDirectX, antDirectY, antDirectZ;
|
||||
double Px, Py, Pz, Vx, Vy, Vz,antDirectX, antDirectY, antDirectZ;
|
||||
};
|
||||
|
||||
|
||||
|
@ -152,7 +148,7 @@ extern "C" void CUDA_RFPC_MainProcess(
|
|||
|
||||
|
||||
extern "C" double* hostSigmaData_toDevice(int devid);
|
||||
extern "C" void ProcessRFPCTask(RFPCTask& task,long devid);
|
||||
extern "C" void ProcessRFPCTask(RFPCTask& task,long devid,float* h_R,float* h_amp);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -24,152 +24,6 @@
|
|||
|
||||
|
||||
|
||||
__global__ void kernel_TimeBPImageGridNet(double* antPx, double* antPy, double* antPz,
|
||||
double* antDirx, double* antDiry, double* antDirz,
|
||||
double* imgx, double* imgy, double* imgz,
|
||||
long prfcount, long freqpoints, double meanH,
|
||||
double Rnear, double dx, double RefRange) {
|
||||
|
||||
long idx = blockIdx.x * blockDim.x + threadIdx.x;
|
||||
long pixelcount = prfcount * freqpoints;
|
||||
long prfid = idx / freqpoints;
|
||||
long Rid = idx % freqpoints;
|
||||
if (idx < pixelcount) {
|
||||
// 计算坐标
|
||||
Vector3 S = { antPx[prfid], antPy[prfid], antPz[prfid] }; // 卫星位置 (m)
|
||||
Vector3 ray = { antDirx[prfid], antDiry[prfid], antDirz[prfid] }; // 视线方向
|
||||
double H = meanH; // 平均高程
|
||||
double R = Rnear + dx * Rid; // 目标距离
|
||||
// 参数校验
|
||||
if (R <= 0 || H < -WGS84_A * 0.1 || H > WGS84_A * 0.1) {
|
||||
//printf("参数错误:\n H范围:±%.1f km\n R必须>0\n", WGS84_A * 0.1 / 1000);
|
||||
imgx[idx] = NAN;
|
||||
imgy[idx] = NAN;
|
||||
imgz[idx] = NAN;
|
||||
//printf("idx=%d;prfid=%d;Rid=%d;S=[%f , %f ,%f ];ray=[%f ,%f ,%f ];H=%f;R=%f,imgP=[%f ,%f , %f ];Rextend\n",
|
||||
// idx, prfid, Rid, S.x, S.y, S.z, ray.x, ray.y, ray.z, H, R,imgx[idx],imgy[idx],imgz[idx]);
|
||||
// 参数校验
|
||||
return;
|
||||
}
|
||||
|
||||
// Step 1: 计算交点T
|
||||
Vector3 T = compute_T(S, ray, H);
|
||||
if (isnan(T.x)) {
|
||||
imgx[idx] = NAN;
|
||||
imgy[idx] = NAN;
|
||||
imgz[idx] = NAN;
|
||||
//printf("idx=%d;prfid=%d;Rid=%d;Tnan\n",
|
||||
// idx, prfid, Rid, S.x, S.y, S.z, ray.x, ray.y, ray.z, H, R,T.x,T.y,T.z, imgx[idx], imgy[idx], imgz[idx]);
|
||||
return;
|
||||
}
|
||||
|
||||
// Step 2: 计算目标点P
|
||||
|
||||
Vector3 P;// = compute_P(S, T, R, H);
|
||||
{ // 计算P
|
||||
Vector3 ex, ey, ez; // 平面基函数
|
||||
Vector3 ST = vec_normalize(vec_sub(T, S));// S->T
|
||||
Vector3 SO = vec_normalize(vec_sub(Vector3{ 0, 0, 0 }, S)); // S->O
|
||||
|
||||
|
||||
Vector3 st1 = vec_sub(T, S);
|
||||
double R0 = sqrt(st1.x * st1.x + st1.y * st1.y + st1.z * st1.z);
|
||||
ez = vec_normalize(vec_cross(SO, ST)); // Z 轴
|
||||
ey = vec_normalize(vec_cross(ez, SO)); // Y 轴 与 ST 同向 --这个结论在星地几何约束,便是显然的;
|
||||
ex = vec_normalize(SO); //X轴
|
||||
|
||||
|
||||
|
||||
double h2 = (WGS84_A + H) * (WGS84_A + H);
|
||||
double b2 = WGS84_B * WGS84_B;
|
||||
double R2 = R * R;
|
||||
double A = R2 * ((ex.x * ex.x + ex.y * ex.y) / h2 + (ex.z * ex.z) / b2);
|
||||
double B = R2 * ((ex.x * ey.x + ex.y * ey.y) / h2 + (ex.z * ey.z) / b2) * 2;
|
||||
double C = R2 * ((ey.x * ey.x + ey.y * ey.y) / h2 + (ey.z * ey.z) / b2);
|
||||
double D = 1 - ((S.x * S.x + S.y * S.y) / h2 + (S.z * S.z) / b2);
|
||||
double E = 2*R * ((S.x * ex.x + S.y * ex.y) / h2 + (S.z * ex.z) / b2);
|
||||
double F = 2*R * ((S.x * ey.x + S.y * ey.y) / h2 + (S.z * ey.z) / b2);
|
||||
double Q0 = angleBetweenVectors(SO, ST, false);
|
||||
double dQ = 0;
|
||||
double fQ = 0;
|
||||
double dfQ = 0;
|
||||
double Q = R < R0 ? Q0 - 1e-3 : Q0 + 1e-3;
|
||||
|
||||
//printf("A=%f;B=%f;C=%f;D=%f;E=%f;F=%f;Q=%f;\
|
||||
// S=[%f , %f ,%f ];\
|
||||
// T=[%f , %f ,%f ];\
|
||||
// ex=[%f , %f ,%f ];\
|
||||
// ey=[%f , %f ,%f ];\
|
||||
// ez=[%f , %f ,%f ];\
|
||||
//ray=[%f ,%f ,%f ];\
|
||||
//H=%f;R=%f;;\n",A,B,C,D,E,F,Q,
|
||||
// S.x,S.y,S.z,
|
||||
// T.x,T.y,T.z ,
|
||||
// ex.x,ex.y,ex.z,
|
||||
// ey.x,ey.y,ey.z,
|
||||
// ez.x,ez.y,ez.z,
|
||||
// ray.x, ray.y, ray.z,
|
||||
// H, R);
|
||||
// return;
|
||||
|
||||
// 牛顿迭代法
|
||||
for (int iter = 0; iter < MAX_ITER * 10; ++iter) {
|
||||
fQ = A * cos(Q) * cos(Q) + B * sin(Q) * cos(Q) + C * sin(Q) * sin(Q) + E * cos(Q) + F * sin(Q) - D;
|
||||
dfQ = (C - A) * sin(2 * Q) + B * cos(2 * Q) - E * sin(Q) + F * cos(Q);
|
||||
dQ = fQ / dfQ;
|
||||
if (abs(dQ) < 1e-8) {
|
||||
//printf("iter=%d;check Q0=%f;Q=%f;dQ=%f;fQ=%f;dfQ=%f;break\n", iter, Q0, Q, dQ, fQ, dfQ);
|
||||
break;
|
||||
}
|
||||
else {
|
||||
dQ = (abs(dQ) < d2r * 3) ? dQ :( abs(dQ) / dQ * d2r* 3);
|
||||
Q = Q - dQ;
|
||||
//printf("iter=%d;check Q0=%f;Q=%f;dQ=%f;fQ=%f;dfQ=%f;\n", iter, Q0, Q, dQ, fQ, dfQ);
|
||||
}
|
||||
|
||||
}
|
||||
//printf("check Q0=%f;Q=%f;\n", Q0, Q);
|
||||
double t1 = R * cos(Q);
|
||||
double t2 = R * sin(Q);
|
||||
P = Vector3{
|
||||
S.x + t1 * ex.x + t2 * ey.x, //因为 t3=0;
|
||||
S.y + t1 * ex.y + t2 * ey.y,
|
||||
S.z + t1 * ex.z + t2 * ey.z,
|
||||
};
|
||||
double check = (P.x * P.x + P.y * P.y) / ((WGS84_A + H) * (WGS84_A + H))
|
||||
+ P.z * P.z / (WGS84_B * WGS84_B);
|
||||
if (isnan(Q) || isinf(Q) || fabs(check - 1.0) > 1e-6) {
|
||||
P = Vector3{ NAN,NAN,NAN };
|
||||
}
|
||||
}
|
||||
|
||||
double Rt = sqrt(pow(S.x - T.x, 2) + pow(S.y - T.y, 2) + pow(S.z - T.z, 2));
|
||||
double Rp = sqrt(pow(S.x - P.x, 2) + pow(S.y - P.y, 2) + pow(S.z - P.z, 2));
|
||||
double Rop = sqrt(pow( P.x, 2) + pow( P.y, 2) + pow( P.z, 2));
|
||||
|
||||
if (!isnan(P.x)&&( Rop>WGS84_A*0.3)&&(Rop<WGS84_A*3)) {
|
||||
|
||||
imgx[idx] = P.x;
|
||||
imgy[idx] = P.y;
|
||||
imgz[idx] = P.z;
|
||||
|
||||
//printf("idx=%d; S=[%f , %f ,%f ]; H=%f;R=%f;RP=%f;Rr=%f;imgT=[%f ,%f ,%f ];imgP=[%f ,%f , %f ]; \n",
|
||||
// idx, S.x, S.y, S.z, H, R, Rp, Rt,T.x, T.y, T.z, P.x, P.y, P.z);
|
||||
}
|
||||
else {
|
||||
imgx[idx] = NAN;
|
||||
imgy[idx] = NAN;
|
||||
imgz[idx] = NAN;
|
||||
printf("idx=%d; S=[%f , %f ,%f ]; H=%f;R=%f;RP=%f;Rr=%f;imgT=[%f ,%f ,%f ];imgP=[%f ,%f , %f ]; ERROR\n",
|
||||
idx, S.x, S.y, S.z, H, R, Rp, Rt, T.x, T.y, T.z, P.x, P.y, P.z);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
__device__ double computerR(double& Px, double& Py, double& Pz, double& Tx, double& Ty, double& Tz) {
|
||||
|
@ -402,25 +256,6 @@ __global__ void kernel_pixelTimeBP(
|
|||
|
||||
|
||||
extern "C" {
|
||||
void TIMEBPCreateImageGrid(double* antPx, double* antPy, double* antPz,
|
||||
double* antDirx, double* antDiry, double* antDirz,
|
||||
double* imgx, double* imgy, double* imgz,
|
||||
long prfcount, long freqpoints, double meanH,
|
||||
double Rnear, double dx, double RefRange
|
||||
)
|
||||
{
|
||||
long pixelcount = prfcount * freqpoints;
|
||||
int grid_size = (pixelcount + BLOCK_SIZE - 1) / BLOCK_SIZE;
|
||||
|
||||
kernel_TimeBPImageGridNet << <grid_size, BLOCK_SIZE >> > (
|
||||
antPx, antPy, antPz,
|
||||
antDirx, antDiry, antDirz,
|
||||
imgx, imgy, imgz,
|
||||
prfcount, freqpoints, meanH,
|
||||
Rnear, dx, RefRange);
|
||||
PrintLasterError("TIMEBPCreateImageGrid");
|
||||
cudaDeviceSynchronize();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -11,15 +11,6 @@
|
|||
|
||||
|
||||
|
||||
extern "C" void TIMEBPCreateImageGrid(
|
||||
double* antPx,double* antPy,double* antPz, // ÎÀÐÇ×ø±ê S
|
||||
double* antDirx,double* antDiry,double* antDirz, //
|
||||
double* imgx,double* imgy,double* imgz,
|
||||
long prfcount,long freqpoints,double meanH,
|
||||
double Rnear,double dx,double RefRange
|
||||
);
|
||||
|
||||
|
||||
|
||||
extern "C" void TimeBPImage(
|
||||
double* antPx, double* antPy, double* antPz,
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
#include "QEcoherentAndAdditive.h"
|
||||
#include "ui_QEcoherentAndAdditive.h"
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
|
||||
|
||||
QEcoherentAndAdditiveDialog::QEcoherentAndAdditiveDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
,ui(new Ui::QEcoherentAndAdditiveClass)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
QObject::connect(ui->pushButtonEchoDataAddSelect, SIGNAL(clicked()), this, SLOT(onpushButtonEchoDataAddSelectClicked()));
|
||||
QObject::connect(ui->pushButtonEchoDataSelect, SIGNAL(clicked()), this, SLOT(onpushButtonEchoDataSelectClicked()));
|
||||
QObject::connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(onaccepted()));
|
||||
QObject::connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(onrejected()));
|
||||
}
|
||||
|
||||
QEcoherentAndAdditiveDialog::~QEcoherentAndAdditiveDialog()
|
||||
{}
|
||||
|
||||
void QEcoherentAndAdditiveDialog::onpushButtonEchoDataAddSelectClicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getOpenFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择影像文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(u8"xml Files (*.xml);;All Files (*)") // 文件过滤器
|
||||
);
|
||||
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = "选择的文件有:\n";
|
||||
this->ui->lineEditEchoDataAddPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void QEcoherentAndAdditiveDialog::onpushButtonEchoDataSelectClicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getOpenFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择影像文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(u8"xml Files (*.xml);;All Files (*)") // 文件过滤器
|
||||
);
|
||||
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = "选择的文件有:\n";
|
||||
this->ui->lineEditEchoDataAdd2Path->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void QEcoherentAndAdditiveDialog::onaccepted()
|
||||
{
|
||||
QString echo1Path = this->ui->lineEditEchoDataAddPath->text();
|
||||
QString echo2Path = this->ui->lineEditEchoDataAdd2Path->text();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QMessageBox::information(this, tr(u8"提示"), tr(u8"完成"));
|
||||
}
|
||||
|
||||
void QEcoherentAndAdditiveDialog::onrejected()
|
||||
{
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
#pragma once
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QDialog>
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class QEcoherentAndAdditiveClass;
|
||||
}
|
||||
|
||||
class QEcoherentAndAdditiveDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QEcoherentAndAdditiveDialog(QWidget *parent = nullptr);
|
||||
~QEcoherentAndAdditiveDialog();
|
||||
|
||||
|
||||
public slots:
|
||||
|
||||
void onpushButtonEchoDataAddSelectClicked();
|
||||
void onpushButtonEchoDataSelectClicked();
|
||||
void onaccepted();
|
||||
void onrejected();
|
||||
|
||||
private:
|
||||
Ui::QEcoherentAndAdditiveClass* ui;
|
||||
};
|
|
@ -0,0 +1,126 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QEcoherentAndAdditiveClass</class>
|
||||
<widget class="QDialog" name="QEcoherentAndAdditiveClass">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>747</width>
|
||||
<height>239</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>仿真回波叠加</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QToolBar" name="mainToolBar"/>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLineEdit" name="lineEditEchoDataAddPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>带叠加回波:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="pushButtonEchoDataAddSelect">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QPushButton" name="pushButtonEchoDataSelect">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="1" colspan="3">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<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="2" column="2">
|
||||
<widget class="QLineEdit" name="lineEditEchoDataAdd2Path">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -103,7 +103,7 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/FZSimulation/LTDQ/Input/LandCover.dat</string>
|
||||
<string>D:/FZSimulation/LTDQ/Input/DEM30/LandCover.dat</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -233,7 +233,7 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/FZSimulation/LTDQ/Input/DEM_XYZ.dat</string>
|
||||
<string>D:/FZSimulation/LTDQ/Input/DEM30/DEM_XYZ.dat</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -350,7 +350,7 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/FZSimulation/LTDQ/Input/DEM_Sloper.dat</string>
|
||||
<string>D:/FZSimulation/LTDQ/Input/DEM30/DEM_Sloper.dat</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -12,6 +12,9 @@ QSimulationBPImage::QSimulationBPImage(QWidget *parent)
|
|||
: QDialog(parent),ui(new Ui::QSimulationBPImageClass)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->checkBox->setEnabled(false);
|
||||
ui->checkBox->setCheckable(true);
|
||||
ui->checkBox->setChecked(true);
|
||||
|
||||
QObject::connect(ui->pushButtonEchoSelect, SIGNAL(clicked()), this, SLOT(onpushButtonEchoSelectClicked()));
|
||||
QObject::connect(ui->pushButtonImageSelect, SIGNAL(clicked()), this, SLOT(onpushButtonImageSelectClicked()));
|
||||
|
@ -97,12 +100,8 @@ void QSimulationBPImage::onbtnaccepted()
|
|||
TBPimag.setImageL1(imagL1);
|
||||
long cpucore_num = std::thread::hardware_concurrency();
|
||||
TBPimag.setGPU(true);
|
||||
if (ui->checkBox->isChecked()) {
|
||||
TBPimag.ProcessWithGridNet(cpucore_num,ui->lineEdit->text().trimmed());
|
||||
}
|
||||
else {
|
||||
TBPimag.Process(cpucore_num);
|
||||
}
|
||||
TBPimag.ProcessWithGridNet(cpucore_num,ui->lineEdit->text().trimmed());
|
||||
|
||||
this->show();
|
||||
QMessageBox::information(this,u8"成像",u8"成像结束");
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>995</width>
|
||||
<width>813</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
|
@ -929,6 +929,8 @@ ErrorCode RFPCProcessCls::RFPCMainProcess_GPU() {
|
|||
|
||||
ErrorCode RFPCProcessCls::RFPCMainProcess_MultiGPU_NoAntPattern()
|
||||
{
|
||||
|
||||
|
||||
int num_devices = 0;
|
||||
cudaGetDeviceCount(&num_devices);
|
||||
PRINT("GPU Count : %d \n", num_devices);
|
||||
|
@ -943,7 +945,11 @@ ErrorCode RFPCProcessCls::RFPCMainProcess_MultiGPU_NoAntPattern()
|
|||
std::shared_ptr<SatelliteOribtNode[]> sateOirbtNodes = this->getSatelliteOribtNodes(prf_time, dt, antflag, imageStarttime);
|
||||
|
||||
|
||||
|
||||
for (int devid = 0; devid < num_devices; devid++) {
|
||||
printf("GPU ID: %d \n", devid);
|
||||
printDeviceInfo(devid);
|
||||
printf("----------------------------------------\n");
|
||||
}
|
||||
|
||||
#pragma omp parallel for
|
||||
for (int devid = 0; devid < num_devices; devid++) {
|
||||
|
@ -969,6 +975,16 @@ ErrorCode RFPCProcessCls::RFPCMainProcess_GPU_NoAntPattern(size_t startprfid, si
|
|||
std::map<long, SigmaParam> clssigmaParamsDict = this->SigmaDatabasePtr->getsigmaParams(polartype);;
|
||||
std::map<long, CUDASigmaParam> clsCUDASigmaParamsDict;
|
||||
for (const auto& pair : clssigmaParamsDict) {
|
||||
|
||||
if (abs(pair.second.p1)<1e-5&&
|
||||
abs(pair.second.p2) < 1e-5 &&
|
||||
abs(pair.second.p3) < 1e-5 &&
|
||||
abs(pair.second.p4) < 1e-5 &&
|
||||
abs(pair.second.p5) < 1e-5 &&
|
||||
abs(pair.second.p6) < 1e-5) {
|
||||
continue;
|
||||
}
|
||||
|
||||
clsCUDASigmaParamsDict.insert(std::pair<long, CUDASigmaParam>(pair.first,
|
||||
CUDASigmaParam{
|
||||
float(pair.second.p1),
|
||||
|
@ -994,7 +1010,7 @@ ErrorCode RFPCProcessCls::RFPCMainProcess_GPU_NoAntPattern(size_t startprfid, si
|
|||
gdalImage demlandcls(this->LandCoverPath);// 地表覆盖类型
|
||||
gdalImage slpxyz(this->demsloperPath);// 地面坡向
|
||||
|
||||
long allDemRow = Memory1MB/demxyz.width/8/3*6000;
|
||||
long allDemRow = Memory1GB/demxyz.width/8/3*6;
|
||||
//allDemRow = allDemRow < demxyz.height ? allDemRow : demxyz.height;
|
||||
for(long demId=0;demId< demxyz.height;demId=demId+ allDemRow){
|
||||
|
||||
|
@ -1114,19 +1130,41 @@ ErrorCode RFPCProcessCls::RFPCMainProcess_GPU_NoAntPattern(size_t startprfid, si
|
|||
|
||||
task.antlist = (SateState*)mallocCUDADevice(prfcount * sizeof(SateState), devId);
|
||||
HostToDevice(h_antlist.get(), task.antlist, sizeof(SateState) * prfcount);
|
||||
|
||||
printf("h_antlist: %e,%e,%e,%e,%e,%e,%e,%e,%e \n",
|
||||
h_antlist.get()[0].Px, h_antlist.get()[0].Py, h_antlist.get()[0].Pz,
|
||||
h_antlist.get()[0].Vx, h_antlist.get()[0].Vy, h_antlist.get()[0].Vz,
|
||||
h_antlist.get()[0].antDirectX, h_antlist.get()[0].antDirectY, h_antlist.get()[0].antDirectZ
|
||||
);
|
||||
//testOutAmpArr(QString("antlist_%1.dat").arg(devId), (double*)(h_antlist.get()), prfcount, 9);
|
||||
}
|
||||
|
||||
|
||||
float* h_R = (float*)mallocCUDAHost(sizeof(float) * prfcount * SHAREMEMORY_FLOAT_HALF); //2GB 距离
|
||||
float* h_amp = (float*)mallocCUDAHost(sizeof(float) * prfcount * SHAREMEMORY_FLOAT_HALF);//2GB 强度
|
||||
|
||||
// 分块计算
|
||||
for (const auto& pair : clsGoalStateDict) {
|
||||
long clsid = pair.first;
|
||||
task.sigma0_cls = clsCUDASigmaParamsDict[clsid];
|
||||
size_t clscount = clsCountDict[clsid];
|
||||
PRINT("Process Class ID : %d , Count: %d Device: %d\n", clsid, clscount,devId);
|
||||
PRINT("Process Class ID : %d , Count: %d Device: %d , sigma Prams :[%f,%f,%f,%f,%f,%F]\n", clsid, clscount,devId,
|
||||
task.sigma0_cls.p1, task.sigma0_cls.p2, task.sigma0_cls.p3, task.sigma0_cls.p4, task.sigma0_cls.p5, task.sigma0_cls.p6);
|
||||
if (abs(task.sigma0_cls.p1) < 1e-6 &&
|
||||
abs(task.sigma0_cls.p2) < 1e-6 &&
|
||||
abs(task.sigma0_cls.p3) < 1e-6 &&
|
||||
abs(task.sigma0_cls.p4) < 1e-6 &&
|
||||
abs(task.sigma0_cls.p5) < 1e-6 &&
|
||||
abs(task.sigma0_cls.p6) < 1e-6) {
|
||||
continue;
|
||||
}
|
||||
task.targetnum = clscount;
|
||||
task.goallist = (GoalState*)mallocCUDADevice(clscount * sizeof(GoalState), devId);
|
||||
HostToDevice(clsGoalStateDict[clsid].get(), task.goallist, sizeof(GoalState) * clscount);
|
||||
task.sigma0_cls = clsCUDASigmaParamsDict[clsid];
|
||||
ProcessRFPCTask(task, devId);
|
||||
|
||||
ProcessRFPCTask(task, devId, h_R, h_amp);
|
||||
//testOutDataArr(QString("h_R_%1.bin").arg(devId), h_R, prfcount, SHAREMEMORY_FLOAT_HALF);
|
||||
//testOutDataArr(QString("h_amp_%1.bin").arg(devId), h_amp, prfcount, SHAREMEMORY_FLOAT_HALF);
|
||||
//exit(-1);
|
||||
FreeCUDADevice(task.goallist);
|
||||
}
|
||||
|
||||
|
@ -1137,7 +1175,8 @@ ErrorCode RFPCProcessCls::RFPCMainProcess_GPU_NoAntPattern(size_t startprfid, si
|
|||
FreeCUDADevice(task.d_echoData);
|
||||
FreeCUDADevice(task.antlist);
|
||||
//FreeCUDADevice(task.goallist);
|
||||
|
||||
FreeCUDAHost(h_R);
|
||||
FreeCUDAHost(h_amp);
|
||||
|
||||
}
|
||||
PRINT("dem cover processbar: [100 precent]\n");
|
||||
|
|
|
@ -467,12 +467,12 @@ void PolyfitSatelliteOribtModel::saveToXml(const QString& filePath) {
|
|||
|
||||
// Write polyfit parameters
|
||||
xmlWriter.writeStartElement("PolyfitParameters");
|
||||
xmlWriter.writeAttribute("Pxchisq", QString::number(Pxchisq));
|
||||
xmlWriter.writeAttribute("Pychisq", QString::number(Pychisq));
|
||||
xmlWriter.writeAttribute("Pzchisq", QString::number(Pzchisq));
|
||||
xmlWriter.writeAttribute("Vxchisq", QString::number(Vxchisq));
|
||||
xmlWriter.writeAttribute("Vychisq", QString::number(Vychisq));
|
||||
xmlWriter.writeAttribute("Vzchisq", QString::number(Vzchisq));
|
||||
xmlWriter.writeAttribute("Pxchisq", QString::number(Pxchisq,'e',35));
|
||||
xmlWriter.writeAttribute("Pychisq", QString::number(Pychisq,'e',35));
|
||||
xmlWriter.writeAttribute("Pzchisq", QString::number(Pzchisq,'e',35));
|
||||
xmlWriter.writeAttribute("Vxchisq", QString::number(Vxchisq,'e',35));
|
||||
xmlWriter.writeAttribute("Vychisq", QString::number(Vychisq,'e',35));
|
||||
xmlWriter.writeAttribute("Vzchisq", QString::number(Vzchisq,'e',35));
|
||||
|
||||
writeVector(xmlWriter, "polyfitPx", polyfitPx);
|
||||
writeVector(xmlWriter, "polyfitPy", polyfitPy);
|
||||
|
@ -491,7 +491,7 @@ void PolyfitSatelliteOribtModel::saveToXml(const QString& filePath) {
|
|||
void PolyfitSatelliteOribtModel::writeVector(QXmlStreamWriter& xmlWriter, const QString& name, const std::vector<double>& vec) {
|
||||
xmlWriter.writeStartElement(name);
|
||||
for (double val : vec) {
|
||||
xmlWriter.writeTextElement("Value", QString::number(val));
|
||||
xmlWriter.writeTextElement("Value", QString::number(val,'e',35));
|
||||
}
|
||||
xmlWriter.writeEndElement();
|
||||
}
|
||||
|
|
|
@ -30,50 +30,66 @@ SigmaDatabase::SigmaDatabase()
|
|||
this->VH_sigmaParam.insert(std::pair<long, SigmaParam>(0, SigmaParam{ 0,0,0, 0, 0,0 }));
|
||||
this->VV_sigmaParam.insert(std::pair<long, SigmaParam>(0, SigmaParam{ 0,0,0, 0, 0,0 }));
|
||||
|
||||
this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(112, SigmaParam{ 30.5876,0,0, 0, 0,0 })); // L波段定标器
|
||||
this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(113, SigmaParam{ 37.6313,0,0, 0, 0,0 })); // L波段定标器
|
||||
this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(114, SigmaParam{ 42.6288,0,0, 0, 0,0 })); // L波段定标器
|
||||
this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(115, SigmaParam{ 46.5052,0,0, 0, 0,0 })); // L波段定标器
|
||||
this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(116, SigmaParam{ 49.6725,0,0, 0, 0,0 })); // L波段定标器
|
||||
this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(117, SigmaParam{ 52.3504,0,0, 0, 0,0 })); // L波段定标器
|
||||
this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(118, SigmaParam{ 54.67,0,0, 0, 0,0 })); // L波段定标器
|
||||
this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(119, SigmaParam{ 56.7161,0,0, 0, 0,0 })); // L波段定标器
|
||||
this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(120, SigmaParam{ 58.5464,0,0, 0, 0,0 })); // L波段定标器
|
||||
|
||||
|
||||
this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(10, SigmaParam{ -21.1019701821713, 9.00621457243906, 6.52932182540331, -1.11157376729893, -15.8022895411007, 11.4690828129602 }));
|
||||
this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(20, SigmaParam{ -43.6677042155964, 32.0245140457417, 0.511060658303930, -2.68482232690106, 6.29783274559538, 1.96648609622833 }));
|
||||
this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(40, SigmaParam{ 50.97, -62.9, -0.0968, 1.604, -4.637, 6.108 }));
|
||||
this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(60, SigmaParam{ -32.45, 23.3097, 3.187, -2.482, 8.244, 0.3632 }));
|
||||
|
||||
////12
|
||||
//this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(12, SigmaParam{ -21.1019701821713, 9.00621457243906, 6.52932182540331, - 1.11157376729893, - 15.8022895411007, 11.4690828129602 }));
|
||||
this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(12, SigmaParam{ -21.1019701821713, 9.00621457243906, 6.52932182540331, - 1.11157376729893, - 15.8022895411007, 11.4690828129602 }));
|
||||
//this->HV_sigmaParam.insert(std::pair<long, SigmaParam>(12, SigmaParam{ -30.0103645753547, 27.1700862271921, 11.8007376386356, - 0.933835390422269, - 16.4640776105300, 11.8318838032267 }));
|
||||
//this->VH_sigmaParam.insert(std::pair<long, SigmaParam>(12, SigmaParam{ -30.0103645753547, 27.1700862271921, 11.8007376386356, -0.933835390422269, -16.4640776105300, 11.8318838032267 }));
|
||||
//this->VV_sigmaParam.insert(std::pair<long, SigmaParam>(12, SigmaParam{ -21.1019701821713, 9.00621457243906, 6.52932182540331, -1.11157376729893, -15.8022895411007, 11.4690828129602 }));
|
||||
|
||||
////22
|
||||
//this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(22, SigmaParam{ -43.6677042155964, 32.0245140457417, 0.511060658303930, - 2.68482232690106, 6.29783274559538, 1.96648609622833 }));
|
||||
this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(22, SigmaParam{ -43.6677042155964, 32.0245140457417, 0.511060658303930, - 2.68482232690106, 6.29783274559538, 1.96648609622833 }));
|
||||
//this->HV_sigmaParam.insert(std::pair<long, SigmaParam>(22, SigmaParam{ -36.3971634075803, 13.1296247093899, 1.12707368693158, - 1.88195857790977, 6.57450737122974, 2.11755051297951 }));
|
||||
//this->VH_sigmaParam.insert(std::pair<long, SigmaParam>(22, SigmaParam{ -36.3971634075803, 13.1296247093899, 1.12707368693158, -1.88195857790977, 6.57450737122974, 2.11755051297951 }));
|
||||
//this->VV_sigmaParam.insert(std::pair<long, SigmaParam>(22, SigmaParam{ -43.6677042155964, 32.0245140457417, 0.511060658303930, -2.68482232690106, 6.29783274559538, 1.96648609622833 }));
|
||||
|
||||
////30
|
||||
//this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(30, SigmaParam{ -59.1080014669385, 47.6710707363975, 0.300193452564135, - 3.93463636916976, 5.99799798331127, - 10.3772604045974 }));
|
||||
this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(30, SigmaParam{ -59.1080014669385, 47.6710707363975, 0.300193452564135, - 3.93463636916976, 5.99799798331127, - 10.3772604045974 }));
|
||||
//this->HV_sigmaParam.insert(std::pair<long, SigmaParam>(30, SigmaParam{ -55.1864353240982, 32.2453149408716, 0.333758208816865, - 3.38774208141056, 6.12774897769798, - 10.1192846531823 }));
|
||||
//this->VH_sigmaParam.insert(std::pair<long, SigmaParam>(30, SigmaParam{ -55.1864353240982, 32.2453149408716, 0.333758208816865, - 3.38774208141056, 6.12774897769798, - 10.1192846531823 }));
|
||||
//this->VV_sigmaParam.insert(std::pair<long, SigmaParam>(30, SigmaParam{ -59.1080014669385, 47.6710707363975, 0.300193452564135, -3.93463636916976, 5.99799798331127, -10.3772604045974 }));
|
||||
|
||||
////50
|
||||
//this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(50, SigmaParam{ -22.9105602882378, 8170.54100628307, 15.4916054293135, - 0.970580847008280, 28.9025325818511, - 21.4319176514170 }));
|
||||
this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(50, SigmaParam{ -22.9105602882378, 30.54100628307, 15.4916054293135, - 0.970580847008280, 28.9025325818511, - 21.4319176514170 }));
|
||||
//this->HV_sigmaParam.insert(std::pair<long, SigmaParam>(50, SigmaParam{ -39.7459019584805, 151.391039247574, 5.17117231380975, - 4.10303899418773, 8.04893424718507, - 3.17171678851531 }));
|
||||
//this->VH_sigmaParam.insert(std::pair<long, SigmaParam>(50, SigmaParam{ -39.7459019584805, 151.391039247574, 5.17117231380975, -4.10303899418773, 8.04893424718507, -3.17171678851531 }));
|
||||
//this->VV_sigmaParam.insert(std::pair<long, SigmaParam>(50, SigmaParam{ -22.9105602882378, 8170.54100628307, 15.4916054293135, -0.970580847008280, 28.9025325818511, -21.4319176514170 }));
|
||||
|
||||
////61
|
||||
//this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(61, SigmaParam{ 27.2590864500905, 95.6840751800642, 3.98975084647232, 50.3262749621072, 3.09962879546370, - 5.10400310274333 }));
|
||||
this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(61, SigmaParam{ 27.2590864500905, 95.6840751800642, 3.98975084647232, 50.3262749621072, 3.09962879546370, - 5.10400310274333 }));
|
||||
//this->HV_sigmaParam.insert(std::pair<long, SigmaParam>(61, SigmaParam{ -65.9799383836613, 106.831320929437, 1.53821651203361, 0.704332523237733, 36.3654715437260, - 13.7449876973719 }));
|
||||
//this->VH_sigmaParam.insert(std::pair<long, SigmaParam>(61, SigmaParam{ -65.9799383836613, 106.831320929437, 1.53821651203361, 0.704332523237733, 36.3654715437260, -13.7449876973719 }));
|
||||
//this->VV_sigmaParam.insert(std::pair<long, SigmaParam>(61, SigmaParam{ 27.2590864500905, 95.6840751800642, 3.98975084647232, 50.3262749621072, 3.09962879546370, -5.10400310274333 }));
|
||||
|
||||
////62
|
||||
//this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(62, SigmaParam{ -34.3961764495281, 21.7503968763591, 1.15914650010176, - 2.83950292185421, 10.3519995095232, 2.75293811408200 }));
|
||||
this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(62, SigmaParam{ -34.3961764495281, 21.7503968763591, 1.15914650010176, - 2.83950292185421, 10.3519995095232, 2.75293811408200 }));
|
||||
//this->HV_sigmaParam.insert(std::pair<long, SigmaParam>(62, SigmaParam{ -34.0710914034599, 14.1778732014224, 3.47049853590805, - 1.73813229616801, 10.9627971440838, 2.19731364578002 }));
|
||||
//this->VH_sigmaParam.insert(std::pair<long, SigmaParam>(62, SigmaParam{ -34.0710914034599, 14.1778732014224, 3.47049853590805, -1.73813229616801, 10.9627971440838, 2.19731364578002 }));
|
||||
//this->VV_sigmaParam.insert(std::pair<long, SigmaParam>(62, SigmaParam{ -34.3961764495281, 21.7503968763591, 1.15914650010176, -2.83950292185421, 10.3519995095232, 2.75293811408200 }));
|
||||
|
||||
////80
|
||||
//this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(80, SigmaParam{ -5.76486750987210, - 7.80014668607246, 0.0880097904597720, - 5.44564720816575, - 0.530358195545799, 1.04332202699956 }));
|
||||
this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(80, SigmaParam{ -5.76486750987210, - 7.80014668607246, 0.0880097904597720, - 5.44564720816575, - 0.530358195545799, 1.04332202699956 }));
|
||||
//this->HV_sigmaParam.insert(std::pair<long, SigmaParam>(80, SigmaParam{ 484.928701445606, - 0.992170190244375, - 1.98914783519718, - 507.127544388772, 0.195180814149377, 6.21339949756719 }));
|
||||
//this->VH_sigmaParam.insert(std::pair<long, SigmaParam>(80, SigmaParam{ 484.928701445606, -0.992170190244375, -1.98914783519718, -507.127544388772, 0.195180814149377, 6.21339949756719 }));
|
||||
//this->VV_sigmaParam.insert(std::pair<long, SigmaParam>(80, SigmaParam{ -5.76486750987210, -7.80014668607246, 0.0880097904597720, -5.44564720816575, -0.530358195545799, 1.04332202699956 }));
|
||||
|
||||
////90
|
||||
//this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(90, SigmaParam{ -20.1761798059391, 13.2752519275021, 2.74667225608397, 3.63052241744923, 8.99932188120922, 34.8246533269446 }));
|
||||
this->HH_sigmaParam.insert(std::pair<long, SigmaParam>(90, SigmaParam{ -20.1761798059391, 13.2752519275021, 2.74667225608397, 3.63052241744923, 8.99932188120922, 34.8246533269446 }));
|
||||
//this->HV_sigmaParam.insert(std::pair<long, SigmaParam>(90, SigmaParam{ -26.8776515733889, 10.4251866500052, 8.43273666535992, 4.33165922141213, 8.68204389555939, - 2.51718779582920 }));
|
||||
//this->VH_sigmaParam.insert(std::pair<long, SigmaParam>(90, SigmaParam{ -26.8776515733889, 10.4251866500052, 8.43273666535992, 4.33165922141213, 8.68204389555939, - 2.51718779582920 }));
|
||||
//this->VV_sigmaParam.insert(std::pair<long, SigmaParam>(90, SigmaParam{ -20.1761798059391, 13.2752519275021, 2.74667225608397, 3.63052241744923, 8.99932188120922, 34.8246533269446 }));
|
||||
|
|
|
@ -14,171 +14,6 @@
|
|||
#include <GPUBpSimulation.cuh>
|
||||
|
||||
|
||||
void CreatePixelXYZ(std::shared_ptr<EchoL0Dataset> echoL0ds, QString outPixelXYZPath)
|
||||
{
|
||||
long bandwidth = echoL0ds->getBandwidth();
|
||||
double Rnear = echoL0ds->getNearRange();
|
||||
double Rfar = echoL0ds->getFarRange();
|
||||
double refRange = echoL0ds->getRefPhaseRange();
|
||||
double dx = LIGHTSPEED / 2.0 / bandwidth; // c/2b
|
||||
|
||||
|
||||
// 创建坐标系统
|
||||
long prfcount = echoL0ds->getPluseCount();
|
||||
long freqcount = echoL0ds->getPlusePoints();
|
||||
Eigen::MatrixXd gt = Eigen::MatrixXd::Zero(2, 3);
|
||||
gt(0, 0) = 0;
|
||||
gt(0, 1) = 1;
|
||||
gt(0, 2) = 0;
|
||||
gt(1, 0) = 0;
|
||||
gt(1, 1) = 0;
|
||||
gt(1, 2) = 1;
|
||||
gdalImage xyzRaster = CreategdalImage(outPixelXYZPath, prfcount, freqcount, 3, gt, QString(""), false, true,true,GDT_Float64);
|
||||
std::shared_ptr<double> antpos = echoL0ds->getAntPos();
|
||||
dx = (echoL0ds->getFarRange()-echoL0ds->getNearRange())/(echoL0ds->getPlusePoints()-1);
|
||||
Rnear = echoL0ds->getNearRange();
|
||||
double Rref = echoL0ds->getRefPhaseRange();
|
||||
double centerInc = echoL0ds->getCenterAngle()*d2r;
|
||||
long echocol = Memory1GB * 1.0 / 8 / 4 / prfcount * 6;
|
||||
qDebug() << "echocol:\t " << echocol ;
|
||||
echocol = echocol < 1 ? 1: echocol;
|
||||
|
||||
|
||||
std::shared_ptr<double> Pxs((double*)mallocCUDAHost(sizeof(double)*prfcount), FreeCUDAHost);
|
||||
std::shared_ptr<double> Pys((double*)mallocCUDAHost(sizeof(double) * prfcount), FreeCUDAHost);
|
||||
std::shared_ptr<double> Pzs((double*)mallocCUDAHost(sizeof(double) * prfcount), FreeCUDAHost);
|
||||
std::shared_ptr<double> AntDirectX((double*)mallocCUDAHost(sizeof(double) * prfcount), FreeCUDAHost);
|
||||
std::shared_ptr<double> AntDirectY((double*)mallocCUDAHost(sizeof(double) * prfcount), FreeCUDAHost);
|
||||
std::shared_ptr<double> AntDirectZ((double*)mallocCUDAHost(sizeof(double) * prfcount), FreeCUDAHost);
|
||||
|
||||
{
|
||||
std::shared_ptr<double> antpos = echoL0ds->getAntPos();
|
||||
double time = 0;
|
||||
double Px = 0;
|
||||
double Py = 0;
|
||||
double Pz = 0;
|
||||
for (long i = 0; i < prfcount; i++) {
|
||||
|
||||
Pxs.get()[i] = antpos.get()[i * 19 + 1]; // 卫星坐标
|
||||
Pys.get()[i] = antpos.get()[i * 19 + 2];
|
||||
Pzs.get()[i] = antpos.get()[i * 19 + 3];
|
||||
AntDirectX.get()[i] = antpos.get()[i * 19 + 13];// zero doppler
|
||||
AntDirectY.get()[i] = antpos.get()[i * 19 + 14];
|
||||
AntDirectZ.get()[i] = antpos.get()[i * 19 + 15];
|
||||
|
||||
double NormAnt = std::sqrt(AntDirectX.get()[i] * AntDirectX.get()[i] +
|
||||
AntDirectY.get()[i] * AntDirectY.get()[i] +
|
||||
AntDirectZ.get()[i] * AntDirectZ.get()[i]);
|
||||
AntDirectX.get()[i] = AntDirectX.get()[i] / NormAnt;
|
||||
AntDirectY.get()[i] = AntDirectY.get()[i] / NormAnt;
|
||||
AntDirectZ.get()[i] = AntDirectZ.get()[i] / NormAnt;// 归一化
|
||||
}
|
||||
antpos.reset();
|
||||
}
|
||||
|
||||
std::shared_ptr<double> d_Pxs((double*)mallocCUDADevice(sizeof(double) * prfcount), FreeCUDADevice);
|
||||
std::shared_ptr<double> d_Pys((double*)mallocCUDADevice(sizeof(double) * prfcount), FreeCUDADevice);
|
||||
std::shared_ptr<double> d_Pzs((double*)mallocCUDADevice(sizeof(double) * prfcount), FreeCUDADevice);
|
||||
std::shared_ptr<double> d_AntDirectX((double*)mallocCUDADevice(sizeof(double) * prfcount), FreeCUDADevice);
|
||||
std::shared_ptr<double> d_AntDirectY((double*)mallocCUDADevice(sizeof(double) * prfcount), FreeCUDADevice);
|
||||
std::shared_ptr<double> d_AntDirectZ((double*)mallocCUDADevice(sizeof(double) * prfcount), FreeCUDADevice);
|
||||
|
||||
HostToDevice(Pxs.get(), d_Pxs.get(), sizeof(double) * prfcount);
|
||||
HostToDevice(Pys.get(), d_Pys.get(), sizeof(double) * prfcount);
|
||||
HostToDevice(Pzs.get(), d_Pzs.get(), sizeof(double) * prfcount);
|
||||
HostToDevice(AntDirectX.get(), d_AntDirectX.get(), sizeof(double) * prfcount);
|
||||
HostToDevice(AntDirectY.get(), d_AntDirectY.get(), sizeof(double) * prfcount);
|
||||
HostToDevice(AntDirectZ.get(), d_AntDirectZ.get(), sizeof(double) * prfcount);
|
||||
|
||||
|
||||
for (long startcolidx = 0; startcolidx < freqcount; startcolidx = startcolidx + echocol) {
|
||||
|
||||
long tempechocol = echocol;
|
||||
if (startcolidx + tempechocol >= freqcount) {
|
||||
tempechocol = freqcount - startcolidx;
|
||||
}
|
||||
qDebug() << "\r[" << QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss.zzz") << "] imgxyz :\t" << startcolidx << "\t-\t" << startcolidx + tempechocol << " / " << freqcount ;
|
||||
|
||||
std::shared_ptr<double> demx = readDataArr<double>(xyzRaster, 0, startcolidx, prfcount, tempechocol, 1, GDALREADARRCOPYMETHOD::VARIABLEMETHOD);
|
||||
std::shared_ptr<double> demy = readDataArr<double>(xyzRaster, 0, startcolidx, prfcount, tempechocol, 2, GDALREADARRCOPYMETHOD::VARIABLEMETHOD);
|
||||
std::shared_ptr<double> demz = readDataArr<double>(xyzRaster, 0, startcolidx, prfcount, tempechocol, 3, GDALREADARRCOPYMETHOD::VARIABLEMETHOD);
|
||||
|
||||
std::shared_ptr<double> h_demx((double*)mallocCUDAHost(sizeof(double) * prfcount*tempechocol), FreeCUDAHost);
|
||||
std::shared_ptr<double> h_demy((double*)mallocCUDAHost(sizeof(double) * prfcount*tempechocol), FreeCUDAHost);
|
||||
std::shared_ptr<double> h_demz((double*)mallocCUDAHost(sizeof(double) * prfcount*tempechocol), FreeCUDAHost);
|
||||
|
||||
#pragma omp parallel for
|
||||
for (long ii = 0; ii < prfcount; ii++) {
|
||||
for (long jj = 0; jj < tempechocol; jj++) {
|
||||
h_demx.get()[ii*tempechocol+jj]=demx.get()[ii*tempechocol+jj];
|
||||
h_demy.get()[ii*tempechocol+jj]=demy.get()[ii*tempechocol+jj];
|
||||
h_demz.get()[ii*tempechocol+jj]=demz.get()[ii*tempechocol+jj];
|
||||
}
|
||||
}
|
||||
|
||||
std::shared_ptr<double> d_demx((double*)mallocCUDADevice(sizeof(double) * prfcount * tempechocol), FreeCUDADevice);
|
||||
std::shared_ptr<double> d_demy((double*)mallocCUDADevice(sizeof(double) * prfcount * tempechocol), FreeCUDADevice);
|
||||
std::shared_ptr<double> d_demz((double*)mallocCUDADevice(sizeof(double) * prfcount * tempechocol), FreeCUDADevice);
|
||||
|
||||
HostToDevice(h_demx.get(), d_demx.get(), sizeof(double) * prfcount * tempechocol);
|
||||
HostToDevice(h_demy.get(), d_demy.get(), sizeof(double) * prfcount * tempechocol);
|
||||
HostToDevice(h_demz.get(), d_demz.get(), sizeof(double) * prfcount * tempechocol);
|
||||
|
||||
|
||||
TIMEBPCreateImageGrid(
|
||||
d_Pxs.get(), d_Pys.get(), d_Pzs.get(),
|
||||
d_AntDirectX.get(), d_AntDirectY.get(), d_AntDirectZ.get(),
|
||||
d_demx.get(), d_demy.get(), d_demz.get(),
|
||||
prfcount, tempechocol, 1000,
|
||||
Rnear+dx* startcolidx, dx, refRange // 更新最近修读
|
||||
);
|
||||
|
||||
DeviceToHost(h_demx.get(), d_demx.get(), sizeof(double) * prfcount * tempechocol);
|
||||
DeviceToHost(h_demy.get(), d_demy.get(), sizeof(double) * prfcount * tempechocol);
|
||||
DeviceToHost(h_demz.get(), d_demz.get(), sizeof(double) * prfcount * tempechocol);
|
||||
|
||||
#pragma omp parallel for
|
||||
for (long ii = 0; ii < prfcount; ii++) {
|
||||
for (long jj = 0; jj < tempechocol; jj++) {
|
||||
demx.get()[ii * tempechocol + jj]=h_demx.get()[ii * tempechocol + jj] ;
|
||||
demy.get()[ii * tempechocol + jj]=h_demy.get()[ii * tempechocol + jj] ;
|
||||
demz.get()[ii * tempechocol + jj]=h_demz.get()[ii * tempechocol + jj] ;
|
||||
}
|
||||
}
|
||||
|
||||
xyzRaster.saveImage(demx, 0, startcolidx,prfcount,tempechocol, 1);
|
||||
xyzRaster.saveImage(demy, 0, startcolidx,prfcount,tempechocol, 2);
|
||||
xyzRaster.saveImage(demz, 0, startcolidx,prfcount,tempechocol, 3);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void TBPImageProcess(QString echofile, QString outImageFolder, QString imagePlanePath,long num_thread)
|
||||
{
|
||||
std::shared_ptr<EchoL0Dataset> echoL0ds(new EchoL0Dataset);
|
||||
echoL0ds->Open(echofile);
|
||||
|
||||
std::shared_ptr< SARSimulationImageL1Dataset> imagL1(new SARSimulationImageL1Dataset);
|
||||
imagL1->setCenterAngle(echoL0ds->getCenterAngle());
|
||||
imagL1->setCenterFreq(echoL0ds->getCenterFreq());
|
||||
imagL1->setNearRange(echoL0ds->getNearRange());
|
||||
imagL1->setRefRange((echoL0ds->getNearRange() + echoL0ds->getFarRange()) / 2);
|
||||
imagL1->setFarRange(echoL0ds->getFarRange());
|
||||
imagL1->setFs(echoL0ds->getFs());
|
||||
imagL1->setLookSide(echoL0ds->getLookSide());
|
||||
|
||||
imagL1->OpenOrNew(outImageFolder, echoL0ds->getSimulationTaskName(), echoL0ds->getPluseCount(), echoL0ds->getPlusePoints());
|
||||
|
||||
|
||||
TBPImageAlgCls TBPimag;
|
||||
TBPimag.setEchoL0(echoL0ds);
|
||||
TBPimag.setImageL1(imagL1);
|
||||
TBPimag.setImagePlanePath(imagePlanePath);
|
||||
|
||||
TBPimag.Process(num_thread);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void TBPImageAlgCls::setImagePlanePath(QString INimagePlanePath)
|
||||
{
|
||||
|
@ -209,20 +44,7 @@ std::shared_ptr<SARSimulationImageL1Dataset> TBPImageAlgCls::getImageL0()
|
|||
{
|
||||
return this->L1ds;
|
||||
}
|
||||
|
||||
ErrorCode TBPImageAlgCls::Process(long num_thread)
|
||||
{
|
||||
|
||||
qDebug() << u8"开始成像";
|
||||
|
||||
|
||||
qDebug() << u8"创建成像平面的XYZ";
|
||||
QString outRasterXYZ = JoinPath(this->L1ds->getoutFolderPath(), this->L0ds->getSimulationTaskName() + "_xyz.bin");
|
||||
CreatePixelXYZ(this->L0ds, outRasterXYZ);
|
||||
|
||||
return this->ProcessWithGridNet(num_thread, outRasterXYZ);
|
||||
|
||||
}
|
||||
|
||||
ErrorCode TBPImageAlgCls::ProcessWithGridNet(long num_thread,QString xyzRasterPath)
|
||||
{
|
||||
|
@ -259,6 +81,10 @@ ErrorCode TBPImageAlgCls::ProcessWithGridNet(long num_thread,QString xyzRasterPa
|
|||
}
|
||||
|
||||
|
||||
// 处理成像映射
|
||||
CopyProjectTransformMatrixFromRasterAToRasterB(this->outRasterXYZPath, this->L1ds->getImageRasterPath());
|
||||
|
||||
|
||||
qDebug() << u8"频域回波-> 时域回波 结束";
|
||||
|
||||
if (GPURUN) {
|
||||
|
@ -268,6 +94,9 @@ ErrorCode TBPImageAlgCls::ProcessWithGridNet(long num_thread,QString xyzRasterPa
|
|||
QMessageBox::information(nullptr, u8"提示", u8"目前只支持显卡");
|
||||
return ErrorCode::FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return ErrorCode::SUCCESS;
|
||||
|
||||
}
|
||||
|
@ -290,7 +119,7 @@ ErrorCode TBPImageAlgCls::ProcessGPU()
|
|||
|
||||
size_t img_rowCont = L1ds->getrowCount();
|
||||
size_t img_colCont = L1ds->getcolCount();
|
||||
size_t block_imgRowCount = Memory1GB / img_colCont / 8 / 3 * 1;// 4GB-- 可以分配内存
|
||||
size_t block_imgRowCount = Memory1GB / img_colCont / 8 / 3 * 12;// 4GB-- 可以分配内存
|
||||
|
||||
gdalImage demgridimg(imgXYZPath);
|
||||
gdalImageComplex im_finalds(outimgDataPath);
|
||||
|
@ -337,6 +166,7 @@ ErrorCode TBPImageAlgCls::ProcessGPU()
|
|||
h_data.AntZ = (double*)mallocCUDAHost(sizeof(double) * block_pfrcount);
|
||||
|
||||
qDebug() << "r_vec [0]:\t" << h_data.r_vec[0];
|
||||
qDebug() << "r_vec [end]:\t" << h_data.r_vec[h_data.Nfft-1];
|
||||
qDebug() << "Range resolution(m):\t" << step;
|
||||
qDebug() << "range Scence(m):\t" << maxWr;
|
||||
qDebug() << "start Freq:\t" << centerFreq - bandwidth / 2;
|
||||
|
@ -355,10 +185,24 @@ ErrorCode TBPImageAlgCls::ProcessGPU()
|
|||
std::shared_ptr<double> demX = readDataArr<double>(demgridimg, img_start_rid, 0, img_blockRowCount, img_blockColCount, 1, GDALREADARRCOPYMETHOD::VARIABLEMETHOD);
|
||||
std::shared_ptr<double> demY = readDataArr<double>(demgridimg, img_start_rid, 0, img_blockRowCount, img_blockColCount, 2, GDALREADARRCOPYMETHOD::VARIABLEMETHOD);
|
||||
std::shared_ptr<double> demZ = readDataArr<double>(demgridimg, img_start_rid, 0, img_blockRowCount, img_blockColCount, 3, GDALREADARRCOPYMETHOD::VARIABLEMETHOD);
|
||||
std::shared_ptr<double> demR= demgridimg.band_num==3?
|
||||
readDataArr<double>(demgridimg, img_start_rid, 0, img_blockRowCount, img_blockColCount, 3, GDALREADARRCOPYMETHOD::VARIABLEMETHOD):
|
||||
readDataArr<double>(demgridimg, img_start_rid, 0, img_blockRowCount, img_blockColCount, 4, GDALREADARRCOPYMETHOD::VARIABLEMETHOD);
|
||||
|
||||
if (nullptr == demR) {
|
||||
for (long i = 0; i < img_blockRowCount; i++) {
|
||||
for (long j = 0; j < img_blockColCount; j++) {
|
||||
demR.get()[i * img_blockColCount + j] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
h_data.x_mat = (double*)mallocCUDAHost(sizeof(double) * img_blockRowCount * img_blockColCount); // 成像网格
|
||||
h_data.y_mat = (double*)mallocCUDAHost(sizeof(double) * img_blockRowCount * img_blockColCount);
|
||||
h_data.z_mat = (double*)mallocCUDAHost(sizeof(double) * img_blockRowCount * img_blockColCount);
|
||||
h_data.R_mat = (double*)mallocCUDAHost(sizeof(double) * img_blockRowCount * img_blockColCount);
|
||||
|
||||
h_data.nx = img_blockColCount;
|
||||
h_data.ny = img_blockRowCount;
|
||||
|
||||
|
@ -367,6 +211,7 @@ ErrorCode TBPImageAlgCls::ProcessGPU()
|
|||
h_data.x_mat[i * h_data.nx + j] = demX.get()[i * h_data.nx + j];
|
||||
h_data.y_mat[i * h_data.nx + j] = demY.get()[i * h_data.nx + j];
|
||||
h_data.z_mat[i * h_data.nx + j] = demZ.get()[i * h_data.nx + j];
|
||||
h_data.R_mat[i * h_data.nx + j] = demR.get()[i * h_data.nx + j];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -465,7 +310,7 @@ void TBPImageAlgCls::EchoFreqToTime()
|
|||
gdalImageComplex outTimeEchoImg = CreategdalImageComplexNoProj(this->TimeEchoDataPath, this->TimeEchoRowCount, this->TimeEchoColCount, 1);
|
||||
|
||||
// 分块
|
||||
long echoBlockline = Memory1GB / 8 / 2 / outColCount * 3; //1GB
|
||||
long echoBlockline = Memory1GB / 8 / 2 / outColCount *2; //1GB
|
||||
echoBlockline = echoBlockline < 1 ? 1 : echoBlockline;
|
||||
|
||||
|
||||
|
@ -489,6 +334,7 @@ void TBPImageAlgCls::EchoFreqToTime()
|
|||
host_echoArr.get()[ii * outColCount + jj] = make_cuComplex(echoArr.get()[ii * inColCount + jj].real(), echoArr.get()[ii * inColCount + jj].imag());
|
||||
}
|
||||
}
|
||||
|
||||
#pragma omp parallel for
|
||||
for (long ii = 0; ii < tempechoBlockline * outColCount; ii++) {
|
||||
host_IFFTechoArr.get()[ii] = make_cuComplex(0, 0);
|
||||
|
@ -537,3 +383,149 @@ bool TBPImageAlgCls::checkZeros(double* data, long long len)
|
|||
return flag;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
|
||||
//
|
||||
//void CreatePixelXYZ(std::shared_ptr<EchoL0Dataset> echoL0ds, QString outPixelXYZPath)
|
||||
//{
|
||||
// long bandwidth = echoL0ds->getBandwidth();
|
||||
// double Rnear = echoL0ds->getNearRange();
|
||||
// double Rfar = echoL0ds->getFarRange();
|
||||
// double refRange = echoL0ds->getRefPhaseRange();
|
||||
// double dx = LIGHTSPEED / 2.0 / bandwidth; // c/2b
|
||||
//
|
||||
//
|
||||
// // 创建坐标系统
|
||||
// long prfcount = echoL0ds->getPluseCount();
|
||||
// long freqcount = echoL0ds->getPlusePoints();
|
||||
// Eigen::MatrixXd gt = Eigen::MatrixXd::Zero(2, 3);
|
||||
// gt(0, 0) = 0;
|
||||
// gt(0, 1) = 1;
|
||||
// gt(0, 2) = 0;
|
||||
// gt(1, 0) = 0;
|
||||
// gt(1, 1) = 0;
|
||||
// gt(1, 2) = 1;
|
||||
// gdalImage xyzRaster = CreategdalImage(outPixelXYZPath, prfcount, freqcount, 3, gt, QString(""), false, true,true,GDT_Float64);
|
||||
// std::shared_ptr<double> antpos = echoL0ds->getAntPos();
|
||||
// dx = (echoL0ds->getFarRange()-echoL0ds->getNearRange())/(echoL0ds->getPlusePoints()-1);
|
||||
// Rnear = echoL0ds->getNearRange();
|
||||
// double Rref = echoL0ds->getRefPhaseRange();
|
||||
// double centerInc = echoL0ds->getCenterAngle()*d2r;
|
||||
// long echocol = Memory1GB * 1.0 / 8 / 4 / prfcount * 6;
|
||||
// qDebug() << "echocol:\t " << echocol ;
|
||||
// echocol = echocol < 1 ? 1: echocol;
|
||||
//
|
||||
//
|
||||
// std::shared_ptr<double> Pxs((double*)mallocCUDAHost(sizeof(double)*prfcount), FreeCUDAHost);
|
||||
// std::shared_ptr<double> Pys((double*)mallocCUDAHost(sizeof(double) * prfcount), FreeCUDAHost);
|
||||
// std::shared_ptr<double> Pzs((double*)mallocCUDAHost(sizeof(double) * prfcount), FreeCUDAHost);
|
||||
// std::shared_ptr<double> AntDirectX((double*)mallocCUDAHost(sizeof(double) * prfcount), FreeCUDAHost);
|
||||
// std::shared_ptr<double> AntDirectY((double*)mallocCUDAHost(sizeof(double) * prfcount), FreeCUDAHost);
|
||||
// std::shared_ptr<double> AntDirectZ((double*)mallocCUDAHost(sizeof(double) * prfcount), FreeCUDAHost);
|
||||
//
|
||||
// {
|
||||
// std::shared_ptr<double> antpos = echoL0ds->getAntPos();
|
||||
// double time = 0;
|
||||
// double Px = 0;
|
||||
// double Py = 0;
|
||||
// double Pz = 0;
|
||||
// for (long i = 0; i < prfcount; i++) {
|
||||
//
|
||||
// Pxs.get()[i] = antpos.get()[i * 19 + 1]; // 卫星坐标
|
||||
// Pys.get()[i] = antpos.get()[i * 19 + 2];
|
||||
// Pzs.get()[i] = antpos.get()[i * 19 + 3];
|
||||
// AntDirectX.get()[i] = antpos.get()[i * 19 + 13];// zero doppler
|
||||
// AntDirectY.get()[i] = antpos.get()[i * 19 + 14];
|
||||
// AntDirectZ.get()[i] = antpos.get()[i * 19 + 15];
|
||||
//
|
||||
// double NormAnt = std::sqrt(AntDirectX.get()[i] * AntDirectX.get()[i] +
|
||||
// AntDirectY.get()[i] * AntDirectY.get()[i] +
|
||||
// AntDirectZ.get()[i] * AntDirectZ.get()[i]);
|
||||
// AntDirectX.get()[i] = AntDirectX.get()[i] / NormAnt;
|
||||
// AntDirectY.get()[i] = AntDirectY.get()[i] / NormAnt;
|
||||
// AntDirectZ.get()[i] = AntDirectZ.get()[i] / NormAnt;// 归一化
|
||||
// }
|
||||
// antpos.reset();
|
||||
// }
|
||||
//
|
||||
// std::shared_ptr<double> d_Pxs((double*)mallocCUDADevice(sizeof(double) * prfcount), FreeCUDADevice);
|
||||
// std::shared_ptr<double> d_Pys((double*)mallocCUDADevice(sizeof(double) * prfcount), FreeCUDADevice);
|
||||
// std::shared_ptr<double> d_Pzs((double*)mallocCUDADevice(sizeof(double) * prfcount), FreeCUDADevice);
|
||||
// std::shared_ptr<double> d_AntDirectX((double*)mallocCUDADevice(sizeof(double) * prfcount), FreeCUDADevice);
|
||||
// std::shared_ptr<double> d_AntDirectY((double*)mallocCUDADevice(sizeof(double) * prfcount), FreeCUDADevice);
|
||||
// std::shared_ptr<double> d_AntDirectZ((double*)mallocCUDADevice(sizeof(double) * prfcount), FreeCUDADevice);
|
||||
//
|
||||
// HostToDevice(Pxs.get(), d_Pxs.get(), sizeof(double) * prfcount);
|
||||
// HostToDevice(Pys.get(), d_Pys.get(), sizeof(double) * prfcount);
|
||||
// HostToDevice(Pzs.get(), d_Pzs.get(), sizeof(double) * prfcount);
|
||||
// HostToDevice(AntDirectX.get(), d_AntDirectX.get(), sizeof(double) * prfcount);
|
||||
// HostToDevice(AntDirectY.get(), d_AntDirectY.get(), sizeof(double) * prfcount);
|
||||
// HostToDevice(AntDirectZ.get(), d_AntDirectZ.get(), sizeof(double) * prfcount);
|
||||
//
|
||||
//
|
||||
// for (long startcolidx = 0; startcolidx < freqcount; startcolidx = startcolidx + echocol) {
|
||||
//
|
||||
// long tempechocol = echocol;
|
||||
// if (startcolidx + tempechocol >= freqcount) {
|
||||
// tempechocol = freqcount - startcolidx;
|
||||
// }
|
||||
// qDebug() << "\r[" << QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss.zzz") << "] imgxyz :\t" << startcolidx << "\t-\t" << startcolidx + tempechocol << " / " << freqcount ;
|
||||
//
|
||||
// std::shared_ptr<double> demx = readDataArr<double>(xyzRaster, 0, startcolidx, prfcount, tempechocol, 1, GDALREADARRCOPYMETHOD::VARIABLEMETHOD);
|
||||
// std::shared_ptr<double> demy = readDataArr<double>(xyzRaster, 0, startcolidx, prfcount, tempechocol, 2, GDALREADARRCOPYMETHOD::VARIABLEMETHOD);
|
||||
// std::shared_ptr<double> demz = readDataArr<double>(xyzRaster, 0, startcolidx, prfcount, tempechocol, 3, GDALREADARRCOPYMETHOD::VARIABLEMETHOD);
|
||||
//
|
||||
// std::shared_ptr<double> h_demx((double*)mallocCUDAHost(sizeof(double) * prfcount*tempechocol), FreeCUDAHost);
|
||||
// std::shared_ptr<double> h_demy((double*)mallocCUDAHost(sizeof(double) * prfcount*tempechocol), FreeCUDAHost);
|
||||
// std::shared_ptr<double> h_demz((double*)mallocCUDAHost(sizeof(double) * prfcount*tempechocol), FreeCUDAHost);
|
||||
//
|
||||
//#pragma omp parallel for
|
||||
// for (long ii = 0; ii < prfcount; ii++) {
|
||||
// for (long jj = 0; jj < tempechocol; jj++) {
|
||||
// h_demx.get()[ii*tempechocol+jj]=demx.get()[ii*tempechocol+jj];
|
||||
// h_demy.get()[ii*tempechocol+jj]=demy.get()[ii*tempechocol+jj];
|
||||
// h_demz.get()[ii*tempechocol+jj]=demz.get()[ii*tempechocol+jj];
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// std::shared_ptr<double> d_demx((double*)mallocCUDADevice(sizeof(double) * prfcount * tempechocol), FreeCUDADevice);
|
||||
// std::shared_ptr<double> d_demy((double*)mallocCUDADevice(sizeof(double) * prfcount * tempechocol), FreeCUDADevice);
|
||||
// std::shared_ptr<double> d_demz((double*)mallocCUDADevice(sizeof(double) * prfcount * tempechocol), FreeCUDADevice);
|
||||
//
|
||||
// HostToDevice(h_demx.get(), d_demx.get(), sizeof(double) * prfcount * tempechocol);
|
||||
// HostToDevice(h_demy.get(), d_demy.get(), sizeof(double) * prfcount * tempechocol);
|
||||
// HostToDevice(h_demz.get(), d_demz.get(), sizeof(double) * prfcount * tempechocol);
|
||||
//
|
||||
//
|
||||
// TIMEBPCreateImageGrid(
|
||||
// d_Pxs.get(), d_Pys.get(), d_Pzs.get(),
|
||||
// d_AntDirectX.get(), d_AntDirectY.get(), d_AntDirectZ.get(),
|
||||
// d_demx.get(), d_demy.get(), d_demz.get(),
|
||||
// prfcount, tempechocol, 0,
|
||||
// Rnear+dx* startcolidx, dx, refRange // 更新最近修读
|
||||
// );
|
||||
//
|
||||
// DeviceToHost(h_demx.get(), d_demx.get(), sizeof(double) * prfcount * tempechocol);
|
||||
// DeviceToHost(h_demy.get(), d_demy.get(), sizeof(double) * prfcount * tempechocol);
|
||||
// DeviceToHost(h_demz.get(), d_demz.get(), sizeof(double) * prfcount * tempechocol);
|
||||
//
|
||||
//#pragma omp parallel for
|
||||
// for (long ii = 0; ii < prfcount; ii++) {
|
||||
// for (long jj = 0; jj < tempechocol; jj++) {
|
||||
// demx.get()[ii * tempechocol + jj]=h_demx.get()[ii * tempechocol + jj] ;
|
||||
// demy.get()[ii * tempechocol + jj]=h_demy.get()[ii * tempechocol + jj] ;
|
||||
// demz.get()[ii * tempechocol + jj]=h_demz.get()[ii * tempechocol + jj] ;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// xyzRaster.saveImage(demx, 0, startcolidx,prfcount,tempechocol, 1);
|
||||
// xyzRaster.saveImage(demy, 0, startcolidx,prfcount,tempechocol, 2);
|
||||
// xyzRaster.saveImage(demz, 0, startcolidx,prfcount,tempechocol, 3);
|
||||
// }
|
||||
//
|
||||
//}
|
||||
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ public:
|
|||
std::shared_ptr<SARSimulationImageL1Dataset> getImageL0();
|
||||
|
||||
public:
|
||||
ErrorCode Process(long num_thread);
|
||||
|
||||
ErrorCode ProcessWithGridNet(long num_thread, QString xyzRasterPath);
|
||||
void setGPU(bool flag);
|
||||
bool getGPU();
|
||||
|
@ -69,23 +69,3 @@ private://
|
|||
private:
|
||||
bool checkZeros(double* data, long long len);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
void CreatePixelXYZ(std::shared_ptr<EchoL0Dataset> echoL0ds,QString outPixelXYZPath);
|
||||
|
||||
|
||||
void TBPImageProcess(QString echofile,QString outImageFolder,QString imagePlanePath,long num_thread);
|
||||
|
||||
//
|
||||
//void TBPImageGridNet(
|
||||
// std::shared_ptr<double> antPx, std::shared_ptr<double> antPy, std::shared_ptr<double> antPz,
|
||||
// std::shared_ptr<double> img_x, std::shared_ptr<double> img_y, std::shared_ptr<double> img_z,
|
||||
// std::shared_ptr<std::complex<double>> echoArr,
|
||||
// std::shared_ptr<std::complex<double>> img_arr,
|
||||
// double freq, double dx, double Rnear, double Rfar, double refRange,
|
||||
// long rowcount, long colcount,
|
||||
// long prfcount, long freqcount,
|
||||
// long startPRFId, long startRowID
|
||||
//);
|
||||
|
|
|
@ -7,6 +7,46 @@
|
|||
#include "QCreateSARIntensityByLookTableDialog.h"
|
||||
#include "QtSimulationGeoSARSigma0Dialog.h"
|
||||
#include "QtLinearToIntenisityDialog.h"
|
||||
#include "InitCreateImageXYZDialog.h"
|
||||
#include "ImagePlaneAtiInterpDialog.h"
|
||||
#include "QCreateInSARImagePlaneXYZRDialog.h"
|
||||
#include "QLookTableResampleFromWGS84ToRange.h"
|
||||
#include "QSARSimulationComplexEchoDataDialog.h"
|
||||
#include "QSimulationBPImageMultiProduction.h"
|
||||
#include "QLonLatInterpAtiFromDEM.h"
|
||||
#include "QL1ASARProcessDialog.h"
|
||||
|
||||
#include "SimulationSARToolSARSatalliteSimulationWorkflow.h"
|
||||
|
||||
void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWidget* toolbox)
|
||||
{
|
||||
emit toolbox->addBoxToolItemSIGNAL(new SARSimlulationRFPCToolButton(toolbox)); // 300
|
||||
emit toolbox->addBoxToolItemSIGNAL(new SARSimulationTBPImageToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new QSimulationSAROrbitModelToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new LookTableComputerClassToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new QCreateSARIntensityByLookTableToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new QtSimulationGeoSARSigma0ToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new QtLinearToIntenisityToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new InitCreateImageXYZToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new ImagePlaneAtiInterpToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new QCreateInSARImagePlaneXYZRToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new QInSARBPImageToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new QLookTableResampleFromWGS84ToRangeToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new QSARSimulationComplexEchoDataDialogToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new QSimulationBPImageMultiProductionToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new QLonLatInterpAtiFromDEMToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new QL1ASARProcessDialogToolButton(toolbox));
|
||||
|
||||
#ifdef __SIMULATIONSARTOOL__SARSATALLITESIMULATIONWORKFLOW__H__
|
||||
|
||||
initSimulationSARToolSARSateSimulationWorkflow(toolbox);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
SARSimlulationRFPCToolButton::SARSimlulationRFPCToolButton(QWidget* parent)
|
||||
{
|
||||
|
@ -66,18 +106,6 @@ void QSimulationSAROrbitModelToolButton::excute()
|
|||
|
||||
|
||||
|
||||
void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWidget* toolbox)
|
||||
{
|
||||
emit toolbox->addBoxToolItemSIGNAL(new SARSimlulationRFPCToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new SARSimulationTBPImageToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new QSimulationSAROrbitModelToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new LookTableComputerClassToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new QCreateSARIntensityByLookTableToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new QtSimulationGeoSARSigma0ToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new QtLinearToIntenisityToolButton(toolbox));
|
||||
|
||||
}
|
||||
|
||||
LookTableComputerClassToolButton::LookTableComputerClassToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolPath = QVector<QString>(0);
|
||||
|
@ -141,4 +169,159 @@ void QtLinearToIntenisityToolButton::excute()
|
|||
{
|
||||
QtLinearToIntenisityDialog* dialog = new QtLinearToIntenisityDialog;
|
||||
dialog->show();
|
||||
}
|
||||
}
|
||||
|
||||
InitCreateImageXYZToolButton::InitCreateImageXYZToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolPath = QVector<QString>(0);
|
||||
this->toolPath.push_back(u8"成像工具库");
|
||||
this->toolname = QString(u8"1.构建成像粗平面");
|
||||
}
|
||||
|
||||
InitCreateImageXYZToolButton::~InitCreateImageXYZToolButton()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void InitCreateImageXYZToolButton::run()
|
||||
{
|
||||
InitCreateImageXYZDialog* dialog = new InitCreateImageXYZDialog;
|
||||
dialog->show();
|
||||
}
|
||||
|
||||
ImagePlaneAtiInterpToolButton::ImagePlaneAtiInterpToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolPath = QVector<QString>(0);
|
||||
this->toolPath.push_back(u8"成像工具库");
|
||||
this->toolname = QString(u8"2.粗平面映射DEM");
|
||||
}
|
||||
ImagePlaneAtiInterpToolButton::~ImagePlaneAtiInterpToolButton()
|
||||
{
|
||||
}
|
||||
|
||||
void ImagePlaneAtiInterpToolButton::run()
|
||||
{
|
||||
ImagePlaneAtiInterpDialog* dialog = new ImagePlaneAtiInterpDialog;
|
||||
dialog->show();
|
||||
}
|
||||
|
||||
QCreateInSARImagePlaneXYZRToolButton::QCreateInSARImagePlaneXYZRToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolPath = QVector<QString>(0);
|
||||
this->toolPath.push_back(u8"InSAR仿真工具库");
|
||||
this->toolname = QString(u8"1.创建InSAR地距成像平面");
|
||||
}
|
||||
|
||||
QCreateInSARImagePlaneXYZRToolButton::~QCreateInSARImagePlaneXYZRToolButton()
|
||||
{
|
||||
}
|
||||
|
||||
void QCreateInSARImagePlaneXYZRToolButton::run()
|
||||
{
|
||||
QCreateInSARImagePlaneXYZRDialog* dialog = new QCreateInSARImagePlaneXYZRDialog;
|
||||
dialog->show();
|
||||
}
|
||||
|
||||
QInSARBPImageToolButton::QInSARBPImageToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolPath = QVector<QString>(0);
|
||||
this->toolPath.push_back(u8"InSAR仿真工具库");
|
||||
this->toolname = QString(u8"2.InSAR地距BP成像");
|
||||
}
|
||||
|
||||
QInSARBPImageToolButton::~QInSARBPImageToolButton()
|
||||
{
|
||||
}
|
||||
|
||||
void QInSARBPImageToolButton::run()
|
||||
{
|
||||
QSimulationBPImage* dialog = new QSimulationBPImage;
|
||||
dialog->show();
|
||||
}
|
||||
|
||||
QLookTableResampleFromWGS84ToRangeToolButton::QLookTableResampleFromWGS84ToRangeToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolPath = QVector<QString>(0);
|
||||
this->toolPath.push_back(u8"仿真工具库");
|
||||
this->toolname = QString(u8"查找表的反向插值");
|
||||
}
|
||||
|
||||
QLookTableResampleFromWGS84ToRangeToolButton::~QLookTableResampleFromWGS84ToRangeToolButton()
|
||||
{
|
||||
}
|
||||
|
||||
void QLookTableResampleFromWGS84ToRangeToolButton::run()
|
||||
{
|
||||
QLookTableResampleFromWGS84ToRange* dialog = new QLookTableResampleFromWGS84ToRange;
|
||||
dialog->show();
|
||||
}
|
||||
|
||||
//QSARSimulationComplexEchoDataDialog
|
||||
|
||||
QSARSimulationComplexEchoDataDialogToolButton::QSARSimulationComplexEchoDataDialogToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolPath = QVector<QString>(0);
|
||||
this->toolPath.push_back(u8"成像工具库");
|
||||
this->toolname = QString(u8"回波反采样工具(测试)");
|
||||
}
|
||||
|
||||
QSARSimulationComplexEchoDataDialogToolButton::~QSARSimulationComplexEchoDataDialogToolButton()
|
||||
{
|
||||
}
|
||||
|
||||
void QSARSimulationComplexEchoDataDialogToolButton::run()
|
||||
{
|
||||
QSARSimulationComplexEchoDataDialog* dialog = new QSARSimulationComplexEchoDataDialog;
|
||||
dialog->show();
|
||||
}
|
||||
|
||||
QSimulationBPImageMultiProductionToolButton::QSimulationBPImageMultiProductionToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolPath = QVector<QString>(0);
|
||||
this->toolPath.push_back(u8"成像工具库");
|
||||
this->toolname = QString(u8"1-2级产品生产");
|
||||
}
|
||||
|
||||
QSimulationBPImageMultiProductionToolButton::~QSimulationBPImageMultiProductionToolButton()
|
||||
{
|
||||
}
|
||||
|
||||
void QSimulationBPImageMultiProductionToolButton::run()
|
||||
{
|
||||
QSimulationBPImageMultiProduction* dialog = new QSimulationBPImageMultiProduction;
|
||||
dialog->show();
|
||||
}
|
||||
|
||||
QLonLatInterpAtiFromDEMToolButton::QLonLatInterpAtiFromDEMToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolPath = QVector<QString>(0);
|
||||
this->toolPath.push_back(u8"成像工具库");
|
||||
this->toolname = QString(u8"生产斜距成像平面");
|
||||
}
|
||||
|
||||
QLonLatInterpAtiFromDEMToolButton::~QLonLatInterpAtiFromDEMToolButton()
|
||||
{
|
||||
}
|
||||
|
||||
void QLonLatInterpAtiFromDEMToolButton::run()
|
||||
{
|
||||
QLonLatInterpAtiFromDEM* dialog = new QLonLatInterpAtiFromDEM;
|
||||
dialog->show();
|
||||
}
|
||||
|
||||
QL1ASARProcessDialogToolButton::QL1ASARProcessDialogToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolPath = QVector<QString>(0);
|
||||
this->toolPath.push_back(u8"成像工具库");
|
||||
this->toolname = QString(u8"生产L1B级产品");
|
||||
}
|
||||
|
||||
QL1ASARProcessDialogToolButton::~QL1ASARProcessDialogToolButton()
|
||||
{
|
||||
}
|
||||
|
||||
void QL1ASARProcessDialogToolButton::run()
|
||||
{
|
||||
QL1ASARProcessDialog* dialog = new QL1ASARProcessDialog;
|
||||
dialog->show();
|
||||
}
|
||||
|
|
|
@ -13,6 +13,10 @@ namespace LAMPMainWidget {
|
|||
class ToolBoxWidget;
|
||||
|
||||
|
||||
extern "C" SIMULATIONSARTOOL_EXPORT void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWidget* toolbox);
|
||||
|
||||
|
||||
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT SARSimlulationRFPCToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
|
@ -98,8 +102,104 @@ public slots:
|
|||
};
|
||||
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT InitCreateImageXYZToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
InitCreateImageXYZToolButton(QWidget* parent = nullptr);
|
||||
~InitCreateImageXYZToolButton();
|
||||
public :
|
||||
virtual void run() override;
|
||||
|
||||
};
|
||||
|
||||
|
||||
extern "C" SIMULATIONSARTOOL_EXPORT void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWidget* toolbox);
|
||||
class SIMULATIONSARTOOL_EXPORT ImagePlaneAtiInterpToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
ImagePlaneAtiInterpToolButton(QWidget* parent = nullptr);
|
||||
~ImagePlaneAtiInterpToolButton();
|
||||
public:
|
||||
virtual void run() override;
|
||||
|
||||
};
|
||||
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT QCreateInSARImagePlaneXYZRToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QCreateInSARImagePlaneXYZRToolButton(QWidget* parent = nullptr);
|
||||
~QCreateInSARImagePlaneXYZRToolButton();
|
||||
public:
|
||||
virtual void run() override;
|
||||
|
||||
};
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT QInSARBPImageToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QInSARBPImageToolButton(QWidget* parent = nullptr);
|
||||
~QInSARBPImageToolButton();
|
||||
public:
|
||||
virtual void run() override;
|
||||
|
||||
};
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT QLookTableResampleFromWGS84ToRangeToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QLookTableResampleFromWGS84ToRangeToolButton(QWidget* parent = nullptr);
|
||||
~QLookTableResampleFromWGS84ToRangeToolButton();
|
||||
public:
|
||||
virtual void run() override;
|
||||
|
||||
};
|
||||
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT QSARSimulationComplexEchoDataDialogToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QSARSimulationComplexEchoDataDialogToolButton(QWidget* parent = nullptr);
|
||||
~QSARSimulationComplexEchoDataDialogToolButton();
|
||||
public:
|
||||
virtual void run() override;
|
||||
|
||||
};
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT QSimulationBPImageMultiProductionToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QSimulationBPImageMultiProductionToolButton(QWidget* parent = nullptr);
|
||||
~QSimulationBPImageMultiProductionToolButton();
|
||||
public:
|
||||
virtual void run() override;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT QLonLatInterpAtiFromDEMToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QLonLatInterpAtiFromDEMToolButton(QWidget* parent = nullptr);
|
||||
~QLonLatInterpAtiFromDEMToolButton();
|
||||
public:
|
||||
virtual void run() override;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT QL1ASARProcessDialogToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QL1ASARProcessDialogToolButton(QWidget* parent = nullptr);
|
||||
~QL1ASARProcessDialogToolButton();
|
||||
public:
|
||||
virtual void run() override;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<IncludePath>..\..\BaseCommonLibrary;..\..\BaseCommonLibrary\BaseTool;..\..\BaseCommonLibrary\ToolAbstract;..\..\GPUBaseLib\GPUTool;.\SimulationSAR;.;..\..\LAMPSARProcessProgram\ToolBoxManager;..\..\RasterMainWidgetGUI\RasterMainWidget;..\..\RasterProcessToolWidget;..\..\RasterMainWidgetGUI;.\PowerSimulationIncoherent;..\..\ImageshowTool;..\..\ImageshowTool\Imageshow;$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
|
||||
<IncludePath>..\..\BaseCommonLibrary;..\..\BaseCommonLibrary\BaseTool;..\..\BaseCommonLibrary\ToolAbstract;..\..\GPUBaseLib\GPUTool;.\SARImage;.\SimulationSAR;.;..\..\LAMPSARProcessProgram\ToolBoxManager;..\..\RasterMainWidgetGUI\RasterMainWidget;..\..\RasterProcessToolWidget;..\..\RasterMainWidgetGUI;.\PowerSimulationIncoherent;..\..\ImageshowTool;..\..\ImageshowTool\Imageshow;$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\Toolbox\</OutDir>
|
||||
<TargetName>PluginTool_$(ProjectName)</TargetName>
|
||||
<CopyLocalProjectReference>true</CopyLocalProjectReference>
|
||||
|
@ -124,8 +124,10 @@
|
|||
<OpenMPSupport>true</OpenMPSupport>
|
||||
<LanguageStandard>stdcpp14</LanguageStandard>
|
||||
<LanguageStandard_C>stdc11</LanguageStandard_C>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
|
||||
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
</ClCompile>
|
||||
<CudaCompile>
|
||||
<GenerateRelocatableDeviceCode>true</GenerateRelocatableDeviceCode>
|
||||
|
@ -210,10 +212,21 @@
|
|||
<ItemGroup>
|
||||
<ClCompile Include="PowerSimulationIncoherent\OribtModelOperator.cpp" />
|
||||
<ClCompile Include="PowerSimulationIncoherent\QCreateSARIntensityByLookTableDialog.cpp" />
|
||||
<ClCompile Include="PowerSimulationIncoherent\QLookTableResampleFromWGS84ToRange.cpp" />
|
||||
<ClCompile Include="PowerSimulationIncoherent\QSimulationLookTableDialog.cpp" />
|
||||
<ClCompile Include="PowerSimulationIncoherent\QSimulationSARPolynomialOrbitModel.cpp" />
|
||||
<ClCompile Include="PowerSimulationIncoherent\QtLinearToIntenisityDialog.cpp" />
|
||||
<ClCompile Include="PowerSimulationIncoherent\QtSimulationGeoSARSigma0Dialog.cpp" />
|
||||
<ClCompile Include="SARImage\ImageNetOperator.cpp" />
|
||||
<ClCompile Include="SARImage\ImagePlaneAtiInterpDialog.cpp" />
|
||||
<ClCompile Include="SARImage\InitCreateImageXYZDialog.cpp" />
|
||||
<ClCompile Include="SARImage\QCreateInSARImagePlaneXYZRDialog.cpp" />
|
||||
<ClCompile Include="SARImage\QL1ASARProcessDialog.cpp" />
|
||||
<ClCompile Include="SARImage\QLonLatInterpAtiFromDEM.cpp" />
|
||||
<ClCompile Include="SARImage\QSARSimulationComplexEchoDataDialog.cpp" />
|
||||
<ClCompile Include="SARImage\QSimulationBPImageMultiProduction.cpp" />
|
||||
<ClCompile Include="SimulationSARToolSARSatalliteSimulationWorkflow.cpp" />
|
||||
<ClCompile Include="SimulationSAR\QEcoherentAndAdditive.cpp" />
|
||||
<ClCompile Include="SimulationSAR\QImageSARRFPC.cpp" />
|
||||
<ClCompile Include="SimulationSAR\QSARLookTableSimualtionGUI.cpp" />
|
||||
<ClCompile Include="SimulationSAR\QSimulationBPImage.cpp" />
|
||||
|
@ -226,6 +239,7 @@
|
|||
<ClCompile Include="SimulationSAR\TBPImageAlgCls.cpp" />
|
||||
<ClCompile Include="UnitTestMain.cpp" />
|
||||
<CudaCompile Include="GPUBpSimulation.cu" />
|
||||
<CudaCompile Include="SARImage\GPUBPImageNet.cu" />
|
||||
<CudaCompile Include="Sigma0ClsReflect.cu" />
|
||||
<CudaCompile Include="SimulationSAR\GPURFPC_single.cu" />
|
||||
<CudaCompile Include="SimulationSAR\GPUTBPImage.cu" />
|
||||
|
@ -237,6 +251,17 @@
|
|||
<QtMoc Include="PowerSimulationIncoherent\QCreateSARIntensityByLookTableDialog.h" />
|
||||
<QtMoc Include="PowerSimulationIncoherent\QtLinearToIntenisityDialog.h" />
|
||||
<QtMoc Include="PowerSimulationIncoherent\QtSimulationGeoSARSigma0Dialog.h" />
|
||||
<QtMoc Include="SARImage\InitCreateImageXYZDialog.h" />
|
||||
<QtMoc Include="PowerSimulationIncoherent\QLookTableResampleFromWGS84ToRange.h" />
|
||||
<ClInclude Include="SARImage\GPUBPImageNet.cuh" />
|
||||
<ClInclude Include="SARImage\ImageNetOperator.h" />
|
||||
<QtMoc Include="SARImage\ImagePlaneAtiInterpDialog.h" />
|
||||
<QtMoc Include="SARImage\QCreateInSARImagePlaneXYZRDialog.h" />
|
||||
<QtMoc Include="SARImage\QSARSimulationComplexEchoDataDialog.h" />
|
||||
<QtMoc Include="SARImage\QSimulationBPImageMultiProduction.h" />
|
||||
<QtMoc Include="SARImage\QLonLatInterpAtiFromDEM.h" />
|
||||
<QtMoc Include="SARImage\QL1ASARProcessDialog.h" />
|
||||
<QtMoc Include="SimulationSARToolSARSatalliteSimulationWorkflow.h" />
|
||||
<ClInclude Include="SimulationSARToolAPI.h" />
|
||||
<ClInclude Include="simulationsartool_global.h" />
|
||||
<QtMoc Include="SimulationSAR\QImageSARRFPC.h" />
|
||||
|
@ -248,6 +273,7 @@
|
|||
<ClInclude Include="SimulationSAR\BPBasic0_CUDA.cuh" />
|
||||
<ClInclude Include="SimulationSAR\GPURFPC_single.cuh" />
|
||||
<ClInclude Include="SimulationSAR\GPUTBPImage.cuh" />
|
||||
<QtMoc Include="SimulationSAR\QEcoherentAndAdditive.h" />
|
||||
<ClInclude Include="SimulationSAR\RFPCProcessCls.h" />
|
||||
<ClInclude Include="SimulationSAR\SARSatelliteSimulationAbstractCls.h" />
|
||||
<ClInclude Include="SimulationSAR\SARSimulationTaskSetting.h" />
|
||||
|
@ -267,10 +293,19 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtUic Include="PowerSimulationIncoherent\QCreateSARIntensityByLookTableDialog.ui" />
|
||||
<QtUic Include="PowerSimulationIncoherent\QLookTableResampleFromWGS84ToRange.ui" />
|
||||
<QtUic Include="PowerSimulationIncoherent\QSimulationLookTableDialog.ui" />
|
||||
<QtUic Include="PowerSimulationIncoherent\QSimulationSARPolynomialOrbitModel.ui" />
|
||||
<QtUic Include="PowerSimulationIncoherent\QtLinearToIntenisityDialog.ui" />
|
||||
<QtUic Include="PowerSimulationIncoherent\QtSimulationGeoSARSigma0Dialog.ui" />
|
||||
<QtUic Include="SARImage\ImagePlaneAtiInterpDialog.ui" />
|
||||
<QtUic Include="SARImage\InitCreateImageXYZDialog.ui" />
|
||||
<QtUic Include="SARImage\QCreateInSARImagePlaneXYZRDialog.ui" />
|
||||
<QtUic Include="SARImage\QL1ASARProcessDialog.ui" />
|
||||
<QtUic Include="SARImage\QLonLatInterpAtiFromDEM.ui" />
|
||||
<QtUic Include="SARImage\QSARSimulationComplexEchoDataDialog.ui" />
|
||||
<QtUic Include="SARImage\QSimulationBPImageMultiProduction.ui" />
|
||||
<QtUic Include="SimulationSAR\QEcoherentAndAdditive.ui" />
|
||||
<QtUic Include="SimulationSAR\QImageSARRFPC.ui" />
|
||||
<QtUic Include="SimulationSAR\QSARLookTableSimualtionGUI.ui" />
|
||||
<QtUic Include="SimulationSAR\QSimulationBPImage.ui" />
|
||||
|
|
|
@ -13,10 +13,6 @@
|
|||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Form Files">
|
||||
<UniqueIdentifier>{99349809-55BA-4b9d-BF79-8FDBB0286EB3}</UniqueIdentifier>
|
||||
<Extensions>ui</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Translation Files">
|
||||
<UniqueIdentifier>{639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}</UniqueIdentifier>
|
||||
<Extensions>ts</Extensions>
|
||||
|
@ -27,6 +23,13 @@
|
|||
<Filter Include="PowerSimulationIncoherent">
|
||||
<UniqueIdentifier>{9b848585-2348-400d-b12a-dd79a2a71007}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SARImage">
|
||||
<UniqueIdentifier>{3380934c-6b95-45eb-8d70-d8b58e0e9de3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Form Files">
|
||||
<UniqueIdentifier>{99349809-55BA-4b9d-BF79-8FDBB0286EB3}</UniqueIdentifier>
|
||||
<Extensions>ui</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="simulationsartool_global.h">
|
||||
|
@ -71,6 +74,12 @@
|
|||
<ClInclude Include="SimulationSAR\GPURFPC_single.cuh">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SARImage\ImageNetOperator.h">
|
||||
<Filter>SARImage</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SARImage\GPUBPImageNet.cuh">
|
||||
<Filter>SARImage</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="SimulationSAR\QImageSARRFPC.cpp">
|
||||
|
@ -124,6 +133,39 @@
|
|||
<ClCompile Include="PowerSimulationIncoherent\QtSimulationGeoSARSigma0Dialog.cpp">
|
||||
<Filter>PowerSimulationIncoherent</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SARImage\InitCreateImageXYZDialog.cpp">
|
||||
<Filter>SARImage</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SARImage\ImageNetOperator.cpp">
|
||||
<Filter>SARImage</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SARImage\ImagePlaneAtiInterpDialog.cpp">
|
||||
<Filter>SARImage</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SARImage\QCreateInSARImagePlaneXYZRDialog.cpp">
|
||||
<Filter>SARImage</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SimulationSAR\QEcoherentAndAdditive.cpp">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="PowerSimulationIncoherent\QLookTableResampleFromWGS84ToRange.cpp">
|
||||
<Filter>PowerSimulationIncoherent</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SARImage\QSimulationBPImageMultiProduction.cpp">
|
||||
<Filter>SARImage</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SARImage\QSARSimulationComplexEchoDataDialog.cpp">
|
||||
<Filter>SARImage</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SARImage\QLonLatInterpAtiFromDEM.cpp">
|
||||
<Filter>SARImage</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SARImage\QL1ASARProcessDialog.cpp">
|
||||
<Filter>SARImage</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SimulationSARToolSARSatalliteSimulationWorkflow.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtUic Include="SimulationSAR\QImageSARRFPC.ui">
|
||||
|
@ -153,6 +195,33 @@
|
|||
<QtUic Include="PowerSimulationIncoherent\QtSimulationGeoSARSigma0Dialog.ui">
|
||||
<Filter>PowerSimulationIncoherent</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="SARImage\InitCreateImageXYZDialog.ui">
|
||||
<Filter>SARImage</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="SARImage\ImagePlaneAtiInterpDialog.ui">
|
||||
<Filter>SARImage</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="SARImage\QCreateInSARImagePlaneXYZRDialog.ui">
|
||||
<Filter>SARImage</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="SimulationSAR\QEcoherentAndAdditive.ui">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="PowerSimulationIncoherent\QLookTableResampleFromWGS84ToRange.ui">
|
||||
<Filter>PowerSimulationIncoherent</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="SARImage\QSARSimulationComplexEchoDataDialog.ui">
|
||||
<Filter>SARImage</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="SARImage\QSimulationBPImageMultiProduction.ui">
|
||||
<Filter>SARImage</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="SARImage\QLonLatInterpAtiFromDEM.ui">
|
||||
<Filter>SARImage</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="SARImage\QL1ASARProcessDialog.ui">
|
||||
<Filter>SARImage</Filter>
|
||||
</QtUic>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="SimulationSAR\QImageSARRFPC.h">
|
||||
|
@ -185,6 +254,36 @@
|
|||
<QtMoc Include="PowerSimulationIncoherent\QtSimulationGeoSARSigma0Dialog.h">
|
||||
<Filter>PowerSimulationIncoherent</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="SARImage\InitCreateImageXYZDialog.h">
|
||||
<Filter>SARImage</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="SARImage\ImagePlaneAtiInterpDialog.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="SARImage\QCreateInSARImagePlaneXYZRDialog.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="SimulationSAR\QEcoherentAndAdditive.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="PowerSimulationIncoherent\QLookTableResampleFromWGS84ToRange.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="SARImage\QSARSimulationComplexEchoDataDialog.h">
|
||||
<Filter>SARImage</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="SARImage\QSimulationBPImageMultiProduction.h">
|
||||
<Filter>SARImage</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="SARImage\QLonLatInterpAtiFromDEM.h">
|
||||
<Filter>SARImage</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="SARImage\QL1ASARProcessDialog.h">
|
||||
<Filter>SARImage</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="SimulationSARToolSARSatalliteSimulationWorkflow.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CudaCompile Include="SimulationSAR\GPURFPC.cu">
|
||||
|
@ -220,5 +319,8 @@
|
|||
<CudaCompile Include="Sigma0ClsReflect.cu">
|
||||
<Filter>SimulationSAR</Filter>
|
||||
</CudaCompile>
|
||||
<CudaCompile Include="SARImage\GPUBPImageNet.cu">
|
||||
<Filter>SARImage</Filter>
|
||||
</CudaCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,255 @@
|
|||
#include "SimulationSARToolSARSatalliteSimulationWorkflow.h"
|
||||
#include "QSimulationSARPolynomialOrbitModel.h"
|
||||
#include "QtSimulationGeoSARSigma0Dialog.h"
|
||||
#include <QSimulationLookTableDialog.h>
|
||||
#include <QCreateSARIntensityByLookTableDialog.h>
|
||||
#include <QImageSARRFPC.h>
|
||||
#include <QCreateInSARImagePlaneXYZRDialog.h>
|
||||
#include <QLookTableResampleFromWGS84ToRange.h>
|
||||
#include <QSimulationBPImageMultiProduction.h>
|
||||
#include <QL1ASARProcessDialog.h>
|
||||
|
||||
SIMULATIONSARTOOL_EXPORT void initSimulationSARToolSARSateSimulationWorkflow(ToolBoxWidget* toolbox)
|
||||
{
|
||||
// 2. 轨道节点模型拟合
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3B仿真流程"}, new QPolyfitSatelliteGPSModelToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3C仿真流程"}, new QPolyfitSatelliteGPSModelToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1A仿真流程"}, new QPolyfitSatelliteGPSModelToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1B仿真流程"}, new QPolyfitSatelliteGPSModelToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2E仿真流程"}, new QPolyfitSatelliteGPSModelToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2F仿真流程"}, new QPolyfitSatelliteGPSModelToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT04仿真流程"}, new QPolyfitSatelliteGPSModelToolButton(toolbox));
|
||||
|
||||
|
||||
// 5. 基于DEM和分类信息的SAR图像模拟
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3B仿真流程",u8"基于DEM和分类信息的SAR图像模拟"}, new QGeneratorGeoSimulationRsaterToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3C仿真流程",u8"基于DEM和分类信息的SAR图像模拟"}, new QGeneratorGeoSimulationRsaterToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1A仿真流程",u8"基于DEM和分类信息的SAR图像模拟"}, new QGeneratorGeoSimulationRsaterToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1B仿真流程",u8"基于DEM和分类信息的SAR图像模拟"}, new QGeneratorGeoSimulationRsaterToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2E仿真流程",u8"基于DEM和分类信息的SAR图像模拟"}, new QGeneratorGeoSimulationRsaterToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2F仿真流程",u8"基于DEM和分类信息的SAR图像模拟"}, new QGeneratorGeoSimulationRsaterToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT04仿真流程",u8"基于DEM和分类信息的SAR图像模拟"}, new QGeneratorGeoSimulationRsaterToolButton(toolbox));
|
||||
|
||||
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3B仿真流程", u8"基于DEM和分类信息的SAR图像模拟"}, new QGeneratorMapGeoAndSltLookTableToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3C仿真流程", u8"基于DEM和分类信息的SAR图像模拟"}, new QGeneratorMapGeoAndSltLookTableToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1A仿真流程", u8"基于DEM和分类信息的SAR图像模拟"}, new QGeneratorMapGeoAndSltLookTableToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1B仿真流程", u8"基于DEM和分类信息的SAR图像模拟"}, new QGeneratorMapGeoAndSltLookTableToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2E仿真流程", u8"基于DEM和分类信息的SAR图像模拟"}, new QGeneratorMapGeoAndSltLookTableToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2F仿真流程", u8"基于DEM和分类信息的SAR图像模拟"}, new QGeneratorMapGeoAndSltLookTableToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT04仿真流程", u8"基于DEM和分类信息的SAR图像模拟"}, new QGeneratorMapGeoAndSltLookTableToolButton(toolbox));
|
||||
|
||||
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3B仿真流程", u8"基于DEM和分类信息的SAR图像模拟"}, new QSimulationSlrSARRasterToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3C仿真流程", u8"基于DEM和分类信息的SAR图像模拟"}, new QSimulationSlrSARRasterToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1A仿真流程", u8"基于DEM和分类信息的SAR图像模拟"}, new QSimulationSlrSARRasterToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1B仿真流程", u8"基于DEM和分类信息的SAR图像模拟"}, new QSimulationSlrSARRasterToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2E仿真流程", u8"基于DEM和分类信息的SAR图像模拟"}, new QSimulationSlrSARRasterToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2F仿真流程", u8"基于DEM和分类信息的SAR图像模拟"}, new QSimulationSlrSARRasterToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT04仿真流程", u8"基于DEM和分类信息的SAR图像模拟"}, new QSimulationSlrSARRasterToolButton(toolbox));
|
||||
|
||||
|
||||
|
||||
|
||||
//6. 基于回波仿真成像
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3B仿真流程", u8"基于回波仿真成像"}, new QEchoDataSimulationSARRFPCToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3C仿真流程", u8"基于回波仿真成像"}, new QEchoDataSimulationSARRFPCToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1A仿真流程", u8"基于回波仿真成像"}, new QEchoDataSimulationSARRFPCToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1B仿真流程", u8"基于回波仿真成像"}, new QEchoDataSimulationSARRFPCToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2E仿真流程", u8"基于回波仿真成像"}, new QEchoDataSimulationSARRFPCToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2F仿真流程", u8"基于回波仿真成像"}, new QEchoDataSimulationSARRFPCToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT04仿真流程", u8"基于回波仿真成像"}, new QEchoDataSimulationSARRFPCToolButton(toolbox));
|
||||
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3B仿真流程", u8"基于回波仿真成像"}, new QInSARImageNetGeneratorToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3C仿真流程", u8"基于回波仿真成像"}, new QInSARImageNetGeneratorToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1A仿真流程", u8"基于回波仿真成像"}, new QInSARImageNetGeneratorToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1B仿真流程", u8"基于回波仿真成像"}, new QInSARImageNetGeneratorToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2E仿真流程", u8"基于回波仿真成像"}, new QInSARImageNetGeneratorToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2F仿真流程", u8"基于回波仿真成像"}, new QInSARImageNetGeneratorToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT04仿真流程", u8"基于回波仿真成像"}, new QInSARImageNetGeneratorToolButton(toolbox));
|
||||
|
||||
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3B仿真流程",u8"基于回波仿真成像"}, new QGeneratorMapGeoAndSltLookTableToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3C仿真流程",u8"基于回波仿真成像"}, new QGeneratorMapGeoAndSltLookTableToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1A仿真流程",u8"基于回波仿真成像"}, new QGeneratorMapGeoAndSltLookTableToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1B仿真流程",u8"基于回波仿真成像"}, new QGeneratorMapGeoAndSltLookTableToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2E仿真流程",u8"基于回波仿真成像"}, new QGeneratorMapGeoAndSltLookTableToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2F仿真流程",u8"基于回波仿真成像"}, new QGeneratorMapGeoAndSltLookTableToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT04仿真流程",u8"基于回波仿真成像"}, new QGeneratorMapGeoAndSltLookTableToolButton(toolbox));
|
||||
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3B仿真流程", u8"基于回波仿真成像"}, new QMapLooktableToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3C仿真流程", u8"基于回波仿真成像"}, new QMapLooktableToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1A仿真流程", u8"基于回波仿真成像"}, new QMapLooktableToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1B仿真流程", u8"基于回波仿真成像"}, new QMapLooktableToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2E仿真流程", u8"基于回波仿真成像"}, new QMapLooktableToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2F仿真流程", u8"基于回波仿真成像"}, new QMapLooktableToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT04仿真流程", u8"基于回波仿真成像"}, new QMapLooktableToolButton(toolbox));
|
||||
|
||||
|
||||
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3B仿真流程", u8"基于回波仿真成像"}, new QSimulationBPImageMultiProductionLevel1_2ToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3C仿真流程", u8"基于回波仿真成像"}, new QSimulationBPImageMultiProductionLevel1_2ToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1A仿真流程", u8"基于回波仿真成像"}, new QSimulationBPImageMultiProductionLevel1_2ToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1B仿真流程", u8"基于回波仿真成像"}, new QSimulationBPImageMultiProductionLevel1_2ToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2E仿真流程", u8"基于回波仿真成像"}, new QSimulationBPImageMultiProductionLevel1_2ToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2F仿真流程", u8"基于回波仿真成像"}, new QSimulationBPImageMultiProductionLevel1_2ToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT04仿真流程", u8"基于回波仿真成像"}, new QSimulationBPImageMultiProductionLevel1_2ToolButton(toolbox));
|
||||
|
||||
|
||||
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3B仿真流程", u8"基于回波仿真成像"}, new QSimulationBPImageL1BToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"GF3C仿真流程", u8"基于回波仿真成像"}, new QSimulationBPImageL1BToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1A仿真流程", u8"基于回波仿真成像"}, new QSimulationBPImageL1BToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT1B仿真流程", u8"基于回波仿真成像"}, new QSimulationBPImageL1BToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2E仿真流程", u8"基于回波仿真成像"}, new QSimulationBPImageL1BToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"HJ2F仿真流程", u8"基于回波仿真成像"}, new QSimulationBPImageL1BToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemInPathSIGNAL(QVector<QString>{u8"大场景仿真流程", u8"LT04仿真流程", u8"基于回波仿真成像"}, new QSimulationBPImageL1BToolButton(toolbox));
|
||||
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
QPolyfitSatelliteGPSModelToolButton::QPolyfitSatelliteGPSModelToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolname = QString(u8"根据轨道节点拟合轨道模型");
|
||||
}
|
||||
|
||||
QPolyfitSatelliteGPSModelToolButton::~QPolyfitSatelliteGPSModelToolButton()
|
||||
{
|
||||
}
|
||||
|
||||
void QPolyfitSatelliteGPSModelToolButton::run()
|
||||
{
|
||||
QSimulationPolynomialSAROrbitModel* dialog = new QSimulationPolynomialSAROrbitModel;
|
||||
dialog->setWindowTitle(u8"根据轨道节点拟合轨道模型");
|
||||
dialog->show();
|
||||
}
|
||||
|
||||
QGeneratorGeoSimulationRsaterToolButton::QGeneratorGeoSimulationRsaterToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolname = QString(u8"1.生成地距模拟影像");
|
||||
}
|
||||
|
||||
QGeneratorGeoSimulationRsaterToolButton::~QGeneratorGeoSimulationRsaterToolButton()
|
||||
{
|
||||
}
|
||||
|
||||
void QGeneratorGeoSimulationRsaterToolButton::run()
|
||||
{
|
||||
QtSimulationGeoSARSigma0Dialog* dialog = new QtSimulationGeoSARSigma0Dialog;
|
||||
dialog->setWindowTitle(u8"生成地距模拟影像");
|
||||
dialog->show();
|
||||
}
|
||||
|
||||
QGeneratorMapGeoAndSltLookTableToolButton::QGeneratorMapGeoAndSltLookTableToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolname = QString(u8"2.计算坐标映射表");
|
||||
}
|
||||
|
||||
QGeneratorMapGeoAndSltLookTableToolButton::~QGeneratorMapGeoAndSltLookTableToolButton()
|
||||
{
|
||||
}
|
||||
|
||||
void QGeneratorMapGeoAndSltLookTableToolButton::run()
|
||||
{
|
||||
QSimulationLookTableDialog* dialog = new QSimulationLookTableDialog;
|
||||
dialog->setWindowTitle(u8"创建地距-斜距映射表");
|
||||
dialog->show();
|
||||
}
|
||||
|
||||
QSimulationSlrSARRasterToolButton::QSimulationSlrSARRasterToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolname = QString(u8"3.生成斜距模拟影像");
|
||||
}
|
||||
|
||||
QSimulationSlrSARRasterToolButton::~QSimulationSlrSARRasterToolButton()
|
||||
{
|
||||
}
|
||||
|
||||
void QSimulationSlrSARRasterToolButton::run()
|
||||
{
|
||||
QCreateSARIntensityByLookTableDialog* dialog = new QCreateSARIntensityByLookTableDialog;
|
||||
dialog->setWindowTitle(u8"生成斜距模拟影像");
|
||||
dialog->show();
|
||||
}
|
||||
|
||||
QEchoDataSimulationSARRFPCToolButton::QEchoDataSimulationSARRFPCToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolname = QString(u8"1.距离频域脉冲相干法");
|
||||
}
|
||||
|
||||
QEchoDataSimulationSARRFPCToolButton::~QEchoDataSimulationSARRFPCToolButton()
|
||||
{
|
||||
}
|
||||
|
||||
void QEchoDataSimulationSARRFPCToolButton::run()
|
||||
{
|
||||
QImageSARRFPC* dialog = new QImageSARRFPC();
|
||||
dialog->setWindowTitle(u8"生成回波-距离频域脉冲相干法");
|
||||
dialog->show();
|
||||
}
|
||||
|
||||
QInSARImageNetGeneratorToolButton::QInSARImageNetGeneratorToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolname = QString(u8"1.成像网格生成");
|
||||
}
|
||||
|
||||
QInSARImageNetGeneratorToolButton::~QInSARImageNetGeneratorToolButton()
|
||||
{
|
||||
}
|
||||
|
||||
void QInSARImageNetGeneratorToolButton::run()
|
||||
{
|
||||
QCreateInSARImagePlaneXYZRDialog* dialog = new QCreateInSARImagePlaneXYZRDialog;
|
||||
dialog->setWindowTitle(u8"成像平面网格划分");
|
||||
dialog->show();
|
||||
}
|
||||
|
||||
QMapLooktableToolButton::QMapLooktableToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolname = QString(u8"3.创建地理编码查找表");
|
||||
}
|
||||
|
||||
QMapLooktableToolButton::~QMapLooktableToolButton()
|
||||
{
|
||||
}
|
||||
|
||||
void QMapLooktableToolButton::run()
|
||||
{
|
||||
QLookTableResampleFromWGS84ToRange* dialog = new QLookTableResampleFromWGS84ToRange;
|
||||
dialog->setWindowTitle(u8"创建地理编码双向查找表");
|
||||
dialog->show();
|
||||
}
|
||||
|
||||
QSimulationBPImageMultiProductionLevel1_2ToolButton::QSimulationBPImageMultiProductionLevel1_2ToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolname = QString(u8"4. 生成1~2级产品");
|
||||
}
|
||||
|
||||
QSimulationBPImageMultiProductionLevel1_2ToolButton::~QSimulationBPImageMultiProductionLevel1_2ToolButton()
|
||||
{
|
||||
}
|
||||
|
||||
void QSimulationBPImageMultiProductionLevel1_2ToolButton::run()
|
||||
{
|
||||
QSimulationBPImageMultiProduction* dialog = new QSimulationBPImageMultiProduction;
|
||||
dialog->setWindowTitle(u8"生成1~2级产品");
|
||||
dialog->show();
|
||||
}
|
||||
|
||||
QSimulationBPImageL1BToolButton::QSimulationBPImageL1BToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolname = QString(u8"4. 生成L1B级产品");
|
||||
|
||||
}
|
||||
|
||||
QSimulationBPImageL1BToolButton::~QSimulationBPImageL1BToolButton()
|
||||
{
|
||||
}
|
||||
|
||||
void QSimulationBPImageL1BToolButton::run()
|
||||
{
|
||||
QL1ASARProcessDialog* dialog = new QL1ASARProcessDialog;
|
||||
dialog->setWindowTitle(u8"生成L1B级产品");
|
||||
dialog->show();
|
||||
}
|
|
@ -0,0 +1,109 @@
|
|||
#pragma once
|
||||
#ifndef __SIMULATIONSARTOOL__SARSATALLITESIMULATIONWORKFLOW__H__
|
||||
#define __SIMULATIONSARTOOL__SARSATALLITESIMULATIONWORKFLOW__H__
|
||||
#include "simulationsartool_global.h"
|
||||
#include <QtWidgets/QMainWindow>
|
||||
#include "ToolBoxWidget.h"
|
||||
#include "QToolAbstract.h"
|
||||
|
||||
|
||||
extern "C" SIMULATIONSARTOOL_EXPORT void initSimulationSARToolSARSateSimulationWorkflow(ToolBoxWidget* toolbox);
|
||||
|
||||
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT QPolyfitSatelliteGPSModelToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QPolyfitSatelliteGPSModelToolButton(QWidget* parent = nullptr);
|
||||
~QPolyfitSatelliteGPSModelToolButton();
|
||||
public:
|
||||
virtual void run() override;
|
||||
|
||||
};
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT QGeneratorGeoSimulationRsaterToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QGeneratorGeoSimulationRsaterToolButton(QWidget* parent = nullptr);
|
||||
~QGeneratorGeoSimulationRsaterToolButton();
|
||||
public:
|
||||
virtual void run() override;
|
||||
|
||||
};
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT QGeneratorMapGeoAndSltLookTableToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QGeneratorMapGeoAndSltLookTableToolButton(QWidget* parent = nullptr);
|
||||
~QGeneratorMapGeoAndSltLookTableToolButton();
|
||||
public:
|
||||
virtual void run() override;
|
||||
|
||||
};
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT QSimulationSlrSARRasterToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QSimulationSlrSARRasterToolButton(QWidget* parent = nullptr);
|
||||
~QSimulationSlrSARRasterToolButton();
|
||||
public:
|
||||
virtual void run() override;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT QEchoDataSimulationSARRFPCToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QEchoDataSimulationSARRFPCToolButton(QWidget* parent = nullptr);
|
||||
~QEchoDataSimulationSARRFPCToolButton();
|
||||
public:
|
||||
virtual void run() override;
|
||||
|
||||
};
|
||||
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT QInSARImageNetGeneratorToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QInSARImageNetGeneratorToolButton(QWidget* parent = nullptr);
|
||||
~QInSARImageNetGeneratorToolButton();
|
||||
public:
|
||||
virtual void run() override;
|
||||
|
||||
};
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT QMapLooktableToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QMapLooktableToolButton(QWidget* parent = nullptr);
|
||||
~QMapLooktableToolButton();
|
||||
public:
|
||||
virtual void run() override;
|
||||
|
||||
};
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT QSimulationBPImageMultiProductionLevel1_2ToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QSimulationBPImageMultiProductionLevel1_2ToolButton(QWidget* parent = nullptr);
|
||||
~QSimulationBPImageMultiProductionLevel1_2ToolButton();
|
||||
public:
|
||||
virtual void run() override;
|
||||
|
||||
};
|
||||
|
||||
class SIMULATIONSARTOOL_EXPORT QSimulationBPImageL1BToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QSimulationBPImageL1BToolButton(QWidget* parent = nullptr);
|
||||
~QSimulationBPImageL1BToolButton();
|
||||
public:
|
||||
virtual void run() override;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue