Changeset 4229 in ntrip


Ignore:
Timestamp:
May 30, 2012, 8:51:49 AM (12 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/rinex
Files:
2 edited

Legend:

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

    r4221 r4229  
    4545
    4646using namespace std;
     47
     48const double rnxV2 = 2.11;
     49const double rnxV3 = 3.01;
    4750
    4851// Constructor
     
    5861  int version     = settings.value("reqcRnxVersion").toInt();
    5962  if (version < 3) {
    60     _rnxVersion = 2.11;
     63    _rnxVersion = rnxV2;
    6164  }
    6265  else {
    63     _rnxVersion = 3.01;
     66    _rnxVersion = rnxV3;
    6467  }
    6568  _samplingRate   = settings.value("reqcSampling").toInt();
     
    298301  qStableSort(_ephs.begin(), _ephs.end(), t_eph::earlierTime);
    299302
     303  // Check Satellite Systems
     304  // -----------------------
     305  bool haveGPS     = false;
     306  bool haveGlonass = false;
     307  for (int ii = 0; ii < _ephs.size(); ii++) {
     308    const t_eph* eph = _ephs[ii];
     309    if      (eph->type() == t_eph::GPS) {
     310      haveGPS = true;
     311    }
     312    else if (eph->type() == t_eph::GLONASS) {
     313      haveGlonass = true;
     314    }
     315  }
     316
    300317  // Initialize output navigation file
    301318  // ---------------------------------
    302319  t_rnxNavFile outNavFile(_outNavFileName, t_rnxNavFile::output);
    303   outNavFile.setVersion(_rnxVersion);
     320
     321  outNavFile.setGlonass(haveGlonass);
     322
     323  if (haveGPS && haveGlonass) {
     324    outNavFile.setVersion(rnxV3);
     325  }
     326  else {
     327    outNavFile.setVersion(_rnxVersion);
     328  }
     329
    304330  bncSettings settings;
    305331  QMap<QString, QString> txtMap;
     
    312338    txtMap["COMMENT"]  = comment;
    313339  }
     340
    314341  outNavFile.writeHeader(&txtMap);
    315342
     
    318345  for (int ii = 0; ii < _ephs.size(); ii++) {
    319346    const t_eph* eph = _ephs[ii];
    320     if (eph->type() == t_eph::GPS || _rnxVersion >= 3.0) {
    321       outNavFile.writeEph(eph);
    322     }
     347    outNavFile.writeEph(eph);
    323348  }
    324349}
  • trunk/BNC/rinex/rnxnavfile.h

    r4219 r4229  
    5858  void   setVersion(double version) {_header._version = version;}
    5959  bool   glonass() const {return _header._glonass;}
     60  void   setGlonass(bool glo) {_header._glonass = glo;}
    6061  void   writeHeader(const QMap<QString, QString>* txtMap = 0);
    6162  void   writeEph(const t_eph* eph);
Note: See TracChangeset for help on using the changeset viewer.