Changeset 4532 in ntrip
- Timestamp:
- Aug 16, 2012, 9:18:57 AM (12 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncrinex.cpp
r4506 r4532 177 177 // Read Skeleton Header File 178 178 //////////////////////////////////////////////////////////////////////////// 179 void bncRinex::readSkeleton() { 179 bool bncRinex::readSkeleton() { 180 181 bool readDone = false; 180 182 181 183 // Read the local file … … 183 185 QFile skl(_sklName); 184 186 if ( skl.exists() && skl.open(QIODevice::ReadOnly) ) { 187 readDone = true; 185 188 QTextStream in(&skl); 186 189 _header.read(&in); … … 193 196 QDate currDate = currentDateAndTimeGPS().date(); 194 197 if ( !_skeletonDate.isValid() || _skeletonDate != currDate ) { 195 downloadSkeleton(); 198 if (downloadSkeleton() == success) { 199 readDone = true; 200 } 196 201 _skeletonDate = currDate; 197 202 } 198 203 } 204 205 return readDone; 199 206 } 200 207 … … 335 342 // Read Skeleton Header 336 343 // -------------------- 337 readSkeleton();344 bool skelRead = readSkeleton(); 338 345 339 346 // Set RINEX Version … … 348 355 // A Few Additional Comments 349 356 // ------------------------- 350 QStringList addComments; 351 addComments << format.left(6) + " " + _mountPoint.host() + _mountPoint.path(); 352 353 if (_nmea == "yes") { 354 addComments << "NMEA LAT=" + _latitude + " " + "LONG=" + _longitude; 357 if (skelRead || _addComments.size() == 0) { 358 _addComments.clear(); 359 _addComments << format.left(6) + " " 360 + _mountPoint.host() + _mountPoint.path(); 361 if (_nmea == "yes") { 362 _addComments << "NMEA LAT=" + _latitude + " " + "LONG=" + _longitude; 363 } 355 364 } 356 365 … … 371 380 // --------------------------- 372 381 if (_header._obsTypesV3.size() == 0) { 373 if ( _header._version >= 3.0) {374 addComments << "Default set of observation types used";382 if (skelRead && _header._version >= 3.0) { 383 _addComments << "Default set of observation types used"; 375 384 } 376 385 _header._obsTypesV3['G'] << "C1C" << "L1C" << "D1C" << "S1C" … … 410 419 411 420 QMap<QString, QString> txtMap; 412 txtMap["COMMENT"] = addComments.join("\\n");421 txtMap["COMMENT"] = _addComments.join("\\n"); 413 422 414 423 _header.write(&outHlp, &txtMap); -
trunk/BNC/src/bncrinex.h
r4502 r4532 55 55 static std::string obsToStr(double val, int width = 14, int precision = 3); 56 56 void resolveFileName(const QDateTime& datTim); 57 voidreadSkeleton();57 bool readSkeleton(); 58 58 void writeHeader(const QByteArray& format, const QDateTime& datTimNom); 59 59 void closeFile(); … … 78 78 QDate _skeletonDate; 79 79 int _samplingRate; 80 QStringList _addComments; 80 81 81 82 QMap<QString, int> _slip_cnt_L1;
Note:
See TracChangeset
for help on using the changeset viewer.