Changeset 8204 in ntrip for trunk/BNC/src/rinex


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

CHANGE: #105 toAscii deprecated

Location:
trunk/BNC/src/rinex
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • 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;
Note: See TracChangeset for help on using the changeset viewer.