调整程序
parent
4d9d16bb65
commit
732c6fe885
|
@ -145,6 +145,14 @@ struct SatelliteAntPos {
|
|||
};
|
||||
|
||||
|
||||
struct PatternImageDesc {
|
||||
long phinum;
|
||||
long thetanum;
|
||||
double startTheta;
|
||||
double startPhi;
|
||||
double dtheta;
|
||||
double dphi;
|
||||
};
|
||||
|
||||
|
||||
/*********************************************** 指针回收区域 ********************************************************************/
|
||||
|
|
|
@ -1,10 +1,213 @@
|
|||
#include "DEMLLA2XYZTool.h"
|
||||
#include <QMessageBox>
|
||||
#include <QFileDialog>
|
||||
#include "ImageOperatorBase.h"
|
||||
#include "GeoOperator.h"
|
||||
|
||||
|
||||
DEMLLA2XYZTool::DEMLLA2XYZTool(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
|
||||
connect(this->ui.dialogBtn, SIGNAL(accept()), this, SLOT(accept()));
|
||||
connect(this->ui.dialogBtn, SIGNAL(reject()), this, SLOT(reject()));
|
||||
connect(this->ui.DEMWSG84SelectBtn, SIGNAL(clicked()), this, SLOT(onDEMWSG84SelectBtn_Clicked()));
|
||||
connect(this->ui.DEMXYZSelectBtn, SIGNAL(clicked()), this, SLOT(onDEMXYZSelectBtn_Clicked()));
|
||||
connect(this->ui.BtnSloper, SIGNAL(clicked()), this, SLOT(onBtnSloper_Clicked()));
|
||||
|
||||
|
||||
}
|
||||
|
||||
DEMLLA2XYZTool::~DEMLLA2XYZTool()
|
||||
{}
|
||||
|
||||
void DEMLLA2XYZTool::accept()
|
||||
{
|
||||
QString DEMPath = this->ui.lineEditLLA->text();
|
||||
QString XYZPath = this->ui.lineEditXYZ->text();
|
||||
QString SLOPERPath = this->ui.lineEditSloper->text();
|
||||
|
||||
this->ui.progressBar->setValue(0);
|
||||
this->ui.progressBar->setMaximum(100);
|
||||
|
||||
gdalImage demds(DEMPath);
|
||||
gdalImage demxyz = CreategdalImageDouble(XYZPath, demds.height, demds.width, 3, demds.gt, demds.projection, true, true, true);// X,Y,Z
|
||||
|
||||
// 分块计算并转换为XYZ
|
||||
|
||||
Eigen::MatrixXd demArr = demds.getData(0, 0, demds.height, demds.width, 1);
|
||||
Eigen::MatrixXd demR = demArr;
|
||||
Landpoint LandP{ 0,0,0 };
|
||||
Point3 GERpoint{ 0,0,0 };
|
||||
double R = 0;
|
||||
double dem_row = 0, dem_col = 0, dem_alt = 0;
|
||||
|
||||
long line_invert = 1000;
|
||||
|
||||
double rowidx = 0;
|
||||
double colidx = 0;
|
||||
this->ui.label_3->setText("WGS84 : LLA -> XYZ");
|
||||
|
||||
for (int max_rows_ids = 0; max_rows_ids < demds.height; max_rows_ids = max_rows_ids + line_invert) {
|
||||
|
||||
|
||||
Eigen::MatrixXd demdata = demds.getData(max_rows_ids, 0, line_invert, demds.width, 1);
|
||||
Eigen::MatrixXd xyzdata_x = demdata.array() * 0;
|
||||
Eigen::MatrixXd xyzdata_y = demdata.array() * 0;
|
||||
Eigen::MatrixXd xyzdata_z = demdata.array() * 0;
|
||||
|
||||
int datarows = demdata.rows();
|
||||
int datacols = demdata.cols();
|
||||
|
||||
for (int i = 0; i < datarows; i++) {
|
||||
for (int j = 0; j < datacols; j++) {
|
||||
rowidx = i + max_rows_ids;
|
||||
colidx = j;
|
||||
demds.getLandPoint(rowidx, colidx, demdata(i, j), LandP); // 获取地理坐标
|
||||
LLA2XYZ(LandP, GERpoint); // 经纬度转换为地心坐标系
|
||||
xyzdata_x(i, j) = GERpoint.x;
|
||||
xyzdata_y(i, j) = GERpoint.y;
|
||||
xyzdata_z(i, j) = GERpoint.z;
|
||||
}
|
||||
}
|
||||
demxyz.saveImage(xyzdata_x, max_rows_ids, 0, 1);
|
||||
demxyz.saveImage(xyzdata_y, max_rows_ids, 0, 2);
|
||||
demxyz.saveImage(xyzdata_z, max_rows_ids, 0, 3);
|
||||
|
||||
this->ui.progressBar->setValue(max_rows_ids/ demds.height/2);
|
||||
}
|
||||
|
||||
|
||||
// 计算坡向角
|
||||
|
||||
|
||||
|
||||
gdalImage demsloperxyz = CreategdalImageDouble(SLOPERPath, demds.height, demds.width, 4, demds.gt, demds.projection, true, true, true);// X,Y,Z,cosangle
|
||||
|
||||
line_invert = 1000;
|
||||
long start_ids = 0;
|
||||
long dem_rows = 0, dem_cols = 0;
|
||||
this->ui.label_3->setText("WGS84 : XYZ -> Sloper XYZ ");
|
||||
for (start_ids = 1; start_ids < demds.height; start_ids = start_ids + line_invert) {
|
||||
Eigen::MatrixXd demdata = demds.getData(start_ids - 1, 0, line_invert + 2, demxyz.width, 1);
|
||||
long startlineid = start_ids;
|
||||
|
||||
Eigen::MatrixXd demsloper_x = demsloperxyz.getData(start_ids - 1, 0, line_invert + 2, demxyz.width, 1);
|
||||
Eigen::MatrixXd demsloper_y = demsloperxyz.getData(start_ids - 1, 0, line_invert + 2, demxyz.width, 2);
|
||||
Eigen::MatrixXd demsloper_z = demsloperxyz.getData(start_ids - 1, 0, line_invert + 2, demxyz.width, 3);
|
||||
Eigen::MatrixXd demsloper_angle = demsloperxyz.getData(start_ids - 1, 0, line_invert + 2, demxyz.width, 4);
|
||||
|
||||
Landpoint p0, p1, p2, p3, p4, pslopeVector, pp;
|
||||
Vector3D slopeVector;
|
||||
|
||||
dem_rows = demsloper_x.rows();
|
||||
dem_cols = demsloper_x.cols();
|
||||
double sloperAngle = 0;
|
||||
Vector3D Zaxis = { 0,0,1 };
|
||||
|
||||
double rowidx = 0, colidx = 0;
|
||||
|
||||
for (long i = 1; i < dem_rows - 1; i++) {
|
||||
for (long j = 1; j < dem_cols - 1; j++) {
|
||||
rowidx = i + startlineid;
|
||||
colidx = j;
|
||||
demds.getLandPoint(rowidx, colidx, demdata(i, j), p0);
|
||||
demds.getLandPoint(rowidx - 1, colidx, demdata(i - 1, j), p1);
|
||||
demds.getLandPoint(rowidx, colidx - 1, demdata(i, j - 1), p2);
|
||||
demds.getLandPoint(rowidx + 1, colidx, demdata(i + 1, j), p3);
|
||||
demds.getLandPoint(rowidx, colidx + 1, demdata(i, j + 1), p4);
|
||||
|
||||
pslopeVector = getSlopeVector(p0, p1, p2, p3, p4); // 地面坡向矢量
|
||||
slopeVector = { pslopeVector.lon,pslopeVector.lat,pslopeVector.ati };
|
||||
pp = LLA2XYZ(p0);
|
||||
Zaxis.x = pp.lon;
|
||||
Zaxis.y = pp.lat;
|
||||
Zaxis.z = pp.ati;
|
||||
sloperAngle = getCosAngle(slopeVector, Zaxis); // 地面坡向角
|
||||
|
||||
demsloper_x(i, j) = slopeVector.x;
|
||||
demsloper_y(i, j) = slopeVector.y;
|
||||
demsloper_z(i, j) = slopeVector.z;
|
||||
demsloper_angle(i, j) = sloperAngle;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
demsloperxyz.saveImage(demsloper_x, start_ids - 1, 0, 1);
|
||||
demsloperxyz.saveImage(demsloper_y, start_ids - 1, 0, 2);
|
||||
demsloperxyz.saveImage(demsloper_z, start_ids - 1, 0, 3);
|
||||
demsloperxyz.saveImage(demsloper_angle, start_ids - 1, 0, 4);
|
||||
|
||||
this->ui.progressBar->setValue(50+start_ids / demds.height / 2);
|
||||
}
|
||||
|
||||
QMessageBox::information(this, tr(u8"程序执行完成"), tr(u8"程序执行完成。"));
|
||||
|
||||
this->ui.progressBar->setValue(0);
|
||||
this->ui.label_3->setText("");
|
||||
}
|
||||
|
||||
void DEMLLA2XYZTool::reject()
|
||||
{
|
||||
this->close();
|
||||
}
|
||||
|
||||
void DEMLLA2XYZTool::onDEMWSG84SelectBtn_Clicked()
|
||||
{
|
||||
QString fileName = QFileDialog::getOpenFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择影像文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(u8"tif Files (*.tif);;data Files (*.data);;bin Files (*.bin);;All Files (*)") // 文件过滤器
|
||||
);
|
||||
|
||||
// 如果用户选择了文件
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.lineEditLLA->setText(fileName);
|
||||
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void DEMLLA2XYZTool::onDEMXYZSelectBtn_Clicked()
|
||||
{
|
||||
QString fileName = QFileDialog::getSaveFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择XYZ文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(u8"data Files (*.data);;bin Files (*.bin)") // 文件过滤器
|
||||
);
|
||||
|
||||
// 如果用户选择了文件
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.lineEditXYZ->setText(fileName);
|
||||
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void DEMLLA2XYZTool::onBtnSloper_Clicked()
|
||||
{
|
||||
QString fileName = QFileDialog::getSaveFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择 sloper 文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(u8"data Files (*.data);;bin Files (*.bin)") // 文件过滤器
|
||||
);
|
||||
|
||||
// 如果用户选择了文件
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.lineEditSloper->setText(fileName);
|
||||
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,15 @@ public:
|
|||
DEMLLA2XYZTool(QWidget *parent = nullptr);
|
||||
~DEMLLA2XYZTool();
|
||||
|
||||
|
||||
public slots:
|
||||
|
||||
void accept();
|
||||
void reject();
|
||||
void onDEMWSG84SelectBtn_Clicked();
|
||||
void onDEMXYZSelectBtn_Clicked();
|
||||
void onBtnSloper_Clicked();
|
||||
|
||||
private:
|
||||
Ui::DEMLLA2XYZToolClass ui;
|
||||
};
|
||||
|
|
|
@ -16,8 +16,83 @@
|
|||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="DEMWSG84SelectBtn">
|
||||
<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="BtnSloper">
|
||||
<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="lineEditSloper">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEditXYZ">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="DEMXYZSelectBtn">
|
||||
<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="lineEditLLA">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" 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(WGS84):</string>
|
||||
</property>
|
||||
|
@ -25,28 +100,27 @@
|
|||
</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>DEM(XYZ):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_2"/>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="DEMWSG84SelectBtn">
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="SloperLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="DEMXYZSelectBtn">
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
<string>Sloper :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -66,7 +140,21 @@
|
|||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QProgressBar" name="progressBar">
|
||||
<property name="value">
|
||||
<number>24</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="dialogBtn">
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
|
|
|
@ -394,8 +394,8 @@ __global__ void CUDAKernel_RFPC_Computer_R_Gain(
|
|||
double antDirectX, double antDirectY, double antDirectZ,// 天线的指向
|
||||
double Pt,// 发射能量
|
||||
double refPhaseRange,
|
||||
double* TransAntpattern, double Transtarttheta, double Transstartphi, double Transdtheta, double Transdphi, int Transthetapoints, int Transphipoints, // 发射天线方向图
|
||||
double* ReceiveAntpattern, double Receivestarttheta, double Receivestartphi, double Receivedtheta, double Receivedphi, int Receivethetapoints, int Receivephipoints,//接收天线方向图
|
||||
double* TransAntpattern, PatternImageDesc TransAntpatternDesc,// double Transtarttheta, double Transstartphi, double Transdtheta, double Transdphi, int Transthetapoints, int Transphipoints, // 发射天线方向图
|
||||
double* ReceiveAntpattern, PatternImageDesc ReceiveAntpatternDesc,// double Receivestarttheta, double Receivestartphi, double Receivedtheta, double Receivedphi, int Receivethetapoints, int Receivephipoints,//接收天线方向图
|
||||
double NearR, double FarR, // 距离范围
|
||||
CUDASigmaParam* sigma0Paramslist, long sigmaparamslistlen,// 插值图
|
||||
float* outR, // 输出距离
|
||||
|
@ -444,13 +444,17 @@ __global__ void CUDAKernel_RFPC_Computer_R_Gain(
|
|||
double TansantPatternGain =
|
||||
GPU_BillerInterpAntPattern(
|
||||
TransAntpattern,
|
||||
Transtarttheta, Transstartphi, Transdtheta, Transdphi, Transthetapoints, Transphipoints,
|
||||
TransAntpatternDesc.startTheta, TransAntpatternDesc.startPhi,
|
||||
TransAntpatternDesc.dtheta, TransAntpatternDesc.dphi, TransAntpatternDesc.thetanum, TransAntpatternDesc.phinum,
|
||||
//Transtarttheta, Transstartphi, Transdtheta, Transdphi, Transthetapoints, Transphipoints,
|
||||
temptheta, tempphi);
|
||||
|
||||
// 接收方向图
|
||||
double antPatternGain = GPU_BillerInterpAntPattern(
|
||||
ReceiveAntpattern,
|
||||
Receivestarttheta, Receivestartphi, Receivedtheta, Receivedphi, Receivethetapoints, Receivephipoints,
|
||||
ReceiveAntpatternDesc.startTheta, ReceiveAntpatternDesc.startPhi,
|
||||
ReceiveAntpatternDesc.dtheta, ReceiveAntpatternDesc.dphi, ReceiveAntpatternDesc.thetanum, ReceiveAntpatternDesc.phinum,
|
||||
//Receivestarttheta, Receivestartphi, Receivedtheta, Receivedphi, Receivethetapoints, Receivephipoints,
|
||||
temptheta, tempphi);
|
||||
|
||||
// 计算
|
||||
|
@ -560,8 +564,8 @@ extern "C" void CUDA_RFPC_MainBlock(
|
|||
double* demSlopeX, double* demSlopeY, double* demSlopeZ, // 地表坡度矢量
|
||||
double Pt,// 发射能量
|
||||
double refPhaseRange,
|
||||
double* TransAntpattern, double Transtarttheta, double Transstartphi, double Transdtheta, double Transdphi, int Transthetapoints, int Transphipoints, // 发射天线方向图
|
||||
double* ReceiveAntpattern, double Receivestarttheta, double Receivestartphi, double Receivedtheta, double Receivedphi, int Receivethetapoints, int Receivephipoints,//接收天线方向图
|
||||
double* TransAntpattern, PatternImageDesc TransAntpatternDesc,// double Transtarttheta, double Transstartphi, double Transdtheta, double Transdphi, int Transthetapoints, int Transphipoints, // 发射天线方向图
|
||||
double* ReceiveAntpattern, PatternImageDesc ReceiveAntpatternDesc, //double Receivestarttheta, double Receivestartphi, double Receivedtheta, double Receivedphi, int Receivethetapoints, int Receivephipoints,//接收天线方向图
|
||||
double NearR, double FarR, // 距离范围
|
||||
CUDASigmaParam* sigma0Paramslist, long sigmaparamslistlen,// 插值图
|
||||
double* out_echoReal, double* out_echoImag,// 输出回波
|
||||
|
@ -588,9 +592,11 @@ extern "C" void CUDA_RFPC_MainBlock(
|
|||
Pt,// 增益后发射能量
|
||||
refPhaseRange,
|
||||
TransAntpattern,
|
||||
Transtarttheta, Transstartphi, Transdtheta, Transdphi, Transthetapoints, Transphipoints,
|
||||
TransAntpatternDesc,
|
||||
//Transtarttheta, Transstartphi, Transdtheta, Transdphi, Transthetapoints, Transphipoints,
|
||||
ReceiveAntpattern,
|
||||
Receivestarttheta, Receivestartphi, Receivedtheta, Receivedphi, Receivethetapoints, Receivephipoints,
|
||||
ReceiveAntpatternDesc,
|
||||
//Receivestarttheta, Receivestartphi, Receivedtheta, Receivedphi, Receivethetapoints, Receivephipoints,
|
||||
NearR, FarR,
|
||||
sigma0Paramslist, sigmaparamslistlen,
|
||||
//factorj, freqnum,
|
||||
|
|
|
@ -113,8 +113,8 @@ extern "C" void CUDA_RFPC_MainBlock(
|
|||
double* demSlopeX, double* demSlopeY, double* demSlopeZ, // 地表坡度矢量
|
||||
double Pt,// 发射能量
|
||||
double refPhaseRange,
|
||||
double* TransAntpattern, double Transtarttheta, double Transstartphi, double Transdtheta, double Transdphi, int Transthetapoints, int Transphipoints, // 发射天线方向图
|
||||
double* ReceiveAntpattern, double Receivestarttheta, double Receivestartphi, double Receivedtheta, double Receivedphi, int Receivethetapoints, int Receivephipoints,//接收天线方向图
|
||||
double* TransAntpattern, PatternImageDesc TransAntpatternDesc, //double Transtarttheta, double Transstartphi, double Transdtheta, double Transdphi, int Transthetapoints, int Transphipoints, // 发射天线方向图
|
||||
double* ReceiveAntpattern, PatternImageDesc ReceiveAntpatternDesc,//double Receivestarttheta, double Receivestartphi, double Receivedtheta, double Receivedphi, int Receivethetapoints, int Receivephipoints,//接收天线方向图
|
||||
double NearR, double FarR, // 距离范围
|
||||
CUDASigmaParam* sigma0Paramslist, long sigmaparamslistlen,// 插值图
|
||||
double* out_echoReal,double* out_echoImag,// 输出回波
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "QOrthSlrRaster.h"
|
||||
#include "QImageSARRFPC.h"
|
||||
#include "QSimulationBPImage.h"
|
||||
#include "DEMLLA2XYZTool.h"
|
||||
|
||||
GF3ImportDataToolButton::GF3ImportDataToolButton(QWidget* parent) :QToolAbstract(parent)
|
||||
{
|
||||
|
@ -148,3 +149,19 @@ void RegisterPreToolBox(RasterProcessTool* mainWindows)
|
|||
emit mainWindows->addBoxToolItemSIGNAL(items7);
|
||||
|
||||
}
|
||||
|
||||
DEMLLA2XYZToolButton::DEMLLA2XYZToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolPath = QVector<QString>(0);
|
||||
this->toolPath.push_back(u8"基础处理");
|
||||
this->toolname = QString(u8"DEM转坡度");
|
||||
}
|
||||
|
||||
DEMLLA2XYZToolButton::~DEMLLA2XYZToolButton()
|
||||
{
|
||||
}
|
||||
void DEMLLA2XYZToolButton::excute()
|
||||
{
|
||||
DEMLLA2XYZTool* dialog = new DEMLLA2XYZTool;
|
||||
dialog->show();
|
||||
}
|
|
@ -76,4 +76,16 @@ public slots:
|
|||
};
|
||||
|
||||
|
||||
class DEMLLA2XYZToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
DEMLLA2XYZToolButton(QWidget* parent = nullptr);
|
||||
~DEMLLA2XYZToolButton();
|
||||
public slots:
|
||||
virtual void excute() override;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
void RegisterPreToolBox(RasterProcessTool* mainWindows);
|
||||
|
|
|
@ -18,10 +18,8 @@ QImageSARRFPC::QImageSARRFPC(QWidget *parent)
|
|||
QObject::connect(ui.pushButtonTaskxml, SIGNAL(clicked()), this, SLOT(onpushButtonTaskxmlClieck()));
|
||||
QObject::connect(ui.pushButtondem, SIGNAL(clicked()), this, SLOT(onpushButtondemClieck()));
|
||||
QObject::connect(ui.pushButtonlandcover, SIGNAL(clicked()), this, SLOT(onpushButtonlandcoverClieck()));
|
||||
QObject::connect(ui.pushButtonHHSigma0, SIGNAL(clicked()), this, SLOT(onpushButtonHHSigma0Clieck()));
|
||||
QObject::connect(ui.pushButtonHVSigma0, SIGNAL(clicked()), this, SLOT(onpushButtonHVSigma0Clieck()));
|
||||
QObject::connect(ui.pushButtonVHSigma0, SIGNAL(clicked()), this, SLOT(onpushButtonVHSigma0Clieck()));
|
||||
QObject::connect(ui.pushButtonVVSigma0, SIGNAL(clicked()), this, SLOT(onpushButtonVVSigma0Clieck()));
|
||||
QObject::connect(ui.pushButtonsloper, SIGNAL(clicked()), this, SLOT(onpushButtonSloperClieck()));
|
||||
|
||||
|
||||
|
||||
QObject::connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(onBtnaccept()));
|
||||
|
@ -117,7 +115,7 @@ void QImageSARRFPC::onpushButtondemClieck()
|
|||
QString fileName = QFileDialog::getSaveFileName(this,
|
||||
u8"dem文件", // 对话框标题
|
||||
"", // 初始目录,可以设置为路径
|
||||
u8"Image Files (*.tif);;All Files (*)"); // 文件类型过滤器
|
||||
u8"tif Files (*.tif);;data Files (*.data);;bin Files (*.bin);;All Files (*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.demTiffPathEdit->setText(fileName);
|
||||
|
@ -127,13 +125,29 @@ void QImageSARRFPC::onpushButtondemClieck()
|
|||
}
|
||||
}
|
||||
|
||||
void QImageSARRFPC::onpushButtonSloperClieck()
|
||||
{
|
||||
// 调用文件选择对话框并选择一个 .tif 文件
|
||||
QString fileName = QFileDialog::getSaveFileName(this,
|
||||
u8"sloper文件", // 对话框标题
|
||||
"", // 初始目录,可以设置为路径
|
||||
u8"tif Files (*.tif);;data Files (*.data);;bin Files (*.bin);;All Files (*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.sloperPathEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
}
|
||||
}
|
||||
|
||||
void QImageSARRFPC::onpushButtonlandcoverClieck()
|
||||
{
|
||||
// 调用文件选择对话框并选择一个 .tif 文件
|
||||
QString fileName = QFileDialog::getSaveFileName(this,
|
||||
u8"地表覆盖数据", // 对话框标题
|
||||
"", // 初始目录,可以设置为路径
|
||||
u8"Image Files (*.tif);;All Files (*)"); // 文件类型过滤器
|
||||
u8"tif Files (*.tif);;data Files (*.data);;bin Files (*.bin);;All Files (*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.landCoverPathEdit->setText(fileName);
|
||||
|
@ -143,70 +157,7 @@ void QImageSARRFPC::onpushButtonlandcoverClieck()
|
|||
}
|
||||
}
|
||||
|
||||
void QImageSARRFPC::onpushButtonHHSigma0Clieck()
|
||||
{
|
||||
// 调用文件选择对话框并选择一个 .tif 文件
|
||||
QString fileName = QFileDialog::getSaveFileName(this,
|
||||
u8"HH后向散射系数", // 对话框标题
|
||||
"", // 初始目录,可以设置为路径
|
||||
u8"Image Files (*.tif);;All Files (*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.hhSigmaPathEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
}
|
||||
}
|
||||
|
||||
void QImageSARRFPC::onpushButtonHVSigma0Clieck()
|
||||
{
|
||||
// 调用文件选择对话框并选择一个 .tif 文件
|
||||
QString fileName = QFileDialog::getSaveFileName(this,
|
||||
u8"HV后向散射系数", // 对话框标题
|
||||
"", // 初始目录,可以设置为路径
|
||||
u8"Image Files (*.tif);;All Files (*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.hvSigmaPathEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
}
|
||||
}
|
||||
|
||||
void QImageSARRFPC::onpushButtonVHSigma0Clieck()
|
||||
{
|
||||
// 调用文件选择对话框并选择一个 .tif 文件
|
||||
QString fileName = QFileDialog::getSaveFileName(this,
|
||||
u8"VH后向散射系数", // 对话框标题
|
||||
"", // 初始目录,可以设置为路径
|
||||
u8"Image Files (*.tif);;All Files (*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.vhSigmaPathEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
}
|
||||
}
|
||||
|
||||
void QImageSARRFPC::onpushButtonVVSigma0Clieck()
|
||||
{
|
||||
// 调用文件选择对话框并选择一个 .tif 文件
|
||||
QString fileName = QFileDialog::getSaveFileName(this,
|
||||
u8"VV后向散射系数", // 对话框标题
|
||||
"", // 初始目录,可以设置为路径
|
||||
u8"Image Files (*.tif);;All Files (*)"); // 文件类型过滤器
|
||||
|
||||
if (!fileName.isEmpty()) {
|
||||
this->ui.vvSigmaPathEdit->setText(fileName);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void QImageSARRFPC::onBtnaccept()
|
||||
{
|
||||
|
||||
|
@ -215,10 +166,7 @@ void QImageSARRFPC::onBtnaccept()
|
|||
QString TaskXmlPath = ui.taskXmlPathEdit->text().trimmed();//u8"D:/Programme/vs2022/RasterMergeTest/TestData/GF3_Simulation_Setting.xml";
|
||||
QString demTiffPath = ui.demTiffPathEdit->text().trimmed();//u8"D:/Programme/vs2022/RasterMergeTest/TestData/115E39N_COP30_clip.tif";
|
||||
QString landConverPath = ui.landCoverPathEdit->text().trimmed();// u8"D:/Programme/vs2022/RasterMergeTest/TestData/landcover_aligned.tiff";
|
||||
QString HHSigmaPath = ui.hhSigmaPathEdit->text().trimmed();// u8"D:/Programme/vs2022/RasterMergeTest/TestData/PALSAR-2/N45E116_23_MOS_F02DAR/N45E116_2023_sl_HH_F02DAR.tif";
|
||||
QString HVSigmaPath = ui.hvSigmaPathEdit->text().trimmed();// u8"D:/Programme/vs2022/RasterMergeTest/TestData/PALSAR-2/N45E116_23_MOS_F02DAR/N45E116_2023_sl_HV_F02DAR.tif";
|
||||
QString VHSigmaPath = ui.vhSigmaPathEdit->text().trimmed();// HVSigmaPath;
|
||||
QString VVSigmaPath = ui.vvSigmaPathEdit->text().trimmed();//HHSigmaPath;
|
||||
|
||||
QString OutEchoPath = ui.outEchoPathEdit->text().trimmed();// u8"D:/Programme/vs2022/RasterMergeTest/TestData/outData/";
|
||||
QString simulationtaskName = ui.simulationTaskNameEdit->text().trimmed();// u8"GF3_Simulation";
|
||||
// 天线方向图
|
||||
|
@ -231,10 +179,7 @@ void QImageSARRFPC::onBtnaccept()
|
|||
<< "Task XML Path: " << TaskXmlPath.toStdString() << "\n"
|
||||
<< "DEM TIFF Path: " << demTiffPath.toStdString() << "\n"
|
||||
<< "Land Cover Path: " << landConverPath.toStdString() << "\n"
|
||||
<< "HH Sigma Path: " << HHSigmaPath.toStdString() << "\n"
|
||||
<< "HV Sigma Path: " << HVSigmaPath.toStdString() << "\n"
|
||||
<< "VH Sigma Path: " << VHSigmaPath.toStdString() << "\n"
|
||||
<< "VV Sigma Path: " << VVSigmaPath.toStdString() << "\n"
|
||||
|
||||
<< "Trans AntPattern Path: " << TransAntPatternFilePath.toStdString() << "\n"
|
||||
<< "Reception AntPattern Path: " << ReceiveAntPatternFilePath.toStdString() << "\n"
|
||||
<< "Output Path: " << OutEchoPath.toStdString() << "\n"
|
||||
|
@ -242,7 +187,7 @@ void QImageSARRFPC::onBtnaccept()
|
|||
|
||||
long cpucore_num = std::thread::hardware_concurrency();
|
||||
|
||||
RFPCProcessMain(cpucore_num, TransAntPatternFilePath, ReceiveAntPatternFilePath, simulationtaskName, OutEchoPath, GPSXmlPath, TaskXmlPath, demTiffPath, landConverPath, HHSigmaPath, HVSigmaPath, VHSigmaPath, VVSigmaPath);
|
||||
RFPCProcessMain(cpucore_num, TransAntPatternFilePath, ReceiveAntPatternFilePath, simulationtaskName, OutEchoPath, GPSXmlPath, TaskXmlPath, demTiffPath, landConverPath);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -20,11 +20,9 @@ public slots:
|
|||
void onpushButtongpxmlClieck();
|
||||
void onpushButtonTaskxmlClieck();
|
||||
void onpushButtondemClieck();
|
||||
void onpushButtonSloperClieck();
|
||||
void onpushButtonlandcoverClieck();
|
||||
void onpushButtonHHSigma0Clieck();
|
||||
void onpushButtonHVSigma0Clieck();
|
||||
void onpushButtonVHSigma0Clieck();
|
||||
void onpushButtonVVSigma0Clieck();
|
||||
|
||||
|
||||
void onBtnaccept();
|
||||
void onBtnReject();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>873</width>
|
||||
<height>647</height>
|
||||
<height>534</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -25,11 +25,76 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>853</width>
|
||||
<height>598</height>
|
||||
<height>485</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="8" column="1">
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="simulationTaskNameEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>GF3_Simulation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="outEchoPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/LAMPCAE_SCANE/</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" 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="5" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>GPS xml 地址:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLineEdit" name="taskXmlPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/GF3_Simulation_Setting.xml</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QLineEdit" name="landCoverPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
|
@ -42,8 +107,8 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QLineEdit" name="demTiffPathEdit">
|
||||
<item row="4" column="2">
|
||||
<widget class="QPushButton" name="pushButtonEcho">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
|
@ -51,7 +116,46 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/115E39N_COP30_clip.tif</string>
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2">
|
||||
<widget class="QPushButton" name="pushButtondem">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="gpsXmlPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/GF3_Simulation_GPSNode.xml</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="QPushButton" name="pushButtonTaskxml">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -81,34 +185,8 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLineEdit" name="taskXmlPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/GF3_Simulation_Setting.xml</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="simulationTaskNameEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>GF3_Simulation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="2">
|
||||
<widget class="QPushButton" name="pushButtonVHSigma0">
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="pushButtonRP">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
|
@ -120,162 +198,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="2">
|
||||
<widget class="QPushButton" name="pushButtonHHSigma0">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>参考HH极化后向散射系数:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QPushButton" name="pushButtonEcho">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="pushButtonTP">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>参考HV极化后向散射系数</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="QPushButton" name="pushButtonTaskxml">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>接收方向图:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="2">
|
||||
<widget class="QPushButton" name="pushButtonlandcover">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="1">
|
||||
<widget class="QLineEdit" name="vhSigmaPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/TestData/PALSAR-2/N45E116_23_MOS_F02DAR/N45E116_2023_sl_HV_F02DAR.tif</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<widget class="QLineEdit" name="vvSigmaPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/TestData/PALSAR-2/N45E116_23_MOS_F02DAR/N45E116_2023_sl_HH_F02DAR.tif</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="transformPatternFilePathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/ant/ant_model_setting_Horn_conical1_FarField-trans.csv</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>参考VV极化后向散射系数</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="minimumSize">
|
||||
|
@ -289,8 +211,8 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="2">
|
||||
<widget class="QPushButton" name="pushButtonVVSigma0">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
|
@ -298,12 +220,12 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
<string>接收方向图:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<item row="7" column="1">
|
||||
<widget class="QLineEdit" name="demTiffPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
|
@ -311,12 +233,12 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>地表覆盖文件地址:</string>
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/115E39N_COP30_clip.tif</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2">
|
||||
<widget class="QPushButton" name="pushButtondem">
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="transformPatternFilePathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
|
@ -324,124 +246,7 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="outEchoPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/LAMPCAE_SCANE/</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="2">
|
||||
<widget class="QPushButton" name="pushButtonHVSigma0">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QLineEdit" name="hvSigmaPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/TestData/PALSAR-2/N45E116_23_MOS_F02DAR/N45E116_2023_sl_HV_F02DAR.tif</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>GPS xml 地址:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="pushButtonRP">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>参考DEM 地址:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QLineEdit" name="hhSigmaPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/TestData/PALSAR-2/N45E116_23_MOS_F02DAR/N45E116_2023_sl_HH_F02DAR.tif</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="gpsXmlPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/GF3_Simulation_GPSNode.xml</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>任务 xml 地址:</string>
|
||||
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/ant/ant_model_setting_Horn_conical1_FarField-trans.csv</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -458,6 +263,58 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>DEM XYZ地址(WGS84):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>任务 xml 地址:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="pushButtonTP">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="2">
|
||||
<widget class="QPushButton" name="pushButtonlandcover">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_1">
|
||||
<property name="minimumSize">
|
||||
|
@ -471,8 +328,8 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
|
@ -480,7 +337,30 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>参考VH极化后向散射系数</string>
|
||||
<string>DEM Sloper地址(WGS84):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QLineEdit" name="sloperPathEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" 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>
|
||||
|
|
|
@ -39,22 +39,12 @@ RFPCProcessCls::RFPCProcessCls()
|
|||
this->PlusePoint = 0;
|
||||
this->TaskSetting = nullptr;
|
||||
this->EchoSimulationData = nullptr;
|
||||
this->DEMTiffPath = "";
|
||||
this->LandCoverPath = "";
|
||||
this->HHSigmaPath = "";
|
||||
this->HVSigmaPath = "";
|
||||
this->VHSigmaPath = "";
|
||||
this->VVSigmaPath = "";
|
||||
this->OutEchoPath = "";
|
||||
this->LandCoverPath = "";
|
||||
this->OutEchoPath = "";
|
||||
|
||||
this->DEMTiffPath.clear();
|
||||
|
||||
this->LandCoverPath.clear();
|
||||
this->HHSigmaPath.clear();
|
||||
this->HVSigmaPath.clear();
|
||||
this->VHSigmaPath.clear();
|
||||
this->VVSigmaPath.clear();
|
||||
this->OutEchoPath.clear();
|
||||
|
||||
this->OutEchoPath.clear();
|
||||
this->SigmaDatabasePtr = std::shared_ptr<SigmaDatabase>(new SigmaDatabase);
|
||||
|
||||
}
|
||||
|
@ -82,7 +72,12 @@ void RFPCProcessCls::setTaskFileName(QString EchoFileName)
|
|||
|
||||
void RFPCProcessCls::setDEMTiffPath(QString DEMTiffPath)
|
||||
{
|
||||
this->DEMTiffPath = DEMTiffPath;
|
||||
this->demxyzPath = DEMTiffPath;
|
||||
}
|
||||
|
||||
void RFPCProcessCls::setSloperPath(QString InSloperPath)
|
||||
{
|
||||
this->demsloperPath = InSloperPath;
|
||||
}
|
||||
|
||||
void RFPCProcessCls::setLandCoverPath(QString LandCoverPath)
|
||||
|
@ -90,25 +85,6 @@ void RFPCProcessCls::setLandCoverPath(QString LandCoverPath)
|
|||
this->LandCoverPath = LandCoverPath;
|
||||
}
|
||||
|
||||
void RFPCProcessCls::setHHSigmaPath(QString HHSigmaPath)
|
||||
{
|
||||
this->HHSigmaPath = HHSigmaPath;
|
||||
}
|
||||
|
||||
void RFPCProcessCls::setHVSigmaPath(QString HVSigmaPath)
|
||||
{
|
||||
this->HVSigmaPath = HVSigmaPath;
|
||||
}
|
||||
|
||||
void RFPCProcessCls::setVHSigmaPath(QString VHSigmaPath)
|
||||
{
|
||||
this->VHSigmaPath = VHSigmaPath;
|
||||
}
|
||||
|
||||
void RFPCProcessCls::setVVSigmaPath(QString VVSigmaPath)
|
||||
{
|
||||
this->VVSigmaPath = VVSigmaPath;
|
||||
}
|
||||
|
||||
void RFPCProcessCls::setOutEchoPath(QString OutEchoPath)
|
||||
{
|
||||
|
@ -126,12 +102,7 @@ ErrorCode RFPCProcessCls::Process(long num_thread)
|
|||
return stateCode;
|
||||
}
|
||||
else {}
|
||||
qDebug() << "DEMMainProcess";
|
||||
stateCode = this->DEMPreprocess();
|
||||
if (stateCode != ErrorCode::SUCCESS) {
|
||||
return stateCode;
|
||||
}
|
||||
else {}
|
||||
|
||||
qDebug() << "RFPCMainProcess";
|
||||
|
||||
stateCode = this->InitEchoMaskArray();
|
||||
|
@ -157,10 +128,8 @@ ErrorCode RFPCProcessCls::Process(long num_thread)
|
|||
|
||||
ErrorCode RFPCProcessCls::InitParams()
|
||||
{
|
||||
if (nullptr == this->TaskSetting || this->DEMTiffPath.isEmpty() ||
|
||||
this->LandCoverPath.isEmpty() || this->HHSigmaPath.isEmpty() ||
|
||||
this->HVSigmaPath.isEmpty() || this->VHSigmaPath.isEmpty() ||
|
||||
this->VVSigmaPath.isEmpty()) {
|
||||
if (nullptr == this->TaskSetting || this->demxyzPath.isEmpty() ||
|
||||
this->LandCoverPath.isEmpty() || this->demsloperPath.isEmpty()) {
|
||||
return ErrorCode::RFPC_PARAMSISEMPTY;
|
||||
}
|
||||
else {
|
||||
|
@ -196,122 +165,7 @@ ErrorCode RFPCProcessCls::InitParams()
|
|||
this->tmpfolderPath = tmpfolderPath;
|
||||
return ErrorCode::SUCCESS;
|
||||
}
|
||||
|
||||
ErrorCode RFPCProcessCls::DEMPreprocess()
|
||||
{
|
||||
|
||||
this->demxyzPath = QDir(tmpfolderPath).filePath("demxyz.bin");
|
||||
gdalImage demds(this->DEMTiffPath);
|
||||
gdalImage demxyz = CreategdalImageDouble(demxyzPath, demds.height, demds.width, 3, demds.gt, demds.projection, true, true, true);// X,Y,Z
|
||||
|
||||
// 分块计算并转换为XYZ
|
||||
|
||||
Eigen::MatrixXd demArr = demds.getData(0, 0, demds.height, demds.width, 1);
|
||||
Eigen::MatrixXd demR = demArr;
|
||||
Landpoint LandP{ 0,0,0 };
|
||||
Point3 GERpoint{ 0,0,0 };
|
||||
double R = 0;
|
||||
double dem_row = 0, dem_col = 0, dem_alt = 0;
|
||||
|
||||
long line_invert = 1000;
|
||||
|
||||
double rowidx = 0;
|
||||
double colidx = 0;
|
||||
|
||||
for (int max_rows_ids = 0; max_rows_ids < demds.height; max_rows_ids = max_rows_ids + line_invert) {
|
||||
Eigen::MatrixXd demdata = demds.getData(max_rows_ids, 0, line_invert, demds.width, 1);
|
||||
Eigen::MatrixXd xyzdata_x = demdata.array() * 0;
|
||||
Eigen::MatrixXd xyzdata_y = demdata.array() * 0;
|
||||
Eigen::MatrixXd xyzdata_z = demdata.array() * 0;
|
||||
|
||||
int datarows = demdata.rows();
|
||||
int datacols = demdata.cols();
|
||||
|
||||
for (int i = 0; i < datarows; i++) {
|
||||
for (int j = 0; j < datacols; j++) {
|
||||
rowidx = i + max_rows_ids;
|
||||
colidx = j;
|
||||
demds.getLandPoint(rowidx, colidx, demdata(i, j), LandP); // 获取地理坐标
|
||||
LLA2XYZ(LandP, GERpoint); // 经纬度转换为地心坐标系
|
||||
xyzdata_x(i, j) = GERpoint.x;
|
||||
xyzdata_y(i, j) = GERpoint.y;
|
||||
xyzdata_z(i, j) = GERpoint.z;
|
||||
}
|
||||
}
|
||||
demxyz.saveImage(xyzdata_x, max_rows_ids, 0, 1);
|
||||
demxyz.saveImage(xyzdata_y, max_rows_ids, 0, 2);
|
||||
demxyz.saveImage(xyzdata_z, max_rows_ids, 0, 3);
|
||||
}
|
||||
|
||||
|
||||
// 计算坡向角
|
||||
|
||||
this->demsloperPath = QDir(tmpfolderPath).filePath("demsloper.bin");
|
||||
this->demmaskPath = QDir(tmpfolderPath).filePath("demmask.bin");
|
||||
|
||||
gdalImage demsloperxyz = CreategdalImageDouble(this->demsloperPath, demds.height, demds.width, 4, demds.gt, demds.projection, true, true, true);// X,Y,Z,cosangle
|
||||
gdalImage demmask = CreategdalImage(this->demmaskPath, demxyz.height, demxyz.width, 1, demxyz.gt, demxyz.projection, true, true, true);// X,Y,Z
|
||||
|
||||
line_invert = 1000;
|
||||
long start_ids = 0;
|
||||
long dem_rows = 0, dem_cols = 0;
|
||||
|
||||
for (start_ids = 1; start_ids < demds.height; start_ids = start_ids + line_invert) {
|
||||
Eigen::MatrixXd demdata = demds.getData(start_ids - 1, 0, line_invert + 2, demxyz.width, 1);
|
||||
long startlineid = start_ids;
|
||||
Eigen::MatrixXd maskdata = demmask.getData(start_ids - 1, 0, line_invert + 2, demxyz.width, 1);
|
||||
Eigen::MatrixXd demsloper_x = demsloperxyz.getData(start_ids - 1, 0, line_invert + 2, demxyz.width, 1);
|
||||
Eigen::MatrixXd demsloper_y = demsloperxyz.getData(start_ids - 1, 0, line_invert + 2, demxyz.width, 2);
|
||||
Eigen::MatrixXd demsloper_z = demsloperxyz.getData(start_ids - 1, 0, line_invert + 2, demxyz.width, 3);
|
||||
Eigen::MatrixXd demsloper_angle = demsloperxyz.getData(start_ids - 1, 0, line_invert + 2, demxyz.width, 4);
|
||||
|
||||
maskdata = maskdata.array() * 0;
|
||||
Landpoint p0, p1, p2, p3, p4, pslopeVector, pp;
|
||||
Vector3D slopeVector;
|
||||
|
||||
dem_rows = maskdata.rows();
|
||||
dem_cols = maskdata.cols();
|
||||
double sloperAngle = 0;
|
||||
Vector3D Zaxis = { 0,0,1 };
|
||||
|
||||
double rowidx = 0, colidx = 0;
|
||||
|
||||
for (long i = 1; i < dem_rows - 1; i++) {
|
||||
for (long j = 1; j < dem_cols - 1; j++) {
|
||||
rowidx = i + startlineid;
|
||||
colidx = j;
|
||||
demds.getLandPoint(rowidx, colidx, demdata(i, j), p0);
|
||||
demds.getLandPoint(rowidx - 1, colidx, demdata(i - 1, j), p1);
|
||||
demds.getLandPoint(rowidx, colidx - 1, demdata(i, j - 1), p2);
|
||||
demds.getLandPoint(rowidx + 1, colidx, demdata(i + 1, j), p3);
|
||||
demds.getLandPoint(rowidx, colidx + 1, demdata(i, j + 1), p4);
|
||||
|
||||
pslopeVector = getSlopeVector(p0, p1, p2, p3, p4); // 地面坡向矢量
|
||||
slopeVector = { pslopeVector.lon,pslopeVector.lat,pslopeVector.ati };
|
||||
pp = LLA2XYZ(p0);
|
||||
Zaxis.x = pp.lon;
|
||||
Zaxis.y = pp.lat;
|
||||
Zaxis.z = pp.ati;
|
||||
sloperAngle = getCosAngle(slopeVector, Zaxis); // 地面坡向角
|
||||
|
||||
demsloper_x(i, j) = slopeVector.x;
|
||||
demsloper_y(i, j) = slopeVector.y;
|
||||
demsloper_z(i, j) = slopeVector.z;
|
||||
demsloper_angle(i, j) = sloperAngle;
|
||||
maskdata(i, j)++;
|
||||
}
|
||||
}
|
||||
demmask.saveImage(maskdata, start_ids - 1, 0, 1);
|
||||
demsloperxyz.saveImage(demsloper_x, start_ids - 1, 0, 1);
|
||||
demsloperxyz.saveImage(demsloper_y, start_ids - 1, 0, 2);
|
||||
demsloperxyz.saveImage(demsloper_z, start_ids - 1, 0, 3);
|
||||
demsloperxyz.saveImage(demsloper_angle, start_ids - 1, 0, 4);
|
||||
}
|
||||
|
||||
|
||||
return ErrorCode::SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
ErrorCode RFPCProcessCls::InitEchoMaskArray()
|
||||
{
|
||||
QString name = this->EchoSimulationData->getSimulationTaskName();
|
||||
|
@ -401,7 +255,7 @@ std::shared_ptr<SatelliteOribtNode[]> RFPCProcessCls::getSatelliteOribtNodes(dou
|
|||
}
|
||||
|
||||
|
||||
void RFPCProcessMain(long num_thread, QString TansformPatternFilePath, QString ReceivePatternFilePath, QString simulationtaskName, QString OutEchoPath, QString GPSXmlPath, QString TaskXmlPath, QString demTiffPath, QString LandCoverPath, QString HHSigmaPath, QString HVSigmaPath, QString VHSigmaPath, QString VVSigmaPath)
|
||||
void RFPCProcessMain(long num_thread, QString TansformPatternFilePath, QString ReceivePatternFilePath, QString simulationtaskName, QString OutEchoPath, QString GPSXmlPath, QString TaskXmlPath,QString demTiffPath, QString sloperPath, QString LandCoverPath)
|
||||
{
|
||||
|
||||
std::shared_ptr < AbstractSARSatelliteModel> task = ReadSimulationSettingsXML(TaskXmlPath);
|
||||
|
@ -463,11 +317,8 @@ void RFPCProcessMain(long num_thread, QString TansformPatternFilePath, QString R
|
|||
RFPC.setTaskSetting(task); //qDebug() << "setTaskSetting";
|
||||
RFPC.setTaskFileName(simulationtaskName); //qDebug() << "setTaskFileName";
|
||||
RFPC.setDEMTiffPath(demTiffPath); //qDebug() << "setDEMTiffPath";
|
||||
RFPC.setDEMTiffPath(demTiffPath); //qDebug() << "setDEMTiffPath";
|
||||
RFPC.setLandCoverPath(LandCoverPath); //qDebug() << "setLandCoverPath";
|
||||
RFPC.setHHSigmaPath(HHSigmaPath); //qDebug() << "setHHSigmaPath";
|
||||
RFPC.setHVSigmaPath(HVSigmaPath); //qDebug() << "setHVSigmaPath";
|
||||
RFPC.setVHSigmaPath(VHSigmaPath); //qDebug() << "setVHSigmaPath";
|
||||
RFPC.setVVSigmaPath(VVSigmaPath); //qDebug() << "setVVSigmaPath";
|
||||
RFPC.setOutEchoPath(OutEchoPath); //qDebug() << "setOutEchoPath";
|
||||
qDebug() << "-------------- RFPC start---------------------------------------";
|
||||
RFPC.Process(num_thread); // 处理程序
|
||||
|
@ -496,16 +347,11 @@ ErrorCode RFPCProcessCls::RFPCMainProcess_GPU()
|
|||
float f0 = float(freqlist[0] / 1e9);
|
||||
float dfreq = float((freqlist[1] - freqlist[0]) / 1e9);
|
||||
|
||||
|
||||
|
||||
|
||||
long double imageStarttime = 0;
|
||||
imageStarttime = this->TaskSetting->getSARImageStartTime();
|
||||
//std::vector<SatelliteOribtNode> sateOirbtNodes(this->PluseCount);
|
||||
|
||||
std::shared_ptr<SatelliteOribtNode[]> sateOirbtNodes = this->getSatelliteOribtNodes(prf_time, dt, antflag, imageStarttime); // 获取天线坐标
|
||||
|
||||
// 回波
|
||||
long echoIdx = 0;
|
||||
double NearRange = this->EchoSimulationData->getNearRange(); // 近斜距
|
||||
double FarRange = this->EchoSimulationData->getFarRange();
|
||||
|
@ -551,74 +397,93 @@ ErrorCode RFPCProcessCls::RFPCMainProcess_GPU()
|
|||
blokline = Memory1MB / 8 / demCol * 500;
|
||||
blokline = blokline < 1 ? 1 : blokline;
|
||||
bool bloklineflag = false;
|
||||
PatternImageDesc TantPatternDesc = {};
|
||||
double* h_TantPattern=nullptr;
|
||||
double* d_TantPattern=nullptr;
|
||||
|
||||
{
|
||||
// 处理发射天线方向图
|
||||
double Tminphi = TransformPattern->getMinPhi();
|
||||
double Tmaxphi = TransformPattern->getMaxPhi();
|
||||
double Tmintheta = TransformPattern->getMinTheta();
|
||||
double Tmaxtheta = TransformPattern->getMaxTheta();
|
||||
|
||||
// 处理发射天线方向图
|
||||
double Tminphi = TransformPattern->getMinPhi();
|
||||
double Tmaxphi = TransformPattern->getMaxPhi();
|
||||
double Tmintheta = TransformPattern->getMinTheta();
|
||||
double Tmaxtheta = TransformPattern->getMaxTheta();
|
||||
long Tphinum = TransformPattern->getPhis().size();
|
||||
long Tthetanum = TransformPattern->getThetas().size();
|
||||
|
||||
long Tphinum = TransformPattern->getPhis().size();
|
||||
long Tthetanum = TransformPattern->getThetas().size();
|
||||
double TstartTheta = Tmintheta;
|
||||
double TstartPhi = Tminphi;
|
||||
|
||||
double TstartTheta = Tmintheta;
|
||||
double TstartPhi = Tminphi;
|
||||
double Tdtheta = (Tmaxtheta - Tmintheta) / (Tthetanum - 1);
|
||||
double Tdphi = (Tmaxphi - Tminphi) / (Tphinum - 1);
|
||||
|
||||
double Tdtheta = (Tmaxtheta - Tmintheta) / (Tthetanum - 1);
|
||||
double Tdphi = (Tmaxphi - Tminphi) / (Tphinum - 1);
|
||||
double* h_TantPattern = (double*)mallocCUDAHost(sizeof(double) * Tthetanum * Tphinum);
|
||||
double* d_TantPattern = (double*)mallocCUDADevice(sizeof(double) * Tthetanum * Tphinum);
|
||||
|
||||
double* h_TantPattern = (double*)mallocCUDAHost(sizeof(double) * Tthetanum * Tphinum);
|
||||
double* d_TantPattern = (double*)mallocCUDADevice(sizeof(double) * Tthetanum * Tphinum);
|
||||
|
||||
for (long i = 0; i < Tthetanum; i++) {
|
||||
for (long j = Tphinum - 1; j >= 0; j--) {
|
||||
//h_TantPattern[i * Tphinum + j] = TransformPattern->getGainLearThetaPhi(TstartTheta + i * Tdtheta, TstartPhi + j * Tdphi);
|
||||
h_TantPattern[i * Tphinum + j] = TransformPattern->getGain(TstartTheta + i * Tdtheta, TstartPhi + j * Tdphi);
|
||||
for (long i = 0; i < Tthetanum; i++) {
|
||||
for (long j = Tphinum - 1; j >= 0; j--) {
|
||||
//h_TantPattern[i * Tphinum + j] = TransformPattern->getGainLearThetaPhi(TstartTheta + i * Tdtheta, TstartPhi + j * Tdphi);
|
||||
h_TantPattern[i * Tphinum + j] = TransformPattern->getGain(TstartTheta + i * Tdtheta, TstartPhi + j * Tdphi);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
testOutAntPatternTrans("TransPattern.bin", h_TantPattern, TstartTheta, Tdtheta, TstartPhi, Tdphi, Tthetanum, Tphinum);
|
||||
for (long i = 0; i < Tthetanum; i++) {
|
||||
for (long j = 0; j < Tphinum; j++) {
|
||||
h_TantPattern[i * Tphinum + j] = powf(10.0, h_TantPattern[i * Tphinum + j] / 10);
|
||||
testOutAntPatternTrans("TransPattern.bin", h_TantPattern, TstartTheta, Tdtheta, TstartPhi, Tdphi, Tthetanum, Tphinum);
|
||||
for (long i = 0; i < Tthetanum; i++) {
|
||||
for (long j = 0; j < Tphinum; j++) {
|
||||
h_TantPattern[i * Tphinum + j] = powf(10.0, h_TantPattern[i * Tphinum + j] / 10);
|
||||
}
|
||||
}
|
||||
HostToDevice(h_TantPattern, d_TantPattern, sizeof(double) * Tthetanum * Tphinum);
|
||||
TantPatternDesc.startTheta = TstartTheta;
|
||||
TantPatternDesc.startPhi = TstartPhi;
|
||||
TantPatternDesc.dtheta = Tdtheta;
|
||||
TantPatternDesc.dphi = Tdphi;
|
||||
TantPatternDesc.phinum = Tphinum;
|
||||
TantPatternDesc.thetanum = Tthetanum;
|
||||
}
|
||||
HostToDevice(h_TantPattern, d_TantPattern, sizeof(double) * Tthetanum * Tphinum);
|
||||
PatternImageDesc RantPatternDesc = {};
|
||||
double* h_RantPattern = nullptr;
|
||||
double* d_RantPattern = nullptr;
|
||||
{
|
||||
// 处理接收天线方向图
|
||||
double Rminphi = ReceivePattern->getMinPhi();
|
||||
double Rmaxphi = ReceivePattern->getMaxPhi();
|
||||
double Rmintheta = ReceivePattern->getMinTheta();
|
||||
double Rmaxtheta = ReceivePattern->getMaxTheta();
|
||||
|
||||
// 处理接收天线方向图
|
||||
double Rminphi = ReceivePattern->getMinPhi();
|
||||
double Rmaxphi = ReceivePattern->getMaxPhi();
|
||||
double Rmintheta = ReceivePattern->getMinTheta();
|
||||
double Rmaxtheta = ReceivePattern->getMaxTheta();
|
||||
long Rphinum = ReceivePattern->getPhis().size();
|
||||
long Rthetanum = ReceivePattern->getThetas().size();
|
||||
|
||||
long Rphinum = ReceivePattern->getPhis().size();
|
||||
long Rthetanum = ReceivePattern->getThetas().size();
|
||||
double RstartTheta = Rmintheta;
|
||||
double RstartPhi = Rminphi;
|
||||
|
||||
double RstartTheta = Rmintheta;
|
||||
double RstartPhi = Rminphi;
|
||||
double Rdtheta = (Rmaxtheta - Rmintheta) / (Rthetanum - 1);
|
||||
double Rdphi = (Rmaxphi - Rminphi) / (Rphinum - 1);
|
||||
|
||||
double Rdtheta = (Rmaxtheta - Rmintheta) / (Rthetanum - 1);
|
||||
double Rdphi = (Rmaxphi - Rminphi) / (Rphinum - 1);
|
||||
double* h_RantPattern = (double*)mallocCUDAHost(sizeof(double) * Rthetanum * Rphinum);
|
||||
double* d_RantPattern = (double*)mallocCUDADevice(sizeof(double) * Rthetanum * Rphinum);
|
||||
|
||||
double* h_RantPattern = (double*)mallocCUDAHost(sizeof(double) * Rthetanum * Rphinum);
|
||||
double* d_RantPattern = (double*)mallocCUDADevice(sizeof(double) * Rthetanum * Rphinum);
|
||||
|
||||
for (long i = 0; i < Rthetanum; i++) {
|
||||
for (long j = 0; j < Rphinum; j++) {
|
||||
//h_RantPattern[i * Rphinum + j] = ReceivePattern->getGainLearThetaPhi(RstartTheta + i * Rdtheta, RstartPhi + j * Rdphi);
|
||||
h_RantPattern[i * Rphinum + j] = ReceivePattern->getGain(RstartTheta + i * Rdtheta, RstartPhi + j * Rdphi);
|
||||
for (long i = 0; i < Rthetanum; i++) {
|
||||
for (long j = 0; j < Rphinum; j++) {
|
||||
//h_RantPattern[i * Rphinum + j] = ReceivePattern->getGainLearThetaPhi(RstartTheta + i * Rdtheta, RstartPhi + j * Rdphi);
|
||||
h_RantPattern[i * Rphinum + j] = ReceivePattern->getGain(RstartTheta + i * Rdtheta, RstartPhi + j * Rdphi);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
testOutAntPatternTrans("ReceivePattern.bin", h_RantPattern, Rmintheta, Rdtheta, RstartPhi, Rdphi, Rthetanum, Rphinum);
|
||||
for (long i = 0; i < Tthetanum; i++) {
|
||||
for (long j = 0; j < Tphinum; j++) {
|
||||
h_RantPattern[i * Tphinum + j] = powf(10.0, h_RantPattern[i * Tphinum + j] / 10);
|
||||
testOutAntPatternTrans("ReceivePattern.bin", h_RantPattern, Rmintheta, Rdtheta, RstartPhi, Rdphi, Rthetanum, Rphinum);
|
||||
for (long i = 0; i < Rthetanum; i++) {
|
||||
for (long j = 0; j < Rphinum; j++) {
|
||||
h_RantPattern[i * Rphinum + j] = powf(10.0, h_RantPattern[i * Rphinum + j] / 10);
|
||||
}
|
||||
}
|
||||
HostToDevice(h_RantPattern, d_RantPattern, sizeof(double) * Rthetanum * Rphinum);
|
||||
RantPatternDesc.startTheta = RstartTheta;
|
||||
RantPatternDesc.startPhi = RstartPhi;
|
||||
RantPatternDesc.dtheta = Rdtheta;
|
||||
RantPatternDesc.dphi = Rdphi;
|
||||
RantPatternDesc.phinum = Rphinum;
|
||||
RantPatternDesc.thetanum = Rthetanum;
|
||||
}
|
||||
HostToDevice(h_RantPattern, d_RantPattern, sizeof(double) * Rthetanum * Rphinum);
|
||||
|
||||
//处理地表覆盖
|
||||
QMap<long, long> clamap;
|
||||
long clamapid = 0;
|
||||
|
|
|
@ -38,11 +38,8 @@ public:
|
|||
void setEchoSimulationDataSetting(std::shared_ptr < EchoL0Dataset> EchoSimulationData);
|
||||
void setTaskFileName(QString EchoFileName);
|
||||
void setDEMTiffPath(QString DEMTiffPath);
|
||||
void setSloperPath(QString SloperPath);
|
||||
void setLandCoverPath(QString LandCoverPath);
|
||||
void setHHSigmaPath(QString HHSigmaPath);
|
||||
void setHVSigmaPath(QString HVSigmaPath);
|
||||
void setVHSigmaPath(QString VHSigmaPath);
|
||||
void setVVSigmaPath(QString VVSigmaPath);
|
||||
void setOutEchoPath(QString OutEchoPath);
|
||||
|
||||
|
||||
|
@ -52,12 +49,7 @@ private:
|
|||
std::shared_ptr<SigmaDatabase> SigmaDatabasePtr;
|
||||
long PluseCount; // 脉冲数量
|
||||
long PlusePoint; // 脉冲点数
|
||||
QString DEMTiffPath; // DEM Tiff Îļþ·¾¶
|
||||
QString LandCoverPath;
|
||||
QString HHSigmaPath;
|
||||
QString HVSigmaPath;
|
||||
QString VHSigmaPath;
|
||||
QString VVSigmaPath;
|
||||
QString OutEchoPath; // 输出回波路径
|
||||
QString TaskFileName;
|
||||
QString tmpfolderPath;
|
||||
|
@ -67,8 +59,7 @@ public:
|
|||
ErrorCode Process(long num_thread); // 处理
|
||||
private: // 处理流程
|
||||
ErrorCode InitParams();// 1. 初始化参数
|
||||
ErrorCode DEMPreprocess(); // 2. ²Ã¼ôDEM·¶Î§
|
||||
ErrorCode InitEchoMaskArray();
|
||||
ErrorCode InitEchoMaskArray();
|
||||
//ErrorCode RFPCMainProcess(long num_thread);
|
||||
ErrorCode RFPCMainProcess_GPU();
|
||||
|
||||
|
@ -80,5 +71,6 @@ private:
|
|||
QString demsloperPath;
|
||||
};
|
||||
|
||||
void RFPCProcessMain(long num_thread,QString TansformPatternFilePath,QString ReceivePatternFilePath,QString simulationtaskName, QString OutEchoPath, QString GPSXmlPath,QString TaskXmlPath,QString demTiffPath, QString LandCoverPath, QString HHSigmaPath, QString HVSigmaPath, QString VHSigmaPath, QString VVSigmaPath);
|
||||
void RFPCProcessMain(long num_thread,QString TansformPatternFilePath,QString ReceivePatternFilePath,QString simulationtaskName, QString OutEchoPath, QString GPSXmlPath,QString TaskXmlPath,
|
||||
QString demTiffPath, QString sloperPath, QString LandCoverPath);
|
||||
|
||||
|
|
|
@ -97,6 +97,11 @@ struct RadiationPatternGainPoint {
|
|||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 天线方向图的获取
|
||||
/// 注意这里使用 双线性插值
|
||||
|
|
Loading…
Reference in New Issue