- Timestamp:
- Jan 3, 2010, 9:47:44 AM (15 years ago)
- Location:
- trunk/BNC
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncfigureppp.cpp
r2164 r2165 53 53 bncSettings settings; 54 54 55 _xyzRef[0] = 0.0; 56 _xyzRef[1] = 0.0; 57 _xyzRef[2] = 0.0; 58 59 QString refCrdStr = settings.value("pppRefCrd").toString(); 60 if (!refCrdStr.isEmpty()) { 61 QStringList refCrdStrList = refCrdStr.split(' ', QString::SkipEmptyParts); 62 if (refCrdStrList.size() == 3) { 63 _xyzRef[0] = refCrdStrList[0].toDouble(); 64 _xyzRef[1] = refCrdStrList[1].toDouble(); 65 _xyzRef[2] = refCrdStrList[2].toDouble(); 66 } 67 } 55 _xyzRef[0] = settings.value("pppRefCrdX").toDouble(); 56 _xyzRef[1] = settings.value("pppRefCrdY").toDouble(); 57 _xyzRef[2] = settings.value("pppRefCrdZ").toDouble(); 58 68 59 } 69 60 … … 80 71 void bncFigurePPP::slotNewPosition(bncTime time, double x, double y, double z){ 81 72 82 const static int MAXNUMPOS = 300;83 84 73 QMutexLocker locker(&_mutex); 85 74 … … 105 94 QPoint bncFigurePPP::pltPoint(double tt, double yy) { 106 95 107 double tScale = 0. 85* _width / _tRange;96 double tScale = 0.90 * _width / _tRange; 108 97 double yScale = 0.90 * _height / (2.0 * _neuMax); 109 double tOffset = _tRange / 1 0.0;98 double tOffset = _tRange / 13.0; 110 99 double yOffset = _neuMax / 10.0; 111 100 … … 121 110 122 111 QPainter painter(this); 112 123 113 _width = painter.viewport().width(); 124 114 _height = painter.viewport().height(); 115 116 QFont font; 117 font.setPointSize(int(font.QFont::pointSize()*0.8)); 118 painter.setFont(font); 125 119 126 120 // Plot X-coordinates as a function of time (in seconds) … … 128 122 if (_pos.size() > 1) { 129 123 130 _tRange = _pos[_pos.size()-1]->time - _pos[0]->time; // in sec 124 // _tRange = _pos[_pos.size()-1]->time - _pos[0]->time; 125 _tRange = MAXNUMPOS; // GW 131 126 _tMin = _pos[0]->time.gpssec(); 132 127 … … 177 172 QString strP = QString("%1 m").arg( tic,0,'f',2); 178 173 QString strM = QString("%1 m").arg(-tic,0,'f',2); 174 QString strZ = QString("%1 m").arg(0.0,0,'f',2); 179 175 180 176 QPoint pntP = pltPoint(_tMin, tic); 181 177 QPoint pntM = pltPoint(_tMin,-tic); 178 QPoint pntZ = pltPoint(_tMin, 0.0); 182 179 183 180 int ww = QFontMetrics(this->font()).width('w'); 184 181 185 painter.drawText(pntP.x() - ww * strP.length(), pntP.y()+ww, strP); 186 painter.drawText(pntM.x() - ww * strM.length(), pntM.y(), strM); 182 painter.drawText(0,pntP.y() - ww * 0.5,pntP.x() - ww * 0.25,pntP.x(),Qt::AlignRight,strP); 183 painter.drawText(0,pntM.y() - ww * 0.5,pntM.x() - ww * 0.25,pntM.y(),Qt::AlignRight,strM); 184 painter.drawText(0,pntZ.y() - ww * 0.5,pntZ.x() - ww * 0.25,pntZ.y(),Qt::AlignRight,strZ); 187 185 188 186 painter.drawLine(pntP.x(), pntP.y(), pntP.x()+ww, pntP.y()); 189 187 painter.drawLine(pntM.x(), pntM.y(), pntM.x()+ww, pntM.y()); 190 191 // time-tic192 // --------193 painter.drawText(pltPoint(_tMin+_tRange,0.0),194 QString(" %1 s").arg(_tRange));195 188 196 189 // neu components … … 199 192 double t1 = _tMin + (_pos[ii-1]->time - _pos[0]->time); 200 193 double t2 = _tMin + (_pos[ii]->time - _pos[0]->time); 194 195 // time-tics 196 // --------- 197 if (fmod(t1,60.) == 0) { 198 QPoint pntTic = pltPoint(t1, 0.0); 199 int daySec = int(fmod(t1,86400.)); 200 int hours = int(daySec / 3600); 201 int minutes = int((daySec - hours * 3600)/ 60.); 202 QString strTic = QString("%1:%2").arg(hours, 2, 10, QChar('0')) 203 .arg(minutes, 2, 10, QChar('0')); 204 painter.setPen(QColor(Qt::black)); 205 double xFirstCharTic = pntTic.x() - ww * 1.2; 206 if ( xFirstCharTic > pntZ.x()) { 207 painter.drawText(xFirstCharTic,pntTic.y() + ww * 1.7,strTic); 208 painter.drawLine(pntTic.x(),pntTic.y(),pntTic.x(),pntTic.y() + ww * 0.5); 209 } 210 } 201 211 painter.setPen(QColor(Qt::red)); 202 212 painter.drawLine(pltPoint(t1, neu[ii-1][0]), pltPoint(t2, neu[ii][0])); -
trunk/BNC/bnchelp.html
r2139 r2165 155 155 3.13.2 <a href=#throughput>Throughput</a><br> 156 156 3.13.3 <a href=#latency>Latency</a><br> 157 3.13.4 <a href=#ppptab>PPP</a><br> 157 158 3.14. <a href=#bottom>Bottom Menu Bar</a><br> 158 159 3.14.1. <a href=#streamadd>Add Stream - Coming from Caster</a><br> … … 1053 1054 <p> 1054 1055 The latency of observations in each incoming stream is shown in the 'Latency' tab in milliseconds or seconds. Streams not carrying observations (i.e. those providing only broadcast ephemeris messages) are not considered here. Note that the calculation of correct latencies requires the clock of the host computer to be properly synchronized. 1056 </p> 1057 1058 <p><a name="ppptab"><h4>3.13.4 PPP</h4></p> 1059 <p> 1060 Precise Point Positioning time series of North (red), East (green) and Up (blue) coordinate components are shown in the 'PPP' tab. Values are either referred to reference coordinates (if specified) or referred to mean values calculated from results received over the latest 5 minues. 1055 1061 </p> 1056 1062 -
trunk/BNC/bncmodel.cpp
r2143 r2165 544 544 ostringstream str2; 545 545 str2.setf(ios::fixed); 546 str2 << " PPP " << _staID.data() << ""546 str2 << _staID.data() << ": PPP " 547 547 << epoData->tt.timestr(1) << " " << epoData->size() << " " 548 548 << setw(14) << setprecision(3) << x() << " +- " -
trunk/BNC/bncsettings.cpp
r2137 r2165 81 81 setValue("pppEstTropo", ""); 82 82 setValue("pppGLONASS", ""); 83 setValue("pppRefCrdX", ""); 84 setValue("pppRefCrdY", ""); 85 setValue("pppRefCrdZ", ""); 83 86 setValue("nmeaFile", ""); 84 85 87 sync(); 86 88 } -
trunk/BNC/bncwindow.cpp
r2164 r2165 336 336 // PPP Options 337 337 // ----------- 338 _pppMountLineEdit = new QLineEdit(settings.value("pppMount").toString()); 339 _pppNMEALineEdit = new QLineEdit(settings.value("nmeaFile").toString()); 340 _pppRefCrdLineEdit = new QLineEdit(settings.value("pppRefCrd").toString()); 341 _pppStaticCheckBox = new QCheckBox(); 338 _pppMountLineEdit = new QLineEdit(settings.value("pppMount").toString()); 339 _pppNMEALineEdit = new QLineEdit(settings.value("nmeaFile").toString()); 340 _pppRefCrdXLineEdit = new QLineEdit(settings.value("pppRefCrdX").toString()); 341 _pppRefCrdYLineEdit = new QLineEdit(settings.value("pppRefCrdY").toString()); 342 _pppRefCrdZLineEdit = new QLineEdit(settings.value("pppRefCrdZ").toString()); 343 _pppStaticCheckBox = new QCheckBox(); 342 344 _pppStaticCheckBox->setCheckState(Qt::CheckState( 343 345 settings.value("pppStatic").toInt())); … … 434 436 _pppGLONASSCheckBox->setWhatsThis(tr("<p>By default BNC does not use GLONASS observations in PPP mode.</p><p>Tick 'Use GLONASS' for a combined processing of both, GPS and GLONASS observations in PPP mode.</p>")); 435 437 _pppNMEALineEdit->setWhatsThis(tr("<p>Specify the full path to a file where PPP results are saved as NMEA messages.</p>")); 438 _pppRefCrdXLineEdit->setWhatsThis(tr("<p>You may enter reference coordinates of the receiver position if known.</p>")); 439 _pppRefCrdYLineEdit->setWhatsThis(tr("<p>You may enter reference coordinates of the receiver position if known.</p>")); 440 _pppRefCrdZLineEdit->setWhatsThis(tr("<p>You may enter reference coordinates of the receiver position if known.</p>")); 441 _bncFigurePPP->setWhatsThis(tr("PPP time series of North (red), East (green) and Up (blue) coordinate components are shown in the 'PPP' tab. Values are either referred to reference coordinates (if specified) or referred to mean values calculated from results received over the latest 5 minues.")); 436 442 437 443 // Canvas with Editable Fields … … 468 474 _loggroup->addTab(_bncFigure,tr("Throughput")); 469 475 _loggroup->addTab(_bncFigureLate,tr("Latency")); 470 _loggroup->addTab(_bncFigurePPP,tr("PPP "));476 _loggroup->addTab(_bncFigurePPP,tr("PPP (NEU)")); 471 477 472 478 // Proxy Tab … … 677 683 pppLayout->addWidget(_pppGLONASSCheckBox, 1, 7); 678 684 pppLayout->addWidget(new QLabel("Use GLONASS "), 1, 8, 1, 1, Qt::AlignLeft); 679 pppLayout->addWidget(new QLabel("NMEA file (full path)"), 2, 0); 680 pppLayout->addWidget(_pppNMEALineEdit, 2, 1, 1, 6); 681 pppLayout->addWidget(new QLabel("Reference Coordinates"), 3, 0); 682 pppLayout->addWidget(_pppRefCrdLineEdit, 3, 1, 1, 6); 685 pppLayout->addWidget(new QLabel("Ref. coordinates"), 2, 0); 686 pppLayout->addWidget(_pppRefCrdXLineEdit, 2, 1, 1, 2); 687 pppLayout->addWidget(new QLabel("X"), 2, 3, 1, 1); 688 pppLayout->addWidget(_pppRefCrdYLineEdit, 2, 4, 1, 1); 689 pppLayout->addWidget(new QLabel("Y"), 2, 5, 1, 1); 690 pppLayout->addWidget(_pppRefCrdZLineEdit, 2, 6, 1, 1); 691 pppLayout->addWidget(new QLabel("Z"), 2, 7, 1, 1); 692 pppLayout->addWidget(new QLabel("NMEA file (full path)"), 3, 0); 693 pppLayout->addWidget(_pppNMEALineEdit, 3, 1, 1, 6); 683 694 pppLayout->addWidget(new QLabel("Coordinates from Precise Point Positioning (PPP)."),4, 0,1,30); 684 pppLayout->addWidget(new QLabel(" "), 5, 0);685 pppLayout->addWidget(new QLabel(" "), 6, 0);695 pppLayout->addWidget(new QLabel(" "), 5, 0); 696 pppLayout->addWidget(new QLabel(" "), 6, 0); 686 697 pppgroup->setLayout(pppLayout); 687 698 … … 994 1005 settings.setValue("pppMount", _pppMountLineEdit->text()); 995 1006 settings.setValue("nmeaFile", _pppNMEALineEdit->text()); 996 settings.setValue("pppRefCrd", _pppRefCrdLineEdit->text()); 1007 settings.setValue("pppRefCrdX", _pppRefCrdXLineEdit->text()); 1008 settings.setValue("pppRefCrdY", _pppRefCrdYLineEdit->text()); 1009 settings.setValue("pppRefCrdZ", _pppRefCrdZLineEdit->text()); 997 1010 settings.setValue("pppStatic", _pppStaticCheckBox->checkState()); 998 1011 settings.setValue("pppUsePhase", _pppUsePhaseCheckBox->checkState()); … … 1530 1543 if (!_pppMountLineEdit->text().isEmpty()) { 1531 1544 _pppNMEALineEdit->setPalette(palette_white); 1532 _pppRefCrdLineEdit->setPalette(palette_white); 1545 _pppRefCrdXLineEdit->setPalette(palette_white); 1546 _pppRefCrdYLineEdit->setPalette(palette_white); 1547 _pppRefCrdZLineEdit->setPalette(palette_white); 1533 1548 _pppStaticCheckBox->setPalette(palette_white); 1534 1549 _pppUsePhaseCheckBox->setPalette(palette_white); … … 1536 1551 _pppGLONASSCheckBox->setPalette(palette_white); 1537 1552 _pppNMEALineEdit->setEnabled(true); 1538 _pppRefCrdLineEdit->setEnabled(true); 1553 _pppRefCrdXLineEdit->setEnabled(true); 1554 _pppRefCrdYLineEdit->setEnabled(true); 1555 _pppRefCrdZLineEdit->setEnabled(true); 1539 1556 _pppStaticCheckBox->setEnabled(true); 1540 1557 _pppUsePhaseCheckBox->setEnabled(true); … … 1543 1560 } else { 1544 1561 _pppNMEALineEdit->setPalette(palette_gray); 1545 _pppRefCrdLineEdit->setPalette(palette_gray); 1562 _pppRefCrdXLineEdit->setPalette(palette_gray); 1563 _pppRefCrdYLineEdit->setPalette(palette_gray); 1564 _pppRefCrdZLineEdit->setPalette(palette_gray); 1546 1565 _pppStaticCheckBox->setPalette(palette_gray); 1547 1566 _pppUsePhaseCheckBox->setPalette(palette_gray); … … 1549 1568 _pppGLONASSCheckBox->setPalette(palette_gray); 1550 1569 _pppNMEALineEdit->setEnabled(false); 1551 _pppRefCrdLineEdit->setEnabled(false); 1570 _pppRefCrdXLineEdit->setEnabled(false); 1571 _pppRefCrdYLineEdit->setEnabled(false); 1572 _pppRefCrdZLineEdit->setEnabled(false); 1552 1573 _pppStaticCheckBox->setEnabled(false); 1553 1574 _pppUsePhaseCheckBox->setEnabled(false); -
trunk/BNC/bncwindow.h
r2164 r2165 115 115 QLineEdit* _pppMountLineEdit; 116 116 QLineEdit* _pppNMEALineEdit; 117 QLineEdit* _pppRefCrdLineEdit; 117 QLineEdit* _pppRefCrdXLineEdit; 118 QLineEdit* _pppRefCrdYLineEdit; 119 QLineEdit* _pppRefCrdZLineEdit; 118 120 QCheckBox* _pppStaticCheckBox; 119 121 QCheckBox* _pppUsePhaseCheckBox;
Note:
See TracChangeset
for help on using the changeset viewer.