修复轨道节点调用bug
parent
ab2800533a
commit
5741dda08c
|
@ -145,7 +145,7 @@ std::vector<SatelliteAntPos> getGPSPoints(std::string line1, std::string line2,
|
||||||
std::cout << "Start time:\t" << start;
|
std::cout << "Start time:\t" << start;
|
||||||
std::cout << "End time:\t" << end;
|
std::cout << "End time:\t" << end;
|
||||||
std::cout << "inc time:\t" << inc << std::endl;
|
std::cout << "inc time:\t" << inc << std::endl;
|
||||||
std::vector<SatelliteAntPos> result= RunTle(tle, start, end, inc, printfinfoflag);
|
std::vector<SatelliteAntPos> result= RunTle(tle, start, end, inc, printfinfoflag,running,first_run);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "CoordTopocentric.h"
|
#include "CoordTopocentric.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "SPG4Function.h"
|
#include "SPG4Function.h"
|
||||||
|
#include "SPG4Tool.h"
|
||||||
/**
|
/**
|
||||||
|
|
||||||
½̽ËĺÅ01ÐÇÎÀÐǹìµÀ
|
½̽ËĺÅ01ÐÇÎÀÐǹìµÀ
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
//int main(int argc, char *argv[])
|
//int main(int argc, char *argv[])
|
||||||
//{
|
//{
|
||||||
//
|
//
|
||||||
|
@ -28,10 +28,10 @@
|
||||||
// libsgp4::Tle tle("GF3", line1, line2);
|
// libsgp4::Tle tle("GF3", line1, line2);
|
||||||
//
|
//
|
||||||
// double start = 0;
|
// double start = 0;
|
||||||
// double end = 10;
|
// double end = 1;
|
||||||
// double inc = 1;
|
// double inc = 1/60.0;
|
||||||
//
|
//
|
||||||
// RunTle(tle, start, end, inc);
|
// RunTle(tle, start, end, inc,true);
|
||||||
// //QCoreApplication a(argc, argv);
|
// //QCoreApplication a(argc, argv);
|
||||||
//
|
//
|
||||||
// //return a.exec();
|
// //return a.exec();
|
||||||
|
|
|
@ -69,8 +69,14 @@ void QtCreateGPSPointsDialog::onaccepted()
|
||||||
QString inLTEPath = this->ui->lineEditLTE->text();
|
QString inLTEPath = this->ui->lineEditLTE->text();
|
||||||
QString outGPSxmlPath = this->ui->lineEditoutGPSxml->text();
|
QString outGPSxmlPath = this->ui->lineEditoutGPSxml->text();
|
||||||
|
|
||||||
double start = this->ui->StartimedateTimeEdit->dateTime().toTime_t();
|
QDateTime startTime = this->ui->StartimedateTimeEdit->dateTime().toUTC();
|
||||||
double end = this->ui->EndimedateTimeEdit->dateTime().toTime_t();
|
QDateTime endTime = this->ui->EndimedateTimeEdit->dateTime().toUTC();
|
||||||
|
|
||||||
|
double start = startTime.toTime_t();
|
||||||
|
double end = endTime.toTime_t();
|
||||||
|
// 转换为utc时间
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
long gpsoint = this->ui->spinBoxGPSPoints->value();
|
long gpsoint = this->ui->spinBoxGPSPoints->value();
|
||||||
|
|
||||||
|
@ -111,6 +117,11 @@ void QtCreateGPSPointsDialog::onaccepted()
|
||||||
|
|
||||||
double inc = (end - start) / (gpsoint-1);
|
double inc = (end - start) / (gpsoint-1);
|
||||||
|
|
||||||
|
start = start / 60.0; // 转换为分钟
|
||||||
|
end = end / 60.0;
|
||||||
|
inc = inc / 60.0;
|
||||||
|
|
||||||
|
|
||||||
std::vector<SatelliteAntPos> gpspoints = getGPSPoints(tle1, tle2, start, end, inc, true,true,false);
|
std::vector<SatelliteAntPos> gpspoints = getGPSPoints(tle1, tle2, start, end, inc, true,true,false);
|
||||||
|
|
||||||
qDebug() << "create gpspoints size:" << gpspoints.size();
|
qDebug() << "create gpspoints size:" << gpspoints.size();
|
||||||
|
@ -124,7 +135,7 @@ void QtCreateGPSPointsDialog::onaccepted()
|
||||||
ofs << "<root>\n<GPS>\n";
|
ofs << "<root>\n<GPS>\n";
|
||||||
for (const auto& point : gpspoints) { // Ëõ·Åµ¥Î»
|
for (const auto& point : gpspoints) { // Ëõ·Åµ¥Î»
|
||||||
ofs << "<GPSParam>\n";
|
ofs << "<GPSParam>\n";
|
||||||
ofs << "<TimeStamp>" << QDateTime::fromTime_t(point.time+ tle1TimeOffset).toString("yyyy-MM-dd HH:mm:ss.zzz").toStdString() << "</TimeStamp>\n";
|
ofs << "<TimeStamp>" << QDateTime::fromTime_t(point.time*60.0+ tle1TimeOffset, Qt::UTC).toLocalTime().toString("yyyy-MM-dd HH:mm:ss.zzz").toStdString() << "</TimeStamp>\n";
|
||||||
ofs << "<xPosition>" << point.Px*1000.0 << "</xPosition>\n";
|
ofs << "<xPosition>" << point.Px*1000.0 << "</xPosition>\n";
|
||||||
ofs << "<yPosition>" << point.Py*1000.0 << "</yPosition>\n";
|
ofs << "<yPosition>" << point.Py*1000.0 << "</yPosition>\n";
|
||||||
ofs << "<zPosition>" << point.Pz*1000.0 << "</zPosition>\n";
|
ofs << "<zPosition>" << point.Pz*1000.0 << "</zPosition>\n";
|
||||||
|
|
Loading…
Reference in New Issue