Skip to content

Commit

Permalink
rtknavi_qt: show the P and L std in the monitor obs page
Browse files Browse the repository at this point in the history
For now only enabled when extended observations are enabled.
  • Loading branch information
ourairquality committed Oct 29, 2024
1 parent 3058d54 commit a9f5a48
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions app/qtapp/rtknavi_qt/mondlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -986,8 +986,11 @@ void MonitorDialog::setObservations()
const QString label[] = {tr("Trcv (GPST)"), tr("SAT"), tr("STR")};
int i, j = 0, width[] = {230, 46, 40};
int nex = ui->cBSelectObservation->currentIndex() ? NEXOBS : 0;
// Show standard deviations when the extended observations are
// also selected, but this could be a separate option.
int std = ui->cBSelectObservation->currentIndex();

ui->tWConsole->setColumnCount(3 + (NFREQ + nex) * 6);
ui->tWConsole->setColumnCount(3 + (NFREQ + nex) * (6 + std * 2));
ui->tWConsole->setRowCount(0);
header.clear();

Expand All @@ -1006,11 +1009,19 @@ void MonitorDialog::setObservations()
for (i = 0; i < NFREQ + nex; i++) {
ui->tWConsole->setColumnWidth(j++, 135 * fontScale / 96);
header << (i < NFREQ ? tr("P%1 (m)").arg(i+1) : tr("PX%1 (m)").arg(i - NFREQ + 1));
if (std) {
ui->tWConsole->setColumnWidth(j++, 65 * fontScale / 96);
header << tr("Std");
}
}
for (i = 0; i < NFREQ + nex; i++) {
ui->tWConsole->setColumnWidth(j++, 160 * fontScale / 96);
header << (i < NFREQ ? tr("L%1 (cycle)").arg(i+1) : tr("LX%1 (cycle)").arg(i - NFREQ + 1));
}
if (std) {
ui->tWConsole->setColumnWidth(j++, 75 * fontScale / 96);
header << tr("Std");
}
}
for (i = 0; i < NFREQ + nex; i++) {
ui->tWConsole->setColumnWidth(j++, 120 * fontScale / 96);
header << (i < NFREQ ? tr("D%1 (Hz)").arg(i+1) : tr("DX%1 (Hz)").arg(i - NFREQ + 1));
Expand All @@ -1030,6 +1041,7 @@ void MonitorDialog::showObservations()
char tstr[64], id[32], *code;
int i, k, n = 0, nex = ui->cBSelectObservation->currentIndex() ? NEXOBS : 0;
int sys = sys_tbl[ui->cBSelectNavigationSystems->currentIndex()];
int std = ui->cBSelectObservation->currentIndex();

rtksvrlock(rtksvr);
for (i = 0; i < rtksvr->obs[0][0].n && n < MAXOBS * 2; i++) {
Expand Down Expand Up @@ -1069,10 +1081,20 @@ void MonitorDialog::showObservations()
if (obs[i].SNR[k]) ui->tWConsole->item(i, j++)->setText(QString::number(obs[i].SNR[k], 'f', 1));
else ui->tWConsole->item(i, j++)->setText("-");
}
for (k = 0; k < NFREQ + nex; k++)
for (k = 0; k < NFREQ + nex; k++) {
ui->tWConsole->item(i, j++)->setText(QString::number(obs[i].P[k], 'f', 3));
for (k = 0; k < NFREQ + nex; k++)
if (std) {
if (obs[i].Pstd[k]) ui->tWConsole->item(i, j++)->setText(QString::number(obs[i].Pstd[k], 'f', 3));
else ui->tWConsole->item(i, j++)->setText("-");
}
}
for (k = 0; k < NFREQ + nex; k++) {
ui->tWConsole->item(i, j++)->setText(QString::number(obs[i].L[k], 'f', 3));
if (std) {
if (obs[i].Lstd[k]) ui->tWConsole->item(i, j++)->setText(QString::number(obs[i].Lstd[k], 'f', 4));
else ui->tWConsole->item(i, j++)->setText("-");
}
}
for (k = 0; k < NFREQ + nex; k++)
ui->tWConsole->item(i, j++)->setText(QString::number(obs[i].D[k], 'f', 3));
for (k = 0; k < NFREQ + nex; k++)
Expand Down

0 comments on commit a9f5a48

Please sign in to comment.