Changeset 8204 in ntrip for trunk/BNC/src/rinex
- Timestamp:
- Dec 11, 2017, 3:00:40 PM (7 years ago)
- Location:
- trunk/BNC/src/rinex
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
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;
Note:
See TracChangeset
for help on using the changeset viewer.