Changeset 2165 in ntrip for trunk


Ignore:
Timestamp:
Jan 3, 2010, 9:47:44 AM (15 years ago)
Author:
weber
Message:

* empty log message *

Location:
trunk/BNC
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncfigureppp.cpp

    r2164 r2165  
    5353  bncSettings settings;
    5454
    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
    6859}
    6960
     
    8071void bncFigurePPP::slotNewPosition(bncTime time, double x, double y, double z){
    8172
    82   const static int MAXNUMPOS = 300;
    83 
    8473  QMutexLocker locker(&_mutex);
    8574
     
    10594QPoint bncFigurePPP::pltPoint(double tt, double yy) {
    10695
    107   double tScale  = 0.85 * _width  / _tRange;
     96  double tScale  = 0.90 * _width  / _tRange;
    10897  double yScale  = 0.90 * _height / (2.0 * _neuMax);
    109   double tOffset = _tRange / 10.0;
     98  double tOffset = _tRange / 13.0;
    11099  double yOffset = _neuMax / 10.0;
    111100
     
    121110
    122111  QPainter painter(this);
     112
    123113  _width  = painter.viewport().width();
    124114  _height = painter.viewport().height();
     115
     116  QFont font;
     117  font.setPointSize(int(font.QFont::pointSize()*0.8));
     118  painter.setFont(font);
    125119
    126120  // Plot X-coordinates as a function of time (in seconds)
     
    128122  if (_pos.size() > 1) {
    129123
    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
    131126    _tMin   = _pos[0]->time.gpssec();
    132127
     
    177172      QString strP = QString("%1 m").arg( tic,0,'f',2);
    178173      QString strM = QString("%1 m").arg(-tic,0,'f',2);
     174      QString strZ = QString("%1 m").arg(0.0,0,'f',2);
    179175
    180176      QPoint pntP = pltPoint(_tMin, tic);
    181177      QPoint pntM = pltPoint(_tMin,-tic);
     178      QPoint pntZ = pltPoint(_tMin, 0.0);
    182179
    183180      int ww = QFontMetrics(this->font()).width('w');
    184181
    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);
    187185
    188186      painter.drawLine(pntP.x(), pntP.y(), pntP.x()+ww, pntP.y());
    189187      painter.drawLine(pntM.x(), pntM.y(), pntM.x()+ww, pntM.y());
    190 
    191       // time-tic
    192       // --------
    193       painter.drawText(pltPoint(_tMin+_tRange,0.0),
    194                        QString("  %1 s").arg(_tRange));
    195188
    196189      // neu components
     
    199192        double t1 = _tMin + (_pos[ii-1]->time - _pos[0]->time);
    200193        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        }
    201211        painter.setPen(QColor(Qt::red));
    202212        painter.drawLine(pltPoint(t1, neu[ii-1][0]), pltPoint(t2, neu[ii][0]));
  • trunk/BNC/bnchelp.html

    r2139 r2165  
    155155&nbsp; &nbsp; &nbsp; 3.13.2 <a href=#throughput>Throughput</a><br>
    156156&nbsp; &nbsp; &nbsp; 3.13.3 <a href=#latency>Latency</a><br>
     157&nbsp; &nbsp; &nbsp; 3.13.4 <a href=#ppptab>PPP</a><br>
    1571583.14. <a href=#bottom>Bottom Menu Bar</a><br>
    158159&nbsp; &nbsp; &nbsp; 3.14.1. <a href=#streamadd>Add Stream - Coming from Caster</a><br>
     
    10531054<p>
    10541055The 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>
     1060Precise 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.
    10551061</p>
    10561062
  • trunk/BNC/bncmodel.cpp

    r2143 r2165  
    544544  ostringstream str2;
    545545  str2.setf(ios::fixed);
    546   str2 << "    PPP " << _staID.data() << " "
     546  str2 << _staID.data() << ": PPP "
    547547       << epoData->tt.timestr(1) << " " << epoData->size() << " "
    548548       << setw(14) << setprecision(3) << x()            << " +- "
  • trunk/BNC/bncsettings.cpp

    r2137 r2165  
    8181    setValue("pppEstTropo",      "");
    8282    setValue("pppGLONASS",       "");
     83    setValue("pppRefCrdX",       "");
     84    setValue("pppRefCrdY",       "");
     85    setValue("pppRefCrdZ",       "");
    8386    setValue("nmeaFile",         "");
    84 
    8587    sync();
    8688  }
  • trunk/BNC/bncwindow.cpp

    r2164 r2165  
    336336  // PPP Options
    337337  // -----------
    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();
    342344  _pppStaticCheckBox->setCheckState(Qt::CheckState(
    343345                                    settings.value("pppStatic").toInt()));
     
    434436  _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>"));
    435437  _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."));
    436442
    437443  // Canvas with Editable Fields
     
    468474  _loggroup->addTab(_bncFigure,tr("Throughput"));
    469475  _loggroup->addTab(_bncFigureLate,tr("Latency"));
    470   _loggroup->addTab(_bncFigurePPP,tr("PPP"));
     476  _loggroup->addTab(_bncFigurePPP,tr("PPP (NEU)"));
    471477
    472478  // Proxy Tab
     
    677683  pppLayout->addWidget(_pppGLONASSCheckBox,                  1, 7);
    678684  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);
    683694  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);
    686697  pppgroup->setLayout(pppLayout);
    687698
     
    9941005  settings.setValue("pppMount",    _pppMountLineEdit->text());
    9951006  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());
    9971010  settings.setValue("pppStatic",   _pppStaticCheckBox->checkState());
    9981011  settings.setValue("pppUsePhase", _pppUsePhaseCheckBox->checkState());
     
    15301543    if (!_pppMountLineEdit->text().isEmpty()) {
    15311544      _pppNMEALineEdit->setPalette(palette_white);
    1532       _pppRefCrdLineEdit->setPalette(palette_white);
     1545      _pppRefCrdXLineEdit->setPalette(palette_white);
     1546      _pppRefCrdYLineEdit->setPalette(palette_white);
     1547      _pppRefCrdZLineEdit->setPalette(palette_white);
    15331548      _pppStaticCheckBox->setPalette(palette_white);
    15341549      _pppUsePhaseCheckBox->setPalette(palette_white);
     
    15361551      _pppGLONASSCheckBox->setPalette(palette_white);
    15371552      _pppNMEALineEdit->setEnabled(true);
    1538       _pppRefCrdLineEdit->setEnabled(true);
     1553      _pppRefCrdXLineEdit->setEnabled(true);
     1554      _pppRefCrdYLineEdit->setEnabled(true);
     1555      _pppRefCrdZLineEdit->setEnabled(true);
    15391556      _pppStaticCheckBox->setEnabled(true);
    15401557      _pppUsePhaseCheckBox->setEnabled(true);
     
    15431560    } else {
    15441561      _pppNMEALineEdit->setPalette(palette_gray);
    1545       _pppRefCrdLineEdit->setPalette(palette_gray);
     1562      _pppRefCrdXLineEdit->setPalette(palette_gray);
     1563      _pppRefCrdYLineEdit->setPalette(palette_gray);
     1564      _pppRefCrdZLineEdit->setPalette(palette_gray);
    15461565      _pppStaticCheckBox->setPalette(palette_gray);
    15471566      _pppUsePhaseCheckBox->setPalette(palette_gray);
     
    15491568      _pppGLONASSCheckBox->setPalette(palette_gray);
    15501569      _pppNMEALineEdit->setEnabled(false);
    1551       _pppRefCrdLineEdit->setEnabled(false);
     1570      _pppRefCrdXLineEdit->setEnabled(false);
     1571      _pppRefCrdYLineEdit->setEnabled(false);
     1572      _pppRefCrdZLineEdit->setEnabled(false);
    15521573      _pppStaticCheckBox->setEnabled(false);
    15531574      _pppUsePhaseCheckBox->setEnabled(false);
  • trunk/BNC/bncwindow.h

    r2164 r2165  
    115115    QLineEdit* _pppMountLineEdit;
    116116    QLineEdit* _pppNMEALineEdit;
    117     QLineEdit* _pppRefCrdLineEdit;
     117    QLineEdit* _pppRefCrdXLineEdit;
     118    QLineEdit* _pppRefCrdYLineEdit;
     119    QLineEdit* _pppRefCrdZLineEdit;
    118120    QCheckBox* _pppStaticCheckBox;
    119121    QCheckBox* _pppUsePhaseCheckBox;
Note: See TracChangeset for help on using the changeset viewer.