Changeset 8204 in ntrip
- Timestamp:
- Dec 11, 2017, 3:00:40 PM (7 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP_SSR_I/pppFilter.cpp
r7974 r8204 648 648 ++par->numEpo; 649 649 LOG << "\n" << _time.datestr() << "_" << _time.timestr(3) 650 << " AMB " << par->prn.mid(0,3).to Ascii().data() << " "650 << " AMB " << par->prn.mid(0,3).toLatin1().data() << " " 651 651 << setw(10) << setprecision(3) << par->xx 652 652 << " +- " << setw(6) << setprecision(3) … … 657 657 double aprTrp = delay_saast(M_PI/2.0); 658 658 LOG << "\n" << _time.datestr() << "_" << _time.timestr(3) 659 << " TRP " << par->prn.mid(0,3).to Ascii().data()659 << " TRP " << par->prn.mid(0,3).toLatin1().data() 660 660 << setw(7) << setprecision(3) << aprTrp << " " 661 661 << setw(6) << setprecision(3) << showpos << par->xx << noshowpos … … 757 757 if (iPhase == 1) { 758 758 if (maxResGlo > 2.98 * OPT->_maxResL1) { 759 LOG << "Outlier Phase " << prnGlo.mid(0,3).to Ascii().data() << ' ' << maxResGlo << endl;759 LOG << "Outlier Phase " << prnGlo.mid(0,3).toLatin1().data() << ' ' << maxResGlo << endl; 760 760 return prnGlo; 761 761 } 762 762 else if (maxResGPS > MAXRES_PHASE_GPS) { 763 LOG << "Outlier Phase " << prnGPS.mid(0,3).to Ascii().data() << ' ' << maxResGPS << endl;763 LOG << "Outlier Phase " << prnGPS.mid(0,3).toLatin1().data() << ' ' << maxResGPS << endl; 764 764 return prnGPS; 765 765 } 766 766 } 767 767 else if (iPhase == 0 && maxResGPS > 2.98 * OPT->_maxResC1) { 768 LOG << "Outlier Code " << prnGPS.mid(0,3).to Ascii().data() << ' ' << maxResGPS << endl;768 LOG << "Outlier Code " << prnGPS.mid(0,3).toLatin1().data() << ' ' << maxResGPS << endl; 769 769 return prnGPS; 770 770 } … … 967 967 if (satData->obsIndex != 0 && useObs) { 968 968 str << _time.datestr() << "_" << _time.timestr(3) 969 << " RES " << satData->prn.mid(0,3).to Ascii().data()969 << " RES " << satData->prn.mid(0,3).toLatin1().data() 970 970 << (iPhase ? " L3 " : " P3 ") 971 971 << setw(9) << setprecision(4) << vv(satData->obsIndex) << endl; … … 1132 1132 LOG << "Neglected PRNs: "; 1133 1133 if (!_outlierGPS.isEmpty()) { 1134 LOG << _outlierGPS.last().mid(0,3).to Ascii().data() << ' ';1134 LOG << _outlierGPS.last().mid(0,3).toLatin1().data() << ' '; 1135 1135 } 1136 1136 QStringListIterator itGlo(_outlierGlo); 1137 1137 while (itGlo.hasNext()) { 1138 1138 QString prn = itGlo.next(); 1139 LOG << prn.mid(0,3).to Ascii().data() << ' ';1139 LOG << prn.mid(0,3).toLatin1().data() << ' '; 1140 1140 } 1141 1141 LOG << endl; -
trunk/BNC/src/RTCM/RTCM2Decoder.cpp
r8025 r8204 424 424 425 425 errmsg.push_back( 426 "missing eph for " + string(prn.to Ascii().data()) + " , IODs "426 "missing eph for " + string(prn.toLatin1().data()) + " , IODs " 427 427 + missingIODstr.str()); 428 428 } -
trunk/BNC/src/RTCM3/RTCM3Decoder.cpp
r8199 r8204 824 824 else if ((type % 10) < 3) { 825 825 emit(newMessage(QString("%1: Block %2 contain partial data! Ignored!") 826 .arg(_staID).arg(type).to Ascii(), true));826 .arg(_staID).arg(type).toLatin1(), true)); 827 827 } 828 828 if (!syncf) { … … 1482 1482 * else. */ 1483 1483 if ((id >= 1057 && id <= 1068) || (id >= 1240 && id <= 1270)) { 1484 if (!_coDecoders.contains(_staID.to Ascii()))1485 _coDecoders[_staID.to Ascii()] = new RTCM3coDecoder(_staID);1486 RTCM3coDecoder* coDecoder = _coDecoders[_staID.to Ascii()];1484 if (!_coDecoders.contains(_staID.toLatin1())) 1485 _coDecoders[_staID.toLatin1()] = new RTCM3coDecoder(_staID); 1486 RTCM3coDecoder* coDecoder = _coDecoders[_staID.toLatin1()]; 1487 1487 if (coDecoder->Decode(reinterpret_cast<char *>(_Message), _BlockSize, 1488 1488 errmsg) == success) { … … 1500 1500 emit(newMessage( 1501 1501 QString("%1: Block %2 contain partial data! Ignored!") 1502 .arg(_staID).arg(id).to Ascii(), true));1502 .arg(_staID).arg(id).toLatin1(), true)); 1503 1503 break; /* no use decoding partial data ATM, remove break when data can be used */ 1504 1504 case 1002: … … 1511 1511 emit(newMessage( 1512 1512 QString("%1: Block %2 contain partial data! Ignored!") 1513 .arg(_staID).arg(id).to Ascii(), true));1513 .arg(_staID).arg(id).toLatin1(), true)); 1514 1514 break; /* no use decoding partial data ATM, remove break when data can be used */ 1515 1515 case 1010: -
trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp
r8028 r8204 146 146 delete _out; 147 147 if ( Qt::CheckState(settings.value("rnxAppend").toInt()) == Qt::Checked) { 148 _out = new ofstream( _fileName.to Ascii().data(), ios_base::out | ios_base::app );148 _out = new ofstream( _fileName.toLatin1().data(), ios_base::out | ios_base::app ); 149 149 } 150 150 else { 151 _out = new ofstream( _fileName.to Ascii().data() );151 _out = new ofstream( _fileName.toLatin1().data() ); 152 152 } 153 153 } … … 560 560 561 561 if (alreadySet && different) { 562 emit newMessage("RTCM3coDecoder: Provider Changed: " + _staID.to Ascii(), true);562 emit newMessage("RTCM3coDecoder: Provider Changed: " + _staID.toLatin1(), true); 563 563 emit providerIDChanged(_staID); 564 564 } -
trunk/BNC/src/bncantex.cpp
r8078 r8204 75 75 itAnt.next(); 76 76 t_antMap* map = itAnt.value(); 77 cout << map->antName.to Ascii().data() << endl;77 cout << map->antName.toLatin1().data() << endl; 78 78 cout << " " << map->zen1 << " " << map->zen2 << " " << map->dZen << endl; 79 79 QMapIterator<t_frequency::type, t_frqMap*> itFrq(map->frqMap); -
trunk/BNC/src/bncclockrinex.cpp
r8084 r8204 48 48 double sec = fmod(GPSweeks, 60.0); 49 49 50 _out << "AS " << prn.to Ascii().data()51 << datTim.toString(" yyyy MM dd hh mm").to Ascii().data()50 _out << "AS " << prn.toLatin1().data() 51 << datTim.toString(" yyyy MM dd hh mm").toLatin1().data() 52 52 << fixed << setw(10) << setprecision(6) << sec 53 << " 1 " << fortranFormat(sp3Clk, 19, 12).to Ascii().data() << endl;53 << " 1 " << fortranFormat(sp3Clk, 19, 12).toLatin1().data() << endl; 54 54 55 55 return success; … … 69 69 70 70 _out << "BNC v" << BNCVERSION << " " 71 << datTim.toString("yyyyMMdd hhmmss").leftJustified(20, ' ', true).to Ascii().data()71 << datTim.toString("yyyyMMdd hhmmss").leftJustified(20, ' ', true).toLatin1().data() 72 72 << "PGM / RUN BY / DATE" << endl; 73 73 -
trunk/BNC/src/bncfigure.cpp
r7640 r8204 89 89 if (hlp.size() <= 1) continue; 90 90 QUrl url(hlp[0]); 91 QByteArray staID = url.path().mid(1).to Ascii();91 QByteArray staID = url.path().mid(1).toLatin1(); 92 92 _bytes[staID] = new sumAndMean(); 93 93 } -
trunk/BNC/src/bncfigurelate.cpp
r7182 r8204 76 76 if (hlp.size() <= 1) continue; 77 77 QUrl url(hlp[0]); 78 QByteArray staID = url.path().mid(1).to Ascii();78 QByteArray staID = url.path().mid(1).toLatin1(); 79 79 _latency[staID] = 0.0; 80 80 } -
trunk/BNC/src/bncnetquerys.cpp
r6787 r8204 79 79 QString hlp; 80 80 QStringList hlpL; 81 hlp = _url.host().to Ascii().replace("-"," ");81 hlp = _url.host().toLatin1().replace("-"," "); 82 82 hlpL = hlp.split(" "); 83 83 … … 191 191 _serialPort = 0; 192 192 _status = error; 193 emit newMessage(_url.path().to Ascii().replace(0,1,"") + ": Cannot open serial port " + _portString.toAscii(), true);193 emit newMessage(_url.path().toLatin1().replace(0,1,"") + ": Cannot open serial port " + _portString.toLatin1(), true); 194 194 return; 195 195 } -
trunk/BNC/src/bncnetqueryudp.cpp
r6787 r8204 124 124 // Send Request 125 125 // ------------ 126 QString uName = QUrl::fromPercentEncoding(_url.userName().to Ascii());127 QString passW = QUrl::fromPercentEncoding(_url.password().to Ascii());126 QString uName = QUrl::fromPercentEncoding(_url.userName().toLatin1()); 127 QString passW = QUrl::fromPercentEncoding(_url.password().toLatin1()); 128 128 QByteArray userAndPwd; 129 129 130 130 if(!uName.isEmpty() || !passW.isEmpty()) { 131 userAndPwd = "Authorization: Basic " + (uName.to Ascii() + ":" +132 passW.to Ascii()).toBase64() + "\r\n";131 userAndPwd = "Authorization: Basic " + (uName.toLatin1() + ":" + 132 passW.toLatin1()).toBase64() + "\r\n"; 133 133 } 134 134 135 QByteArray reqStr = "GET " + _url.path().to Ascii() + " HTTP/1.1\r\n"136 + "Host: " + _url.host().to Ascii() + "\r\n"135 QByteArray reqStr = "GET " + _url.path().toLatin1() + " HTTP/1.1\r\n" 136 + "Host: " + _url.host().toLatin1() + "\r\n" 137 137 + "Ntrip-Version: Ntrip/2.0\r\n" 138 138 + "User-Agent: NTRIP BNC/" BNCVERSION " (" BNC_OS ")\r\n"; -
trunk/BNC/src/bncnetqueryv0.cpp
r6787 r8204 67 67 _socket = 0; 68 68 _status = error; 69 emit newMessage(_url.path().to Ascii() + " read timeout", true);69 emit newMessage(_url.path().toLatin1() + " read timeout", true); 70 70 return; 71 71 } … … 102 102 _socket = 0; 103 103 _status = error; 104 emit(newMessage(_url.path().to Ascii().replace(0,1,"")104 emit(newMessage(_url.path().toLatin1().replace(0,1,"") 105 105 + ": Connect timeout, reconnecting", true)); 106 106 return; … … 115 115 _socket = 0; 116 116 _status = error; 117 emit newMessage(_url.path().to Ascii().replace(0,1,"")117 emit newMessage(_url.path().toLatin1().replace(0,1,"") 118 118 + ": Read timeout", true); 119 119 return; -
trunk/BNC/src/bncoutf.cpp
r7657 r8204 181 181 _out.setf(ios::showpoint | ios::fixed); 182 182 if (_append && QFile::exists(_fName)) { 183 _out.open(_fName.to Ascii().data(), ios::out | ios::app);183 _out.open(_fName.toLatin1().data(), ios::out | ios::app); 184 184 } 185 185 else { 186 _out.open(_fName.to Ascii().data());186 _out.open(_fName.toLatin1().data()); 187 187 writeHeader(datTim); 188 188 } … … 199 199 t_irc bncoutf::write(int GPSweek, double GPSweeks, const QString& str) { 200 200 reopen(GPSweek, GPSweeks); 201 _out << str.to Ascii().data();201 _out << str.toLatin1().data(); 202 202 _out.flush(); 203 203 return success; -
trunk/BNC/src/bncrawfile.cpp
r5846 r8204 115 115 .arg(QString(format)) 116 116 .arg(data.size()); 117 _outFile->write(chunkHeader.to Ascii());117 _outFile->write(chunkHeader.toLatin1()); 118 118 _outFile->write(data); 119 119 _outFile->flush(); … … 138 138 BNC_CORE->setDateAndTimeGPS(QDateTime(QDateTime::fromString(lst.value(0), Qt::ISODate))); 139 139 140 _staID = lst.value(1).to Ascii();141 _format = lst.value(2).to Ascii();140 _staID = lst.value(1).toLatin1(); 141 _format = lst.value(2).toLatin1(); 142 142 int nBytes = lst.value(3).toInt(); 143 143 -
trunk/BNC/src/bncsp3.cpp
r8084 r8204 32 32 _prevEpoch = 0; 33 33 34 _stream.open(fileName.to Ascii().data());34 _stream.open(fileName.toLatin1().data()); 35 35 if (!_stream.good()) { 36 36 throw "t_sp3File: cannot open file " + fileName; … … 87 87 } 88 88 89 _out << "P" << prn.to Ascii().data()89 _out << "P" << prn.toLatin1().data() 90 90 << setw(14) << setprecision(6) << xCoM(1) / 1000.0 91 91 << setw(14) << setprecision(6) << xCoM(2) / 1000.0 … … 126 126 } 127 127 128 _out << "#aP" << datTim.toString("yyyy MM dd hh mm").to Ascii().data()128 _out << "#aP" << datTim.toString("yyyy MM dd hh mm").toLatin1().data() 129 129 << setw(12) << setprecision(8) << sec 130 130 << " " << setw(7) << numEpo << " ORBIT IGS14 HLM IGS" << endl; -
trunk/BNC/src/combination/bnccomb.cpp
r8175 r8204 366 366 // -------------------- 367 367 if (_resTime.valid() && clkCorr._time <= _resTime) { 368 emit newMessage("bncComb: old correction: " + acName.to Ascii() + " " + prn.mid(0,3).toAscii(), true);368 emit newMessage("bncComb: old correction: " + acName.toLatin1() + " " + prn.mid(0,3).toLatin1(), true); 369 369 continue; 370 370 } … … 401 401 t_eph* ephPrev = _ephUser.ephPrev(prn); 402 402 if (ephLast == 0) { 403 emit newMessage("bncComb: eph not found " + prn.mid(0,3).to Ascii(), true);403 emit newMessage("bncComb: eph not found " + prn.mid(0,3).toLatin1(), true); 404 404 delete newCorr; 405 405 continue; … … 414 414 } 415 415 else { 416 emit newMessage("bncComb: eph not found " + prn.mid(0,3).to Ascii() +417 QString(" %1").arg(newCorr->_iod).to Ascii(), true);416 emit newMessage("bncComb: eph not found " + prn.mid(0,3).toLatin1() + 417 QString(" %1").arg(newCorr->_iod).toLatin1(), true); 418 418 delete newCorr; 419 419 continue; … … 469 469 + QString(" %1 -> %2 %3").arg(corr->_iod,3).arg(lastEph->IOD(),3).arg(dC*t_CST::c, 8, 'f', 4); 470 470 471 emit newMessage(msg.to Ascii(), false);471 emit newMessage(msg.toLatin1(), false); 472 472 473 473 corr->_iod = lastEph->IOD(); … … 507 507 } 508 508 } 509 out << AC->name.to Ascii().data() << ": " << AC->numObs << endl;509 out << AC->name.toLatin1().data() << ": " << AC->numObs << endl; 510 510 } 511 511 … … 531 531 if (AC->numObs > 0) { 532 532 out << "Switching Master AC " 533 << _masterOrbitAC.to Ascii().data() << " --> "534 << AC->name.to Ascii().data() << " "533 << _masterOrbitAC.toLatin1().data() << " --> " 534 << AC->name.toLatin1().data() << " " 535 535 << _resTime.datestr().c_str() << " " 536 536 << _resTime.timestr().c_str() << endl; … … 752 752 if (_antex->satCoMcorrection(corr->_prn, Mjd, xc.Rows(1,3), dx) != success) { 753 753 dx = 0; 754 _log += "antenna not found " + corr->_prn.mid(0,3).to Ascii() + '\n';754 _log += "antenna not found " + corr->_prn.mid(0,3).toLatin1() + '\n'; 755 755 } 756 756 } … … 777 777 " %10.5f INTERNAL", 778 778 messageType, updateInt, _resTime.gpsw(), _resTime.gpssec(), 779 corr->_prn.mid(0,3).to Ascii().data(),779 corr->_prn.mid(0,3).toLatin1().data(), 780 780 corr->_iod, 781 781 corr->_dClkResult * t_CST::c, … … 800 800 801 801 vector<string> errmsg; 802 _rtnetDecoder->Decode(outLines.to Ascii().data(), outLines.length(), errmsg);802 _rtnetDecoder->Decode(outLines.toLatin1().data(), outLines.length(), errmsg); 803 803 804 804 // Send new Corrections to PPP etc. … … 1169 1169 << _resTime.timestr().c_str() << " " 1170 1170 << "Orbit Outlier: " 1171 << corr->_acName.to Ascii().data() << " "1172 << prn.mid(0,3).to Ascii().data() << " "1171 << corr->_acName.toLatin1().data() << " " 1172 << prn.mid(0,3).toLatin1().data() << " " 1173 1173 << corr->_iod << " " 1174 1174 << norm << endl; … … 1203 1203 if (AC->mountPoint == mountPoint) { 1204 1204 acName = AC->name; 1205 out << "Provider ID changed: AC " << AC->name.to Ascii().data() << " "1205 out << "Provider ID changed: AC " << AC->name.toLatin1().data() << " " 1206 1206 << _resTime.datestr().c_str() << " " 1207 1207 << _resTime.timestr().c_str() << endl; -
trunk/BNC/src/ephemeris.cpp
r8187 r8204 176 176 177 177 if ( iLine == 0 ) { 178 QTextStream in(line.left(pos[1]).to Ascii());178 QTextStream in(line.left(pos[1]).toLatin1()); 179 179 int year, month, day, hour, min; 180 180 double sec; … … 512 512 513 513 if ( iLine == 0 ) { 514 QTextStream in(line.left(pos[1]).to Ascii());514 QTextStream in(line.left(pos[1]).toLatin1()); 515 515 516 516 int year, month, day, hour, min; … … 771 771 772 772 if ( iLine == 0 ) { 773 QTextStream in(line.left(pos[1]).to Ascii());773 QTextStream in(line.left(pos[1]).toLatin1()); 774 774 QString n; 775 775 in >> prnStr; … … 1159 1159 1160 1160 if ( iLine == 0 ) { 1161 QTextStream in(line.left(pos[1]).to Ascii());1161 QTextStream in(line.left(pos[1]).toLatin1()); 1162 1162 1163 1163 int year, month, day, hour, min; … … 1353 1353 1354 1354 if ( iLine == 0 ) { 1355 QTextStream in(line.left(pos[1]).to Ascii());1355 QTextStream in(line.left(pos[1]).toLatin1()); 1356 1356 1357 1357 int year, month, day, hour, min; -
trunk/BNC/src/latencychecker.cpp
r8156 r8204 178 178 _begTimeOut = _endDateTimeOut.toUTC().time().toString("hh:mm:ss"); 179 179 emit(newMessage((_staID + ": Failure threshold exceeded, outage since " 180 + _begDateOut + " " + _begTimeOut + " UTC").to Ascii(), true));180 + _begDateOut + " " + _begTimeOut + " UTC").toLatin1(), true)); 181 181 callScript(("Begin_Outage " 182 + _begDateOut + " " + _begTimeOut + " UTC").to Ascii());182 + _begDateOut + " " + _begTimeOut + " UTC").toLatin1()); 183 183 _decodeStop.setDate(QDate()); 184 184 _decodeStop.setTime(QTime()); … … 257 257 _begTimeCorr = _endDateTimeCorr.toUTC().time().toString("hh:mm:ss"); 258 258 emit(newMessage((_staID + ": Failure threshold exceeded, corrupted since " 259 + _begDateCorr + " " + _begTimeCorr + " UTC").to Ascii(), true));259 + _begDateCorr + " " + _begTimeCorr + " UTC").toLatin1(), true)); 260 260 callScript(("Begin_Corrupted " 261 + _begDateCorr + " " + _begTimeCorr + " UTC").to Ascii());261 + _begDateCorr + " " + _begTimeCorr + " UTC").toLatin1()); 262 262 _secSucc = 0; 263 263 _numSucc = 0; … … 277 277 _endTimeCorr = _begDateTimeCorr.toUTC().time().toString("hh:mm:ss"); 278 278 emit(newMessage((_staID + ": Recovery threshold exceeded, corruption ended " 279 + _endDateCorr + " " + _endTimeCorr + " UTC").to Ascii(), true));279 + _endDateCorr + " " + _endTimeCorr + " UTC").toLatin1(), true)); 280 280 callScript(("End_Corrupted " 281 281 + _endDateCorr + " " + _endTimeCorr + " UTC Begin was " 282 + _begDateCorr + " " + _begTimeCorr + " UTC").to Ascii());282 + _begDateCorr + " " + _begTimeCorr + " UTC").toLatin1()); 283 283 _decodeStartCorr.setDate(QDate()); 284 284 _decodeStartCorr.setTime(QTime()); … … 305 305 _endTimeOut = _begDateTimeOut.toUTC().time().toString("hh:mm:ss"); 306 306 emit(newMessage((_staID + ": Recovery threshold exceeded, outage ended " 307 + _endDateOut + " " + _endTimeOut + " UTC").to Ascii(), true));307 + _endDateOut + " " + _endTimeOut + " UTC").toLatin1(), true)); 308 308 callScript(("End_Outage " 309 309 + _endDateOut + " " + _endTimeOut + " UTC Begin was " 310 + _begDateOut + " " + _begTimeOut + " UTC").to Ascii());310 + _begDateOut + " " + _begTimeOut + " UTC").toLatin1()); 311 311 _decodeStart.setDate(QDate()); 312 312 _decodeStart.setTime(QTime()); … … 341 341 .arg(l._numLat) 342 342 .arg(l._numGaps) 343 .to Ascii(), true) );343 .toLatin1(), true) ); 344 344 } 345 345 } else { … … 353 353 .arg(int((sqrt((l._sumLatQ - l._sumLat * l._sumLat / l._numLat)/l._numLat))*100)/100.) 354 354 .arg(l._numLat) 355 .to Ascii(), true) );355 .toLatin1(), true) ); 356 356 } 357 357 } … … 466 466 .arg(l._numGaps); 467 467 if ( _checkMountPoint == _staID || _checkMountPoint == "ALL" ) { 468 emit(newMessage(QString(_staID + late ).to Ascii(), true) );468 emit(newMessage(QString(_staID + late ).toLatin1(), true) ); 469 469 } 470 470 } … … 478 478 .arg(l._numLat); 479 479 if ( _checkMountPoint == _staID || _checkMountPoint == "ALL" ) { 480 emit(newMessage(QString(_staID + late ).to Ascii(), true) );480 emit(newMessage(QString(_staID + late ).toLatin1(), true) ); 481 481 } 482 482 } -
trunk/BNC/src/orbComp/sp3Comp.cpp
r7942 r8204 423 423 QStringListIterator it(_excludeSats); 424 424 while (it.hasNext()) { 425 string prnStr = it.next().to Ascii().data();425 string prnStr = it.next().toLatin1().data(); 426 426 if (prnStr == prn.toString() || prnStr == prn.toString().substr(0,1)) { 427 427 return true; -
trunk/BNC/src/pppModel.cpp
r7996 r8204 295 295 296 296 line = line.trimmed(); 297 QTextStream inLine(line.to Ascii(), QIODevice::ReadOnly);297 QTextStream inLine(line.toLatin1(), QIODevice::ReadOnly); 298 298 299 299 switch (row) { -
trunk/BNC/src/pppRun.cpp
r7972 r8204 375 375 _nmeaFile->write(output._epoTime.gpsw(), output._epoTime.gpssec(), ggaStr); 376 376 } 377 emit newNMEAstr(staID, rmcStr.to Ascii());378 emit newNMEAstr(staID, ggaStr.to Ascii());377 emit newNMEAstr(staID, rmcStr.toLatin1()); 378 emit newNMEAstr(staID, ggaStr.toLatin1()); 379 379 if (_snxtroFile && output._epoTime.valid()) { 380 380 _snxtroFile->write(staID, int(output._epoTime.gpsw()), output._epoTime.gpssec(), … … 676 676 unsigned char XOR = 0; 677 677 for (int ii = 0; ii < nmStr.length(); ii++) { 678 XOR ^= (unsigned char) nmStr[ii].to Ascii();678 XOR ^= (unsigned char) nmStr[ii].toLatin1(); 679 679 } 680 680 … … 692 692 693 693 QString msg = "pppRun " + QString(_opt->_roverName.c_str()) + ": Provider Changed: " + mountPoint; 694 emit newMessage(msg.to Ascii(), true);694 emit newMessage(msg.toLatin1(), true); 695 695 696 696 _pppClient->reset(); -
trunk/BNC/src/rinex/corrfile.cpp
r7039 r8204 50 50 t_corrFile::t_corrFile(QString fileName) { 51 51 expandEnvVar(fileName); 52 _stream.open(fileName.to Ascii().data());52 _stream.open(fileName.toLatin1().data()); 53 53 } 54 54 -
trunk/BNC/src/rinex/reqcanalyze.cpp
r8148 r8204 157 157 QStringList input = signalsOpt.at(ii).split(QRegExp("[:&]"), QString::SkipEmptyParts); 158 158 if (input.size() > 1 && input[0].length() == 1) { 159 char system = input[0].to Ascii().constData()[0];159 char system = input[0].toLatin1().constData()[0]; 160 160 QStringList sysValid = _defaultSignalTypes.filter(QString(system)); 161 161 QStringList defaultSignals = sysValid.at(0).split(QRegExp("[:&]")); … … 400 400 if (_signalTypes.find(sys) != _signalTypes.end()) { 401 401 frqType1.push_back(sys); 402 frqType1.push_back(_signalTypes[sys][0][0].to Ascii());402 frqType1.push_back(_signalTypes[sys][0][0].toLatin1()); 403 403 frqType2.push_back(sys); 404 frqType2.push_back(_signalTypes[sys][1][0].to Ascii());404 frqType2.push_back(_signalTypes[sys][1][0].toLatin1()); 405 405 if (frqObs->_rnxType2ch[0] == frqType1[1]) { 406 406 fA = t_frequency::toInt(frqType1); … … 612 612 if (BNC_CORE->GUIenabled()) { 613 613 QFileInfo fileInfo(obsFile->fileName()); 614 QByteArray title = fileInfo.fileName().to Ascii();614 QByteArray title = fileInfo.fileName().toLatin1(); 615 615 emit dspSkyPlot(obsFile->fileName(), mp1Title, dataMP1, mp2Title, dataMP2, "Meters", 2.0); 616 616 emit dspSkyPlot(obsFile->fileName(), sn1Title, dataSNR1, sn2Title, dataSNR2, "dbHz", 54.0); … … 725 725 } 726 726 727 char frqChar1 = _signalTypes[prn.system()][0][0].to Ascii();728 char frqChar2 = _signalTypes[prn.system()][1][0].to Ascii();727 char frqChar1 = _signalTypes[prn.system()][0][0].toLatin1(); 728 char frqChar2 = _signalTypes[prn.system()][1][0].toLatin1(); 729 729 730 730 QString frqType1; -
trunk/BNC/src/rinex/reqcedit.cpp
r8168 r8204 70 70 } 71 71 _samplingRate = settings.value("reqcSampling").toInt(); 72 _begTime = bncTime(settings.value("reqcStartDateTime").toString().to Ascii().data());73 _endTime = bncTime(settings.value("reqcEndDateTime").toString().to Ascii().data());72 _begTime = bncTime(settings.value("reqcStartDateTime").toString().toLatin1().data()); 73 _endTime = bncTime(settings.value("reqcEndDateTime").toString().toLatin1().data()); 74 74 75 75 } … … 183 183 delete rnxObsFile; 184 184 if (log) { 185 *log << "Error in rnxObsFile " << filePath.to Ascii().data() << endl;185 *log << "Error in rnxObsFile " << filePath.toLatin1().data() << endl; 186 186 } 187 187 } … … 196 196 catch (...) { 197 197 if (log) { 198 *log << "Error in rnxObsFile " << fileName.to Ascii().data() << endl;198 *log << "Error in rnxObsFile " << fileName.toLatin1().data() << endl; 199 199 } 200 200 } … … 668 668 669 669 for(int ii = 0; ii < obsFile->numSys(); ii++) { 670 char sys = systems[ii].to Ascii();670 char sys = systems[ii].toLatin1(); 671 671 txtMap.insert(commentKey, comment); 672 672 QMap <char, QString> signalPriorityMap; … … 675 675 for (int jj = 0; jj < types.size(); jj++) { 676 676 QString inType = types[jj]; 677 char band = inType[1].to Ascii();677 char band = inType[1].toLatin1(); 678 678 for (int ii = 0; ii < preferredAttribListSys.size(); ii++) { 679 679 QString preferredAttrib; -
trunk/BNC/src/rinex/rnxnavfile.cpp
r8168 r8204 74 74 } 75 75 else if (key == "RINEX VERSION / TYPE") { 76 QTextStream in(value.to Ascii(), QIODevice::ReadOnly);76 QTextStream in(value.toLatin1(), QIODevice::ReadOnly); 77 77 in >> _version; 78 78 if (value.indexOf("GLONASS") != -1) { -
trunk/BNC/src/rinex/rnxobsfile.cpp
r8168 r8204 92 92 } 93 93 else if (key == "RINEX VERSION / TYPE") { 94 QTextStream in(value.to Ascii(), QIODevice::ReadOnly);94 QTextStream in(value.toLatin1(), QIODevice::ReadOnly); 95 95 in >> _version; 96 96 } … … 118 118 } 119 119 else if (key == "INTERVAL") { 120 QTextStream in(value.to Ascii(), QIODevice::ReadOnly);120 QTextStream in(value.toLatin1(), QIODevice::ReadOnly); 121 121 in >> _interval; 122 122 } … … 125 125 } 126 126 else if (key == "WAVELENGTH FACT L1/2") { 127 QTextStream in(value.to Ascii(), QIODevice::ReadOnly);127 QTextStream in(value.toLatin1(), QIODevice::ReadOnly); 128 128 int wlFactL1 = 0; 129 129 int wlFactL2 = 0; … … 149 149 } 150 150 else if (key == "APPROX POSITION XYZ") { 151 QTextStream in(value.to Ascii(), QIODevice::ReadOnly);151 QTextStream in(value.toLatin1(), QIODevice::ReadOnly); 152 152 in >> _xyz[0] >> _xyz[1] >> _xyz[2]; 153 153 } 154 154 else if (key == "ANTENNA: DELTA H/E/N") { 155 QTextStream in(value.to Ascii(), QIODevice::ReadOnly);155 QTextStream in(value.toLatin1(), QIODevice::ReadOnly); 156 156 in >> _antNEU[2] >> _antNEU[1] >> _antNEU[0]; 157 157 } 158 158 else if (key == "ANTENNA: DELTA X/Y/Z") { 159 QTextStream in(value.to Ascii(), QIODevice::ReadOnly);159 QTextStream in(value.toLatin1(), QIODevice::ReadOnly); 160 160 in >> _antXYZ[0] >> _antXYZ[1] >> _antXYZ[2]; 161 161 } 162 162 else if (key == "ANTENNA: B.SIGHT XYZ") { 163 QTextStream in(value.to Ascii(), QIODevice::ReadOnly);163 QTextStream in(value.toLatin1(), QIODevice::ReadOnly); 164 164 in >> _antBSG[0] >> _antBSG[1] >> _antBSG[2]; 165 165 } … … 168 168 _version = defaultRnxObsVersion2; 169 169 } 170 QTextStream* in = new QTextStream(value.to Ascii(), QIODevice::ReadOnly);170 QTextStream* in = new QTextStream(value.toLatin1(), QIODevice::ReadOnly); 171 171 int nTypes; 172 172 *in >> nTypes; 173 char sys0 = _usedSystems[0].to Ascii();173 char sys0 = _usedSystems[0].toLatin1(); 174 174 _obsTypes[sys0].clear(); 175 175 for (int ii = 0; ii < nTypes; ii++) { … … 177 177 line = stream->readLine(); ++numLines; 178 178 delete in; 179 in = new QTextStream(line.left(60).to Ascii(), QIODevice::ReadOnly);179 in = new QTextStream(line.left(60).toLatin1(), QIODevice::ReadOnly); 180 180 } 181 181 QString hlp; … … 184 184 } 185 185 for (int ii = 1; ii < _usedSystems.length(); ii++) { 186 char sysI = _usedSystems[ii].to Ascii();186 char sysI = _usedSystems[ii].toLatin1(); 187 187 _obsTypes[sysI] = _obsTypes[sys0]; 188 188 } … … 192 192 _version = defaultRnxObsVersion3; 193 193 } 194 QTextStream* in = new QTextStream(value.to Ascii(), QIODevice::ReadOnly);194 QTextStream* in = new QTextStream(value.toLatin1(), QIODevice::ReadOnly); 195 195 char sys; 196 196 int nTypes; … … 201 201 line = stream->readLine(); ++numLines; 202 202 delete in; 203 in = new QTextStream(line.to Ascii(), QIODevice::ReadOnly);203 in = new QTextStream(line.toLatin1(), QIODevice::ReadOnly); 204 204 } 205 205 QString hlp; … … 213 213 } 214 214 else if (key == "TIME OF FIRST OBS") { 215 QTextStream in(value.to Ascii(), QIODevice::ReadOnly);215 QTextStream in(value.toLatin1(), QIODevice::ReadOnly); 216 216 int year, month, day, hour, min; 217 217 double sec; … … 220 220 } 221 221 else if (key == "SYS / PHASE SHIFT"){ 222 QTextStream* in = new QTextStream(value.to Ascii(), QIODevice::ReadOnly);222 QTextStream* in = new QTextStream(value.toLatin1(), QIODevice::ReadOnly); 223 223 char sys; 224 224 QString obstype; … … 233 233 line = stream->readLine(); ++numLines; 234 234 delete in; 235 in = new QTextStream(line.left(60).to Ascii(), QIODevice::ReadOnly);235 in = new QTextStream(line.left(60).toLatin1(), QIODevice::ReadOnly); 236 236 } 237 237 *in >> sat; … … 243 243 } 244 244 else if (key == "GLONASS COD/PHS/BIS"){ 245 QTextStream in(value.to Ascii(), QIODevice::ReadOnly);245 QTextStream in(value.toLatin1(), QIODevice::ReadOnly); 246 246 for (int ii = 0; ii < 4; ii++) { 247 247 QString type; … … 253 253 } 254 254 else if (key == "GLONASS SLOT / FRQ #") { 255 QTextStream* in = new QTextStream(value.to Ascii(), QIODevice::ReadOnly);255 QTextStream* in = new QTextStream(value.toLatin1(), QIODevice::ReadOnly); 256 256 int nSlots = 0; 257 257 *in >> nSlots; … … 260 260 line = stream->readLine(); ++numLines; 261 261 delete in; 262 in = new QTextStream(line.left(60).to Ascii(), QIODevice::ReadOnly);262 in = new QTextStream(line.left(60).toLatin1(), QIODevice::ReadOnly); 263 263 } 264 264 QString sat; … … 457 457 QString type = header.obsType(sys, iType, _version); 458 458 for (int jSys = 0; jSys < _usedSystems.length(); jSys++) { 459 char thisSys = _usedSystems[jSys].to Ascii();459 char thisSys = _usedSystems[jSys].toLatin1(); 460 460 if (!_obsTypes[thisSys].contains(type)) { 461 461 _obsTypes[thisSys].push_back(type); … … 473 473 if (hlp.size() == 2 && hlp[0].length() == 1) { 474 474 if (_version >= 3.0) { 475 char sys = hlp[0][0].to Ascii();475 char sys = hlp[0][0].toLatin1(); 476 476 QString type = t_rnxObsFile::type2to3(sys, hlp[1]); 477 477 if (!_obsTypes[sys].contains(type)) { … … 481 481 else { 482 482 for (int iSys = 0; iSys < _usedSystems.length(); iSys++) { 483 char sys = _usedSystems[iSys].to Ascii();483 char sys = _usedSystems[iSys].toLatin1(); 484 484 QString type = t_rnxObsFile::type3to2(sys, hlp[1]); 485 485 if (!_obsTypes[sys].contains(type)) { … … 492 492 else { 493 493 for (int iSys = 0; iSys < _usedSystems.length(); iSys++) { 494 char sys = _usedSystems[iSys].to Ascii();494 char sys = _usedSystems[iSys].toLatin1(); 495 495 QString type = _version >= 3.0 ? t_rnxObsFile::type2to3(sys, useObsTypes->at(iType)) : 496 496 t_rnxObsFile::type3to2(sys, useObsTypes->at(iType)); … … 936 936 QStringList strList; 937 937 if (_version < 3.0) { 938 char sys0 = _usedSystems[0].to Ascii();938 char sys0 = _usedSystems[0].toLatin1(); 939 939 QString hlp; 940 940 QTextStream(&hlp) << QString("%1").arg(_obsTypes[sys0].size(), 6); … … 1131 1131 } 1132 1132 1133 QTextStream in(line.mid(1).to Ascii(), QIODevice::ReadOnly);1133 QTextStream in(line.mid(1).toLatin1(), QIODevice::ReadOnly); 1134 1134 1135 1135 // Epoch Time … … 1151 1151 for (int iSat = 0; iSat < numSat; iSat++) { 1152 1152 line = _stream->readLine(); 1153 t_prn prn; prn.set(line.left(3).to Ascii().data());1153 t_prn prn; prn.set(line.left(3).toLatin1().data()); 1154 1154 _currEpo.rnxSat[iSat].prn = prn; 1155 1155 char sys = prn.system(); … … 1202 1202 } 1203 1203 1204 QTextStream in(line.to Ascii(), QIODevice::ReadOnly);1204 QTextStream in(line.toLatin1(), QIODevice::ReadOnly); 1205 1205 1206 1206 // Epoch Time … … 1233 1233 } 1234 1234 1235 char sys = line.to Ascii()[pos];1235 char sys = line.toLatin1()[pos]; 1236 1236 if (sys == ' ') { 1237 1237 sys = 'G'; … … 1512 1512 void t_rnxObsFile::setObsFromRnx(const t_rnxObsFile* rnxObsFile, const t_rnxObsFile::t_rnxEpo* epo, 1513 1513 const t_rnxObsFile::t_rnxSat& rnxSat, t_satObs& obs) { 1514 obs._staID = rnxObsFile->markerName().to Ascii().constData();1514 obs._staID = rnxObsFile->markerName().toLatin1().constData(); 1515 1515 obs._prn = rnxSat.prn; 1516 1516 obs._time = epo->tt; … … 1539 1539 const t_rnxObs& rnxObs = rnxSat.obs[type]; 1540 1540 if (rnxObs.value != 0.0) { 1541 string type2ch(typeV3.mid(1).to Ascii().data());1541 string type2ch(typeV3.mid(1).toLatin1().data()); 1542 1542 1543 1543 t_frqObs* frqObs = 0; … … 1554 1554 } 1555 1555 1556 switch( typeV3.to Ascii().data()[0] ) {1556 switch( typeV3.toLatin1().data()[0] ) { 1557 1557 case 'C': 1558 1558 frqObs->_codeValid = true; -
trunk/BNC/src/serial/win_qextserialport.cpp
r6788 r8204 151 151 if (!isOpen()) { 152 152 /*open the port*/ 153 Win_Handle=CreateFileA(port.to Ascii(), GENERIC_READ|GENERIC_WRITE,153 Win_Handle=CreateFileA(port.toLatin1(), GENERIC_READ|GENERIC_WRITE, 154 154 FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL); 155 155 if (Win_Handle!=INVALID_HANDLE_VALUE) { -
trunk/BNC/src/upload/bncrtnetuploadcaster.cpp
r8145 r8204 280 280 // Read first line (with epoch time) 281 281 // --------------------------------- 282 QTextStream in(lines[0].to Ascii());282 QTextStream in(lines[0].toLatin1()); 283 283 QString hlp; 284 284 int year, month, day, hour, min; … … 291 291 "bncRtnetUploadCaster: decode " + QByteArray(epoTime.datestr().c_str()) 292 292 + " " + QByteArray(epoTime.timestr().c_str()) + " " 293 + _casterID.to Ascii(), false));293 + _casterID.toLatin1(), false)); 294 294 295 295 struct ClockOrbit co; … … 369 369 t_prn prn; 370 370 371 QTextStream in(lines[ii].to Ascii());371 QTextStream in(lines[ii].toLatin1()); 372 372 373 373 in >> key; … … 401 401 } 402 402 // satellite specific parameters 403 char sys = key.mid(0, 1).at(0).to Ascii();403 char sys = key.mid(0, 1).at(0).toLatin1(); 404 404 int number = key.mid(1, 2).toInt(); 405 405 int flags = 0; -
trunk/BNC/src/upload/bncuploadcaster.cpp
r8153 r8204 90 90 _outSocket->write(_outBuffer); 91 91 _outSocket->flush(); 92 emit newBytes(_mountpoint.to Ascii(), _outBuffer.size());92 emit newBytes(_mountpoint.toLatin1(), _outBuffer.size()); 93 93 } 94 94 } … … 140 140 delete _outSocket; 141 141 _outSocket = 0; 142 emit(newMessage("Broadcaster: Connect timeout for " + _mountpoint.to Ascii(), true));142 emit(newMessage("Broadcaster: Connect timeout for " + _mountpoint.toLatin1(), true)); 143 143 return; 144 144 } 145 145 146 QByteArray msg = "SOURCE " + _password.to Ascii() + " /" +147 _mountpoint.to Ascii() + "\r\n" +146 QByteArray msg = "SOURCE " + _password.toLatin1() + " /" + 147 _mountpoint.toLatin1() + "\r\n" + 148 148 "Source-Agent: NTRIP BNC/" BNCVERSION "\r\n\r\n"; 149 149 … … 157 157 delete _outSocket; 158 158 _outSocket = 0; 159 emit(newMessage("Broadcaster: Connection broken for " + _mountpoint.to Ascii(), true));159 emit(newMessage("Broadcaster: Connection broken for " + _mountpoint.toLatin1(), true)); 160 160 } 161 161 else { 162 emit(newMessage("Broadcaster: Connection opened for " + _mountpoint.to Ascii(), true));162 emit(newMessage("Broadcaster: Connection opened for " + _mountpoint.toLatin1(), true)); 163 163 _sOpenTrial = 0; 164 164 }
Note:
See TracChangeset
for help on using the changeset viewer.