Changeset 3764 in ntrip for trunk/BNC/rinex/rnxnavfile.cpp


Ignore:
Timestamp:
Apr 1, 2012, 6:52:25 PM (12 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

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

    r3758 r3764  
    162162                                const QMap<QString, int>* corrIODs) {
    163163
     164  // Get Ephemeris according to IOD
     165  // ------------------------------
    164166  if (corrIODs) {
    165167    QMapIterator<QString, int> itIOD(*corrIODs);
     
    180182  }
    181183
    182 //  while (!_ephs.empty()) {
    183 //    t_eph* eph = _ephs.front();
    184 //    bncTime ephTime(eph->GPSweek(), eph->GPSweeks());
    185 //    double dt = ephTime - tt;
    186 //    if (dt < 2*3600.0) {
    187 //      _ephs.pop();
    188 //      return eph;
    189 //    }
    190 //    else {
    191 //      return 0;
    192 //    }
    193 //  }
     184  // Get Ephemeris according to time
     185  // -------------------------------
     186  else {
     187    vector<t_eph*>::iterator it = _ephs.begin();
     188    while (it != _ephs.end()) {
     189      t_eph* eph = *it;
     190
     191      bncTime ephTime(eph->GPSweek(), eph->GPSweeks());
     192      double dt = ephTime - tt;
     193
     194      if (dt < 2*3600.0) {
     195        it = _ephs.erase(it);
     196        return eph;
     197      }
     198      ++it;
     199    }
     200  }
    194201
    195202  return 0;
Note: See TracChangeset for help on using the changeset viewer.