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


Ignore:
Timestamp:
Apr 1, 2012, 4:27:17 PM (12 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

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

    r3757 r3758  
    101101////////////////////////////////////////////////////////////////////////////
    102102t_rnxNavFile::~t_rnxNavFile() {
    103   while (!_ephs.empty()) {
    104     t_eph* eph = _ephs.front();
    105     _ephs.pop();
    106     delete eph;
     103  for (unsigned ii = 0; ii < _ephs.size(); ii++) {
     104    delete _ephs[ii];
    107105  }
    108106}
     
    151149    }
    152150    if (eph && eph->ok()) {
    153       _ephs.push(eph);
     151      _ephs.push_back(eph);
    154152    }
    155153    else {
     
    163161t_eph* t_rnxNavFile::getNextEph(const bncTime& tt,
    164162                                const QMap<QString, int>* corrIODs) {
    165   while (!_ephs.empty()) {
    166     t_eph* eph = _ephs.front();
    167     bncTime ephTime(eph->GPSweek(), eph->GPSweeks());
    168     double dt = ephTime - tt;
    169     if (dt < 2*3600.0) {
    170       _ephs.pop();
    171       return eph;
    172     }
    173     else {
    174       return 0;
     163
     164  if (corrIODs) {
     165    QMapIterator<QString, int> itIOD(*corrIODs);
     166    while (itIOD.hasNext()) {
     167      itIOD.next();
     168      QString prn = itIOD.key();
     169      int     iod = itIOD.value();
     170      vector<t_eph*>::iterator it = _ephs.begin();
     171      while (it != _ephs.end()) {
     172        t_eph* eph = *it;
     173        if (eph->prn() == prn && eph->IOD() == iod) {
     174          it = _ephs.erase(it);
     175          return eph;
     176        }
     177        ++it;
     178      }
    175179    }
    176180  }
     181
     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//  }
     194
    177195  return 0;
    178196}
Note: See TracChangeset for help on using the changeset viewer.