Changeset 6130 in ntrip for trunk


Ignore:
Timestamp:
Sep 11, 2014, 7:06:45 PM (10 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src/rinex
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/rinex/reqcedit.cpp

    r6121 r6130  
    221221  QStringList useObsTypes = settings.value("reqcUseObsTypes").toString().split(" ", QString::SkipEmptyParts);
    222222
     223  // Put together all observation types
     224  // ----------------------------------
     225  if (_rnxObsFiles.size() > 1 && useObsTypes.size() == 0) {
     226    for (int ii = 0; ii < _rnxObsFiles.size(); ii++) {
     227      t_rnxObsFile* obsFile = _rnxObsFiles[ii];
     228      for (int iSys = 0; iSys < obsFile->numSys(); iSys++) {
     229        char sys = obsFile->system(iSys);
     230        if (sys != ' ') {
     231        }
     232      }
     233    }
     234  }
     235
    223236  // Loop over all input observation files
    224237  // -------------------------------------
     
    251264      outObsFile.header().write(outObsFile.stream(), &txtMap);
    252265    }
    253     else {
    254       outObsFile.checkNewHeader(obsFile->header());
    255     }
    256266    t_rnxObsFile::t_rnxEpo* epo = 0;
    257267    try {
     
    280290      else {
    281291        qDebug() << str;   
     292      }
     293      return;
     294    }
     295    catch (...) {
     296      if (_log) {
     297        *_log << "Exception unknown" << endl;
     298      }
     299      else {
     300        qDebug() << "Exception unknown";
    282301      }
    283302      return;
  • trunk/BNC/src/rinex/rnxobsfile.cpp

    r6127 r6130  
    342342}
    343343
     344//
     345////////////////////////////////////////////////////////////////////////////
     346char t_rnxObsHeader::system(int iSys) const {
     347  int iSysLocal = -1;
     348  QMapIterator<char, QVector<QString> > it(_obsTypes);
     349  while (it.hasNext()) {
     350    ++iSysLocal;
     351    it.next();
     352    if (iSysLocal == iSys) {
     353      return it.key();
     354    }
     355  }
     356  return ' ';
     357}
     358
    344359// Number of Observation Types (satellite-system specific)
    345360////////////////////////////////////////////////////////////////////////////
     
    10211036}
    10221037
    1023 // Check for Changes in Header
    1024 ////////////////////////////////////////////////////////////////////////////
    1025 void t_rnxObsFile::checkNewHeader(const t_rnxObsHeader& header) {
    1026 
    1027   t_rnxObsHeader oldHeader(_header);
    1028   setHeader(header, oldHeader._version, QStringList());
    1029 
    1030   // Check Observation Types
    1031   // -----------------------
    1032   bool same = true;
    1033   QMapIterator<char, QVector<QString> > it(_header._obsTypes);
    1034   while (it.hasNext()) {
    1035     it.next();
    1036     char                    sys   = it.key();
    1037     const QVector<QString>& types = it.value();
    1038     if (!oldHeader._obsTypes.contains(sys) || oldHeader._obsTypes[sys] != types) {
    1039       same = false;
    1040       break;
    1041     }
    1042   }
    1043 
    1044   if (!same) {
    1045     QStringList strLst = _header.obsTypesStrings();
    1046     if (_header._version < 3.0) {
    1047       *_stream << QString().leftJustified(26);
    1048     }
    1049     else {
    1050       *_stream << '>' << QString().leftJustified(28);
    1051     }
    1052     *_stream << QString("  4%1\n").arg(strLst.size(), 3)
    1053              << strLst.join("");
    1054   }
    1055 }
    1056 
    10571038// Set Observations from RINEX File
    10581039////////////////////////////////////////////////////////////////////////////
     
    10621043                                 t_obs& obs) {
    10631044
    1064   strncpy(obs.StatID, rnxObsFile->markerName().toAscii().constData(),
    1065           sizeof(obs.StatID));
     1045  strncpy(obs.StatID, rnxObsFile->markerName().toAscii().constData(), sizeof(obs.StatID));
    10661046
    10671047  obs.satSys   = rnxSat.prn.system();
  • trunk/BNC/src/rinex/rnxobsfile.h

    r6129 r6130  
    5353  t_irc       read(QTextStream* stream, int maxLines = 0);
    5454  int         numSys() const;
     55  char        system(int iSys) const;
    5556  int         nTypes(char sys) const;
    5657  QString     obsType(char sys, int index, double version = 0.0) const;
     
    122123  double         interval() const {return _header._interval;}
    123124  int            numSys() const {return _header.numSys();}
     125  char           system(int iSys) const {return _header.system(iSys);}
    124126  int            nTypes(char sys) const {return _header.nTypes(sys);}
    125127  const QString& fileName() const {return _fileName;}
     
    154156  const t_rnxObsHeader& header() const {return _header;}
    155157  void setHeader(const t_rnxObsHeader& header, double version, const QStringList& useObsTypes);
    156   void checkNewHeader(const t_rnxObsHeader& header);
    157158  void writeEpoch(const t_rnxEpo* epo);
    158159
Note: See TracChangeset for help on using the changeset viewer.