Changeset 10979 in ntrip for trunk/BNC/src/bncrinex.cpp


Ignore:
Timestamp:
Jul 31, 2026, 9:44:38 AM (7 days ago)
Author:
stuerze
Message:

RINEX version 2 files can be written now from skl files containing RINEX version 3/4 observation types too

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncrinex.cpp

    r10961 r10979  
    447447  // Read Skeleton Header
    448448  // --------------------
    449   if (readSkeleton()) {
     449  bool sklUsable = readSkeleton();
     450  if (sklUsable && intHeaderVers >= 3) {
     451    // A skeleton carrying only 2-char (v2-style) observation codes cannot
     452    // supply the attribute-specific codes a v3 file needs. Judge this from
     453    // the actual codes rather than _sklHeader.version(), which is often
     454    // left at 0.0 for skeleton files that omit "RINEX VERSION / TYPE".
     455    bool haveV3Types = false;
     456    for (int iSys = 0; iSys < _sklHeader.numSys() && !haveV3Types; iSys++) {
     457      char sys = _sklHeader.system(iSys);
     458      QStringList types = _sklHeader.obsTypes(sys);
     459      for (int iType = 0; iType < types.size(); iType++) {
     460        if (types.at(iType).length() >= 3) {
     461          haveV3Types = true;
     462          break;
     463        }
     464      }
     465    }
     466    if (!haveV3Types) {
     467      sklUsable = false;
     468    }
     469  }
     470  if (sklUsable) {
    450471    _header.set(_sklHeader, intHeaderVers);
    451472  }
Note: See TracChangeset for help on using the changeset viewer.