修复查找表生成工具bug
parent
b5263a1760
commit
2040d42ff8
|
|
@ -141,7 +141,7 @@
|
||||||
<ProjectReference Include="..\LAMPDataProcessEXE\LAMPDataProcessEXE.vcxproj">
|
<ProjectReference Include="..\LAMPDataProcessEXE\LAMPDataProcessEXE.vcxproj">
|
||||||
<Project>{4e6e79a3-048c-4fb4-bbb0-43c518a3e6d4}</Project>
|
<Project>{4e6e79a3-048c-4fb4-bbb0-43c518a3e6d4}</Project>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\LAMPSARProcessProgram\RasterProcessTool.vcxproj">
|
<ProjectReference Include="..\RasterProcessToolWidget\RasterProcessTool.vcxproj">
|
||||||
<Project>{7ef67daa-dbc0-4b7f-80e8-11b4d2cb7ec2}</Project>
|
<Project>{7ef67daa-dbc0-4b7f-80e8-11b4d2cb7ec2}</Project>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\RasterMainWidgetGUI\RasterMainWidgetGUI.vcxproj">
|
<ProjectReference Include="..\RasterMainWidgetGUI\RasterMainWidgetGUI.vcxproj">
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,6 @@
|
||||||
#include "ToolBoxWidget.h"
|
#include "ToolBoxWidget.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class RasterMainWidget;
|
class RasterMainWidget;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -232,8 +232,9 @@ namespace LookTableSimualtionMainProcessSpace {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 处理分块
|
// 处理分块
|
||||||
long GPUMemoryline = floor((Memory1MB * 2.0 / 8.0/3.0 / demimg.width*1000));//2GB
|
long GPUMemoryline = floor((Memory1MB * 2.0 / 8.0/3.0 / demimg.width*2000));//2GB
|
||||||
GPUMemoryline = GPUMemoryline < 1 ? 1 : GPUMemoryline;
|
GPUMemoryline = GPUMemoryline < 1 ? 1 : GPUMemoryline;
|
||||||
|
|
||||||
// 内存预分配
|
// 内存预分配
|
||||||
|
|
@ -261,8 +262,10 @@ namespace LookTableSimualtionMainProcessSpace {
|
||||||
long colcount = 0;
|
long colcount = 0;
|
||||||
double fact_lamda = 1 / lamda;
|
double fact_lamda = 1 / lamda;
|
||||||
for (long rid = 0; rid < demimg.height; rid = rid + GPUMemoryline) {
|
for (long rid = 0; rid < demimg.height; rid = rid + GPUMemoryline) {
|
||||||
|
|
||||||
rowcount = GPUMemoryline;
|
rowcount = GPUMemoryline;
|
||||||
colcount = demimg.width;
|
colcount = demimg.width;
|
||||||
|
qDebug() << "computer read file : " << rid << "~" << rowcount + rid << "\t:" << demimg.height;
|
||||||
std::shared_ptr<double> demX = readDataArr<double>(demimg, rid, 0, rowcount, colcount, 1,GDALREADARRCOPYMETHOD::MEMCPYMETHOD);// 行列数修改
|
std::shared_ptr<double> demX = readDataArr<double>(demimg, rid, 0, rowcount, colcount, 1,GDALREADARRCOPYMETHOD::MEMCPYMETHOD);// 行列数修改
|
||||||
std::shared_ptr<double> demY = readDataArr<double>(demimg, rid, 0, rowcount, colcount, 2,GDALREADARRCOPYMETHOD::MEMCPYMETHOD);
|
std::shared_ptr<double> demY = readDataArr<double>(demimg, rid, 0, rowcount, colcount, 2,GDALREADARRCOPYMETHOD::MEMCPYMETHOD);
|
||||||
std::shared_ptr<double> demZ = readDataArr<double>(demimg, rid, 0, rowcount, colcount, 3,GDALREADARRCOPYMETHOD::MEMCPYMETHOD);
|
std::shared_ptr<double> demZ = readDataArr<double>(demimg, rid, 0, rowcount, colcount, 3,GDALREADARRCOPYMETHOD::MEMCPYMETHOD);
|
||||||
|
|
@ -279,7 +282,7 @@ namespace LookTableSimualtionMainProcessSpace {
|
||||||
HostToDevice(host_demY.get(), device_demY.get(), sizeof(double)* GPUMemoryline* demimg.width);
|
HostToDevice(host_demY.get(), device_demY.get(), sizeof(double)* GPUMemoryline* demimg.width);
|
||||||
HostToDevice(host_demZ.get(), device_demZ.get(), sizeof(double)* GPUMemoryline* demimg.width);
|
HostToDevice(host_demZ.get(), device_demZ.get(), sizeof(double)* GPUMemoryline* demimg.width);
|
||||||
|
|
||||||
|
qDebug() << "GPU computer start: " << rid << "~" << rowcount + rid << "\t:" << demimg.height;
|
||||||
RDProcess_dopplerGPU(
|
RDProcess_dopplerGPU(
|
||||||
device_demX.get(), device_demY.get(), device_demZ.get(),
|
device_demX.get(), device_demY.get(), device_demZ.get(),
|
||||||
device_Rid.get(), device_Cid.get(),
|
device_Rid.get(), device_Cid.get(),
|
||||||
|
|
@ -299,10 +302,11 @@ namespace LookTableSimualtionMainProcessSpace {
|
||||||
// GPU -> 内存
|
// GPU -> 内存
|
||||||
DeviceToHost(host_Rid.get(), device_Rid.get(), sizeof(float)* GPUMemoryline* demimg.width);
|
DeviceToHost(host_Rid.get(), device_Rid.get(), sizeof(float)* GPUMemoryline* demimg.width);
|
||||||
DeviceToHost(host_Cid.get(), device_Cid.get(), sizeof(float)* GPUMemoryline* demimg.width);
|
DeviceToHost(host_Cid.get(), device_Cid.get(), sizeof(float)* GPUMemoryline* demimg.width);
|
||||||
|
qDebug() << "GPU computer finished!!: " << rid << "~" << rowcount + rid << "\t:" << demimg.height;
|
||||||
// 数据存储
|
// 数据存储
|
||||||
outLookTable.saveImage(host_Rid, rid, 0, rowcount, colcount,1);
|
outLookTable.saveImage(host_Rid, rid, 0, rowcount, colcount,1);
|
||||||
outLookTable.saveImage(host_Cid, rid, 0, rowcount, colcount,2);
|
outLookTable.saveImage(host_Cid, rid, 0, rowcount, colcount,2);
|
||||||
|
qDebug() << "GPU computer result write finished: " << rid << "~" << rowcount + rid << "\t:" << demimg.height;
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug() << "look table computed finished!!!";
|
qDebug() << "look table computed finished!!!";
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,15 @@ QSimulationLookTableDialog::QSimulationLookTableDialog(QWidget *parent)
|
||||||
: QDialog(parent),ui(new Ui::QSimulationLookTableDialogClass)
|
: QDialog(parent),ui(new Ui::QSimulationLookTableDialogClass)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
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->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)));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QSimulationLookTableDialog::~QSimulationLookTableDialog()
|
QSimulationLookTableDialog::~QSimulationLookTableDialog()
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>763</width>
|
<width>763</width>
|
||||||
<height>400</height>
|
<height>387</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
|
@ -35,6 +35,9 @@
|
||||||
<height>30</height>
|
<height>30</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>D:\FZSimulation\LT1A\L20250210\LT1A_DEM_20250210_resampleXYZ.dat</string>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="1">
|
<item row="5" column="1">
|
||||||
|
|
@ -46,7 +49,7 @@
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/demdataset/demxyz.bin</string>
|
<string>D:\FZSimulation\LT1A\L20250210\Looktable</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
@ -121,7 +124,7 @@
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/demdataset/demxyz.bin</string>
|
<string>D:\FZSimulation\LT1A\L20250210\LT1_Simulation_Setting.xml</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
@ -224,7 +227,7 @@
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/demdataset/demxyz.bin</string>
|
<string>D:\FZSimulation\LT1A\L20250210\LT1_Simulation_OrbitModel.xml</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
@ -311,7 +314,7 @@
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string>LT1A_20250210</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
||||||
|
|
@ -497,16 +497,6 @@ void PolyfitSatelliteOribtModel::writeVector(QXmlStreamWriter& xmlWriter, const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PolyfitSatelliteOribtModel::readVector(QXmlStreamReader& xmlReader, const QString& name, std::vector<double>& vec) {
|
|
||||||
if (xmlReader.name() == name) {
|
|
||||||
while (xmlReader.readNextStartElement()) {
|
|
||||||
if (xmlReader.name() == "Value") {
|
|
||||||
vec.push_back(xmlReader.readElementText().toDouble());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool PolyfitSatelliteOribtModel::loadFromXml(const QString& filePath) {
|
bool PolyfitSatelliteOribtModel::loadFromXml(const QString& filePath) {
|
||||||
QFile file(filePath);
|
QFile file(filePath);
|
||||||
|
|
@ -529,13 +519,24 @@ bool PolyfitSatelliteOribtModel::loadFromXml(const QString& filePath) {
|
||||||
Vxchisq = xmlReader.attributes().value("Vxchisq").toDouble();
|
Vxchisq = xmlReader.attributes().value("Vxchisq").toDouble();
|
||||||
Vychisq = xmlReader.attributes().value("Vychisq").toDouble();
|
Vychisq = xmlReader.attributes().value("Vychisq").toDouble();
|
||||||
Vzchisq = xmlReader.attributes().value("Vzchisq").toDouble();
|
Vzchisq = xmlReader.attributes().value("Vzchisq").toDouble();
|
||||||
|
}
|
||||||
readVector(xmlReader, "polyfitPx", polyfitPx);
|
else if (xmlReader.name() == "polyfitPx") {
|
||||||
readVector(xmlReader, "polyfitPy", polyfitPy);
|
this->readVector(xmlReader, QString("polyfitPx"), polyfitPx);
|
||||||
readVector(xmlReader, "polyfitPz", polyfitPz);
|
}
|
||||||
readVector(xmlReader, "polyfitVx", polyfitVx);
|
else if (xmlReader.name() == "polyfitPy") {
|
||||||
readVector(xmlReader, "polyfitVy", polyfitVy);
|
this->readVector(xmlReader, QString("polyfitPy"), polyfitPy);
|
||||||
readVector(xmlReader, "polyfitVz", polyfitVz);
|
}
|
||||||
|
else if (xmlReader.name() == "polyfitPz") {
|
||||||
|
this->readVector(xmlReader, QString("polyfitPz"), polyfitPz);
|
||||||
|
}
|
||||||
|
else if (xmlReader.name() == "polyfitVx") {
|
||||||
|
this->readVector(xmlReader, QString("polyfitVx"), polyfitVx);
|
||||||
|
}
|
||||||
|
else if (xmlReader.name() == "polyfitVy") {
|
||||||
|
this->readVector(xmlReader, QString("polyfitVy"), polyfitVy);
|
||||||
|
}
|
||||||
|
else if (xmlReader.name() == "polyfitVz") {
|
||||||
|
this->readVector(xmlReader, QString("polyfitVz"), polyfitVz);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -549,6 +550,20 @@ bool PolyfitSatelliteOribtModel::loadFromXml(const QString& filePath) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PolyfitSatelliteOribtModel::readVector(QXmlStreamReader& xmlReader, const QString& name, std::vector<double>& vec) {
|
||||||
|
if (xmlReader.name() == name) {
|
||||||
|
qDebug() << "read orbit model ,key " << name;
|
||||||
|
while (xmlReader.readNextStartElement()) {
|
||||||
|
if (xmlReader.name() == "Value") {
|
||||||
|
vec.push_back(xmlReader.readElementText().toDouble());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
long double PolyfitSatelliteOribtModel::getOribtStartTime()
|
long double PolyfitSatelliteOribtModel::getOribtStartTime()
|
||||||
{
|
{
|
||||||
return oribtStartTime;
|
return oribtStartTime;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue