- Timestamp:
- Sep 11, 2014, 7:06:45 PM (10 years ago)
- Location:
- trunk/BNC/src/rinex
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/reqcedit.cpp
r6121 r6130 221 221 QStringList useObsTypes = settings.value("reqcUseObsTypes").toString().split(" ", QString::SkipEmptyParts); 222 222 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 223 236 // Loop over all input observation files 224 237 // ------------------------------------- … … 251 264 outObsFile.header().write(outObsFile.stream(), &txtMap); 252 265 } 253 else {254 outObsFile.checkNewHeader(obsFile->header());255 }256 266 t_rnxObsFile::t_rnxEpo* epo = 0; 257 267 try { … … 280 290 else { 281 291 qDebug() << str; 292 } 293 return; 294 } 295 catch (...) { 296 if (_log) { 297 *_log << "Exception unknown" << endl; 298 } 299 else { 300 qDebug() << "Exception unknown"; 282 301 } 283 302 return; -
trunk/BNC/src/rinex/rnxobsfile.cpp
r6127 r6130 342 342 } 343 343 344 // 345 //////////////////////////////////////////////////////////////////////////// 346 char 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 344 359 // Number of Observation Types (satellite-system specific) 345 360 //////////////////////////////////////////////////////////////////////////// … … 1021 1036 } 1022 1037 1023 // Check for Changes in Header1024 ////////////////////////////////////////////////////////////////////////////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 Types1031 // -----------------------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 1057 1038 // Set Observations from RINEX File 1058 1039 //////////////////////////////////////////////////////////////////////////// … … 1062 1043 t_obs& obs) { 1063 1044 1064 strncpy(obs.StatID, rnxObsFile->markerName().toAscii().constData(), 1065 sizeof(obs.StatID)); 1045 strncpy(obs.StatID, rnxObsFile->markerName().toAscii().constData(), sizeof(obs.StatID)); 1066 1046 1067 1047 obs.satSys = rnxSat.prn.system(); -
trunk/BNC/src/rinex/rnxobsfile.h
r6129 r6130 53 53 t_irc read(QTextStream* stream, int maxLines = 0); 54 54 int numSys() const; 55 char system(int iSys) const; 55 56 int nTypes(char sys) const; 56 57 QString obsType(char sys, int index, double version = 0.0) const; … … 122 123 double interval() const {return _header._interval;} 123 124 int numSys() const {return _header.numSys();} 125 char system(int iSys) const {return _header.system(iSys);} 124 126 int nTypes(char sys) const {return _header.nTypes(sys);} 125 127 const QString& fileName() const {return _fileName;} … … 154 156 const t_rnxObsHeader& header() const {return _header;} 155 157 void setHeader(const t_rnxObsHeader& header, double version, const QStringList& useObsTypes); 156 void checkNewHeader(const t_rnxObsHeader& header);157 158 void writeEpoch(const t_rnxEpo* epo); 158 159
Note:
See TracChangeset
for help on using the changeset viewer.