Changeset 8204 in ntrip


Ignore:
Timestamp:
Dec 11, 2017, 3:00:40 PM (6 years ago)
Author:
wiese
Message:

CHANGE: #105 toAscii deprecated

Location:
trunk/BNC/src
Files:
28 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP_SSR_I/pppFilter.cpp

    r7974 r8204  
    648648      ++par->numEpo;
    649649      LOG << "\n" << _time.datestr() << "_" << _time.timestr(3)
    650           << " AMB " << par->prn.mid(0,3).toAscii().data() << " "
     650          << " AMB " << par->prn.mid(0,3).toLatin1().data() << " "
    651651          << setw(10) << setprecision(3) << par->xx
    652652          << " +- " << setw(6) << setprecision(3)
     
    657657      double aprTrp = delay_saast(M_PI/2.0);
    658658      LOG << "\n" << _time.datestr() << "_" << _time.timestr(3)
    659           << " TRP     " << par->prn.mid(0,3).toAscii().data()
     659          << " TRP     " << par->prn.mid(0,3).toLatin1().data()
    660660          << setw(7) << setprecision(3) << aprTrp << " "
    661661          << setw(6) << setprecision(3) << showpos << par->xx << noshowpos
     
    757757  if      (iPhase == 1) {
    758758    if      (maxResGlo > 2.98 * OPT->_maxResL1) {
    759       LOG << "Outlier Phase " << prnGlo.mid(0,3).toAscii().data() << ' ' << maxResGlo << endl;
     759      LOG << "Outlier Phase " << prnGlo.mid(0,3).toLatin1().data() << ' ' << maxResGlo << endl;
    760760      return prnGlo;
    761761    }
    762762    else if (maxResGPS > MAXRES_PHASE_GPS) {
    763       LOG << "Outlier Phase " << prnGPS.mid(0,3).toAscii().data() << ' ' << maxResGPS << endl;
     763      LOG << "Outlier Phase " << prnGPS.mid(0,3).toLatin1().data() << ' ' << maxResGPS << endl;
    764764      return prnGPS;
    765765    }
    766766  }
    767767  else if (iPhase == 0 && maxResGPS > 2.98 * OPT->_maxResC1) {
    768     LOG << "Outlier Code  " << prnGPS.mid(0,3).toAscii().data() << ' ' << maxResGPS << endl;
     768    LOG << "Outlier Code  " << prnGPS.mid(0,3).toLatin1().data() << ' ' << maxResGPS << endl;
    769769    return prnGPS;
    770770  }
     
    967967    if (satData->obsIndex != 0 && useObs) {
    968968      str << _time.datestr() << "_" << _time.timestr(3)
    969           << " RES " << satData->prn.mid(0,3).toAscii().data()
     969          << " RES " << satData->prn.mid(0,3).toLatin1().data()
    970970          << (iPhase ? "   L3 " : "   P3 ")
    971971          << setw(9) << setprecision(4) << vv(satData->obsIndex) << endl;
     
    11321132            LOG << "Neglected PRNs: ";
    11331133            if (!_outlierGPS.isEmpty()) {
    1134               LOG << _outlierGPS.last().mid(0,3).toAscii().data() << ' ';
     1134              LOG << _outlierGPS.last().mid(0,3).toLatin1().data() << ' ';
    11351135            }
    11361136            QStringListIterator itGlo(_outlierGlo);
    11371137            while (itGlo.hasNext()) {
    11381138              QString prn = itGlo.next();
    1139               LOG << prn.mid(0,3).toAscii().data() << ' ';
     1139              LOG << prn.mid(0,3).toLatin1().data() << ' ';
    11401140            }
    11411141            LOG << endl;
  • trunk/BNC/src/RTCM/RTCM2Decoder.cpp

    r8025 r8204  
    424424
    425425      errmsg.push_back(
    426           "missing eph for " + string(prn.toAscii().data()) + " , IODs "
     426          "missing eph for " + string(prn.toLatin1().data()) + " , IODs "
    427427              + missingIODstr.str());
    428428    }
  • trunk/BNC/src/RTCM3/RTCM3Decoder.cpp

    r8199 r8204  
    824824  else if ((type % 10) < 3) {
    825825    emit(newMessage(QString("%1: Block %2 contain partial data! Ignored!")
    826         .arg(_staID).arg(type).toAscii(), true));
     826        .arg(_staID).arg(type).toLatin1(), true));
    827827  }
    828828  if (!syncf) {
     
    14821482       * else. */
    14831483      if ((id >= 1057 && id <= 1068) || (id >= 1240 && id <= 1270)) {
    1484         if (!_coDecoders.contains(_staID.toAscii()))
    1485           _coDecoders[_staID.toAscii()] = new RTCM3coDecoder(_staID);
    1486         RTCM3coDecoder* coDecoder = _coDecoders[_staID.toAscii()];
     1484        if (!_coDecoders.contains(_staID.toLatin1()))
     1485          _coDecoders[_staID.toLatin1()] = new RTCM3coDecoder(_staID);
     1486        RTCM3coDecoder* coDecoder = _coDecoders[_staID.toLatin1()];
    14871487        if (coDecoder->Decode(reinterpret_cast<char *>(_Message), _BlockSize,
    14881488            errmsg) == success) {
     
    15001500            emit(newMessage(
    15011501                QString("%1: Block %2 contain partial data! Ignored!")
    1502                     .arg(_staID).arg(id).toAscii(), true));
     1502                    .arg(_staID).arg(id).toLatin1(), true));
    15031503            break; /* no use decoding partial data ATM, remove break when data can be used */
    15041504          case 1002:
     
    15111511            emit(newMessage(
    15121512                QString("%1: Block %2 contain partial data! Ignored!")
    1513                     .arg(_staID).arg(id).toAscii(), true));
     1513                    .arg(_staID).arg(id).toLatin1(), true));
    15141514            break; /* no use decoding partial data ATM, remove break when data can be used */
    15151515          case 1010:
  • trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp

    r8028 r8204  
    146146    delete _out;
    147147    if ( Qt::CheckState(settings.value("rnxAppend").toInt()) == Qt::Checked) {
    148       _out = new ofstream( _fileName.toAscii().data(), ios_base::out | ios_base::app );
     148      _out = new ofstream( _fileName.toLatin1().data(), ios_base::out | ios_base::app );
    149149    }
    150150    else {
    151       _out = new ofstream( _fileName.toAscii().data() );
     151      _out = new ofstream( _fileName.toLatin1().data() );
    152152    }
    153153  }
     
    560560
    561561  if (alreadySet && different) {
    562     emit newMessage("RTCM3coDecoder: Provider Changed: " + _staID.toAscii(), true);
     562    emit newMessage("RTCM3coDecoder: Provider Changed: " + _staID.toLatin1(), true);
    563563    emit providerIDChanged(_staID);
    564564  }
  • trunk/BNC/src/bncantex.cpp

    r8078 r8204  
    7575    itAnt.next();
    7676    t_antMap* map = itAnt.value();
    77     cout << map->antName.toAscii().data() << endl;
     77    cout << map->antName.toLatin1().data() << endl;
    7878    cout << "    " << map->zen1 << " " << map->zen2 << " " << map->dZen << endl;
    7979    QMapIterator<t_frequency::type, t_frqMap*> itFrq(map->frqMap);
  • trunk/BNC/src/bncclockrinex.cpp

    r8084 r8204  
    4848      double sec = fmod(GPSweeks, 60.0);
    4949
    50       _out << "AS " << prn.toAscii().data()
    51            << datTim.toString("  yyyy MM dd hh mm").toAscii().data()
     50      _out << "AS " << prn.toLatin1().data()
     51           << datTim.toString("  yyyy MM dd hh mm").toLatin1().data()
    5252           << fixed      << setw(10) << setprecision(6)  << sec
    53            << "  1   "   << fortranFormat(sp3Clk, 19, 12).toAscii().data() << endl;
     53           << "  1   "   << fortranFormat(sp3Clk, 19, 12).toLatin1().data() << endl;
    5454
    5555    return success;
     
    6969
    7070  _out << "BNC v" << BNCVERSION     << "                               "
    71        << datTim.toString("yyyyMMdd hhmmss").leftJustified(20, ' ', true).toAscii().data()
     71       << datTim.toString("yyyyMMdd hhmmss").leftJustified(20, ' ', true).toLatin1().data()
    7272       << "PGM / RUN BY / DATE" << endl;
    7373
  • trunk/BNC/src/bncfigure.cpp

    r7640 r8204  
    8989    if (hlp.size() <= 1) continue;
    9090    QUrl        url(hlp[0]);
    91     QByteArray  staID = url.path().mid(1).toAscii();
     91    QByteArray  staID = url.path().mid(1).toLatin1();
    9292    _bytes[staID] = new sumAndMean();
    9393  }
  • trunk/BNC/src/bncfigurelate.cpp

    r7182 r8204  
    7676    if (hlp.size() <= 1) continue;
    7777    QUrl        url(hlp[0]);
    78     QByteArray  staID = url.path().mid(1).toAscii();
     78    QByteArray  staID = url.path().mid(1).toLatin1();
    7979    _latency[staID] = 0.0;
    8080  }
  • trunk/BNC/src/bncnetquerys.cpp

    r6787 r8204  
    7979  QString hlp;
    8080  QStringList hlpL;
    81   hlp = _url.host().toAscii().replace("-"," ");
     81  hlp = _url.host().toLatin1().replace("-"," ");
    8282  hlpL = hlp.split(" ");
    8383
     
    191191    _serialPort = 0;
    192192    _status = error;
    193     emit newMessage(_url.path().toAscii().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);
    194194    return;
    195195  }
  • trunk/BNC/src/bncnetqueryudp.cpp

    r6787 r8204  
    124124    // Send Request
    125125    // ------------
    126     QString uName = QUrl::fromPercentEncoding(_url.userName().toAscii());
    127     QString passW = QUrl::fromPercentEncoding(_url.password().toAscii());
     126    QString uName = QUrl::fromPercentEncoding(_url.userName().toLatin1());
     127    QString passW = QUrl::fromPercentEncoding(_url.password().toLatin1());
    128128    QByteArray userAndPwd;
    129129   
    130130    if(!uName.isEmpty() || !passW.isEmpty()) {
    131       userAndPwd = "Authorization: Basic " + (uName.toAscii() + ":" +
    132       passW.toAscii()).toBase64() + "\r\n";
     131      userAndPwd = "Authorization: Basic " + (uName.toLatin1() + ":" +
     132      passW.toLatin1()).toBase64() + "\r\n";
    133133    }
    134134   
    135     QByteArray reqStr = "GET " + _url.path().toAscii() + " HTTP/1.1\r\n"
    136                       + "Host: " + _url.host().toAscii() + "\r\n"
     135    QByteArray reqStr = "GET " + _url.path().toLatin1() + " HTTP/1.1\r\n"
     136                      + "Host: " + _url.host().toLatin1() + "\r\n"
    137137                      + "Ntrip-Version: Ntrip/2.0\r\n"
    138138                      + "User-Agent: NTRIP BNC/" BNCVERSION " (" BNC_OS ")\r\n";
  • trunk/BNC/src/bncnetqueryv0.cpp

    r6787 r8204  
    6767        _socket = 0;
    6868        _status = error;
    69         emit newMessage(_url.path().toAscii() + " read timeout", true);
     69        emit newMessage(_url.path().toLatin1() + " read timeout", true);
    7070        return;
    7171      }
     
    102102    _socket = 0;
    103103    _status = error;
    104       emit(newMessage(_url.path().toAscii().replace(0,1,"")
     104      emit(newMessage(_url.path().toLatin1().replace(0,1,"")
    105105                      + ": Connect timeout, reconnecting", true));
    106106    return;
     
    115115      _socket = 0;
    116116      _status = error;
    117       emit newMessage(_url.path().toAscii().replace(0,1,"")
     117      emit newMessage(_url.path().toLatin1().replace(0,1,"")
    118118                      + ": Read timeout", true);
    119119      return;
  • trunk/BNC/src/bncoutf.cpp

    r7657 r8204  
    181181    _out.setf(ios::showpoint | ios::fixed);
    182182    if (_append && QFile::exists(_fName)) {
    183       _out.open(_fName.toAscii().data(), ios::out | ios::app);
     183      _out.open(_fName.toLatin1().data(), ios::out | ios::app);
    184184    }
    185185    else {
    186       _out.open(_fName.toAscii().data());
     186      _out.open(_fName.toLatin1().data());
    187187      writeHeader(datTim);
    188188    }
     
    199199t_irc bncoutf::write(int GPSweek, double GPSweeks, const QString& str) {
    200200  reopen(GPSweek, GPSweeks);
    201   _out << str.toAscii().data();
     201  _out << str.toLatin1().data();
    202202  _out.flush();
    203203  return success;
  • trunk/BNC/src/bncrawfile.cpp

    r5846 r8204  
    115115                 .arg(QString(format))
    116116                 .arg(data.size());
    117     _outFile->write(chunkHeader.toAscii());
     117    _outFile->write(chunkHeader.toLatin1());
    118118    _outFile->write(data);
    119119    _outFile->flush();
     
    138138      BNC_CORE->setDateAndTimeGPS(QDateTime(QDateTime::fromString(lst.value(0), Qt::ISODate)));
    139139     
    140       _staID  = lst.value(1).toAscii();
    141       _format = lst.value(2).toAscii();
     140      _staID  = lst.value(1).toLatin1();
     141      _format = lst.value(2).toLatin1();
    142142      int nBytes = lst.value(3).toInt();
    143143     
  • trunk/BNC/src/bncsp3.cpp

    r8084 r8204  
    3232  _prevEpoch = 0;
    3333
    34   _stream.open(fileName.toAscii().data());
     34  _stream.open(fileName.toLatin1().data());
    3535  if (!_stream.good()) {
    3636    throw "t_sp3File: cannot open file " + fileName;
     
    8787    }
    8888
    89     _out << "P" << prn.toAscii().data()
     89    _out << "P" << prn.toLatin1().data()
    9090         << setw(14) << setprecision(6) << xCoM(1) / 1000.0
    9191         << setw(14) << setprecision(6) << xCoM(2) / 1000.0
     
    126126  }
    127127
    128   _out << "#aP" << datTim.toString("yyyy MM dd hh mm").toAscii().data()
     128  _out << "#aP" << datTim.toString("yyyy MM dd hh mm").toLatin1().data()
    129129       << setw(12) << setprecision(8) << sec
    130130       << " " << setw(7) << numEpo << " ORBIT IGS14 HLM  IGS" << endl;
  • trunk/BNC/src/combination/bnccomb.cpp

    r8175 r8204  
    366366    // --------------------
    367367    if (_resTime.valid() && clkCorr._time <= _resTime) {
    368       emit newMessage("bncComb: old correction: " + acName.toAscii() + " " + prn.mid(0,3).toAscii(), true);
     368      emit newMessage("bncComb: old correction: " + acName.toLatin1() + " " + prn.mid(0,3).toLatin1(), true);
    369369      continue;
    370370    }
     
    401401    t_eph* ephPrev = _ephUser.ephPrev(prn);
    402402    if (ephLast == 0) {
    403       emit newMessage("bncComb: eph not found "  + prn.mid(0,3).toAscii(), true);
     403      emit newMessage("bncComb: eph not found "  + prn.mid(0,3).toLatin1(), true);
    404404      delete newCorr;
    405405      continue;
     
    414414      }
    415415      else {
    416         emit newMessage("bncComb: eph not found "  + prn.mid(0,3).toAscii() +
    417                         QString(" %1").arg(newCorr->_iod).toAscii(), true);
     416        emit newMessage("bncComb: eph not found "  + prn.mid(0,3).toLatin1() +
     417                        QString(" %1").arg(newCorr->_iod).toLatin1(), true);
    418418        delete newCorr;
    419419        continue;
     
    469469    + QString(" %1 -> %2 %3").arg(corr->_iod,3).arg(lastEph->IOD(),3).arg(dC*t_CST::c, 8, 'f', 4);
    470470
    471   emit newMessage(msg.toAscii(), false);
     471  emit newMessage(msg.toLatin1(), false);
    472472
    473473  corr->_iod = lastEph->IOD();
     
    507507      }
    508508    }
    509     out << AC->name.toAscii().data() << ": " << AC->numObs << endl;
     509    out << AC->name.toLatin1().data() << ": " << AC->numObs << endl;
    510510  }
    511511
     
    531531        if (AC->numObs > 0) {
    532532          out << "Switching Master AC "
    533               << _masterOrbitAC.toAscii().data() << " --> "
    534               << AC->name.toAscii().data()   << " "
     533              << _masterOrbitAC.toLatin1().data() << " --> "
     534              << AC->name.toLatin1().data()   << " "
    535535              << _resTime.datestr().c_str()    << " "
    536536              << _resTime.timestr().c_str()    << endl;
     
    752752      if (_antex->satCoMcorrection(corr->_prn, Mjd, xc.Rows(1,3), dx) != success) {
    753753        dx = 0;
    754         _log += "antenna not found " + corr->_prn.mid(0,3).toAscii() + '\n';
     754        _log += "antenna not found " + corr->_prn.mid(0,3).toLatin1() + '\n';
    755755      }
    756756    }
     
    777777                 "   %10.5f INTERNAL",
    778778                 messageType, updateInt, _resTime.gpsw(), _resTime.gpssec(),
    779                  corr->_prn.mid(0,3).toAscii().data(),
     779                 corr->_prn.mid(0,3).toLatin1().data(),
    780780                 corr->_iod,
    781781                 corr->_dClkResult * t_CST::c,
     
    800800
    801801  vector<string> errmsg;
    802   _rtnetDecoder->Decode(outLines.toAscii().data(), outLines.length(), errmsg);
     802  _rtnetDecoder->Decode(outLines.toLatin1().data(), outLines.length(), errmsg);
    803803
    804804  // Send new Corrections to PPP etc.
     
    11691169              << _resTime.timestr().c_str()    << " "
    11701170              << "Orbit Outlier: "
    1171               << corr->_acName.toAscii().data() << " "
    1172               << prn.mid(0,3).toAscii().data()           << " "
     1171              << corr->_acName.toLatin1().data() << " "
     1172              << prn.mid(0,3).toLatin1().data()           << " "
    11731173              << corr->_iod                     << " "
    11741174              << norm                           << endl;
     
    12031203    if (AC->mountPoint == mountPoint) {
    12041204      acName = AC->name;
    1205       out << "Provider ID changed: AC " << AC->name.toAscii().data()   << " "
     1205      out << "Provider ID changed: AC " << AC->name.toLatin1().data()   << " "
    12061206          << _resTime.datestr().c_str()    << " "
    12071207          << _resTime.timestr().c_str()    << endl;
  • trunk/BNC/src/ephemeris.cpp

    r8187 r8204  
    176176
    177177    if      ( iLine == 0 ) {
    178       QTextStream in(line.left(pos[1]).toAscii());
     178      QTextStream in(line.left(pos[1]).toLatin1());
    179179      int    year, month, day, hour, min;
    180180      double sec;
     
    512512
    513513    if      ( iLine == 0 ) {
    514       QTextStream in(line.left(pos[1]).toAscii());
     514      QTextStream in(line.left(pos[1]).toLatin1());
    515515
    516516      int    year, month, day, hour, min;
     
    771771
    772772    if      ( iLine == 0 ) {
    773       QTextStream in(line.left(pos[1]).toAscii());
     773      QTextStream in(line.left(pos[1]).toLatin1());
    774774      QString n;
    775775      in >> prnStr;
     
    11591159
    11601160    if      ( iLine == 0 ) {
    1161       QTextStream in(line.left(pos[1]).toAscii());
     1161      QTextStream in(line.left(pos[1]).toLatin1());
    11621162
    11631163      int    year, month, day, hour, min;
     
    13531353
    13541354    if      ( iLine == 0 ) {
    1355       QTextStream in(line.left(pos[1]).toAscii());
     1355      QTextStream in(line.left(pos[1]).toLatin1());
    13561356
    13571357      int    year, month, day, hour, min;
  • trunk/BNC/src/latencychecker.cpp

    r8156 r8204  
    178178      _begTimeOut = _endDateTimeOut.toUTC().time().toString("hh:mm:ss");
    179179      emit(newMessage((_staID + ": Failure threshold exceeded, outage since "
    180                     + _begDateOut + " " + _begTimeOut + " UTC").toAscii(), true));
     180                    + _begDateOut + " " + _begTimeOut + " UTC").toLatin1(), true));
    181181      callScript(("Begin_Outage "
    182                     + _begDateOut + " " + _begTimeOut + " UTC").toAscii());
     182                    + _begDateOut + " " + _begTimeOut + " UTC").toLatin1());
    183183      _decodeStop.setDate(QDate());
    184184      _decodeStop.setTime(QTime());
     
    257257          _begTimeCorr = _endDateTimeCorr.toUTC().time().toString("hh:mm:ss");
    258258          emit(newMessage((_staID + ": Failure threshold exceeded, corrupted since "
    259                     + _begDateCorr + " " + _begTimeCorr + " UTC").toAscii(), true));
     259                    + _begDateCorr + " " + _begTimeCorr + " UTC").toLatin1(), true));
    260260          callScript(("Begin_Corrupted "
    261                     + _begDateCorr + " " + _begTimeCorr + " UTC").toAscii());
     261                    + _begDateCorr + " " + _begTimeCorr + " UTC").toLatin1());
    262262          _secSucc = 0;
    263263          _numSucc = 0;
     
    277277            _endTimeCorr = _begDateTimeCorr.toUTC().time().toString("hh:mm:ss");
    278278            emit(newMessage((_staID + ": Recovery threshold exceeded, corruption ended "
    279                         + _endDateCorr + " " + _endTimeCorr + " UTC").toAscii(), true));
     279                        + _endDateCorr + " " + _endTimeCorr + " UTC").toLatin1(), true));
    280280            callScript(("End_Corrupted "
    281281                        + _endDateCorr + " " + _endTimeCorr + " UTC Begin was "
    282                         + _begDateCorr + " " + _begTimeCorr + " UTC").toAscii());
     282                        + _begDateCorr + " " + _begTimeCorr + " UTC").toLatin1());
    283283            _decodeStartCorr.setDate(QDate());
    284284            _decodeStartCorr.setTime(QTime());
     
    305305      _endTimeOut = _begDateTimeOut.toUTC().time().toString("hh:mm:ss");
    306306      emit(newMessage((_staID + ": Recovery threshold exceeded, outage ended "
    307                     + _endDateOut + " " + _endTimeOut + " UTC").toAscii(), true));
     307                    + _endDateOut + " " + _endTimeOut + " UTC").toLatin1(), true));
    308308      callScript(("End_Outage "
    309309                    + _endDateOut + " " + _endTimeOut + " UTC Begin was "
    310                     + _begDateOut + " " + _begTimeOut + " UTC").toAscii());
     310                    + _begDateOut + " " + _begTimeOut + " UTC").toLatin1());
    311311      _decodeStart.setDate(QDate());
    312312      _decodeStart.setTime(QTime());
     
    341341                  .arg(l._numLat)
    342342                  .arg(l._numGaps)
    343                   .toAscii(), true) );
     343                  .toLatin1(), true) );
    344344              }
    345345            } else {
     
    353353                  .arg(int((sqrt((l._sumLatQ - l._sumLat * l._sumLat / l._numLat)/l._numLat))*100)/100.)
    354354                  .arg(l._numLat)
    355                   .toAscii(), true) );
     355                  .toLatin1(), true) );
    356356              }
    357357            }
     
    466466            .arg(l._numGaps);
    467467            if ( _checkMountPoint == _staID || _checkMountPoint == "ALL" ) {
    468               emit(newMessage(QString(_staID + late ).toAscii(), true) );
     468              emit(newMessage(QString(_staID + late ).toLatin1(), true) );
    469469            }
    470470          }
     
    478478            .arg(l._numLat);
    479479            if ( _checkMountPoint == _staID || _checkMountPoint == "ALL" ) {
    480             emit(newMessage(QString(_staID + late ).toAscii(), true) );
     480            emit(newMessage(QString(_staID + late ).toLatin1(), true) );
    481481            }
    482482          }
  • trunk/BNC/src/orbComp/sp3Comp.cpp

    r7942 r8204  
    423423  QStringListIterator it(_excludeSats);
    424424  while (it.hasNext()) {
    425     string prnStr = it.next().toAscii().data();
     425    string prnStr = it.next().toLatin1().data();
    426426    if (prnStr == prn.toString() || prnStr == prn.toString().substr(0,1)) {
    427427      return true;
  • trunk/BNC/src/pppModel.cpp

    r7996 r8204  
    295295
    296296    line = line.trimmed();
    297     QTextStream inLine(line.toAscii(), QIODevice::ReadOnly);
     297    QTextStream inLine(line.toLatin1(), QIODevice::ReadOnly);
    298298
    299299    switch (row) {
  • trunk/BNC/src/pppRun.cpp

    r7972 r8204  
    375375          _nmeaFile->write(output._epoTime.gpsw(), output._epoTime.gpssec(), ggaStr);
    376376        }
    377         emit newNMEAstr(staID, rmcStr.toAscii());
    378         emit newNMEAstr(staID, ggaStr.toAscii());
     377        emit newNMEAstr(staID, rmcStr.toLatin1());
     378        emit newNMEAstr(staID, ggaStr.toLatin1());
    379379        if (_snxtroFile && output._epoTime.valid()) {
    380380          _snxtroFile->write(staID, int(output._epoTime.gpsw()), output._epoTime.gpssec(),
     
    676676  unsigned char XOR = 0;
    677677  for (int ii = 0; ii < nmStr.length(); ii++) {
    678     XOR ^= (unsigned char) nmStr[ii].toAscii();
     678    XOR ^= (unsigned char) nmStr[ii].toLatin1();
    679679  }
    680680
     
    692692
    693693  QString msg = "pppRun " + QString(_opt->_roverName.c_str()) + ": Provider Changed: " + mountPoint;
    694   emit newMessage(msg.toAscii(), true);
     694  emit newMessage(msg.toLatin1(), true);
    695695
    696696  _pppClient->reset();
  • trunk/BNC/src/rinex/corrfile.cpp

    r7039 r8204  
    5050t_corrFile::t_corrFile(QString fileName) {
    5151  expandEnvVar(fileName);
    52   _stream.open(fileName.toAscii().data());
     52  _stream.open(fileName.toLatin1().data());
    5353}
    5454
  • trunk/BNC/src/rinex/reqcanalyze.cpp

    r8148 r8204  
    157157    QStringList input = signalsOpt.at(ii).split(QRegExp("[:&]"), QString::SkipEmptyParts);
    158158    if (input.size() > 1 && input[0].length() == 1) {
    159       char system = input[0].toAscii().constData()[0];
     159      char system = input[0].toLatin1().constData()[0];
    160160      QStringList sysValid       = _defaultSignalTypes.filter(QString(system));
    161161      QStringList defaultSignals = sysValid.at(0).split(QRegExp("[:&]"));
     
    400400      if (_signalTypes.find(sys) != _signalTypes.end()) {
    401401        frqType1.push_back(sys);
    402         frqType1.push_back(_signalTypes[sys][0][0].toAscii());
     402        frqType1.push_back(_signalTypes[sys][0][0].toLatin1());
    403403        frqType2.push_back(sys);
    404         frqType2.push_back(_signalTypes[sys][1][0].toAscii());
     404        frqType2.push_back(_signalTypes[sys][1][0].toLatin1());
    405405        if      (frqObs->_rnxType2ch[0] == frqType1[1]) {
    406406          fA = t_frequency::toInt(frqType1);
     
    612612  if (BNC_CORE->GUIenabled()) {
    613613    QFileInfo  fileInfo(obsFile->fileName());
    614     QByteArray title = fileInfo.fileName().toAscii();
     614    QByteArray title = fileInfo.fileName().toLatin1();
    615615    emit dspSkyPlot(obsFile->fileName(), mp1Title,  dataMP1,  mp2Title,  dataMP2,  "Meters",  2.0);
    616616    emit dspSkyPlot(obsFile->fileName(), sn1Title, dataSNR1, sn2Title, dataSNR2, "dbHz",   54.0);
     
    725725      }
    726726
    727       char frqChar1 = _signalTypes[prn.system()][0][0].toAscii();
    728       char frqChar2 = _signalTypes[prn.system()][1][0].toAscii();
     727      char frqChar1 = _signalTypes[prn.system()][0][0].toLatin1();
     728      char frqChar2 = _signalTypes[prn.system()][1][0].toLatin1();
    729729
    730730      QString frqType1;
  • trunk/BNC/src/rinex/reqcedit.cpp

    r8168 r8204  
    7070  }
    7171  _samplingRate   = settings.value("reqcSampling").toInt();
    72   _begTime        = bncTime(settings.value("reqcStartDateTime").toString().toAscii().data());
    73   _endTime        = bncTime(settings.value("reqcEndDateTime").toString().toAscii().data());
     72  _begTime        = bncTime(settings.value("reqcStartDateTime").toString().toLatin1().data());
     73  _endTime        = bncTime(settings.value("reqcEndDateTime").toString().toLatin1().data());
    7474
    7575}
     
    183183          delete rnxObsFile;
    184184          if (log) {
    185             *log << "Error in rnxObsFile " << filePath.toAscii().data() << endl;
     185            *log << "Error in rnxObsFile " << filePath.toLatin1().data() << endl;
    186186          }
    187187        }
     
    196196      catch (...) {
    197197        if (log) {
    198           *log << "Error in rnxObsFile " << fileName.toAscii().data() << endl;
     198          *log << "Error in rnxObsFile " << fileName.toLatin1().data() << endl;
    199199        }
    200200      }
     
    668668
    669669  for(int ii = 0; ii < obsFile->numSys(); ii++) {
    670     char sys = systems[ii].toAscii();
     670    char sys = systems[ii].toLatin1();
    671671    txtMap.insert(commentKey, comment);
    672672    QMap <char, QString>  signalPriorityMap;
     
    675675    for (int jj = 0; jj < types.size(); jj++) {
    676676      QString inType = types[jj];
    677       char band = inType[1].toAscii();
     677      char band = inType[1].toLatin1();
    678678      for (int ii = 0; ii < preferredAttribListSys.size(); ii++) {
    679679        QString preferredAttrib;
  • trunk/BNC/src/rinex/rnxnavfile.cpp

    r8168 r8204  
    7474    }
    7575    else if (key == "RINEX VERSION / TYPE") {
    76       QTextStream in(value.toAscii(), QIODevice::ReadOnly);
     76      QTextStream in(value.toLatin1(), QIODevice::ReadOnly);
    7777      in >> _version;
    7878      if (value.indexOf("GLONASS") != -1) {
  • trunk/BNC/src/rinex/rnxobsfile.cpp

    r8168 r8204  
    9292    }
    9393    else if (key == "RINEX VERSION / TYPE") {
    94       QTextStream in(value.toAscii(), QIODevice::ReadOnly);
     94      QTextStream in(value.toLatin1(), QIODevice::ReadOnly);
    9595      in >> _version;
    9696    }
     
    118118    }
    119119    else if (key == "INTERVAL") {
    120       QTextStream in(value.toAscii(), QIODevice::ReadOnly);
     120      QTextStream in(value.toLatin1(), QIODevice::ReadOnly);
    121121      in >> _interval;
    122122    }
     
    125125    }
    126126    else if (key == "WAVELENGTH FACT L1/2") {
    127       QTextStream in(value.toAscii(), QIODevice::ReadOnly);
     127      QTextStream in(value.toLatin1(), QIODevice::ReadOnly);
    128128      int wlFactL1 = 0;
    129129      int wlFactL2 = 0;
     
    149149    }
    150150    else if (key == "APPROX POSITION XYZ") {
    151       QTextStream in(value.toAscii(), QIODevice::ReadOnly);
     151      QTextStream in(value.toLatin1(), QIODevice::ReadOnly);
    152152      in >> _xyz[0] >> _xyz[1] >> _xyz[2];
    153153    }
    154154    else if (key == "ANTENNA: DELTA H/E/N") {
    155       QTextStream in(value.toAscii(), QIODevice::ReadOnly);
     155      QTextStream in(value.toLatin1(), QIODevice::ReadOnly);
    156156      in >> _antNEU[2] >> _antNEU[1] >> _antNEU[0];
    157157    }
    158158    else if (key == "ANTENNA: DELTA X/Y/Z") {
    159       QTextStream in(value.toAscii(), QIODevice::ReadOnly);
     159      QTextStream in(value.toLatin1(), QIODevice::ReadOnly);
    160160      in >> _antXYZ[0] >> _antXYZ[1] >> _antXYZ[2];
    161161    }
    162162    else if (key == "ANTENNA: B.SIGHT XYZ") {
    163       QTextStream in(value.toAscii(), QIODevice::ReadOnly);
     163      QTextStream in(value.toLatin1(), QIODevice::ReadOnly);
    164164      in >> _antBSG[0] >> _antBSG[1] >> _antBSG[2];
    165165    }
     
    168168        _version = defaultRnxObsVersion2;
    169169      }
    170       QTextStream* in = new QTextStream(value.toAscii(), QIODevice::ReadOnly);
     170      QTextStream* in = new QTextStream(value.toLatin1(), QIODevice::ReadOnly);
    171171      int nTypes;
    172172      *in >> nTypes;
    173       char sys0 = _usedSystems[0].toAscii();
     173      char sys0 = _usedSystems[0].toLatin1();
    174174      _obsTypes[sys0].clear();
    175175      for (int ii = 0; ii < nTypes; ii++) {
     
    177177          line = stream->readLine(); ++numLines;
    178178          delete in;
    179           in = new QTextStream(line.left(60).toAscii(), QIODevice::ReadOnly);
     179          in = new QTextStream(line.left(60).toLatin1(), QIODevice::ReadOnly);
    180180        }
    181181        QString hlp;
     
    184184      }
    185185      for (int ii = 1; ii < _usedSystems.length(); ii++) {
    186         char sysI = _usedSystems[ii].toAscii();
     186        char sysI = _usedSystems[ii].toLatin1();
    187187        _obsTypes[sysI] = _obsTypes[sys0];
    188188      }
     
    192192        _version = defaultRnxObsVersion3;
    193193      }
    194       QTextStream* in = new QTextStream(value.toAscii(), QIODevice::ReadOnly);
     194      QTextStream* in = new QTextStream(value.toLatin1(), QIODevice::ReadOnly);
    195195      char sys;
    196196      int nTypes;
     
    201201          line = stream->readLine(); ++numLines;
    202202          delete in;
    203           in = new QTextStream(line.toAscii(), QIODevice::ReadOnly);
     203          in = new QTextStream(line.toLatin1(), QIODevice::ReadOnly);
    204204        }
    205205        QString hlp;
     
    213213    }
    214214    else if (key == "TIME OF FIRST OBS") {
    215       QTextStream in(value.toAscii(), QIODevice::ReadOnly);
     215      QTextStream in(value.toLatin1(), QIODevice::ReadOnly);
    216216      int year, month, day, hour, min;
    217217      double sec;
     
    220220    }
    221221    else if (key == "SYS / PHASE SHIFT"){
    222       QTextStream* in = new QTextStream(value.toAscii(), QIODevice::ReadOnly);
     222      QTextStream* in = new QTextStream(value.toLatin1(), QIODevice::ReadOnly);
    223223      char        sys;
    224224      QString     obstype;
     
    233233            line = stream->readLine(); ++numLines;
    234234            delete in;
    235             in = new QTextStream(line.left(60).toAscii(), QIODevice::ReadOnly);
     235            in = new QTextStream(line.left(60).toLatin1(), QIODevice::ReadOnly);
    236236          }
    237237          *in >> sat;
     
    243243    }
    244244    else if (key == "GLONASS COD/PHS/BIS"){
    245       QTextStream in(value.toAscii(), QIODevice::ReadOnly);
     245      QTextStream in(value.toLatin1(), QIODevice::ReadOnly);
    246246      for (int ii = 0; ii < 4; ii++) {
    247247        QString type;
     
    253253    }
    254254    else if (key == "GLONASS SLOT / FRQ #") {
    255       QTextStream* in = new QTextStream(value.toAscii(), QIODevice::ReadOnly);
     255      QTextStream* in = new QTextStream(value.toLatin1(), QIODevice::ReadOnly);
    256256      int nSlots = 0;
    257257      *in >> nSlots;
     
    260260          line = stream->readLine(); ++numLines;
    261261          delete in;
    262           in = new QTextStream(line.left(60).toAscii(), QIODevice::ReadOnly);
     262          in = new QTextStream(line.left(60).toLatin1(), QIODevice::ReadOnly);
    263263        }
    264264        QString sat;
     
    457457            QString type = header.obsType(sys, iType, _version);
    458458            for (int jSys = 0; jSys < _usedSystems.length(); jSys++) {
    459               char thisSys  = _usedSystems[jSys].toAscii();
     459              char thisSys  = _usedSystems[jSys].toLatin1();
    460460              if (!_obsTypes[thisSys].contains(type)) {
    461461                _obsTypes[thisSys].push_back(type);
     
    473473        if (hlp.size() == 2 && hlp[0].length() == 1) {
    474474          if (_version >= 3.0) {
    475             char    sys  = hlp[0][0].toAscii();
     475            char    sys  = hlp[0][0].toLatin1();
    476476            QString type = t_rnxObsFile::type2to3(sys, hlp[1]);
    477477            if (!_obsTypes[sys].contains(type)) {
     
    481481          else {
    482482            for (int iSys = 0; iSys < _usedSystems.length(); iSys++) {
    483               char    sys  = _usedSystems[iSys].toAscii();
     483              char    sys  = _usedSystems[iSys].toLatin1();
    484484              QString type = t_rnxObsFile::type3to2(sys, hlp[1]);
    485485              if (!_obsTypes[sys].contains(type)) {
     
    492492      else {
    493493        for (int iSys = 0; iSys < _usedSystems.length(); iSys++) {
    494           char    sys  = _usedSystems[iSys].toAscii();
     494          char    sys  = _usedSystems[iSys].toLatin1();
    495495          QString type = _version >= 3.0 ? t_rnxObsFile::type2to3(sys, useObsTypes->at(iType)) :
    496496                                           t_rnxObsFile::type3to2(sys, useObsTypes->at(iType));
     
    936936  QStringList strList;
    937937  if (_version < 3.0) {
    938     char sys0 = _usedSystems[0].toAscii();
     938    char sys0 = _usedSystems[0].toLatin1();
    939939    QString hlp;
    940940    QTextStream(&hlp) << QString("%1").arg(_obsTypes[sys0].size(), 6);
     
    11311131    }
    11321132
    1133     QTextStream in(line.mid(1).toAscii(), QIODevice::ReadOnly);
     1133    QTextStream in(line.mid(1).toLatin1(), QIODevice::ReadOnly);
    11341134
    11351135    // Epoch Time
     
    11511151    for (int iSat = 0; iSat < numSat; iSat++) {
    11521152      line = _stream->readLine();
    1153       t_prn prn; prn.set(line.left(3).toAscii().data());
     1153      t_prn prn; prn.set(line.left(3).toLatin1().data());
    11541154      _currEpo.rnxSat[iSat].prn = prn;
    11551155      char sys = prn.system();
     
    12021202    }
    12031203
    1204     QTextStream in(line.toAscii(), QIODevice::ReadOnly);
     1204    QTextStream in(line.toLatin1(), QIODevice::ReadOnly);
    12051205
    12061206    // Epoch Time
     
    12331233      }
    12341234
    1235       char sys = line.toAscii()[pos];
     1235      char sys = line.toLatin1()[pos];
    12361236      if (sys == ' ') {
    12371237        sys = 'G';
     
    15121512void t_rnxObsFile::setObsFromRnx(const t_rnxObsFile* rnxObsFile, const t_rnxObsFile::t_rnxEpo* epo,
    15131513                                 const t_rnxObsFile::t_rnxSat& rnxSat, t_satObs& obs) {
    1514   obs._staID = rnxObsFile->markerName().toAscii().constData();
     1514  obs._staID = rnxObsFile->markerName().toLatin1().constData();
    15151515  obs._prn   = rnxSat.prn;
    15161516  obs._time  = epo->tt;
     
    15391539      const t_rnxObs& rnxObs = rnxSat.obs[type];
    15401540      if (rnxObs.value != 0.0) {
    1541         string type2ch(typeV3.mid(1).toAscii().data());
     1541        string type2ch(typeV3.mid(1).toLatin1().data());
    15421542
    15431543        t_frqObs* frqObs = 0;
     
    15541554        }
    15551555
    1556         switch( typeV3.toAscii().data()[0] ) {
     1556        switch( typeV3.toLatin1().data()[0] ) {
    15571557        case 'C':
    15581558          frqObs->_codeValid = true;
  • trunk/BNC/src/serial/win_qextserialport.cpp

    r6788 r8204  
    151151    if (!isOpen()) {
    152152        /*open the port*/
    153         Win_Handle=CreateFileA(port.toAscii(), GENERIC_READ|GENERIC_WRITE,
     153        Win_Handle=CreateFileA(port.toLatin1(), GENERIC_READ|GENERIC_WRITE,
    154154                              FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
    155155        if (Win_Handle!=INVALID_HANDLE_VALUE) {
  • trunk/BNC/src/upload/bncrtnetuploadcaster.cpp

    r8145 r8204  
    280280  // Read first line (with epoch time)
    281281  // ---------------------------------
    282   QTextStream in(lines[0].toAscii());
     282  QTextStream in(lines[0].toLatin1());
    283283  QString hlp;
    284284  int year, month, day, hour, min;
     
    291291      "bncRtnetUploadCaster: decode " + QByteArray(epoTime.datestr().c_str())
    292292          + " " + QByteArray(epoTime.timestr().c_str()) + " "
    293           + _casterID.toAscii(), false));
     293          + _casterID.toLatin1(), false));
    294294
    295295  struct ClockOrbit co;
     
    369369    t_prn prn;
    370370
    371     QTextStream in(lines[ii].toAscii());
     371    QTextStream in(lines[ii].toLatin1());
    372372
    373373    in >> key;
     
    401401    }
    402402    // satellite specific parameters
    403     char sys = key.mid(0, 1).at(0).toAscii();
     403    char sys = key.mid(0, 1).at(0).toLatin1();
    404404    int number = key.mid(1, 2).toInt();
    405405    int flags = 0;
  • trunk/BNC/src/upload/bncuploadcaster.cpp

    r8153 r8204  
    9090        _outSocket->write(_outBuffer);
    9191        _outSocket->flush();
    92         emit newBytes(_mountpoint.toAscii(), _outBuffer.size());
     92        emit newBytes(_mountpoint.toLatin1(), _outBuffer.size());
    9393      }
    9494    }
     
    140140    delete _outSocket;
    141141    _outSocket = 0;
    142     emit(newMessage("Broadcaster: Connect timeout for " + _mountpoint.toAscii(), true));
     142    emit(newMessage("Broadcaster: Connect timeout for " + _mountpoint.toLatin1(), true));
    143143    return;
    144144  }
    145145
    146   QByteArray msg = "SOURCE " + _password.toAscii() + " /" +
    147                    _mountpoint.toAscii() + "\r\n" +
     146  QByteArray msg = "SOURCE " + _password.toLatin1() + " /" +
     147                   _mountpoint.toLatin1() + "\r\n" +
    148148                   "Source-Agent: NTRIP BNC/" BNCVERSION "\r\n\r\n";
    149149
     
    157157    delete _outSocket;
    158158    _outSocket = 0;
    159     emit(newMessage("Broadcaster: Connection broken for " + _mountpoint.toAscii(), true));
     159    emit(newMessage("Broadcaster: Connection broken for " + _mountpoint.toLatin1(), true));
    160160  }
    161161  else {
    162     emit(newMessage("Broadcaster: Connection opened for " + _mountpoint.toAscii(), true));
     162    emit(newMessage("Broadcaster: Connection opened for " + _mountpoint.toLatin1(), true));
    163163    _sOpenTrial = 0;
    164164  }
Note: See TracChangeset for help on using the changeset viewer.