Changeset 6120 in ntrip


Ignore:
Timestamp:
Sep 11, 2014, 2:15:50 PM (10 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src
Files:
3 edited

Legend:

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

    r5530 r6120  
    165165    if (query->status() == bncNetQuery::finished) {
    166166      irc = success;
    167       _header._obsTypesV2.clear();
    168       _header._obsTypesV3.clear();
     167      _header._obsTypes.clear();
    169168      QTextStream in(outData);
    170169      _header.read(&in);
     
    188187  if ( skl.exists() && skl.open(QIODevice::ReadOnly) ) {
    189188    readDone = true;
    190     _header._obsTypesV2.clear();
    191     _header._obsTypesV3.clear();
     189    _header._obsTypes.clear();
    192190    QTextStream in(&skl);
    193191    _header.read(&in);
     
    362360    _addComments << format.left(6) + " "
    363361                                   + _mountPoint.host() + _mountPoint.path();
    364     if (_header._obsTypesV3.size() == 0 && _header._version >= 3.0) {
     362    if (_header._obsTypes.size() == 0) {
    365363      _addComments << "Default set of observation types used";
    366364    }
     
    376374  }
    377375
    378   // Set Default RINEX v2 Types
    379   // --------------------------
    380   if (_header._obsTypesV2.size() == 0) {
    381     _header._obsTypesV2 << "C1" << "P1" << "L1" << "S1"
    382                         << "C2" << "P2" << "L2" << "S2";
    383   }
    384 
    385   // Set Default RINEX v3 Types
    386   // ---------------------------
    387   if (_header._obsTypesV3.size() == 0) {
    388     _header._obsTypesV3['G'] << "C1C" << "L1C" << "D1C" << "S1C"
     376  // Set Default Observation Types
     377  // -----------------------------
     378  if (_header._obsTypes.size() == 0) {
     379    if (_header._version < 3.0) {
     380      _header._obsTypes['G'] << "C1" << "P1" << "L1" << "S1"
     381                             << "C2" << "P2" << "L2" << "S2";
     382      _header._obsTypes['R'] = _header._obsTypes['G'];
     383      _header._obsTypes['E'] = _header._obsTypes['G'];
     384      _header._obsTypes['J'] = _header._obsTypes['G'];
     385      _header._obsTypes['S'] = _header._obsTypes['G'];
     386      _header._obsTypes['C'] = _header._obsTypes['G'];
     387    }
     388    else {
     389      _header._obsTypes['G'] << "C1C" << "L1C" << "D1C" << "S1C"
    389390                             << "C1P" << "L1P" << "D1P" << "S1P"
    390391                             << "C2C" << "L2C" << "D2C" << "S2C"
    391392                             << "C2P" << "L2P" << "D2P" << "S2P"
    392393                             << "C5"  << "D5"  << "L5"  << "S5";
    393    
    394     _header._obsTypesV3['R'] << "C1C" << "L1C" << "D1C" << "S1C"
     394     
     395      _header._obsTypes['R'] << "C1C" << "L1C" << "D1C" << "S1C"
    395396                             << "C1P" << "L1P" << "D1P" << "S1P"
    396397                             << "C2C" << "L2C" << "D2C" << "S2C"
    397398                             << "C2P" << "L2P" << "D2P" << "S2P";
    398    
    399     _header._obsTypesV3['E'] << "C1" << "L1" << "D1" << "S1"
     399     
     400      _header._obsTypes['E'] << "C1" << "L1" << "D1" << "S1"
    400401                             << "C5" << "L5" << "D5" << "S5"
    401402                             << "C6" << "L6" << "D6" << "S6"
    402403                             << "C7" << "L7" << "D7" << "S7"
    403404                             << "C8" << "L8" << "D8" << "S8";
    404    
    405     _header._obsTypesV3['J'] << "C1" << "L1" << "D1" << "S1"
     405     
     406      _header._obsTypes['J'] << "C1" << "L1" << "D1" << "S1"
    406407                             << "C2" << "L2" << "D2" << "S2"
    407408                             << "C5" << "L5" << "D5" << "S5"
    408409                             << "C6" << "D6" << "L6" << "S6";
    409    
    410     _header._obsTypesV3['S'] << "C1" << "L1" << "D1" << "S1"
     410     
     411      _header._obsTypes['S'] << "C1" << "L1" << "D1" << "S1"
    411412                             << "C5" << "L5" << "D5" << "S5";
    412    
    413     _header._obsTypesV3['C'] << "C1" << "L1" << "D1" << "S1"
     413     
     414      _header._obsTypes['C'] << "C1" << "L1" << "D1" << "S1"
    414415                             << "C6" << "L6" << "D6" << "S6"
    415416                             << "C7" << "L7" << "D7" << "S7";
     417    }
    416418  }
    417419
     
    489491  while (mItDump.hasNext()) {
    490492    t_obs& obs = mItDump.next();
    491     if (!_header._obsTypesV3.contains(obs.satSys) && !_header._obsTypesV3.contains(obs.satSys)) {
     493    if (!_header._obsTypes.contains(obs.satSys) && !_header._obsTypes.contains(obs.satSys)) {
    492494      mItDump.remove();
    493495    }
     
    602604  }
    603605
    604   const QVector<QString>& types = (_header._version > 3.0) ?
    605                           _header._obsTypesV3[obs.satSys] : _header._obsTypesV2;
     606  const QVector<QString>& types = _header._obsTypes[obs.satSys];
    606607  for (int ii = 0; ii < types.size(); ii++) {
    607608    if (_header._version < 3.0 && ii > 0 && ii % 5 == 0) {
  • trunk/BNC/src/rinex/rnxobsfile.cpp

    r6119 r6120  
    721721                             const QStringList& useObsTypes) {
    722722
    723   if (version >= 3.0) {
     723  if (version < 3.0) {
     724    _header._version = t_rnxObsHeader::defaultRnxObsVersion2;
     725  }
     726  else {
    724727    _header._version = t_rnxObsHeader::defaultRnxObsVersion3;
    725   }
    726   else {
    727     _header._version = t_rnxObsHeader::defaultRnxObsVersion2;
    728728  }
    729729  _header._interval        = header._interval;   
  • trunk/BNC/src/rinex/rnxobsfile.h

    r6119 r6120  
    4141
    4242 friend class t_rnxObsFile;
     43 friend class bncRinex;
    4344
    4445 public:
Note: See TracChangeset for help on using the changeset viewer.