Changeset 5881 in ntrip


Ignore:
Timestamp:
Aug 8, 2014, 1:10:43 PM (10 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncfigureppp.cpp

    r5879 r5881  
    6666void bncFigurePPP::reset() {
    6767  QMutexLocker locker(&_mutex);
    68 
    69   bncSettings settings;
    70 
    71   if (settings.value("pppRefCrdX").toString() != "" &&
    72       settings.value("pppRefCrdY").toString() != "" &&
    73       settings.value("pppRefCrdZ").toString() != "") {
    74     _xyzRef[0] = settings.value("pppRefCrdX").toDouble();
    75     _xyzRef[1] = settings.value("pppRefCrdY").toDouble();
    76     _xyzRef[2] = settings.value("pppRefCrdZ").toDouble();
    77   }
    78   else {
    79     _xyzRef[0] = 0.0;
    80     _xyzRef[1] = 0.0;
    81     _xyzRef[2] = 0.0;
    82   }
    83 
    84   if (settings.value("pppRefCrdX").toString() != "" &&
    85       settings.value("pppRefCrdY").toString() != "" &&
    86       settings.value("pppRefCrdZ").toString() != "" &&
    87       settings.value("pppQuickStart").toString() != "" &&
    88       settings.value("pppAudioResponse").toString() != "" ) {
    89     _pppAudioResponse = settings.value("pppAudioResponse").toDouble();
    90     }
    91   else {
    92     _pppAudioResponse = 0.0;
    93   }
    94 
    95   _pppMount = settings.value("pppMount").toString();
    96   _pppCorrMount = settings.value("pppCorrMount").toString();
    97   _pppSPP = settings.value("pppSPP").toString();
    98 
    9968  for (int ii = 0; ii < _pos.size(); ++ii) {
    10069    delete _pos[ii];
    10170  }
    10271  _pos.clear();
    103 
    10472  update();
    10573}
     
    11482
    11583  newPos->time   = time;
    116   newPos->xyz[0] = xx.data()[0];
    117   newPos->xyz[1] = xx.data()[1];
    118   newPos->xyz[2] = xx.data()[2];
     84  newPos->neu[0] = xx.data()[3];
     85  newPos->neu[1] = xx.data()[4];
     86  newPos->neu[2] = xx.data()[5];
    11987
    12088  _pos.push_back(newPos);
     
    169137    _tMin   = _pos[0]->time.gpssec();
    170138
    171     // Reference Coordinates
    172     // ---------------------
    173     if (_xyzRef[0] == 0.0 && _xyzRef[1] == 0.0  && _xyzRef[2] == 0.0) {
    174       _xyzRef[0] = _pos[0]->xyz[0];
    175       _xyzRef[1] = _pos[0]->xyz[1];
    176       _xyzRef[2] = _pos[0]->xyz[2];
    177     }
    178     double ellRef[3];
    179     xyz2ell(_xyzRef, ellRef);
    180 
    181139    // North, East and Up differences wrt Reference Coordinates
    182140    // --------------------------------------------------------
     
    184142    double neu[_pos.size()][3];
    185143    for (int ii = 0; ii < _pos.size(); ++ii) {
    186       double dXYZ[3];
    187144      for (int ic = 0; ic < 3; ++ic) {
    188         dXYZ[ic] = _pos[ii]->xyz[ic] - _xyzRef[ic];
    189       }
    190       xyz2neu(ellRef, dXYZ, neu[ii]);
    191       for (int ic = 0; ic < 3; ++ic) {
     145        neu[ii][ic] = _pos[ii]->neu[ic];
    192146        if (fabs(neu[ii][ic]) > _neuMax) {
    193147          _neuMax = fabs(neu[ii][ic]);
     
    211165        double t1 = _tMin + (_pos[ii-1]->time - _pos[0]->time);
    212166        double t2 = _tMin + (_pos[ii]->time   - _pos[0]->time);
    213 
    214         // Audio response
    215         // --------------
    216         if ( ii == _pos.size()-1) {
    217           if ( _pppAudioResponse > 0.0 &&
    218                (fabs(neu[ii-1][0]) > _pppAudioResponse ||
    219                 fabs(neu[ii-1][1]) > _pppAudioResponse) ) {
    220             QApplication::beep();
    221           }
    222         }
    223167
    224168        // dots
     
    300244      // Start Time
    301245      // ----------
    302 
    303       _startTime.civil_time(hour, minute, second);
    304 
    305       if (_pppSPP == "Realtime-PPP") {
    306 
    307       QString startStr = QString("%1 & %2, Start %3:%4:%5")
    308                               .arg(_pppMount)
    309                               .arg(_pppCorrMount)
    310                               .arg(hour,   2, 10, QChar('0'))
    311                               .arg(minute, 2, 10, QChar('0'))
    312                               .arg(int(second), 2, 10, QChar('0'));
     246      QString startStr = QString(_startTime.timestr().c_str());
    313247      painter.setPen(QColor(Qt::black));
    314       painter.drawText(0, ww, pntP.x() + 31*ww, pntP.x(),
    315                        Qt::AlignRight, startStr);                 
    316                                      }
    317 
    318       if (_pppSPP == "Realtime-SPP") {
    319 
    320       QString startStr = QString("%1 Start %2:%3:%4")
    321                               .arg(_pppMount)
    322                               .arg(hour,   2, 10, QChar('0'))
    323                               .arg(minute, 2, 10, QChar('0'))
    324                               .arg(int(second), 2, 10, QChar('0'));
    325       painter.setPen(QColor(Qt::black));
    326       painter.drawText(0, ww, pntP.x() + 21*ww, pntP.x(),
    327                        Qt::AlignRight, startStr);                 
    328                                      }
    329 
    330 
    331 
     248      painter.drawText(0, ww, pntP.x() + 31*ww, pntP.x(), Qt::AlignRight, startStr);
    332249    }
    333250  }
  • trunk/BNC/src/bncfigureppp.h

    r5879 r5881  
    4848   public:
    4949    bncTime time;
    50     double  xyz[3];
     50    double  neu[3];
    5151  };
    5252
     
    5656  QVector<pppPos*> _pos;
    5757  bncTime          _startTime;
    58   QString          _pppMount;
    59   QString          _pppCorrMount;
    60   QString          _pppSPP;
    6158  double           _neuMax;
    6259  double           _tMin;
    63   double           _pppAudioResponse;
    6460  int              _width;
    6561  int              _height;
    66   double           _xyzRef[3];
    6762};
    6863
Note: See TracChangeset for help on using the changeset viewer.