Changeset 9765 in ntrip for trunk/BNC/src/rinex/reqcedit.cpp


Ignore:
Timestamp:
Jun 20, 2022, 4:54:59 PM (23 months ago)
Author:
stuerze
Message:

some more changes to consider RINEX Version 4 nav file (EPH key only)

File:
1 edited

Legend:

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

    r9639 r9765  
    6363  _outNavFileName = settings.value("reqcOutNavFile").toString();
    6464  int version     = settings.value("reqcRnxVersion").toInt();
    65   if (version < 3) {
     65  if (version == 2) {
    6666    _rnxVersion = defaultRnxObsVersion2;
    6767  }
    68   else {
     68  if (version == 3) {
    6969    _rnxVersion = defaultRnxObsVersion3;
     70  }
     71  if (version == 4) {
     72    _rnxVersion = defaultRnxObsVersion4;
    7073  }
    7174  _samplingRate   = settings.value("reqcSampling").toString().split("sec").first().toDouble();
     
    601604  outNavFile.setGlonass(haveGlonass);
    602605
    603   if ( (haveGPS && haveGlonass) || _rnxVersion >= 3.0) {
     606  if (_rnxVersion < 3.0) {
     607    if (haveGPS && haveGlonass) {
     608      outNavFile.setVersion(defaultRnxNavVersion3);
     609    }
     610    if (haveGPS && !haveGlonass) {
     611      outNavFile.setVersion(defaultRnxNavVersion2);
     612    }
     613  }
     614
     615  if (_rnxVersion >= 3.0 &&  _rnxVersion < 4.0) {
    604616    outNavFile.setVersion(defaultRnxNavVersion3);
    605617  }
    606   else {
    607     outNavFile.setVersion(defaultRnxNavVersion2);
     618
     619  if (_rnxVersion >= 4.0) {
     620    outNavFile.setVersion(defaultRnxNavVersion4);
    608621  }
    609622
     
    626639  }
    627640
    628   outNavFile.writeHeader(&txtMap);
     641  int mergedNavFiles = _navFileNames.size();
     642  unsigned year, month, day;
     643  int gps_utc = 0;
     644  if (_ephs.size()) {
     645    _ephs.at(0)->TOC().civil_date(year, month, day);
     646    gps_utc = gnumleap(year, month, day);
     647  }
     648  outNavFile.writeHeader(&txtMap, mergedNavFiles, gps_utc);
    629649
    630650  // Loop over all ephemerides
     
    645665    }
    646666    if (eph->checkState() == t_eph::bad) {
     667      continue;
     668    }
     669    if (outNavFile.version() >= 4.0 &&
     670        eph->navType() == t_eph::undefined) { // input files < version 4.0
    647671      continue;
    648672    }
Note: See TracChangeset for help on using the changeset viewer.