diff --git a/Toolbox/BaseToolbox/BaseToolbox/GF3CalibrationAndGeocodingClass.cpp b/GF3CalibrationAndOrthLib/GF3CalibrationAndGeocodingClass.cpp similarity index 99% rename from Toolbox/BaseToolbox/BaseToolbox/GF3CalibrationAndGeocodingClass.cpp rename to GF3CalibrationAndOrthLib/GF3CalibrationAndGeocodingClass.cpp index aadbd71..2abf020 100644 --- a/Toolbox/BaseToolbox/BaseToolbox/GF3CalibrationAndGeocodingClass.cpp +++ b/GF3CalibrationAndOrthLib/GF3CalibrationAndGeocodingClass.cpp @@ -429,7 +429,6 @@ ErrorCode GF3RDCreateLookTable(QString inxmlPath, QString indemPath, QString out bool antflag = false; - for (long j = 0; j < blockcols; j++) { timeR = sar_r(i, j) / prf; slopex = demslope_x(i, j); @@ -601,7 +600,6 @@ ErrorCode GF3RDProcess(QString inxmlPath, QString indemPath, QString outworkdir, QString resampleDEMPath = JoinPath(outworkdir, getFileNameWidthoutExtend(indemPath) + filename + "_clip_resample.tif"); 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"); diff --git a/GF3CalibrationAndOrthLib/GF3CalibrationAndGeocodingClass.h b/GF3CalibrationAndOrthLib/GF3CalibrationAndGeocodingClass.h new file mode 100644 index 0000000..8cb29bb --- /dev/null +++ b/GF3CalibrationAndOrthLib/GF3CalibrationAndGeocodingClass.h @@ -0,0 +1,35 @@ +#pragma once +#ifndef __GF3CALIBRATIONANDGEOCODINGCLASS__H__ +#define __GF3CALIBRATIONANDGEOCODINGCLASS__H__ +#include "gf3calibrationandorthlib_global.h" +#include "BaseConstVariable.h" +#include "ImageOperatorBase.h" +#include "LogInfoCls.h" +#include "SARSimulationImageL1.h" +#include "GF3PSTNClass.h" +#include + + +// 数据定标 +ErrorCode GF3CALIBRATIONANDORTHLIB_EXPORT GF3CalibrationRaster(QString inRasterPath, QString outRasterPath, double Qualifyvalue, double calibrationConst); + +ErrorCode GF3CALIBRATIONANDORTHLIB_EXPORT ImportGF3L1ARasterToWorkspace(QString inMetaxmlPath,QString inRasterPath, QString outWorkDirPath, POLARTYPEENUM polsartype); + +QVector GF3CALIBRATIONANDORTHLIB_EXPORT SearchGF3DataTiff(QString inMetaxmlPath); + +POLARTYPEENUM GF3CALIBRATIONANDORTHLIB_EXPORT getDatasetGF3FilePolsarType(QString fileName); + +ErrorCode GF3CALIBRATIONANDORTHLIB_EXPORT ImportGF3L1AProcess(QString inMetaxmlPath, QString outWorkDirPath); + +// RD 算法类 +ErrorCode GF3CALIBRATIONANDORTHLIB_EXPORT 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); + + +//创建查找表 +ErrorCode GF3CALIBRATIONANDORTHLIB_EXPORT GF3RDCreateLookTable(QString inxmlPath, QString indemPath, QString outworkdir, QString outlooktablePath, QString outLocalIncidenceAnglePath, bool localincAngleFlag=false); +ErrorCode GF3CALIBRATIONANDORTHLIB_EXPORT GF3OrthSLC( QString inRasterPath, QString inlooktablePath, QString outRasterPath); + +// 正射处理流程 +ErrorCode GF3CALIBRATIONANDORTHLIB_EXPORT GF3RDProcess(QString inxmlPath, QString indemPath, QString outworkdir, double gridx, double gridy); + +#endif \ No newline at end of file diff --git a/GF3CalibrationAndOrthLib/GF3CalibrationAndOrthLib.vcxproj b/GF3CalibrationAndOrthLib/GF3CalibrationAndOrthLib.vcxproj index 1dd7d0f..19af8ab 100644 --- a/GF3CalibrationAndOrthLib/GF3CalibrationAndOrthLib.vcxproj +++ b/GF3CalibrationAndOrthLib/GF3CalibrationAndOrthLib.vcxproj @@ -42,7 +42,7 @@ tools_qt5 - core + core;xml;opengl;gui;xmlpatterns;widgets;quick;dbus;datavisualization release @@ -97,10 +97,18 @@ + + + + + + + + diff --git a/GF3CalibrationAndOrthLib/GF3CalibrationAndOrthLib.vcxproj.filters b/GF3CalibrationAndOrthLib/GF3CalibrationAndOrthLib.vcxproj.filters index 73024af..583d053 100644 --- a/GF3CalibrationAndOrthLib/GF3CalibrationAndOrthLib.vcxproj.filters +++ b/GF3CalibrationAndOrthLib/GF3CalibrationAndOrthLib.vcxproj.filters @@ -35,9 +35,35 @@ Header Files + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + \ No newline at end of file diff --git a/Toolbox/BaseToolbox/BaseToolbox/GF3PSTNClass.cpp b/GF3CalibrationAndOrthLib/GF3PSTNClass.cpp similarity index 100% rename from Toolbox/BaseToolbox/BaseToolbox/GF3PSTNClass.cpp rename to GF3CalibrationAndOrthLib/GF3PSTNClass.cpp diff --git a/Toolbox/BaseToolbox/BaseToolbox/GF3PSTNClass.h b/GF3CalibrationAndOrthLib/GF3PSTNClass.h similarity index 87% rename from Toolbox/BaseToolbox/BaseToolbox/GF3PSTNClass.h rename to GF3CalibrationAndOrthLib/GF3PSTNClass.h index babc6bd..fddc8d1 100644 --- a/Toolbox/BaseToolbox/BaseToolbox/GF3PSTNClass.h +++ b/GF3CalibrationAndOrthLib/GF3PSTNClass.h @@ -1,8 +1,9 @@ #pragma once +#ifndef __GF3PSTNCLASS_H__ +#define __GF3PSTNCLASS_H__ - - +#include "gf3calibrationandorthlib_global.h" #include "LogInfoCls.h" #include "BaseConstVariable.h" @@ -14,7 +15,7 @@ /// /// 多项式轨道模型 /// -class GF3PolyfitSatelliteOribtModel +class GF3CALIBRATIONANDORTHLIB_EXPORT GF3PolyfitSatelliteOribtModel { public: GF3PolyfitSatelliteOribtModel(); @@ -43,8 +44,9 @@ public: // virtual void setAntnnaAxisY(double X, double Y, double Z) ; // 设置天线X轴指向 virtual void setAntnnaAxisZ(double X, double Y, double Z) ; // 设置天线X轴指向 - virtual ErrorCode getAntnnaDirection(SatelliteOribtNode& node) ; // 获取天线指向方向 - virtual ErrorCode getZeroDopplerAntDirect(SatelliteOribtNode& node) ; + virtual ErrorCode getAntnnaDirection(SatelliteOribtNode& node); // 获取天线指向方向 + virtual ErrorCode getZeroDopplerAntDirect(SatelliteOribtNode& node); + private: // 变量 long double oribtStartTime; // 卫星模型参考时间 double beamAngle; // 波位角 @@ -93,16 +95,14 @@ public: //virtual void setPt(double Pt); //virtual void setGri(double gri); - - private: double Pt; // 发射电压 double Gri;// 系统增益 }; -std::shared_ptr CreataGF3PolyfitSatelliteOribtModel(std::vector& nodes, long double startTime, int polynum = 3); - +std::shared_ptr GF3CALIBRATIONANDORTHLIB_EXPORT CreataGF3PolyfitSatelliteOribtModel(std::vector& nodes, long double startTime, int polynum = 3); +#endif diff --git a/Toolbox/BaseToolbox/BaseToolbox/SateOrbit.cpp b/GF3CalibrationAndOrthLib/SateOrbit.cpp similarity index 86% rename from Toolbox/BaseToolbox/BaseToolbox/SateOrbit.cpp rename to GF3CalibrationAndOrthLib/SateOrbit.cpp index ac036bd..1aa04f7 100644 --- a/Toolbox/BaseToolbox/BaseToolbox/SateOrbit.cpp +++ b/GF3CalibrationAndOrthLib/SateOrbit.cpp @@ -41,27 +41,19 @@ Eigen::MatrixX OrbitPoly::SatelliteSpacePoint(long double satellitetime) if (this->polySatellitePara.rows() != polynum || this->polySatellitePara.cols() != 6) { throw exception("the size of satellitetime has error!! row: p1,p2,p3,p4 col: x,y,z,vx,vy,vz "); } - // ????????? + double satellitetime2 =double( satellitetime - this->SatelliteModelStartTime); Eigen::MatrixX satetime(1, polynum); for (int i = 0; i < polynum; i++) { satetime(0, i) = pow(satellitetime2, i); } - // ???? Eigen::MatrixX satellitePoints(1, 6); satellitePoints = satetime * polySatellitePara; return satellitePoints; } -/// -/// ???????????????????? -/// -/// ??????? -/// ?????????? -/// ??????[x1,y1,z1,vx1,vy1,vz1; x2,y2,z2,vx2,vy2,vz2; ..... ] -/// ?????????? -/// ???????? + Eigen::MatrixX SatelliteSpacePoints(Eigen::MatrixX& satellitetime, double SatelliteModelStartTime, Eigen::MatrixX& polySatellitePara, int polynum) { if (satellitetime.cols() != 1) { @@ -70,7 +62,7 @@ Eigen::MatrixX SatelliteSpacePoints(Eigen::MatrixX& satellitetim if (polySatellitePara.rows() != polynum || polySatellitePara.cols() != 6) { throw exception("the size of satellitetime has error!! row: p1,p2,p3,p4 col: x,y,z,vx,vy,vz "); } - // ????????? + int satellitetime_num = satellitetime.rows(); satellitetime = satellitetime.array() - SatelliteModelStartTime; Eigen::MatrixX satelliteTime(satellitetime_num, polynum); @@ -78,7 +70,6 @@ Eigen::MatrixX SatelliteSpacePoints(Eigen::MatrixX& satellitetim satelliteTime.col(i) = satellitetime.array().pow(i); } - // ???? Eigen::MatrixX satellitePoints(satellitetime_num, 6); satellitePoints = satelliteTime * polySatellitePara; return satellitePoints; diff --git a/Toolbox/BaseToolbox/BaseToolbox/SateOrbit.h b/GF3CalibrationAndOrthLib/SateOrbit.h similarity index 73% rename from Toolbox/BaseToolbox/BaseToolbox/SateOrbit.h rename to GF3CalibrationAndOrthLib/SateOrbit.h index 5148739..4b65871 100644 --- a/Toolbox/BaseToolbox/BaseToolbox/SateOrbit.h +++ b/GF3CalibrationAndOrthLib/SateOrbit.h @@ -1,4 +1,6 @@ #pragma once +#ifndef __SATEORIBT_H__ +#define __SATEORIBT_H__ /// /// 计算卫星轨道 /// @@ -7,6 +9,7 @@ //#define EIGEN_VECTORIZE_SSE4_2 //#include // 本地方法 +#include "gf3calibrationandorthlib_global.h" #include "BaseTool.h" #include #include @@ -16,15 +19,15 @@ //#include -using namespace std; -using namespace Eigen; +//using namespace std; +//using namespace Eigen; //using namespace arma; /// /// 多项式轨道模型 /// -class OrbitPoly { +class GF3CALIBRATIONANDORTHLIB_EXPORT OrbitPoly { public: //OrbitPoly(std::string orbitModelPath); OrbitPoly(); @@ -49,4 +52,8 @@ public: /// 模型参数[x1,y1,z1,vx1,vy1,vz1; x2,y2,z2,vx2,vy2,vz2; ..... ] /// 模型参数数量 /// 卫星坐标 -Eigen::MatrixX SatelliteSpacePoints(Eigen::MatrixX &satellitetime, double SatelliteModelStartTime, Eigen::MatrixX& polySatellitePara, int polynum = 4); +Eigen::MatrixX GF3CALIBRATIONANDORTHLIB_EXPORT SatelliteSpacePoints(Eigen::MatrixX &satellitetime, double SatelliteModelStartTime, Eigen::MatrixX& polySatellitePara, int polynum = 4); + + + +#endif \ No newline at end of file diff --git a/Toolbox/BaseToolbox/BaseToolbox/SatelliteGF3xmlParser.cpp b/GF3CalibrationAndOrthLib/SatelliteGF3xmlParser.cpp similarity index 100% rename from Toolbox/BaseToolbox/BaseToolbox/SatelliteGF3xmlParser.cpp rename to GF3CalibrationAndOrthLib/SatelliteGF3xmlParser.cpp diff --git a/Toolbox/BaseToolbox/BaseToolbox/SatelliteGF3xmlParser.h b/GF3CalibrationAndOrthLib/SatelliteGF3xmlParser.h similarity index 89% rename from Toolbox/BaseToolbox/BaseToolbox/SatelliteGF3xmlParser.h rename to GF3CalibrationAndOrthLib/SatelliteGF3xmlParser.h index 8bbf282..91a1f89 100644 --- a/Toolbox/BaseToolbox/BaseToolbox/SatelliteGF3xmlParser.h +++ b/GF3CalibrationAndOrthLib/SatelliteGF3xmlParser.h @@ -1,4 +1,8 @@ #pragma once +#ifndef __SATELLITEGF3XMLPARSER_H__ +#define __SATELLITEGF3XMLPARSER_H__ + +#include "gf3calibrationandorthlib_global.h" #include #include #include @@ -9,7 +13,7 @@ -class SatelliteGF3xmlParser { +class GF3CALIBRATIONANDORTHLIB_EXPORT SatelliteGF3xmlParser { public: bool loadFile(const QString& filename); @@ -51,3 +55,5 @@ public: + +#endif \ No newline at end of file diff --git a/Toolbox/BaseToolbox/BaseToolbox.vcxproj b/Toolbox/BaseToolbox/BaseToolbox.vcxproj index 1ace8fc..7ba7c25 100644 --- a/Toolbox/BaseToolbox/BaseToolbox.vcxproj +++ b/Toolbox/BaseToolbox/BaseToolbox.vcxproj @@ -103,7 +103,7 @@ - ..\..\BaseCommonLibrary;..\..\BaseCommonLibrary\BaseTool;..\..\BaseCommonLibrary\ToolAbstract;..\..\GPUBaseLib\GPUTool;.\BaseToolbox;..\..\RasterMainWidgetGUI\RasterMainWidget;..\..\RasterMainWidgetGUI;..\..\SPG4Tool;..\..\RasterProcessToolWidget;$(VC_IncludePath);$(WindowsSDK_IncludePath) + ..\..\GF3CalibrationAndOrthLib;..\..\BaseCommonLibrary;..\..\BaseCommonLibrary\BaseTool;..\..\BaseCommonLibrary\ToolAbstract;..\..\GPUBaseLib\GPUTool;.\BaseToolbox;..\..\RasterMainWidgetGUI\RasterMainWidget;..\..\RasterMainWidgetGUI;..\..\SPG4Tool;..\..\RasterProcessToolWidget;$(VC_IncludePath);$(WindowsSDK_IncludePath) $(SolutionDir)$(Platform)\$(Configuration)\Toolbox\ PluginTool_$(ProjectName) true @@ -195,8 +195,6 @@ - - @@ -209,15 +207,11 @@ - - - - @@ -230,8 +224,6 @@ - - @@ -257,6 +249,9 @@ {872ecd6f-30e3-4a1b-b17c-15e87d373ff6} + + {886f7829-af74-4f23-b3be-29b7b3c9843c} + {b8b40c54-f7fe-4809-b6fb-8bc014570d7b} diff --git a/Toolbox/BaseToolbox/BaseToolbox.vcxproj.filters b/Toolbox/BaseToolbox/BaseToolbox.vcxproj.filters index dbe0ff5..399f5d8 100644 --- a/Toolbox/BaseToolbox/BaseToolbox.vcxproj.filters +++ b/Toolbox/BaseToolbox/BaseToolbox.vcxproj.filters @@ -32,18 +32,6 @@ Source Files - - BaseToolbox - - - BaseToolbox - - - BaseToolbox - - - BaseToolbox - BaseToolbox @@ -55,12 +43,6 @@ BaseToolbox - - BaseToolbox - - - BaseToolbox - BaseToolbox @@ -76,12 +58,6 @@ BaseToolbox - - BaseToolbox - - - BaseToolbox - BaseToolbox diff --git a/Toolbox/BaseToolbox/BaseToolbox/GF3CalibrationAndGeocodingClass.h b/Toolbox/BaseToolbox/BaseToolbox/GF3CalibrationAndGeocodingClass.h deleted file mode 100644 index db71e8c..0000000 --- a/Toolbox/BaseToolbox/BaseToolbox/GF3CalibrationAndGeocodingClass.h +++ /dev/null @@ -1,31 +0,0 @@ -#pragma once -#include "BaseConstVariable.h" -#include "ImageOperatorBase.h" -#include "LogInfoCls.h" -#include "SARSimulationImageL1.h" -#include "GF3PSTNClass.h" -#include - - -// 数据定标 -ErrorCode GF3CalibrationRaster(QString inRasterPath, QString outRasterPath, double Qualifyvalue, double calibrationConst); - -ErrorCode ImportGF3L1ARasterToWorkspace(QString inMetaxmlPath,QString inRasterPath, QString outWorkDirPath, POLARTYPEENUM polsartype); - -QVector SearchGF3DataTiff(QString inMetaxmlPath); - -POLARTYPEENUM getDatasetGF3FilePolsarType(QString fileName); - -ErrorCode ImportGF3L1AProcess(QString inMetaxmlPath, QString outWorkDirPath); - -// 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); - - -//创建查找表 -ErrorCode GF3RDCreateLookTable(QString inxmlPath, QString indemPath, QString outworkdir, QString outlooktablePath, QString outLocalIncidenceAnglePath, bool localincAngleFlag=false); -ErrorCode GF3OrthSLC( QString inRasterPath, QString inlooktablePath, QString outRasterPath); - -// 正射处理流程 -ErrorCode GF3RDProcess(QString inxmlPath, QString indemPath, QString outworkdir, double gridx, double gridy); -