Changeset 5881 in ntrip for trunk/BNC/src/bncfigureppp.cpp
- Timestamp:
- Aug 8, 2014, 1:10:43 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncfigureppp.cpp
r5879 r5881 66 66 void bncFigurePPP::reset() { 67 67 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 99 68 for (int ii = 0; ii < _pos.size(); ++ii) { 100 69 delete _pos[ii]; 101 70 } 102 71 _pos.clear(); 103 104 72 update(); 105 73 } … … 114 82 115 83 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]; 119 87 120 88 _pos.push_back(newPos); … … 169 137 _tMin = _pos[0]->time.gpssec(); 170 138 171 // Reference Coordinates172 // ---------------------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 181 139 // North, East and Up differences wrt Reference Coordinates 182 140 // -------------------------------------------------------- … … 184 142 double neu[_pos.size()][3]; 185 143 for (int ii = 0; ii < _pos.size(); ++ii) { 186 double dXYZ[3];187 144 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]; 192 146 if (fabs(neu[ii][ic]) > _neuMax) { 193 147 _neuMax = fabs(neu[ii][ic]); … … 211 165 double t1 = _tMin + (_pos[ii-1]->time - _pos[0]->time); 212 166 double t2 = _tMin + (_pos[ii]->time - _pos[0]->time); 213 214 // Audio response215 // --------------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 }223 167 224 168 // dots … … 300 244 // Start Time 301 245 // ---------- 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()); 313 247 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); 332 249 } 333 250 }
Note:
See TracChangeset
for help on using the changeset viewer.