Changeset 8127 in ntrip for trunk/BNC/src/bnccore.cpp
- Timestamp:
- May 10, 2017, 3:20:54 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bnccore.cpp
r7999 r8127 170 170 expandEnvVar(logFileName); 171 171 _logFile = new QFile(logFileName + "_" + 172 currDate.toString("yyMMdd").to Ascii().data());172 currDate.toString("yyMMdd").toLatin1().data()); 173 173 _fileDate = currDate; 174 174 if ( Qt::CheckState(settings.value("rnxAppend").toInt()) == Qt::Checked) { … … 189 189 msgLocal = msg.mid(1); 190 190 } 191 *_logStream << currentDateAndTimeGPS().toString("yy-MM-dd hh:mm:ss ").to Ascii().data();191 *_logStream << currentDateAndTimeGPS().toString("yy-MM-dd hh:mm:ss ").toLatin1().data(); 192 192 *_logStream << msgLocal.data() << endl; 193 193 _logStream->flush(); … … 202 202 t_irc ircPut = _ephUser.putNewEph(eph, true); 203 203 if (eph->checkState() == t_eph::bad) { 204 messagePrivate("WRONG EPHEMERIS\n" + eph->toString(3.0).to Ascii());204 messagePrivate("WRONG EPHEMERIS\n" + eph->toString(3.0).toLatin1()); 205 205 return failure; 206 206 } 207 207 else if (eph->checkState() == t_eph::outdated) { 208 messagePrivate("OUTDATED EPHEMERIS\n" + eph->toString(3.0).to Ascii());208 messagePrivate("OUTDATED EPHEMERIS\n" + eph->toString(3.0).toLatin1()); 209 209 return failure; 210 210 } … … 270 270 comments.append("Source: " + decoder + 271 271 " " + url.encodedHost() + 272 "/" + url.path().mid(1).to Ascii());272 "/" + url.path().mid(1).toLatin1()); 273 273 } 274 274 … … 388 388 line.sprintf( 389 389 "%9.2f%11sN: GNSS NAV DATA M: Mixed%12sRINEX VERSION / TYPE\n", 390 t_rnxNavFile::defaultRnxNavVersion3, "", "");390 defaultRnxNavVersion3, "", ""); 391 391 *_ephStreamGPS << line; 392 392 393 393 QString hlp = currentDateAndTimeGPS().toString("yyyyMMdd hhmmss UTC").leftJustified(20, ' ', true); 394 *_ephStreamGPS << _pgmName.to Ascii().data()395 << _userName.to Ascii().data()396 << hlp.to Ascii().data()394 *_ephStreamGPS << _pgmName.toLatin1().data() 395 << _userName.toLatin1().data() 396 << hlp.toLatin1().data() 397 397 << "PGM / RUN BY / DATE" << endl; 398 398 … … 415 415 QString line; 416 416 line.sprintf("%9.2f%11sN: GPS NAV DATA%25sRINEX VERSION / TYPE\n", 417 t_rnxNavFile::defaultRnxNavVersion2, "", "");417 defaultRnxNavVersion2, "", ""); 418 418 *_ephStreamGPS << line; 419 419 420 420 QString hlp = currentDateAndTimeGPS().date().toString("dd-MMM-yyyy").leftJustified(20, ' ', true); 421 *_ephStreamGPS << _pgmName.to Ascii().data()422 << _userName.to Ascii().data()423 << hlp.to Ascii().data()421 *_ephStreamGPS << _pgmName.toLatin1().data() 422 << _userName.toLatin1().data() 423 << hlp.toLatin1().data() 424 424 << "PGM / RUN BY / DATE" << endl; 425 425 … … 437 437 QString line; 438 438 line.sprintf("%9.2f%11sG: GLONASS NAV DATA%21sRINEX VERSION / TYPE\n", 439 t_rnxNavFile::defaultRnxNavVersion2, "", "");439 defaultRnxNavVersion2, "", ""); 440 440 *_ephStreamGlonass << line; 441 441 442 442 QString hlp = currentDateAndTimeGPS().date().toString("dd-MMM-yyyy").leftJustified(20, ' ', true); 443 *_ephStreamGlonass << _pgmName.to Ascii().data()444 << _userName.to Ascii().data()445 << hlp.to Ascii().data()443 *_ephStreamGlonass << _pgmName.toLatin1().data() 444 << _userName.toLatin1().data() 445 << hlp.toLatin1().data() 446 446 << "PGM / RUN BY / DATE" << endl; 447 447 … … 464 464 void t_bncCore::printEph(const t_eph& eph, bool printFile) { 465 465 466 QString strV2 = eph.toString( t_rnxNavFile::defaultRnxNavVersion2);467 QString strV3 = eph.toString( t_rnxObsHeader::defaultRnxObsVersion3);466 QString strV2 = eph.toString(defaultRnxNavVersion2); 467 QString strV3 = eph.toString(defaultRnxObsVersion3); 468 468 469 469 if (_rinexVers == 2 && eph.type() == t_eph::GLONASS) { … … 487 487 if (printFile && stream) { 488 488 if (_rinexVers == 2) { 489 *stream << strV2.to Ascii();489 *stream << strV2.toLatin1(); 490 490 } 491 491 else { 492 *stream << strV3.to Ascii();492 *stream << strV3.toLatin1(); 493 493 } 494 494 stream->flush(); … … 502 502 QTcpSocket* sock = is.next(); 503 503 if (sock->state() == QAbstractSocket::ConnectedState) { 504 if (sock->write(strV3.to Ascii()) == -1) {504 if (sock->write(strV3.toLatin1()) == -1) { 505 505 delete sock; 506 506 is.remove();
Note:
See TracChangeset
for help on using the changeset viewer.