Skip to content

Commit 68a355b

Browse files
committed
fix time tag extraction for input, output, and log stream in rtknavi_qt
update stream formats in option dialog of rtknavi_qt and rtkpost_qt
1 parent bf9284d commit 68a355b

File tree

7 files changed

+69
-22
lines changed

7 files changed

+69
-22
lines changed

app/qtapp/appcmn_qt/navi_post_opt.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,18 @@ OptDialog::OptDialog(QWidget *parent, int opts)
5050

5151
processingOptions = prcopt_default;
5252
solutionOptions = solopt_default;
53+
fileOptions.blq[0] = '\0';
54+
fileOptions.dcb[0] = '\0';
55+
fileOptions.eop[0] = '\0';
56+
fileOptions.geexe[0] = '\0';
57+
fileOptions.geoid[0] = '\0';
58+
fileOptions.iono[0] = '\0';
59+
fileOptions.rcvantp[0] = '\0';
60+
fileOptions.satantp[0] = '\0';
61+
fileOptions.solstat[0] = '\0';
62+
fileOptions.stapos[0] = '\0';
63+
fileOptions.tempdir[0] = '\0';
64+
fileOptions.trace[0] = '\0';
5365

5466
appOptions = nullptr;
5567

app/qtapp/rtknavi_qt/instrdlg.cpp

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,27 +301,41 @@ void InputStrDialog::setPath(int stream, int type, const QString & path)
301301
{
302302
QLineEdit *edits[] = {ui->lEFilePath1, ui->lEFilePath2, ui->lEFilePath3};
303303
paths[stream][type] = path;
304+
ui->cBTimeTag->setChecked(path.contains("::T"));
305+
ui->cB64Bit->setChecked(path.contains("::P=8"));
306+
if (path.contains("::+"))
307+
{
308+
int startPos = path.indexOf("::+")+3;
309+
QString startTime = path.mid(startPos, path.indexOf("::", startPos)-startPos);
310+
ui->sBTimeStart->setValue(startTime.toInt());
311+
};
312+
if (path.contains("::x"))
313+
{
314+
int startPos = path.indexOf("::x")+3;
315+
QString speed = path.mid(startPos, path.indexOf("::", startPos)-startPos);
316+
ui->cBTimeSpeed->setCurrentText(speed);
317+
}
304318
if (type == 2)
305319
{
306-
edits[stream]->setText(path);
320+
edits[stream]->setText(path.mid(0, path.indexOf("::")));
307321
};
308322
}
309323
//---------------------------------------------------------------------------
310324
QString InputStrDialog::getPath(int stream, int type)
311325
{
312326
QLineEdit *edits[] = {ui->lEFilePath1, ui->lEFilePath2, ui->lEFilePath3};
313327
if (type == 2)
314-
return setFilePath(edits[stream]->text());
328+
return makePath(edits[stream]->text());
315329

316330
return paths[stream][type];
317331
}
318332
//---------------------------------------------------------------------------
319-
QString InputStrDialog::getFilePath(const QString &path)
333+
QString InputStrDialog::extractFilePath(const QString &path)
320334
{
321335
return path.mid(0, path.indexOf("::"));
322336
}
323337
//---------------------------------------------------------------------------
324-
QString InputStrDialog::setFilePath(const QString &p)
338+
QString InputStrDialog::makePath(const QString &p)
325339
{
326340
QString path = p;
327341

app/qtapp/rtknavi_qt/instrdlg.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ public slots:
101101
void updateEnable();
102102

103103
private:
104-
QString getFilePath(const QString &path);
105-
QString setFilePath(const QString &path);
104+
QString extractFilePath(const QString &path);
105+
QString makePath(const QString &path);
106106
void showSerialOptionsDialog(int index, int opt);
107107
void showTcpOptionsDialog(int index, int opt);
108108
void showFtpOptionsDialog(int index, int opt);

app/qtapp/rtknavi_qt/logstrdlg.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,16 @@ void LogStrDialog::setPath(int stream, int type, const QString &path)
214214
QLineEdit *edits[] = {ui->lEFilePath1, ui->lEFilePath2, ui->lEFilePath3};
215215
if (stream > 3) return;
216216
paths[stream][type] = path;
217+
ui->cBTimeTag->setChecked(path.contains("::T"));
218+
if (path.contains("::S="))
219+
{
220+
int startPos = path.indexOf("::S=")+4;
221+
QString startTime = path.mid(startPos, path.indexOf("::", startPos)-startPos);
222+
ui->cBSwapInterval->setCurrentText(startTime);
223+
};
217224
if (type == 2)
218225
{
219-
edits[stream]->setText(path);
226+
edits[stream]->setText(path.mid(0, path.indexOf("::")));
220227
};
221228
}
222229
//---------------------------------------------------------------------------
@@ -241,7 +248,8 @@ bool LogStrDialog::getLogTimeTagEnabled(){
241248
//---------------------------------------------------------------------------
242249
void LogStrDialog::setSwapInterval(const QString & swapInterval)
243250
{
244-
QString interval_str = swapInterval + " h";
251+
QString interval_str = swapInterval;
252+
if (!interval_str.isEmpty()) interval_str += " h";
245253
if (ui->cBSwapInterval->findText(interval_str) == -1)
246254
ui->cBSwapInterval->insertItem(0, interval_str);
247255
ui->cBSwapInterval->setCurrentText(interval_str);

app/qtapp/rtknavi_qt/navimain.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ static int strfmt[] = { /* stream formats */
9696
#define FLGOPT "0:off,1:std+2:age/ratio/ns"
9797
#define ISTOPT "0:off,1:serial,2:file,3:tcpsvr,4:tcpcli,6:ntripcli,7:ftp,8:http"
9898
#define OSTOPT "0:off,1:serial,2:file,3:tcpsvr,4:tcpcli,5:ntripsvr,9:ntripcas"
99-
#define FMTOPT "0:rtcm2,1:rtcm3,2:oem4,3:oem3,4:ubx,5:swift,6:hemis,7:skytraq,8:javad,9:nvs,10:binex,11:rt17,12:sbf,14,15:sp3"
99+
#define FMTOPT "0:rtcm2,1:rtcm3,2:oem4,3:oem3,4:ubx,5:ss2,6:hemis,7:skytraq,8:javad,9:nvs,10:binex,11:rt17,12:sbf,13:tersus,14:rinex,15:sp3,16:clk,17:sbas,18:nmea"
100100
#define NMEOPT "0:off,1:latlon,2:single"
101101
#define SOLOPT "0:llh,1:xyz,2:enu,3:nmea,4:stat"
102102

@@ -2355,6 +2355,7 @@ void MainWindow::saveNavigation(nav_t *nav)
23552355
trace(3, "saveNavigation\n");
23562356

23572357
if (nav == NULL) return;
2358+
if (nav->eph == NULL) return;
23582359

23592360
for (i = 0; i < MAXSAT*2; i++) {
23602361
if (nav->eph[i].ttr.time == 0) continue;

app/qtapp/rtknavi_qt/outstrdlg.cpp

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,17 @@ void OutputStrDialog::setPath(int stream, int type, const QString &path)
211211
QLineEdit *edits[] = {ui->lEFilePath1, ui->lEFilePath2};
212212
if (stream > 2) return;
213213
paths[stream][type] = path;
214+
ui->cBTimeTag->setChecked(path.contains("::T"));
215+
if (path.contains("::S="))
216+
{
217+
int startPos = path.indexOf("::S=")+4;
218+
QString startTime = path.mid(startPos, path.indexOf("::", startPos)-startPos);
219+
ui->cBSwapInterval->setCurrentText(startTime + " h");
220+
};
221+
214222
if (type == 2)
215223
{
216-
edits[stream]->setText(path);
224+
edits[stream]->setText(path.mid(0, path.indexOf("::")));
217225
};
218226
}
219227
//---------------------------------------------------------------------------
@@ -238,15 +246,19 @@ bool OutputStrDialog::getTimeTagEnabled(){
238246
//---------------------------------------------------------------------------
239247
void OutputStrDialog::setSwapInterval(const QString & swapInterval)
240248
{
241-
QString interval_str = swapInterval + " h";
249+
QString interval_str = swapInterval;
250+
if (!interval_str.isEmpty()) interval_str += " h";
242251
if (ui->cBSwapInterval->findText(interval_str) == -1)
243252
ui->cBSwapInterval->insertItem(0, interval_str);
244253
ui->cBSwapInterval->setCurrentText(interval_str);
245254
}
246255
//---------------------------------------------------------------------------
247256
QString OutputStrDialog::getSwapInterval()
248257
{
249-
return ui->cBSwapInterval->currentText().split(' ', Qt::SkipEmptyParts).first();
258+
QStringList tokens = ui->cBSwapInterval->currentText().split(' ', Qt::SkipEmptyParts);
259+
if (tokens.size() > 1)
260+
return tokens.first();
261+
else return "";
250262
};
251263
//---------------------------------------------------------------------------
252264
void OutputStrDialog::setHistory(int i, const QString &history)

app/qtapp/rtknavi_qt/outstrdlg.ui

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<x>0</x>
88
<y>0</y>
99
<width>747</width>
10-
<height>260</height>
10+
<height>268</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
@@ -55,7 +55,7 @@
5555
<string>Select swap interval for output data. Use specific keys (see &quot;?&quot; button) in the file path to generate unique filenames.</string>
5656
</property>
5757
<property name="sizeAdjustPolicy">
58-
<enum>QComboBox::AdjustToContents</enum>
58+
<enum>QComboBox::SizeAdjustPolicy::AdjustToContents</enum>
5959
</property>
6060
<item>
6161
<property name="text">
@@ -64,37 +64,37 @@
6464
</item>
6565
<item>
6666
<property name="text">
67-
<string>0.25</string>
67+
<string>0.25 h</string>
6868
</property>
6969
</item>
7070
<item>
7171
<property name="text">
72-
<string>0.5</string>
72+
<string>0.5 h</string>
7373
</property>
7474
</item>
7575
<item>
7676
<property name="text">
77-
<string>1</string>
77+
<string>1 h</string>
7878
</property>
7979
</item>
8080
<item>
8181
<property name="text">
82-
<string>3</string>
82+
<string>3 h</string>
8383
</property>
8484
</item>
8585
<item>
8686
<property name="text">
87-
<string>6</string>
87+
<string>6 h</string>
8888
</property>
8989
</item>
9090
<item>
9191
<property name="text">
92-
<string>12</string>
92+
<string>12 h</string>
9393
</property>
9494
</item>
9595
<item>
9696
<property name="text">
97-
<string>24</string>
97+
<string>24 h</string>
9898
</property>
9999
</item>
100100
</widget>
@@ -115,7 +115,7 @@
115115
<item row="2" column="1">
116116
<widget class="QDialogButtonBox" name="buttonBox">
117117
<property name="standardButtons">
118-
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
118+
<set>QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok</set>
119119
</property>
120120
</widget>
121121
</item>

0 commit comments

Comments
 (0)