调整主窗口大小
parent
673d66dd19
commit
9585c74111
File diff suppressed because it is too large
Load Diff
|
@ -125,6 +125,7 @@
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="QApplicationSettingManager.cpp" />
|
<ClCompile Include="QApplicationSettingManager.cpp" />
|
||||||
|
<QtRcc Include="..\RasterMainWidgetGUI\resource\res.qrc" />
|
||||||
<QtRcc Include="RasterProcessTool.qrc" />
|
<QtRcc Include="RasterProcessTool.qrc" />
|
||||||
<QtUic Include="QApplicationSettingManager.ui" />
|
<QtUic Include="QApplicationSettingManager.ui" />
|
||||||
<QtUic Include="ToolBoxWidget.ui" />
|
<QtUic Include="ToolBoxWidget.ui" />
|
||||||
|
|
|
@ -38,6 +38,9 @@
|
||||||
<ClCompile Include="ToolBoxWidget.cpp">
|
<ClCompile Include="ToolBoxWidget.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<QtRcc Include="..\RasterMainWidgetGUI\resource\res.qrc">
|
||||||
|
<Filter>Resource Files</Filter>
|
||||||
|
</QtRcc>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="QApplicationSettingManager.cpp">
|
<ClCompile Include="QApplicationSettingManager.cpp">
|
||||||
|
|
|
@ -75,7 +75,7 @@ void ToolBoxWidget::initToolbox(QString dlltoolPath)
|
||||||
else {
|
else {
|
||||||
FreeLibrary(hmodel);
|
FreeLibrary(hmodel);
|
||||||
qDebug() << "do not find Register function Plugin: " << plugpath;
|
qDebug() << "do not find Register function Plugin: " << plugpath;
|
||||||
return ;
|
continue ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -191,7 +191,7 @@ QToolboxTreeWidgetItem::QToolboxTreeWidgetItem(QTreeWidget* IntreeWidgetToolBox,
|
||||||
button->setIcon(icon);
|
button->setIcon(icon);
|
||||||
button->setText(toolName);
|
button->setText(toolName);
|
||||||
button->setLayoutDirection(Qt::LeftToRight);
|
button->setLayoutDirection(Qt::LeftToRight);
|
||||||
button->setStyleSheet("QPushButton { text-align: left;font-size: 12px; font-weight: normal; }");
|
button->setStyleSheet("QPushButton { text-align: left; font-weight: blob; }");
|
||||||
IntreeWidgetToolBox->setItemWidget(actionItem, 0, button);
|
IntreeWidgetToolBox->setItemWidget(actionItem, 0, button);
|
||||||
QObject::connect(button, SIGNAL(clicked()), item, SLOT(excute()));
|
QObject::connect(button, SIGNAL(clicked()), item, SLOT(excute()));
|
||||||
item->setParent(IntreeWidgetToolBox);
|
item->setParent(IntreeWidgetToolBox);
|
||||||
|
|
|
@ -98,8 +98,8 @@ RasterMainWidget::setupActions() {
|
||||||
|
|
||||||
void RasterMainWidget::setupWindow() {
|
void RasterMainWidget::setupWindow() {
|
||||||
mUi->mapCanvasLayout->addWidget(mMapConvas);
|
mUi->mapCanvasLayout->addWidget(mMapConvas);
|
||||||
setFixedSize(size());
|
//setFixedSize(size());
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowMaximizeButtonHint);
|
//setWindowFlags(windowFlags() | Qt::WindowMinMaxButtonsHint | Qt::WindowSystemMenuHint);
|
||||||
|
|
||||||
QObject::connect(mMapConvas, &MapCanvas::zoomChanged, this, &RasterMainWidget::zoomChangedHandle);
|
QObject::connect(mMapConvas, &MapCanvas::zoomChanged, this, &RasterMainWidget::zoomChangedHandle);
|
||||||
QObject::connect(mMapConvas, &MapCanvas::clicked, this, &RasterMainWidget::clickedHandle);
|
QObject::connect(mMapConvas, &MapCanvas::clicked, this, &RasterMainWidget::clickedHandle);
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>RasterMainWidget</class>
|
<class>RasterMainWidget</class>
|
||||||
<widget class="QMainWindow" name="RasterMainWidget">
|
<widget class="QMainWindow" name="RasterMainWidget">
|
||||||
|
<property name="windowModality">
|
||||||
|
<enum>Qt::WindowModal</enum>
|
||||||
|
</property>
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -9,8 +12,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>810</width>
|
<width>906</width>
|
||||||
<height>637</height>
|
<height>609</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -19,22 +22,24 @@
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::StrongFocus</enum>
|
||||||
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>地图下载器</string>
|
<string>LAMP栅格处理主界面</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="centralwidget">
|
<widget class="QWidget" name="centralwidget">
|
||||||
<widget class="QWidget" name="gridLayoutWidget">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="geometry">
|
<item row="0" column="0">
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>1441</width>
|
|
||||||
<height>911</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="mainLayout">
|
<layout class="QGridLayout" name="mainLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
|
@ -42,60 +47,23 @@
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>地图</string>
|
<string>地图</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<widget class="QWidget" name="gridLayoutWidget_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<property name="geometry">
|
<item>
|
||||||
<rect>
|
<layout class="QGridLayout" name="infoLayout"/>
|
||||||
<x>0</x>
|
</item>
|
||||||
<y>0</y>
|
<item>
|
||||||
<width>1241</width>
|
<layout class="QGridLayout" name="mapCanvasLayout">
|
||||||
<height>881</height>
|
<item row="0" column="0">
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="mapCanvasLayout"/>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="gridLayoutWidget_3">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>1250</x>
|
|
||||||
<y>-1</y>
|
|
||||||
<width>191</width>
|
|
||||||
<height>881</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="infoLayout">
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QGroupBox" name="layersListGbx">
|
<widget class="QGroupBox" name="layersListGbx">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QGroupBox" name="layersGbx">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>10</y>
|
|
||||||
<width>171</width>
|
|
||||||
<height>611</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>图层列表</string>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="gridLayoutWidget_4">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>9</x>
|
|
||||||
<y>30</y>
|
|
||||||
<width>151</width>
|
|
||||||
<height>571</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="layersLayout">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QListWidget" name="layerList"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
<widget class="QGroupBox" name="downloadGbx">
|
<widget class="QGroupBox" name="downloadGbx">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
|
@ -105,6 +73,12 @@
|
||||||
<height>221</height>
|
<height>221</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>下载区域</string>
|
<string>下载区域</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -117,6 +91,12 @@
|
||||||
<height>31</height>
|
<height>31</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="readOnly">
|
<property name="readOnly">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -130,6 +110,12 @@
|
||||||
<height>25</height>
|
<height>25</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>点击开始选择左上角点</string>
|
<string>点击开始选择左上角点</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -146,6 +132,12 @@
|
||||||
<height>31</height>
|
<height>31</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="readOnly">
|
<property name="readOnly">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -159,6 +151,12 @@
|
||||||
<height>25</height>
|
<height>25</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>点击开始选择右下角点</string>
|
<string>点击开始选择右下角点</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -170,7 +168,8 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="taskTab">
|
<widget class="QWidget" name="taskTab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -195,14 +194,15 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenuBar" name="menubar">
|
<widget class="QMenuBar" name="menubar">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>810</width>
|
<width>906</width>
|
||||||
<height>22</height>
|
<height>22</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -275,6 +275,53 @@
|
||||||
<addaction name="downloadAction"/>
|
<addaction name="downloadAction"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QDockWidget" name="dockWidget">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<attribute name="dockWidgetArea">
|
||||||
|
<number>1</number>
|
||||||
|
</attribute>
|
||||||
|
<widget class="QWidget" name="dockWidgetContents">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="layersGbx">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>图层列表</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<layout class="QGridLayout" name="layersLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QListWidget" name="layerList">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
<action name="tutorialAction">
|
<action name="tutorialAction">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>使用教程</string>
|
<string>使用教程</string>
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
<RCC>
|
||||||
|
<qresource prefix="/themes">
|
||||||
|
<file alias="mActionPan">theme/mActionPan.svg</file>
|
||||||
|
<file alias="mActionRefresh">theme/mActionRefresh.svg</file>
|
||||||
|
<file alias="mActionZoomIn">theme/mActionZoomIn.svg</file>
|
||||||
|
<file alias="mActionZoomOut">theme/mActionZoomOut.svg</file>
|
||||||
|
<file alias="mActionSelect">theme/mActionSelect.svg</file>
|
||||||
|
<file alias="mActionDownload">theme/mActionDownload.svg</file>
|
||||||
|
</qresource>
|
||||||
|
<qresource prefix="/">
|
||||||
|
<file>plane-red.png</file>
|
||||||
|
<file>plane-black.png</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
|
@ -10,4 +10,7 @@ class ToolBoxWidget;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
extern "C" LAMPSCATTERTOOL_EXPORT void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWidget* toolbox);
|
extern "C" LAMPSCATTERTOOL_EXPORT void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWidget* toolbox);
|
|
@ -0,0 +1,693 @@
|
||||||
|
#include "OribtModelOperator.h"
|
||||||
|
#include <Eigen/Core>
|
||||||
|
#include <Eigen/Dense>
|
||||||
|
#include <QMatrix>
|
||||||
|
#include <QtMath>
|
||||||
|
#include <QDate>
|
||||||
|
#include <QTime>
|
||||||
|
#include <QDateTime>
|
||||||
|
|
||||||
|
OrbitElements::OrbitElements() : semiMajorAxis(0), eccentricity(0), inclination(0),
|
||||||
|
longitudeOfAscendingNode(0), argumentOfPeriapsis(0), trueAnomaly(0) {}
|
||||||
|
|
||||||
|
|
||||||
|
/** 六根数轨道拟合模型************************************************************************************/
|
||||||
|
|
||||||
|
OrbitEstimator::OrbitEstimator() {}
|
||||||
|
|
||||||
|
void OrbitEstimator::estimateOrbit(const SatellitePos& node) {
|
||||||
|
// 根据轨道节点估算轨道六根数的具体算法
|
||||||
|
elements = estimateKeplerianElements(node);
|
||||||
|
}
|
||||||
|
|
||||||
|
void OrbitEstimator::saveToXml(const QString& filename) const {
|
||||||
|
QDomDocument doc("OrbitElements");
|
||||||
|
QDomElement root = doc.createElement("OrbitElements");
|
||||||
|
doc.appendChild(root);
|
||||||
|
|
||||||
|
QDomElement elem;
|
||||||
|
|
||||||
|
elem = doc.createElement("SemiMajorAxis");
|
||||||
|
elem.appendChild(doc.createTextNode(QString::number(elements.semiMajorAxis)));
|
||||||
|
root.appendChild(elem);
|
||||||
|
|
||||||
|
elem = doc.createElement("Eccentricity");
|
||||||
|
elem.appendChild(doc.createTextNode(QString::number(elements.eccentricity)));
|
||||||
|
root.appendChild(elem);
|
||||||
|
|
||||||
|
elem = doc.createElement("Inclination");
|
||||||
|
elem.appendChild(doc.createTextNode(QString::number(elements.inclination)));
|
||||||
|
root.appendChild(elem);
|
||||||
|
|
||||||
|
elem = doc.createElement("LongitudeOfAscendingNode");
|
||||||
|
elem.appendChild(doc.createTextNode(QString::number(elements.longitudeOfAscendingNode)));
|
||||||
|
root.appendChild(elem);
|
||||||
|
|
||||||
|
elem = doc.createElement("ArgumentOfPeriapsis");
|
||||||
|
elem.appendChild(doc.createTextNode(QString::number(elements.argumentOfPeriapsis)));
|
||||||
|
root.appendChild(elem);
|
||||||
|
|
||||||
|
elem = doc.createElement("TrueAnomaly");
|
||||||
|
elem.appendChild(doc.createTextNode(QString::number(elements.trueAnomaly)));
|
||||||
|
root.appendChild(elem);
|
||||||
|
|
||||||
|
QFile file(filename);
|
||||||
|
if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
|
||||||
|
qDebug() << "Cannot open file for writing:" << filename;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QTextStream out(&file);
|
||||||
|
doc.save(out, 4); // Indent by 4 spaces
|
||||||
|
file.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool OrbitEstimator::loadFromXml(const QString& filename) {
|
||||||
|
QFile file(filename);
|
||||||
|
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||||
|
qDebug() << "Cannot open file for reading:" << filename;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDomDocument doc;
|
||||||
|
if (!doc.setContent(&file)) {
|
||||||
|
file.close();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
file.close();
|
||||||
|
|
||||||
|
QDomElement root = doc.documentElement();
|
||||||
|
QDomNodeList nodeList = root.elementsByTagName("*");
|
||||||
|
|
||||||
|
for (int i = 0; i < nodeList.count(); ++i) {
|
||||||
|
QDomElement element = nodeList.at(i).toElement();
|
||||||
|
if (element.tagName() == "SemiMajorAxis") {
|
||||||
|
elements.semiMajorAxis = element.text().toDouble();
|
||||||
|
}
|
||||||
|
else if (element.tagName() == "Eccentricity") {
|
||||||
|
elements.eccentricity = element.text().toDouble();
|
||||||
|
}
|
||||||
|
else if (element.tagName() == "Inclination") {
|
||||||
|
elements.inclination = element.text().toDouble();
|
||||||
|
}
|
||||||
|
else if (element.tagName() == "LongitudeOfAscendingNode") {
|
||||||
|
elements.longitudeOfAscendingNode = element.text().toDouble();
|
||||||
|
}
|
||||||
|
else if (element.tagName() == "ArgumentOfPeriapsis") {
|
||||||
|
elements.argumentOfPeriapsis = element.text().toDouble();
|
||||||
|
}
|
||||||
|
else if (element.tagName() == "TrueAnomaly") {
|
||||||
|
elements.trueAnomaly = element.text().toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
SatellitePos OrbitEstimator::calculateNode(double time) const {
|
||||||
|
// 根据轨道六根数计算轨道节点的具体算法
|
||||||
|
return calculateKeplerianNode(elements, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
SatellitePos OrbitEstimator::predictNode(double time)
|
||||||
|
{
|
||||||
|
return calculateNode(time);
|
||||||
|
}
|
||||||
|
|
||||||
|
OrbitElements OrbitEstimator::estimateKeplerianElements(const SatellitePos& node) {
|
||||||
|
// 示例:简单地将所有值设为0
|
||||||
|
OrbitElements elements;
|
||||||
|
elements.semiMajorAxis = 0;
|
||||||
|
elements.eccentricity = 0;
|
||||||
|
elements.inclination = 0;
|
||||||
|
elements.longitudeOfAscendingNode = 0;
|
||||||
|
elements.argumentOfPeriapsis = 0;
|
||||||
|
elements.trueAnomaly = 0;
|
||||||
|
return elements;
|
||||||
|
}
|
||||||
|
|
||||||
|
SatellitePos OrbitEstimator::calculateKeplerianNode(const OrbitElements& elements, double time) const {
|
||||||
|
const double G = 6.67430e-11; // 引力常数 m^3 kg^-1 s^-2
|
||||||
|
const double M_Earth = 5.972e24; // 地球质量 kg
|
||||||
|
const double mu = G * M_Earth; // 地球引力参数 m^3 s^-2
|
||||||
|
|
||||||
|
double a = elements.semiMajorAxis;
|
||||||
|
double e = elements.eccentricity;
|
||||||
|
double i = elements.inclination;
|
||||||
|
double Omega = elements.longitudeOfAscendingNode;
|
||||||
|
double omega = elements.argumentOfPeriapsis;
|
||||||
|
|
||||||
|
// 计算平均运动
|
||||||
|
double n = std::sqrt(mu / (a * a * a));
|
||||||
|
|
||||||
|
// 计算从参考时刻到给定时间的平均异常
|
||||||
|
double t_ref = 0.0; // 参考时刻,假设为0
|
||||||
|
double M = n * (time - t_ref);
|
||||||
|
|
||||||
|
// 求解开普勒方程 E - e*sin(E) = M 使用牛顿迭代法
|
||||||
|
double E = M; // 初始猜测
|
||||||
|
double tolerance = 1e-8;
|
||||||
|
int maxIterations = 100;
|
||||||
|
for (int iter = 0; iter < maxIterations; ++iter) {
|
||||||
|
double f = E - e * std::sin(E) - M;
|
||||||
|
double df = 1 - e * std::cos(E);
|
||||||
|
double delta = f / df;
|
||||||
|
E -= delta;
|
||||||
|
if (std::abs(delta) < tolerance) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 计算偏近点角 ν
|
||||||
|
double sin_nu = std::sqrt(1 - e * e) * std::sin(E) / (1 - e * std::cos(E));
|
||||||
|
double cos_nu = (std::cos(E) - e) / (1 - e * std::cos(E));
|
||||||
|
double nu = std::atan2(sin_nu, cos_nu);
|
||||||
|
|
||||||
|
// 计算半径 r
|
||||||
|
double r = a * (1 - e * std::cos(E));
|
||||||
|
|
||||||
|
// 计算位置向量在轨道平面上的分量
|
||||||
|
double Px_prime = r * std::cos(nu);
|
||||||
|
double Py_prime = r * std::sin(nu);
|
||||||
|
|
||||||
|
// 计算速度向量在轨道平面上的分量
|
||||||
|
double h = std::sqrt(mu * a * (1 - e * e)); // 角动量
|
||||||
|
double Vx_prime = -(h / r) * std::sin(nu);
|
||||||
|
double Vy_prime = (h / r) * (std::cos(nu) + e);
|
||||||
|
|
||||||
|
// 将轨道平面坐标系转换到惯性坐标系
|
||||||
|
double cos_Omega = std::cos(Omega);
|
||||||
|
double sin_Omega = std::sin(Omega);
|
||||||
|
double cos_omega = std::cos(omega);
|
||||||
|
double sin_omega = std::sin(omega);
|
||||||
|
double cos_i = std::cos(i);
|
||||||
|
double sin_i = std::sin(i);
|
||||||
|
|
||||||
|
double Px = Px_prime * (cos_Omega * cos_omega - sin_Omega * sin_omega * cos_i) +
|
||||||
|
Py_prime * (-cos_Omega * sin_omega - sin_Omega * cos_omega * cos_i);
|
||||||
|
double Py = Px_prime * (sin_Omega * cos_omega + cos_Omega * sin_omega * cos_i) +
|
||||||
|
Py_prime * (-sin_Omega * sin_omega + cos_Omega * cos_omega * cos_i);
|
||||||
|
double Pz = Px_prime * sin_omega * sin_i + Py_prime * cos_omega * sin_i;
|
||||||
|
|
||||||
|
double Vx = Vx_prime * (cos_Omega * cos_omega - sin_Omega * sin_omega * cos_i) +
|
||||||
|
Vy_prime * (-cos_Omega * sin_omega - sin_Omega * cos_omega * cos_i);
|
||||||
|
double Vy = Vx_prime * (sin_Omega * cos_omega + cos_Omega * sin_omega * cos_i) +
|
||||||
|
Vy_prime * (-sin_Omega * sin_omega + cos_Omega * cos_omega * cos_i);
|
||||||
|
double Vz = Vx_prime * sin_omega * sin_i + Vy_prime * cos_omega * sin_i;
|
||||||
|
|
||||||
|
SatellitePos node;
|
||||||
|
node.time = time;
|
||||||
|
node.Px = Px;
|
||||||
|
node.Py = Py;
|
||||||
|
node.Pz = Pz;
|
||||||
|
node.Vx = Vx;
|
||||||
|
node.Vy = Vy;
|
||||||
|
node.Vz = Vz;
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
|
double OrbitEstimator::solveKeplerEquation(double M, double e) const {
|
||||||
|
double E = M; // 初始猜测
|
||||||
|
double tolerance = 1e-8;
|
||||||
|
int maxIterations = 100;
|
||||||
|
for (int iter = 0; iter < maxIterations; ++iter) {
|
||||||
|
double f = E - e * std::sin(E) - M;
|
||||||
|
double df = 1 - e * std::cos(E);
|
||||||
|
double delta = f / df;
|
||||||
|
E -= delta;
|
||||||
|
if (std::abs(delta) < tolerance) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return E;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 多项式轨道拟合模型************************************************************************************/
|
||||||
|
|
||||||
|
void PolynomialOrbitModel::fitPolynomial(const QList<SatellitePos>& nodes, int degree) {
|
||||||
|
QList<double> times;
|
||||||
|
QList<double> positionsX;
|
||||||
|
QList<double> positionsY;
|
||||||
|
QList<double> positionsZ;
|
||||||
|
QList<double> velocitiesX;
|
||||||
|
QList<double> velocitiesY;
|
||||||
|
QList<double> velocitiesZ;
|
||||||
|
|
||||||
|
for (const auto& node : nodes) {
|
||||||
|
times.append(node.time);
|
||||||
|
positionsX.append(node.Px);
|
||||||
|
positionsY.append(node.Py);
|
||||||
|
positionsZ.append(node.Pz);
|
||||||
|
velocitiesX.append(node.Vx);
|
||||||
|
velocitiesY.append(node.Vy);
|
||||||
|
velocitiesZ.append(node.Vz);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
coefficientsX = leastSquaresFit(times, positionsX, degree);
|
||||||
|
coefficientsY = leastSquaresFit(times, positionsY, degree);
|
||||||
|
coefficientsZ = leastSquaresFit(times, positionsZ, degree);
|
||||||
|
coefficientsVx = leastSquaresFit(times, velocitiesX, degree);
|
||||||
|
coefficientsVy = leastSquaresFit(times, velocitiesY, degree);
|
||||||
|
coefficientsVz = leastSquaresFit(times, velocitiesZ, degree);
|
||||||
|
}
|
||||||
|
|
||||||
|
SatellitePos PolynomialOrbitModel::predictPosition(double time) {
|
||||||
|
double Px = 0.0;
|
||||||
|
double Py = 0.0;
|
||||||
|
double Pz = 0.0;
|
||||||
|
double Vx = 0.0;
|
||||||
|
double Vy = 0.0;
|
||||||
|
double Vz = 0.0;
|
||||||
|
|
||||||
|
for (int i = 0; i < coefficientsX.size(); ++i) {
|
||||||
|
Px += coefficientsX(i) * std::pow(time, i);
|
||||||
|
Py += coefficientsY(i) * std::pow(time, i);
|
||||||
|
Pz += coefficientsZ(i) * std::pow(time, i);
|
||||||
|
Vx += coefficientsVx(i) * std::pow(time, i);
|
||||||
|
Vy += coefficientsVy(i) * std::pow(time, i);
|
||||||
|
Vz += coefficientsVz(i) * std::pow(time, i);
|
||||||
|
}
|
||||||
|
|
||||||
|
SatellitePos predictedNode;
|
||||||
|
predictedNode.time = time;
|
||||||
|
predictedNode.Px = Px;
|
||||||
|
predictedNode.Py = Py;
|
||||||
|
predictedNode.Pz = Pz;
|
||||||
|
predictedNode.Vx = Vx;
|
||||||
|
predictedNode.Vy = Vy;
|
||||||
|
predictedNode.Vz = Vz;
|
||||||
|
return predictedNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
Eigen::VectorXd PolynomialOrbitModel::leastSquaresFit(const QList<double>& x, const QList<double>& y, int degree) {
|
||||||
|
int n = x.size();
|
||||||
|
Eigen::MatrixXd A=Eigen::MatrixXd::Zero(n, degree + 1);
|
||||||
|
|
||||||
|
for (int i = 0; i < n; ++i) {
|
||||||
|
for (int j = 0; j <= degree; ++j) {
|
||||||
|
A(i, j) = std::pow(x[i], j);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Eigen::VectorXd b(y.count());
|
||||||
|
|
||||||
|
for (long i = 0; i < y.count(); i++) {
|
||||||
|
b(i) = y[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Eigen::Vector2d coefficients = A.colPivHouseholderQr().solve(b);
|
||||||
|
//Eigen::Vector2d coefficientsVector = Eigen::Vector2d::Zero(degree);
|
||||||
|
//coefficientsVector = coefficients.array();
|
||||||
|
return coefficients;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PolynomialOrbitModel::saveCoefficientsToXml(QDomElement& parent, const Eigen::VectorXd& coefficients, const QString& tagName) const {
|
||||||
|
QDomDocument doc = parent.ownerDocument();
|
||||||
|
QDomElement coeffElement = doc.createElement(tagName);
|
||||||
|
for (int i = 0; i < coefficients.size(); ++i) {
|
||||||
|
QDomElement valueElement = doc.createElement("Value");
|
||||||
|
valueElement.appendChild(doc.createTextNode(QString::number(coefficients(i))));
|
||||||
|
coeffElement.appendChild(valueElement);
|
||||||
|
}
|
||||||
|
parent.appendChild(coeffElement);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool PolynomialOrbitModel::loadCoefficientsFromXml(const QDomElement& parent, Eigen::VectorXd& coefficients, const QString& tagName) {
|
||||||
|
QDomNodeList coeffNodes = parent.elementsByTagName(tagName);
|
||||||
|
if (coeffNodes.isEmpty()) {
|
||||||
|
qWarning() << "Tag" << tagName << "not found in XML.";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDomElement coeffElement = coeffNodes.at(0).toElement();
|
||||||
|
QDomNodeList valueNodes = coeffElement.elementsByTagName("Value");
|
||||||
|
|
||||||
|
int size = valueNodes.count();
|
||||||
|
coefficients.resize(size);
|
||||||
|
|
||||||
|
for (int i = 0; i < size; ++i) {
|
||||||
|
QDomElement valueElement = valueNodes.at(i).toElement();
|
||||||
|
coefficients(i) = valueElement.text().toDouble();
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PolynomialOrbitModel::saveToXml(const QString& filename) const {
|
||||||
|
QDomDocument doc("PolynomialOrbitModel");
|
||||||
|
QDomElement root = doc.createElement("PolynomialOrbitModel");
|
||||||
|
doc.appendChild(root);
|
||||||
|
|
||||||
|
saveCoefficientsToXml(root, coefficientsX, "CoefficientsX");
|
||||||
|
saveCoefficientsToXml(root, coefficientsY, "CoefficientsY");
|
||||||
|
saveCoefficientsToXml(root, coefficientsZ, "CoefficientsZ");
|
||||||
|
saveCoefficientsToXml(root, coefficientsVx, "CoefficientsVx");
|
||||||
|
saveCoefficientsToXml(root, coefficientsVy, "CoefficientsVy");
|
||||||
|
saveCoefficientsToXml(root, coefficientsVz, "CoefficientsVz");
|
||||||
|
|
||||||
|
QFile file(filename);
|
||||||
|
if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
|
||||||
|
qDebug() << "Cannot open file for writing:" << filename;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QTextStream out(&file);
|
||||||
|
doc.save(out, 4); // Indent by 4 spaces
|
||||||
|
file.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool PolynomialOrbitModel::loadFromXml(const QString& filename) {
|
||||||
|
QFile file(filename);
|
||||||
|
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||||
|
qDebug() << "Cannot open file for reading:" << filename;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDomDocument doc;
|
||||||
|
if (!doc.setContent(&file)) {
|
||||||
|
file.close();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
file.close();
|
||||||
|
|
||||||
|
QDomElement root = doc.documentElement();
|
||||||
|
|
||||||
|
if (!loadCoefficientsFromXml(root, coefficientsX, "CoefficientsX")) return false;
|
||||||
|
if (!loadCoefficientsFromXml(root, coefficientsY, "CoefficientsY")) return false;
|
||||||
|
if (!loadCoefficientsFromXml(root, coefficientsZ, "CoefficientsZ")) return false;
|
||||||
|
if (!loadCoefficientsFromXml(root, coefficientsVx, "CoefficientsVx")) return false;
|
||||||
|
if (!loadCoefficientsFromXml(root, coefficientsVy, "CoefficientsVy")) return false;
|
||||||
|
if (!loadCoefficientsFromXml(root, coefficientsVz, "CoefficientsVz")) return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
SatellitePos PolynomialOrbitModel::predictNode(double time)
|
||||||
|
{
|
||||||
|
return predictPosition(time);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** 两行根数************************************************************************************/
|
||||||
|
|
||||||
|
TwoLineElements::TwoLineElements() {}
|
||||||
|
|
||||||
|
bool TwoLineElements::loadFromTleFile(const QString& filename) {
|
||||||
|
QFile file(filename);
|
||||||
|
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||||
|
qDebug() << "Cannot open file for reading:" << filename;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
QTextStream in(&file);
|
||||||
|
line1 = in.readLine().toStdString();
|
||||||
|
line2 = in.readLine().toStdString();
|
||||||
|
|
||||||
|
if (line1.empty() || line2.empty()) {
|
||||||
|
qDebug() << "Invalid TLE data in file:" << filename;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
file.close();
|
||||||
|
|
||||||
|
parseTleLines();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TwoLineElements::parseTleLines() {
|
||||||
|
// 解析第一行
|
||||||
|
// 示例:1 25544U 98067A 23044.15434167 .00001971 00000-0 39389-4 0 9994
|
||||||
|
// 第二行
|
||||||
|
// 示例:2 25544 51.6416 243.5887 0001672 130.5360 325.0288 15.49472743275958
|
||||||
|
|
||||||
|
// 这里仅做基本解析,实际应用中需要更严格的验证和错误处理
|
||||||
|
}
|
||||||
|
|
||||||
|
double TwoLineElements::meanMotion() const {
|
||||||
|
// 第二行第53-63位是平均运动(每分钟转数)
|
||||||
|
return std::stod(line2.substr(52, 11));
|
||||||
|
}
|
||||||
|
|
||||||
|
double TwoLineElements::semiMajorAxis() const {
|
||||||
|
const double G = 6.67430e-11; // 引力常数 m^3 kg^-1 s^-2
|
||||||
|
const double M_Earth = 5.972e24; // 地球质量 kg
|
||||||
|
const double mu = G * M_Earth; // 地球引力参数 m^3 s^-2
|
||||||
|
double n = meanMotion() * 2 * M_PI / 60; // 转换为弧度/秒
|
||||||
|
return std::cbrt(mu / (n * n));
|
||||||
|
}
|
||||||
|
|
||||||
|
double TwoLineElements::eccentricity() const {
|
||||||
|
// 第二行第9-16位是离心率(小数点省略)
|
||||||
|
return std::stod("0." + line2.substr(8, 7));
|
||||||
|
}
|
||||||
|
|
||||||
|
double TwoLineElements::inclination() const {
|
||||||
|
// 第二行第20-25位是倾斜角(度)
|
||||||
|
return std::stod(line2.substr(19, 5));
|
||||||
|
}
|
||||||
|
|
||||||
|
double TwoLineElements::longitudeOfAscendingNode() const {
|
||||||
|
// 第二行第34-42位是升交点赤经(度)
|
||||||
|
return std::stod(line2.substr(33, 9));
|
||||||
|
}
|
||||||
|
|
||||||
|
double TwoLineElements::argumentOfPeriapsis() const {
|
||||||
|
// 第二行第45-52位是近地点幅角(度)
|
||||||
|
return std::stod(line2.substr(44, 8));
|
||||||
|
}
|
||||||
|
|
||||||
|
double TwoLineElements::meanAnomaly() const {
|
||||||
|
// 第二行第64-72位是平均近点角(度)
|
||||||
|
return std::stod(line2.substr(63, 9));
|
||||||
|
}
|
||||||
|
|
||||||
|
double TwoLineElements::revolutionNumberAtEpoch() const {
|
||||||
|
// 第二行第64-72位是绕地次数
|
||||||
|
return std::stod(line2.substr(63, 5));
|
||||||
|
}
|
||||||
|
|
||||||
|
double TwoLineElements::epochTime() const {
|
||||||
|
// 第一行第20-32位是历元时间
|
||||||
|
int year = std::stoi(line1.substr(18, 2)) + 2000;
|
||||||
|
double dayOfYear = std::stod(line1.substr(20, 12));
|
||||||
|
int month = 1, day = 1;
|
||||||
|
while (dayOfYear > 0) {
|
||||||
|
int daysInMonth[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
|
||||||
|
if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) {
|
||||||
|
daysInMonth[1] = 29;
|
||||||
|
}
|
||||||
|
if (dayOfYear <= daysInMonth[month - 1]) {
|
||||||
|
day = static_cast<int>(dayOfYear);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
dayOfYear -= daysInMonth[month - 1];
|
||||||
|
month++;
|
||||||
|
}
|
||||||
|
QDate date(year, month, day);
|
||||||
|
QTime time(0, 0, 0);
|
||||||
|
QDateTime dateTime(date, time);
|
||||||
|
return dateTime.toSecsSinceEpoch() + (dayOfYear - day) * 86400;
|
||||||
|
}
|
||||||
|
|
||||||
|
SatellitePos TwoLineElements::calculateNode(double time) const {
|
||||||
|
return calculateKeplerianNode(time);
|
||||||
|
}
|
||||||
|
|
||||||
|
SatellitePos TwoLineElements::predictNode(double time)
|
||||||
|
{
|
||||||
|
return calculateNode(time);
|
||||||
|
}
|
||||||
|
|
||||||
|
SatellitePos TwoLineElements::calculateKeplerianNode(double time) const {
|
||||||
|
const double G = 6.67430e-11; // 引力常数 m^3 kg^-1 s^-2
|
||||||
|
const double M_Earth = 5.972e24; // 地球质量 kg
|
||||||
|
const double mu = G * M_Earth; // 地球引力参数 m^3 s^-2
|
||||||
|
|
||||||
|
double a = semiMajorAxis();
|
||||||
|
double e = eccentricity();
|
||||||
|
double i = inclination() * M_PI / 180.0;
|
||||||
|
double Omega = longitudeOfAscendingNode() * M_PI / 180.0;
|
||||||
|
double omega = argumentOfPeriapsis() * M_PI / 180.0;
|
||||||
|
double M0 = meanAnomaly() * M_PI / 180.0;
|
||||||
|
|
||||||
|
// 计算平均运动
|
||||||
|
double n = std::sqrt(mu / (a * a * a));
|
||||||
|
|
||||||
|
// 计算从参考时刻到给定时间的平均异常
|
||||||
|
double t_ref = epochTime(); // 参考时刻
|
||||||
|
double M = M0 + n * (time - t_ref);
|
||||||
|
|
||||||
|
// 求解开普勒方程 E - e*sin(E) = M 使用牛顿迭代法
|
||||||
|
double E = solveKeplerEquation(M, e);
|
||||||
|
|
||||||
|
// 计算偏近点角 ν
|
||||||
|
double sin_nu = std::sqrt(1 - e * e) * std::sin(E) / (1 - e * std::cos(E));
|
||||||
|
double cos_nu = (std::cos(E) - e) / (1 - e * std::cos(E));
|
||||||
|
double nu = std::atan2(sin_nu, cos_nu);
|
||||||
|
|
||||||
|
// 计算半径 r
|
||||||
|
double r = a * (1 - e * std::cos(E));
|
||||||
|
|
||||||
|
// 计算位置向量在轨道平面上的分量
|
||||||
|
double Px_prime = r * std::cos(nu);
|
||||||
|
double Py_prime = r * std::sin(nu);
|
||||||
|
|
||||||
|
// 计算速度向量在轨道平面上的分量
|
||||||
|
double h = std::sqrt(mu * a * (1 - e * e)); // 角动量
|
||||||
|
double Vx_prime = -(h / r) * std::sin(nu);
|
||||||
|
double Vy_prime = (h / r) * (std::cos(nu) + e);
|
||||||
|
|
||||||
|
// 将轨道平面坐标系转换到惯性坐标系
|
||||||
|
double cos_Omega = std::cos(Omega);
|
||||||
|
double sin_Omega = std::sin(Omega);
|
||||||
|
double cos_omega = std::cos(omega);
|
||||||
|
double sin_omega = std::sin(omega);
|
||||||
|
double cos_i = std::cos(i);
|
||||||
|
double sin_i = std::sin(i);
|
||||||
|
|
||||||
|
double Px = Px_prime * (cos_Omega * cos_omega - sin_Omega * sin_omega * cos_i) +
|
||||||
|
Py_prime * (-cos_Omega * sin_omega - sin_Omega * cos_omega * cos_i);
|
||||||
|
double Py = Px_prime * (sin_Omega * cos_omega + cos_Omega * sin_omega * cos_i) +
|
||||||
|
Py_prime * (-sin_Omega * sin_omega + cos_Omega * cos_omega * cos_i);
|
||||||
|
double Pz = Px_prime * sin_omega * sin_i + Py_prime * cos_omega * sin_i;
|
||||||
|
|
||||||
|
double Vx = Vx_prime * (cos_Omega * cos_omega - sin_Omega * sin_omega * cos_i) +
|
||||||
|
Vy_prime * (-cos_Omega * sin_omega - sin_Omega * cos_omega * cos_i);
|
||||||
|
double Vy = Vx_prime * (sin_Omega * cos_omega + cos_Omega * sin_omega * cos_i) +
|
||||||
|
Vy_prime * (-sin_Omega * sin_omega + cos_Omega * cos_omega * cos_i);
|
||||||
|
double Vz = Vx_prime * sin_omega * sin_i + Vy_prime * cos_omega * sin_i;
|
||||||
|
|
||||||
|
SatellitePos node;
|
||||||
|
node.time = time;
|
||||||
|
node.Px = Px;
|
||||||
|
node.Py = Py;
|
||||||
|
node.Pz = Pz;
|
||||||
|
node.Vx = Vx;
|
||||||
|
node.Vy = Vy;
|
||||||
|
node.Vz = Vz;
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
|
double TwoLineElements::solveKeplerEquation(double M, double e) const {
|
||||||
|
double E = M; // 初始猜测
|
||||||
|
double tolerance = 1e-8;
|
||||||
|
int maxIterations = 100;
|
||||||
|
for (int iter = 0; iter < maxIterations; ++iter) {
|
||||||
|
double f = E - e * std::sin(E) - M;
|
||||||
|
double df = 1 - e * std::cos(E);
|
||||||
|
double delta = f / df;
|
||||||
|
E -= delta;
|
||||||
|
if (std::abs(delta) < tolerance) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return E;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** 轨道节点文件读写************************************************************************************/
|
||||||
|
|
||||||
|
QList<SatellitePos> loadNodesFromXml(const QString& filename) {
|
||||||
|
QFile file(filename);
|
||||||
|
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||||
|
qDebug() << "Cannot open file for reading:" << filename;
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
QDomDocument doc;
|
||||||
|
if (!doc.setContent(&file)) {
|
||||||
|
file.close();
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
file.close();
|
||||||
|
|
||||||
|
QDomElement root = doc.documentElement();
|
||||||
|
QDomNodeList gpsParamNodes = root.elementsByTagName("GPSParam");
|
||||||
|
|
||||||
|
QList<SatellitePos> loadedNodes;
|
||||||
|
|
||||||
|
for (int i = 0; i < gpsParamNodes.count(); ++i) {
|
||||||
|
QDomElement paramElement = gpsParamNodes.at(i).toElement();
|
||||||
|
|
||||||
|
SatellitePos node;
|
||||||
|
node.time = paramElement.firstChildElement("TimeStamp").text().toDouble();
|
||||||
|
node.Px = paramElement.firstChildElement("xPosition").text().toDouble();
|
||||||
|
node.Py = paramElement.firstChildElement("yPosition").text().toDouble();
|
||||||
|
node.Pz = paramElement.firstChildElement("zPosition").text().toDouble();
|
||||||
|
node.Vx = paramElement.firstChildElement("xVelocity").text().toDouble();
|
||||||
|
node.Vy = paramElement.firstChildElement("yVelocity").text().toDouble();
|
||||||
|
node.Vz = paramElement.firstChildElement("zVelocity").text().toDouble();
|
||||||
|
|
||||||
|
loadedNodes.append(node);
|
||||||
|
}
|
||||||
|
|
||||||
|
return loadedNodes;
|
||||||
|
}
|
||||||
|
|
||||||
|
void saveNodesToXml(const QString& filename, const QList<SatellitePos>& inposes) {
|
||||||
|
QDomDocument doc("GPSData");
|
||||||
|
QDomElement root = doc.createElement("GPS");
|
||||||
|
doc.appendChild(root);
|
||||||
|
|
||||||
|
for (const auto& node : inposes) {
|
||||||
|
QDomElement paramElement = doc.createElement("GPSParam");
|
||||||
|
|
||||||
|
QDomElement timeStampElement = doc.createElement("TimeStamp");
|
||||||
|
timeStampElement.appendChild(doc.createTextNode(QString::number(node.time)));
|
||||||
|
paramElement.appendChild(timeStampElement);
|
||||||
|
|
||||||
|
QDomElement xPositionElement = doc.createElement("xPosition");
|
||||||
|
xPositionElement.appendChild(doc.createTextNode(QString::number(node.Px)));
|
||||||
|
paramElement.appendChild(xPositionElement);
|
||||||
|
|
||||||
|
QDomElement yPositionElement = doc.createElement("yPosition");
|
||||||
|
yPositionElement.appendChild(doc.createTextNode(QString::number(node.Py)));
|
||||||
|
paramElement.appendChild(yPositionElement);
|
||||||
|
|
||||||
|
QDomElement zPositionElement = doc.createElement("zPosition");
|
||||||
|
zPositionElement.appendChild(doc.createTextNode(QString::number(node.Pz)));
|
||||||
|
paramElement.appendChild(zPositionElement);
|
||||||
|
|
||||||
|
QDomElement xVelocityElement = doc.createElement("xVelocity");
|
||||||
|
xVelocityElement.appendChild(doc.createTextNode(QString::number(node.Vx)));
|
||||||
|
paramElement.appendChild(xVelocityElement);
|
||||||
|
|
||||||
|
QDomElement yVelocityElement = doc.createElement("yVelocity");
|
||||||
|
yVelocityElement.appendChild(doc.createTextNode(QString::number(node.Vy)));
|
||||||
|
paramElement.appendChild(yVelocityElement);
|
||||||
|
|
||||||
|
QDomElement zVelocityElement = doc.createElement("zVelocity");
|
||||||
|
zVelocityElement.appendChild(doc.createTextNode(QString::number(node.Vz)));
|
||||||
|
paramElement.appendChild(zVelocityElement);
|
||||||
|
|
||||||
|
root.appendChild(paramElement);
|
||||||
|
}
|
||||||
|
|
||||||
|
QFile file(filename);
|
||||||
|
if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
|
||||||
|
qDebug() << "Cannot open file for writing:" << filename;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QTextStream out(&file);
|
||||||
|
doc.save(out, 4); // Indent by 4 spaces
|
||||||
|
file.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
OrbitModelAbstract::OrbitModelAbstract()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
OrbitModelAbstract::~OrbitModelAbstract()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
SatellitePos OrbitModelAbstract::predictNode(double time)
|
||||||
|
{
|
||||||
|
return SatellitePos();
|
||||||
|
}
|
|
@ -0,0 +1,101 @@
|
||||||
|
#ifndef ORIBTMODELOPERATOR_H_
|
||||||
|
#define ORIBTMODELOPERATOR_H_
|
||||||
|
#include <QFile>
|
||||||
|
#include <QDomDocument>
|
||||||
|
#include <QVector3D>
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QList>
|
||||||
|
#include <Eigen/Core>
|
||||||
|
#include <Eigen/Dense>
|
||||||
|
#include "BaseConstVariable.h"
|
||||||
|
|
||||||
|
QList<SatellitePos> loadNodesFromXml(const QString& filename);
|
||||||
|
void saveNodesToXml(const QString& filename, const QList<SatellitePos>& inposes);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class OrbitModelAbstract {
|
||||||
|
public:
|
||||||
|
OrbitModelAbstract();
|
||||||
|
~OrbitModelAbstract();
|
||||||
|
public:
|
||||||
|
virtual SatellitePos predictNode(double time) ;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class OrbitElements {
|
||||||
|
public:
|
||||||
|
double semiMajorAxis; // 半长轴 (a)
|
||||||
|
double eccentricity; // 离心率 (e)
|
||||||
|
double inclination; // 倾斜角 (i)
|
||||||
|
double longitudeOfAscendingNode; // 升交点赤经 (Ω)
|
||||||
|
double argumentOfPeriapsis; // 近地点幅角 (ω)
|
||||||
|
double trueAnomaly; // 真近点角 (ν)
|
||||||
|
|
||||||
|
OrbitElements();
|
||||||
|
};
|
||||||
|
|
||||||
|
class OrbitEstimator :public OrbitModelAbstract {
|
||||||
|
public:
|
||||||
|
OrbitEstimator();
|
||||||
|
void estimateOrbit(const SatellitePos& node);
|
||||||
|
void saveToXml(const QString& filename) const;
|
||||||
|
bool loadFromXml(const QString& filename);
|
||||||
|
SatellitePos calculateNode(double time) const;
|
||||||
|
virtual SatellitePos predictNode(double time) override;
|
||||||
|
private:
|
||||||
|
OrbitElements elements;
|
||||||
|
OrbitElements estimateKeplerianElements(const SatellitePos& node);
|
||||||
|
SatellitePos calculateKeplerianNode(const OrbitElements& elements, double time) const;
|
||||||
|
double solveKeplerEquation(double M, double e) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
class PolynomialOrbitModel :public OrbitModelAbstract {
|
||||||
|
public:
|
||||||
|
void fitPolynomial(const QList<SatellitePos>& nodes, int degree=3);
|
||||||
|
SatellitePos predictPosition(double time);
|
||||||
|
void saveToXml(const QString& filename) const;
|
||||||
|
bool loadFromXml(const QString& filename);
|
||||||
|
virtual SatellitePos predictNode(double time) override;
|
||||||
|
private:
|
||||||
|
Eigen::VectorXd coefficientsX;
|
||||||
|
Eigen::VectorXd coefficientsY;
|
||||||
|
Eigen::VectorXd coefficientsZ;
|
||||||
|
Eigen::VectorXd coefficientsVx;
|
||||||
|
Eigen::VectorXd coefficientsVy;
|
||||||
|
Eigen::VectorXd coefficientsVz;
|
||||||
|
|
||||||
|
Eigen::VectorXd leastSquaresFit(const QList<double>& x, const QList<double>& y, int degree);
|
||||||
|
void saveCoefficientsToXml(QDomElement& parent, const Eigen::VectorXd& coefficients, const QString& tagName) const;
|
||||||
|
bool loadCoefficientsFromXml(const QDomElement& parent, Eigen::VectorXd& coefficients, const QString& tagName);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class TwoLineElements :public OrbitModelAbstract {
|
||||||
|
public:
|
||||||
|
TwoLineElements();
|
||||||
|
bool loadFromTleFile(const QString& filename);
|
||||||
|
SatellitePos calculateNode(double time) const;
|
||||||
|
virtual SatellitePos predictNode(double time) override;
|
||||||
|
private:
|
||||||
|
std::string line1;
|
||||||
|
std::string line2;
|
||||||
|
|
||||||
|
void parseTleLines();
|
||||||
|
double meanMotion() const;
|
||||||
|
double semiMajorAxis() const;
|
||||||
|
double eccentricity() const;
|
||||||
|
double inclination() const;
|
||||||
|
double longitudeOfAscendingNode() const;
|
||||||
|
double argumentOfPeriapsis() const;
|
||||||
|
double meanAnomaly() const;
|
||||||
|
double revolutionNumberAtEpoch() const;
|
||||||
|
double epochTime() const;
|
||||||
|
double solveKeplerEquation(double M, double e) const;
|
||||||
|
SatellitePos calculateKeplerianNode(double time) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,73 @@
|
||||||
|
|
||||||
|
|
||||||
|
#include "QSimulationSARPolynomialOrbitModel.h"
|
||||||
|
#include "ui_QSimulationSARPolynomialOrbitModel.h"
|
||||||
|
#include <QFileDialog>
|
||||||
|
#include "OribtModelOperator.h"
|
||||||
|
|
||||||
|
QSimulationPolynomialSAROrbitModel::QSimulationPolynomialSAROrbitModel(QWidget *parent)
|
||||||
|
: QDialog(parent),ui(new Ui::QSimulationSARPolynomialOrbitModelClass)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
connect(ui->pushButtongpxml, SIGNAL(clicked(bool)), this, SLOT(onpushButtongpxmlClicked(bool)));
|
||||||
|
connect(ui->pushButtonOrbitModel, SIGNAL(clicked(bool)), this, SLOT(onpushButtonOrbitModelClicked(bool)));
|
||||||
|
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(onbtnaccepted()));
|
||||||
|
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(onbtnrejected()));
|
||||||
|
}
|
||||||
|
|
||||||
|
QSimulationPolynomialSAROrbitModel::~QSimulationPolynomialSAROrbitModel()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void QSimulationPolynomialSAROrbitModel::onpushButtongpxmlClicked(bool)
|
||||||
|
{
|
||||||
|
// 调用文件选择对话框并选择一个 .tif 文件
|
||||||
|
QString fileName = QFileDialog::getOpenFileName(this,
|
||||||
|
u8"GPS xml", // 对话框标题
|
||||||
|
"", // 初始目录,可以设置为路径
|
||||||
|
u8"xml Files (*.xml)"); // 文件类型过滤器
|
||||||
|
|
||||||
|
if (!fileName.isEmpty()) {
|
||||||
|
this->ui->gpsXmlPathEdit->setText(fileName);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void QSimulationPolynomialSAROrbitModel::onpushButtonOrbitModelClicked(bool)
|
||||||
|
{
|
||||||
|
// 调用文件选择对话框并选择一个 .tif 文件
|
||||||
|
QString fileName = QFileDialog::getSaveFileName(this,
|
||||||
|
u8"Polynomial GPS Model xml", // 对话框标题
|
||||||
|
"", // 初始目录,可以设置为路径
|
||||||
|
u8"xml Files (*.xml)"); // 文件类型过滤器
|
||||||
|
|
||||||
|
if (!fileName.isEmpty()) {
|
||||||
|
this->ui->gpsXmlPathEdit->setText(fileName);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
QMessageBox::information(this, u8"没有选择文件", u8"没有选择任何文件");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void QSimulationPolynomialSAROrbitModel::onbtnaccepted()
|
||||||
|
{
|
||||||
|
QString gpsxmlpath = this->ui->gpsXmlPathEdit->text();
|
||||||
|
QString outmodelpath = this->ui->modelxmlPathEdit->text();
|
||||||
|
qDebug() << "Input GPS Xml:\t" << gpsxmlpath;
|
||||||
|
qDebug() << "out Model Xml:\t" << outmodelpath;
|
||||||
|
|
||||||
|
PolynomialOrbitModel model;
|
||||||
|
QList<SatellitePos> sateposes = loadNodesFromXml(gpsxmlpath);
|
||||||
|
model.fitPolynomial(sateposes);
|
||||||
|
model.saveToXml(outmodelpath);
|
||||||
|
qDebug() << "PolynomialSAROrbitModel fit finished!!";
|
||||||
|
QMessageBox::information(this, u8"信息", u8"模型拟合成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
void QSimulationPolynomialSAROrbitModel::onbtnrejected()
|
||||||
|
{
|
||||||
|
this->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
#pragma once
|
||||||
|
#include "SimulationSARToolAPI.h"
|
||||||
|
#include "QToolAbstract.h"
|
||||||
|
#include <QDialog>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class QSimulationSARPolynomialOrbitModelClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class SIMULATIONSARTOOLAPI_EXPORT QSimulationPolynomialSAROrbitModel : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
QSimulationPolynomialSAROrbitModel(QWidget *parent = nullptr);
|
||||||
|
~QSimulationPolynomialSAROrbitModel();
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void onpushButtongpxmlClicked(bool);
|
||||||
|
void onpushButtonOrbitModelClicked(bool);
|
||||||
|
void onbtnaccepted();
|
||||||
|
void onbtnrejected();
|
||||||
|
private:
|
||||||
|
Ui::QSimulationSARPolynomialOrbitModelClass* ui;
|
||||||
|
|
||||||
|
};
|
|
@ -0,0 +1,120 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>QSimulationSARPolynomialOrbitModelClass</class>
|
||||||
|
<widget class="QDialog" name="QSimulationSARPolynomialOrbitModelClass">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>600</width>
|
||||||
|
<height>170</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>多项式轨道模型</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="1" 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="1" 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="2">
|
||||||
|
<widget class="QPushButton" name="pushButtongpxml">
|
||||||
|
<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="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="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="modelxmlPathEdit">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>30</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>D:/Programme/vs2022/RasterMergeTest/simulationData/demdataset/demxyz.bin</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" 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="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>
|
||||||
|
<item row="3" column="0" colspan="3">
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
|
@ -2,6 +2,7 @@
|
||||||
#include "LAMPMainWidget.h"
|
#include "LAMPMainWidget.h"
|
||||||
#include "RasterMainWidget.h"
|
#include "RasterMainWidget.h"
|
||||||
#include "ToolBoxWidget.h"
|
#include "ToolBoxWidget.h"
|
||||||
|
#include "QSimulationSARPolynomialOrbitModel.h"
|
||||||
|
|
||||||
SARSimlulationRFPCToolButton::SARSimlulationRFPCToolButton(QWidget* parent)
|
SARSimlulationRFPCToolButton::SARSimlulationRFPCToolButton(QWidget* parent)
|
||||||
{
|
{
|
||||||
|
@ -42,16 +43,35 @@ void SARSimulationTBPImageToolButton::excute()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
QSimulationSAROrbitModelToolButton::QSimulationSAROrbitModelToolButton(QWidget* parent)
|
||||||
|
{
|
||||||
|
this->toolPath = QVector<QString>(0);
|
||||||
|
this->toolPath.push_back(u8"·ÂÕæ¹¤¾ß¿â");
|
||||||
|
this->toolname = QString(u8"¹ìµÀ·ÂÕæ");
|
||||||
|
}
|
||||||
|
|
||||||
|
QSimulationSAROrbitModelToolButton::~QSimulationSAROrbitModelToolButton()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
void QSimulationSAROrbitModelToolButton::excute()
|
||||||
|
{
|
||||||
|
QSimulationPolynomialSAROrbitModel* dialog = new QSimulationPolynomialSAROrbitModel;
|
||||||
|
dialog->show();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWidget* toolbox)
|
void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWidget* toolbox)
|
||||||
{
|
{
|
||||||
SARSimlulationRFPCToolButton* items6 = new SARSimlulationRFPCToolButton(toolbox);
|
SARSimlulationRFPCToolButton* items6 = new SARSimlulationRFPCToolButton(toolbox);
|
||||||
SARSimulationTBPImageToolButton* items7 = new SARSimulationTBPImageToolButton(toolbox);
|
SARSimulationTBPImageToolButton* items7 = new SARSimulationTBPImageToolButton(toolbox);
|
||||||
|
QSimulationSAROrbitModelToolButton* items8 = new QSimulationSAROrbitModelToolButton(toolbox);
|
||||||
|
|
||||||
emit toolbox->addBoxToolItemSIGNAL(items6);
|
emit toolbox->addBoxToolItemSIGNAL(items6);
|
||||||
emit toolbox->addBoxToolItemSIGNAL(items7);
|
emit toolbox->addBoxToolItemSIGNAL(items7);
|
||||||
|
emit toolbox->addBoxToolItemSIGNAL(items8);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,15 @@ class ToolBoxWidget;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class SIMULATIONSARTOOL_EXPORT SARSimlulationRFPCToolButton : public QToolAbstract {
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
SARSimlulationRFPCToolButton(QWidget* parent = nullptr);
|
||||||
|
~SARSimlulationRFPCToolButton();
|
||||||
|
public slots:
|
||||||
|
virtual void excute() override;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
class SIMULATIONSARTOOL_EXPORT SARSimulationTBPImageToolButton : public QToolAbstract {
|
class SIMULATIONSARTOOL_EXPORT SARSimulationTBPImageToolButton : public QToolAbstract {
|
||||||
|
@ -26,18 +35,20 @@ public slots:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class SIMULATIONSARTOOL_EXPORT SARSimlulationRFPCToolButton : public QToolAbstract {
|
|
||||||
|
|
||||||
|
|
||||||
|
class QSimulationSAROrbitModelToolButton :public QToolAbstract {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
SARSimlulationRFPCToolButton(QWidget* parent = nullptr);
|
QSimulationSAROrbitModelToolButton(QWidget* parent = nullptr);
|
||||||
~SARSimlulationRFPCToolButton();
|
~QSimulationSAROrbitModelToolButton();
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
virtual void excute() override;
|
virtual void excute() override;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
extern "C" SIMULATIONSARTOOL_EXPORT void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWidget* toolbox);
|
extern "C" SIMULATIONSARTOOL_EXPORT void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWidget* toolbox);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||||
<IncludePath>..\..\BaseCommonLibrary;..\..\BaseCommonLibrary\BaseTool;..\..\BaseCommonLibrary\ToolAbstract;..\..\GPUBaseLib\GPUTool;.\SimulationSAR;.;..\..\LAMPSARProcessProgram\ToolBoxManager;..\..\RasterMainWidgetGUI\RasterMainWidget;..\..\LAMPSARProcessProgram;..\..\RasterMainWidgetGUI;$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
|
<IncludePath>..\..\BaseCommonLibrary;..\..\BaseCommonLibrary\BaseTool;..\..\BaseCommonLibrary\ToolAbstract;..\..\GPUBaseLib\GPUTool;.\SimulationSAR;.;..\..\LAMPSARProcessProgram\ToolBoxManager;..\..\RasterMainWidgetGUI\RasterMainWidget;..\..\LAMPSARProcessProgram;..\..\RasterMainWidgetGUI;.\PowerSimulationIncoherent;$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
|
||||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\Toolbox\</OutDir>
|
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\Toolbox\</OutDir>
|
||||||
<TargetName>PluginTool_$(ProjectName)</TargetName>
|
<TargetName>PluginTool_$(ProjectName)</TargetName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
@ -111,6 +111,8 @@
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ClCompile Include="PowerSimulationIncoherent\OribtModelOperator.cpp" />
|
||||||
|
<ClCompile Include="PowerSimulationIncoherent\QSimulationSARPolynomialOrbitModel.cpp" />
|
||||||
<ClCompile Include="SimulationSAR\QImageSARRFPC.cpp" />
|
<ClCompile Include="SimulationSAR\QImageSARRFPC.cpp" />
|
||||||
<ClCompile Include="SimulationSAR\QSARLookTableSimualtionGUI.cpp" />
|
<ClCompile Include="SimulationSAR\QSARLookTableSimualtionGUI.cpp" />
|
||||||
<ClCompile Include="SimulationSAR\QSimulationBPImage.cpp" />
|
<ClCompile Include="SimulationSAR\QSimulationBPImage.cpp" />
|
||||||
|
@ -121,6 +123,8 @@
|
||||||
<ClCompile Include="SimulationSAR\SatelliteOribtModel.cpp" />
|
<ClCompile Include="SimulationSAR\SatelliteOribtModel.cpp" />
|
||||||
<ClCompile Include="SimulationSAR\SigmaDatabase.cpp" />
|
<ClCompile Include="SimulationSAR\SigmaDatabase.cpp" />
|
||||||
<ClCompile Include="SimulationSAR\TBPImageAlgCls.cpp" />
|
<ClCompile Include="SimulationSAR\TBPImageAlgCls.cpp" />
|
||||||
|
<QtMoc Include="PowerSimulationIncoherent\QSimulationSARPolynomialOrbitModel.h" />
|
||||||
|
<ClInclude Include="PowerSimulationIncoherent\OribtModelOperator.h" />
|
||||||
<ClInclude Include="SimulationSARToolAPI.h" />
|
<ClInclude Include="SimulationSARToolAPI.h" />
|
||||||
<ClInclude Include="simulationsartool_global.h" />
|
<ClInclude Include="simulationsartool_global.h" />
|
||||||
<QtMoc Include="SimulationSAR\QImageSARRFPC.h" />
|
<QtMoc Include="SimulationSAR\QImageSARRFPC.h" />
|
||||||
|
@ -147,6 +151,7 @@
|
||||||
<CudaCompile Include="SimulationSAR\GPUTBPImage.cuh" />
|
<CudaCompile Include="SimulationSAR\GPUTBPImage.cuh" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<QtUic Include="PowerSimulationIncoherent\QSimulationSARPolynomialOrbitModel.ui" />
|
||||||
<QtUic Include="SimulationSAR\QImageSARRFPC.ui" />
|
<QtUic Include="SimulationSAR\QImageSARRFPC.ui" />
|
||||||
<QtUic Include="SimulationSAR\QSARLookTableSimualtionGUI.ui" />
|
<QtUic Include="SimulationSAR\QSARLookTableSimualtionGUI.ui" />
|
||||||
<QtUic Include="SimulationSAR\QSimulationBPImage.ui" />
|
<QtUic Include="SimulationSAR\QSimulationBPImage.ui" />
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
<Filter Include="SimulationSAR">
|
<Filter Include="SimulationSAR">
|
||||||
<UniqueIdentifier>{2d0ea8a6-e32f-4ebb-b8df-3f1afdfa2b00}</UniqueIdentifier>
|
<UniqueIdentifier>{2d0ea8a6-e32f-4ebb-b8df-3f1afdfa2b00}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
<Filter Include="PowerSimulationIncoherent">
|
||||||
|
<UniqueIdentifier>{9b848585-2348-400d-b12a-dd79a2a71007}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="simulationsartool_global.h">
|
<ClInclude Include="simulationsartool_global.h">
|
||||||
|
@ -53,6 +56,9 @@
|
||||||
<ClInclude Include="SimulationSARToolAPI.h">
|
<ClInclude Include="SimulationSARToolAPI.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="PowerSimulationIncoherent\OribtModelOperator.h">
|
||||||
|
<Filter>PowerSimulationIncoherent</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="SimulationSAR\QImageSARRFPC.cpp">
|
<ClCompile Include="SimulationSAR\QImageSARRFPC.cpp">
|
||||||
|
@ -85,6 +91,12 @@
|
||||||
<ClCompile Include="SimulationSAR\TBPImageAlgCls.cpp">
|
<ClCompile Include="SimulationSAR\TBPImageAlgCls.cpp">
|
||||||
<Filter>SimulationSAR</Filter>
|
<Filter>SimulationSAR</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="PowerSimulationIncoherent\OribtModelOperator.cpp">
|
||||||
|
<Filter>PowerSimulationIncoherent</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="PowerSimulationIncoherent\QSimulationSARPolynomialOrbitModel.cpp">
|
||||||
|
<Filter>PowerSimulationIncoherent</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<QtUic Include="SimulationSAR\QImageSARRFPC.ui">
|
<QtUic Include="SimulationSAR\QImageSARRFPC.ui">
|
||||||
|
@ -99,6 +111,9 @@
|
||||||
<QtUic Include="SimulationSAR\QSimulationRFPCGUI.ui">
|
<QtUic Include="SimulationSAR\QSimulationRFPCGUI.ui">
|
||||||
<Filter>SimulationSAR</Filter>
|
<Filter>SimulationSAR</Filter>
|
||||||
</QtUic>
|
</QtUic>
|
||||||
|
<QtUic Include="PowerSimulationIncoherent\QSimulationSARPolynomialOrbitModel.ui">
|
||||||
|
<Filter>PowerSimulationIncoherent</Filter>
|
||||||
|
</QtUic>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<QtMoc Include="SimulationSAR\QImageSARRFPC.h">
|
<QtMoc Include="SimulationSAR\QImageSARRFPC.h">
|
||||||
|
@ -116,6 +131,9 @@
|
||||||
<QtMoc Include="SimulationSARTool.h">
|
<QtMoc Include="SimulationSARTool.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</QtMoc>
|
</QtMoc>
|
||||||
|
<QtMoc Include="PowerSimulationIncoherent\QSimulationSARPolynomialOrbitModel.h">
|
||||||
|
<Filter>PowerSimulationIncoherent</Filter>
|
||||||
|
</QtMoc>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<CudaCompile Include="SimulationSAR\GPURFPC.cu">
|
<CudaCompile Include="SimulationSAR\GPURFPC.cu">
|
||||||
|
|
Loading…
Reference in New Issue